Every VMDK disk is described by a short text file, the descriptor. It is either a
.vmdk file of its own, next to the extent files that hold the data, or it is
embedded in the first sectors of a sparse
extent. It has three parts: a header, the extent lines, and the disk database. This
page follows the libvmdk project’s description of the format, which builds on VMware’s
Virtual Disk Format technical note.
Syntax
Lines end with a line feed; lines starting # are comments. Keys and
values are written key = value, with strings in double quotes. A
descriptor normally starts with the comment # Disk DescriptorFile.
# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=7d1b4b6c
parentCID=ffffffff
createType="monolithicSparse"
# Extent description
RW 41943040 SPARSE "disk.vmdk"
# The Disk Data Base
#DDB
ddb.adapterType = "lsilogic"
ddb.geometry.cylinders = "2610"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.longContentID = "0fd9dc5bb0e6b7b3e5f81b3a7d1b4b6c"
ddb.uuid = "60 00 c2 9a 4b 1e 5f 7d-87 31 0a 6e 2c 9b 3e 11"
ddb.virtualHWVersion = "21"
Header keys
| Key | Meaning |
|---|---|
version | Descriptor version, 1 to 3. Version 3 adds change tracking (changeTrackPath). |
encoding | Character set of the descriptor: UTF-8 by default. libvmdk lists windows-1252, Shift_JIS, GBK and Big5 (assumed equal to Windows code pages 1252, 932, 936 and 950) and notes that which encodings are supported is unknown. |
CID | Content ID: a random 32-bit number in hex, changed when the disk is first written after being opened. |
parentCID | The parent’s content ID when this disk was made from it; ffffffff means no parent. |
isNativeSnapshot | no in the files seen. |
createType | How the disk is stored: see create types. |
parentFileNameHint | The parent’s descriptor file name, for a child (delta) disk. |
changeTrackPath | The change-tracking file (-ctk.vmdk) used for incremental backup. |
Create types
| Value | Storage |
|---|---|
monolithicSparse | One growing sparse file, with the descriptor embedded. |
monolithicFlat | One fully allocated flat file plus a separate descriptor. |
twoGbMaxExtentSparse (also 2GbMaxExtentSparse) | Sparse extent files of at most 2 GB each (-s001.vmdk, -s002.vmdk…). |
twoGbMaxExtentFlat (also 2GbMaxExtentFlat) | Flat extent files of at most 2 GB each (-f001.vmdk…). |
streamOptimized | One compressed sparse file written in a single pass, for OVF/OVA packages and transfers. |
vmfs | ESX: a flat extent on a VMFS volume (-flat.vmdk). |
vmfsThin | ESX: a thin-provisioned extent on VMFS. |
vmfsPreallocated | ESX: a preallocated extent. |
vmfsEagerZeroedThick | ESX: preallocated and zeroed in advance. |
vmfsSparse | ESX: a sparse (snapshot delta) extent in the COWD format. |
vmfsRaw | ESX: a raw device. |
vmfsRDM (vmfsRawDeviceMap) | ESX: a raw device mapping. |
vmfsRDMP (vmfsPassthroughRawDeviceMap) | ESX: a pass-through raw device mapping. |
fullDevice | A whole physical disk. |
partitionedDevice | Partitions of a physical disk. |
custom | Any other arrangement of extents. |
Extent lines
One line per extent, in disk order:
ACCESS SIZE TYPE "FILENAME" [OFFSET].
| Part | Values |
|---|---|
| Access | RW read and write, RDONLY read only, NOACCESS no access. |
| Size | The extent’s size in 512-byte sectors. |
| Type | FLAT raw data; SPARSE a sparse extent (KDMV); ZERO reads as zeros, no file; VMFS a flat extent on VMFS; VMFSSPARSE a COWD sparse extent; VMFSRDM and VMFSRAW raw device mappings; SESPARSE the space-efficient sparse format of newer ESXi (not publicly documented). |
| File name | In quotes, relative to the descriptor. Not present for ZERO. |
| Offset | For flat extents only: the sector in the file where this extent’s data starts. |
Disk database
After a #DDB comment, keys starting ddb., all with quoted
values.
| Key | Meaning |
|---|---|
ddb.adapterType | The emulated controller: ide, buslogic, lsilogic or legacyESX. |
ddb.geometry.cylinders, .heads, .sectors | The disk geometry the guest sees. |
ddb.geometry.biosCylinders, .biosHeads, .biosSectors | The BIOS geometry, for physical device disks. |
ddb.virtualHWVersion | The VMware virtual hardware version that made the disk. |
ddb.toolsVersion | The VMware Tools version installed in the guest. |
ddb.uuid | A 128-bit UUID, written as 16 hex bytes separated by spaces with a hyphen in the middle. |
ddb.longContentID | A 128-bit content ID in hex, without spaces. |
ddb.deletable | true when the disk may be deleted with its virtual machine. |
ddb.thinProvisioned | 1 for a thin-provisioned disk. |
Programs add other ddb. keys; readers ignore those they do not know.