Comment Dissection of a vmdk - 01/8/09
Okay so I’m WAY late on this post, but it’s my site, so that’s OK.
Today’s post is going to examine the components of a vmdk. A virtual machine’s VMDK is made up of two files – a binary file (In conversation I refer to this as the flat-VMDK), and a text file (text-VMDK). Together these files define the hard disk of a virtual machine; one pair of files per hard drive.
On ESX, it is a safe assumption that the flat-VMDK is a thickly provisioned file. That means however large you define the disk to be, that is how big the file will be – from the get go. By default ESX creates “zeroedthick” disks, in other words: a disk that occupies all allocated space immediately, and this space is zeroed out (but not immediately). If you are using iSCSI or Fibre Channel storage (VMFS) – this is your best bet, and is all that is “officially supported”. There are a couple other “thick” options, that zero the space immediately, or don’t zero it at all.
Another option that you may consider using, or encounter is “thin”. This is the default for virtual machines created on NFS storage.
Some other options that exist:
- 2gbspare – a disk that is more or less thinly provisioned, with multiple flat components, each with a maximum size of 2 GB
- rdm/rdmp – Raw disk mapping. Allows you to assign a VM raw physical disk space. If you are running ESX 3.5, I would suggest checking out NPIV instead.
I can’t go into to much detail regarding RDM as I have never worked with it, but it’s there if you want it.
Now time to look at the text-VMDK.
Here is an example from one of my hosts
# Disk DescriptorFile
version=1
CID=e39002c2
parentCID=ffffffff
createType=”vmfs”# Extent description
RW 104857600 VMFS “florida_1-flat.vmdk”# The Disk Data Base
#DDB
ddb.toolsVersion = “7302″
ddb.virtualHWVersion = “4″
ddb.uuid = “60 00 C2 93 54 19 90 f8-f1 8f 7b 25 7b 72 e2 3a”
ddb.geometry.cylinders = “6527″
ddb.geometry.heads = “255″
ddb.geometry.sectors = “63″
ddb.adapterType = “lsilogic”
ddb.thinProvisioned = “1″
There is a lot of information packed into this tiny little file, rather than bore you with all the details, I’ll cover what you should know.
First of all there is the CID- this line is a unique identifier for the flat-vmdk this text file describes. For machines that do not contain a snapshot, or no using sparse VMDKs, it’s just a piece of information (more on that when I talk about deltas tomorrow – I promise).
Next there is the parentCID- if this is the base VMDK, it will always be ffffffff, if it is a child VMDK the value of the field will be the CID of the next VMDK in the chain (more on this tomorrow).
The rest of the file contains information to describe to ESX how to present the disk geometry wise and other fun stuff to the Virtual Machine.
Tomorrow I’ll do a brief explanation of Delta vmdks, and how the ESX assembles a chain of VMDKs.

