Archive

Posts Tagged ‘fusion’

Recreate VMDK descriptor with Fusion

March 14, 2017 Leave a comment

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.

Advertisements
Categories: vmware Tags: , ,