how to re-construct disk descriptor file?

how to re-construct disk descriptor file?

as you know, every vmdk consists of 2 files, one is xxxx.vmdk, the other is xxxxx-flat.vmdk.

the former is disk descriptor file, the later is the disk include the real data.


if for some reason, user delete the  descriptor file, how to restore it from the xxxxx-flat.vmdk?


Just use the VI client to reattach the file back to the VM.


You can restore it from the log and you can restore it by "calculating" its contents.


your method does not work, if there's only flat file without the  descriptor file, when vi client browse the directory, it will display no  vmdk files.


agree with you, can you provide the detail approch how to do this.

i read the ppt from TSX 2007, "top support issues and how to solve them,  part 2", it says use "grep -i rw xxxx.vmdk" to get the size, but when i  use it, nothing useful displayed.


Oh right I see what you mean. The following steps will guide you to recreate your vmdk's:

  1. Determine the hard disk sizes of your original VM  - this information should be in the logs files mentioned by previous poster.
  2. Create a new VM with the same number of hard disks as your old VM, and the exact same sizes  using the log info.
  3. Once created, use Putty or some tool to navigate to the directory of new VM.
  4. Copy the newly created vmdk files to your existing directory
  5. Edit the new VMDK's with the existing flat.vmdk file names.
  6. Load the VM in your VirtualCenter. You should now be able to add the flat.vmdk to your VM


Thanks for the post. Apologies for not reading your original post more closely.


thank you and your method is very easy to understand and implement. i  successfully do a test, let me add some notes to your steps.

1. Determine the hard disk sizes of your original VM - this  information should be in the logs files mentioned by previous poster.

just use ls -l to determine the disk size, in my example, i have 2 disks, one is 6457893888 bytes, the other is 5368709120

2. Create a new VM with the same number of hard disks as your old VM, and the exact same sizes using the log info.

when you create a new VM, the key is disk size and guest os type. the  guest os type you can get it from vmware.log, or you can ask the user  who use it.

for disk capacity, just use the size get from step 1, and divide it with  1024*1024*1024, for  6457893888, the result is:6158.7275390625

for  5368709120, the result is just 5. notice the unit is MB, so type the exact value in the input box.

3. Once created, use Putty or some tool to navigate to the directory of new VM.
4. Copy the newly created vmdk files to your existing directory

this should be: copy the vmdk flat files in your existing directory to the newly created VM dir
5. Edit the new VMDK's with the existing flat.vmdk file names.
6. Load the VM in your VirtualCenter. You should now be able to add the flat.vmdk to your VM


just power on the VM in virtualcenter

This document was generated from the following thread: how to re-construct disk descriptor file?

Version history
Revision #:
1 of 1
Last update:
‎03-29-2008 07:48 AM
Updated by: