Recreating Missing VMDK Descriptor Files!


A few times over the years VMDK files have been ‘lost’ when a customer has had to shutown their storage in a less than graceful fashion.

In every case so far, touch wood, it is only the desciptor files that have been deleted so the raw data is still present in the *-flat.vmdk file.

It is actually quite simple to rescue the situation you simply restore from backup. Ahaha what if you do not have a backup, then there is another way.

Firstly, identify the size of the *-flatvmdk file using putty or something similar. Once you know how big it is, 250GB for instance, either find another flat-vmdk file the same size or create a new one that size.

Once you have created or identified the 250GB *-flat.vmdk you’ll notice it has an accompanying *.vmdk file, run a cat against it, and you’ll notice something like this:

cat rescue_me.vmdk

# Disk DescriptorFile
version=1
CID=7131fc31
parentCID=ffffffff
createType=”vmfs”

# Extent description
RW 419430400 VMFS “rescue_me-flat.vmdk”

# The Disk Data Base
#DDB

ddb.virtualHWVersion = “4″
ddb.geometry.cylinders = “26108″
ddb.geometry.heads = “255″
ddb.geometry.sectors = “63″
ddb.adapterType = “lsilogic”
ddb.toolsVersion = “7201″

Now make a copy of this file to the folder that has the original *-flat.vmdk file:

cp rescue_me.vmdk /vmfs/volumes/mysan/rescued/rescued.vmdk

Using your favourite editor change the following line as below from:

RW 419430400 VMFS “rescue_me-flat.vmdk”

To:

RW 419430400 VMFS “rescued-flat.vmdk”

Obviously making sure that the name of the .vmdk file corresponds to the scis*:*.fileName field in the Virtual Machine vmx file.

You should now be able to power on the VM with all the original disks intact.

Clear as mud, I hope.

Bron: http://www.vm-aware.com

Advertisements

6 thoughts on “Recreating Missing VMDK Descriptor Files!

  1. um, if live near Saint Louis can I come by and give you a hug? you saved my a$$. THANK YOU!!

  2. Not realy, but when you are in the Netherlands, you’re welcome 😉

  3. God bless you. You solution helped me a lot.
    Thank you again.

  4. Cheers you saved me too!!!

  5. Thank you so much for the quick and simple solution you listed here. Worked like a charm!!

  6. This saved my test Lync Lab which was not backed up.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s