VMWARE: Converting Multiple VMDK files into one

VMware supports both growable and pre-allocated virtual disks. In addition, the disks can be specified to be contained in a single file, or divided into multiple 2GB files

I recently had to work on some older VMs and thought it would be a good idea to do some housekeeping. Renaming the machines and vmdk files to a more meaningful name and also consolidating multiple 2GB file into a single one.

All these tasks can be done in one single step using the VMware Disk Management Tool

The VMware Disk Management Tool is a command line tool which is installed by default with VMware Workstation or Server.
The executable file is named vmware-vdiskmanager and is located in the VMWare program directory on Windows hosts, and /usr/bin on Linux systems.

To convert multiple VMDKs into a single file, I used the following command (Windows 2000 Server-cl3.vmdk is the name of the first VMDK file – i.e. the one attached to the VM):

vmware-vdiskmanager -r “Windows 2000 Server-cl4.vmdk” -t 0 win2003-32.vmdk

The above operation takes a while, but not too long. It shows its progress as it completes.

Next, you can configure your VM to use the new VMDK file and delete the obsolete files from the disk.