In Esxi 6.0, I create a vm in NFS store, every virtual disk of the vm has disk_name.vmdk and disk_name-flat.vmdk.
disk_name.vmdk:
# Disk DescriptorFile
version=3
encoding="UTF-8"
CID=164e2cb0
parentCID=ffffffff
isNativeSnapshot="no"
createType="vmfs"
# Extent description
RW 8388608 VMFS "disk_name-flat.vmdk"
# The Disk Data Base
#DDB
ddb.adapterType = "lsilogic"
ddb.deletable = "true"
ddb.geometry.cylinders = "522"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.longContentID = "2cd42eda8ae3ff5540338b8f164e2cb0"
ddb.thinProvisioned = "1"
ddb.uuid = "d7 07 97 90 a3 6a 48 30-a0 fc d9 55 b9 6d ba 1f"
ddb.virtualHWVersion = "11"
I find https://www.vmware.com/support/developer/vddk/vmdk_50_technote.pdf , vmdk file format is discribled.
But I find my disk_name-flat.vmdk is inconsistent with pdf file.
The beginning of the disk_name-flat.vmdk is zero bit.
But in vmdk_50_technote.pdf , the beginning of the file may be ESXi Host Sparse Extent Header, why?
My real purpose is to get valid data on disk by parsing the contents of the vmdk file , I hope someone can help me, thanks very much!
Flat.vmdks are not virtual disks - they dont use a header like VMFSsparse, Sesparse or Workstation VMDK sparse types.
Treat them like dd images instead.
Thank you very much.
I suppose the flat.vmdk can be prased accord to virtual disk format 5.0 specific, and I can get the valid disk blocks offset (really used by vms), so I can only backup this valid disk blocks. If the flat.vmdk can not be prased . I think I can use vddk 6.7 QueryAllocatedBlocks interface or vsphere api QueryChangedDiskAreas to get disk valid block offset.
Is there any other way to try ?
Forget parsing flat.vmdks.
To develope a backup tool look into ctk.vmdks.