Home > vmware > Recreate VMDK descriptor with Fusion

Recreate VMDK descriptor with Fusion

If you have a VMDK flat file but are missing the descriptor file (or you renamed the flat file), you will need to regenerate it.  This can be done on an ESX host, but if you have VMware Fusion, you can also do with with the vmware-vdiskmanager CLI tool included with the product.

Get the size of the VMDK that is missing a descriptor:

ls -l /path/to/some/disk-image.vmdk

Make a new empty disk image near the .vmdk, which will create the descriptor file as well.  Be sure to use a different directory so as not to overwrite the existing .vmdk:

/Applications/VMware Fusion.app/Contents/Library/vmware-vdiskmanager -c -s 1GB -a lsilogic -t 4 /path/near/my/disk-image.vmdk

-c – creates a new disk

-s – size is 1 GB

-a – type of adapter.  If connecting to a SCSI controller, you’ll need lsilogic.

-t – type of disk.  If it’s a thick provisioned ESXi / vSphere disk image, this should be 4.

This will create the .vmdk (descriptor) as well as a new -flat.vmdk (the actual disk image). You can copy the descriptor next to your original disk image and discard the new -flat.vmdk file since it’s not really needed.

Categories: vmware Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: