VMFS Recovery
Recovers data from VMware ESXi servers

How to recover missed VMDK descriptor file



Contents




Structure of VMDK files


There are two formats of VMDK files used by VMWare: an ESX type and a local type. The latter is used by VMWare Player, Fusion, and Workstation. These types are distinguished mostly by small text description that is either included into a binary file or is inside a separate text file at the same folder. VMWare uses these text settings to describe the parameters of the physical drive. Basically, they correspond to parameters that are used on HDDs and determine cylinders, heads sector size, and their count. There are also links to snapshots, software ESX\ESXi RAID linkage, and other stuff.

The difference between these two: an ESX type VMDK file always has another VMDK file with the same name but without “-flat” or “-delta” endings. It contains text data in INI-like format that describes disk parameters.

Please see a sample below:

# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=fffffffe
parentCID=ffffffff
isNativeSnapshot="no"
createType="vmfs"

# Extent description
RW 83886080 VMFS "VM-flat.vmdk"

# The Disk Data Base
#DDB

ddb.adapterType = "lsilogic"
ddb.geometry.cylinders = "5221"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.longContentID = "7ed9bde6bd0e9d3c78369865fffffffe"
ddb.thinProvisioned = "1"
ddb.uuid = "60 00 C2 99 d3 f5 dc ad-9e 25 3e 89 48 2c 3f de"
ddb.virtualHWVersion = "11"

VMDK that is used on a local machine has this information included in its header.

Sample:

VMDK with descriptor block highlighted


Re-creating a VMDK descriptor file


If VMDK descriptor is missed, there is a simple way to recreate it:

  • 1. You need to create a virtual disk of the same size as the one with a missing descriptor. It’s required to obtain the correct values for disk cylinders, sectors, and heads. Use standard Vsphere features and make sure you have set it as thick provisioned.

  • 2. Open descriptor VMDK in a text editor and edit string with a path to -flat.vmdk. In the sample above it is called

    # Extent description
    RW 83886080 VMFS "VM-flat.vmdk"

  • Type a name of VMDK with a lost descriptor here(value marked red). You need both files in the same directory. It is possible to enter a full path into this value to separate -FLAT.VMDK and its descriptor. However, I doubt it may have any sense, as descriptor occupies only a couple of kilobytes of disk space.

  • 3. Copy new vmdk descriptor file to the -flat.VMDK and rename it to match -flat.VMDK. Do not forget to remove “-flat” or “-delta” from the name of the descriptor.



PS

Do not forget to use a 3-rd party SSH client as a file browser. Remember that vSphere doesn’t display vmdk with descriptors.




Return to contents