More About Vmdk Descriptor File

The VMware behavior on opening VMDK disk is:

Read the descriptor file, if it has magic bytes (“VMDK” or “COWD”) in first 4 bytes, it’s recognized as monolithic sparse disk, otherwise try to parse the file as a text file.

The text file is a VMDK descriptor file when the first option line (the line after leading comment lines and blank lines) gives the value of ‘version’. I.e. the line is in the form of ‘version=1′ or ‘version=2′ (only two values are recognized as tested).

No extra space or uppercase is accepted, except the cases of:

version=1<some spaces>

or

version=1<anything non-numeric>

are OK.

Following option and comment lines can be in any order, which has no effect on VMware’s opening and manipulating. But whenever there’s a modification from VMware (e.g. updating CID), the whole descriptor is regenerated with a fixed template, resulting in a format like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Disk DescriptorFile
version=1
CID=fffffffe
parentCID=ffffffff
createType="twoGbMaxExtentSparse"
# Extent description
RW 4192256 SPARSE "test-s001.vmdk"
...
# The Disk Data Base
#DDB
ddb.adapterType = "ide"
ddb.geometry.sectors = "63"
ddb.geometry.heads = "16"
ddb.geometry.cylinders = "10402"

Comments