Tuesday, September 9, 2008

How to create new "VMDK" desciptor file


Strange issue with the VMDK descriptor file.


One the virtual machine was registered and powered on , but for some reason “vmx” file was missing. I thought I would create a “vmx” file using wizard. I unregistered the “VM” and then tried to create the “vmx” file using wizard. VM was got created but was not able to attached the disk file because “vmdk” descriptor file was missing. “Peewe” how the heck I should create the descriptor file .

  1. Tried using other descriptor file from other VM’s and removed the line something like this

RW 419430400 VMFS “rescue_me-flat.vmdk”


This did not work out because the other information like may not be correct.


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



I was not surprised with this. So I thought lets create a exact same size disk on some other host and copy over the descriptor file from that host to current host (Because current was not having enough space to create the new disk file).

This also did not work because I guess information is so encrypted that I was not able to find out what need to change. So how did I fix it?


  1. Power off some other VM’s (In order to free up some space).

  2. Once I have enough space create a new disk with same EXACT SIZE using the wizard at the same location where we are trying to create a descriptor file

(This step is very important I wasted my 2 hour to just figure this out)

  1. Now remove the newly created disk from the VM.

  2. Unregister the VM from the host.

  3. Copy the newly created “vmdk” file with the old name (For which we are trying to generate descriptor file).

  4. Edit the renamed “vmdk ” file and make sure the entry is pointing to correct flat file

E.g:

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

  1. Once the above steps are done then edit the vmx file and search for the line

E.G

scsi0:0.fileName = " rescue_me-flat.vmdk "

  1. Once all the above steps are done then re-register the file using following


Vmware-cmd –s register <path to vmx file>

I would like to thank Paul Shannon for his wonderful blog which really helped me to achieve what I wanted.







No comments: