How to Convert a VMware Pre-allocated Virtual Disk to a Growable Virtual Disk


he vmware-vdiskmanager tool

The VMware Disk Management Tool is a command line tool which is installed by default with VMware Server. The executable file is named vmware-vdiskmanager and is located in \Program Files\VMware\VMware Server on Windows hosts, and /usr/bin on Linux systems.
The tool accepts a number of command-line arguments, a full listing of which can be obtained by running vmware-vdiskmanager with no options.

Virtual Disk Types

The type to which a virtual disk is to be converted is specified using the -t flag, together with the target disk type. This is represented by a number as outlined in the following table:
Type Identifier
Growable (single .vmdk file)
1 Growable (multiple 2GB files)
2 Pre-allocated (single file)
Pre-allocated (multiple 2GB files)
4 Pre-allocated ESX
5 Compressed for streaming

Performing the Virtual Disk Type Conversion

The vmware-vdiskmanager command requires a number of arugments perform a virtual disk type conversion. The syntax for a type conversion is as follows:
vmware-vdiskmanager -r .vmdk -t  .vmdk
where .vmdk is the name of the virtual disk image file to be converted,  is the number from the above table indicating the target virtual disk type, and .vmdk is the name of the new, converted file.
For example, to convert a virtual disk image file called win2008-1_2.vmdk to a growable disk called new.vmdk the following command would need to be executed:
vmware-vdiskmanager -r  win2008-1_2.vmdk -t 0 new.vmdk

Creating disk 'new.vmdk'
Convert: 100% done.
Virtual disk conversion successful.
Once the conversion is completed, the virtual machine will need to be configured to use the converted disk, or the new disk renamed to have the name of the original disk.