Recreating the descriptor file from a .vmdk file

There are times, that either due to a poorly deleted snapshot or an unexpected shutdown of the VM the .vmdk of the same is corrupted losing the information of the VM. “configuration” and leaving us the raw virtual hard drive; normally, mydisco-flat.vmdk

If this situation happens to us, The most likely thing is that the virtual machine will give us the error “File not found” When trying to start. The procedure to follow is to recreate the descriptors() of the virtual disk(s).

You have to follow it step by step:

– The first thing is to determine the error from the virtual machine itself, -flat.vmdk disk size using putty or some other application.

– After that, We create one of the same size and features, Let's imagine that the size of the flat.vmdk is 250Gb and we call it salvage.vmdk

– About the HOST, we execute the CAT command on salvacion.vmdk that will return the descriptor

Cat Salvation.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"

– At this time, We copy this file to the location of our -flat.vmdk file

cp salvacion.vmdk /vmfs/volumes/MILUN/MIVM/salvado.vmdk

– Finally, we modify the following line with the editor we choose:

RW 419430400 VMFS "salvation-flat.vmdk"

By:

RW 419430400 VMFS "bran-flat.vmdk"

As you can understand, each one should use the names of the .vmdk file of their VMs.

Once the procedure has been performed, You can turn on the machine again or create a new one by playing the saved discs.


Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!

Installing VMware ESX 4.0

25 June de 2009