Archive

Posts Tagged ‘vmdk’

Consolidating Multiple VMware VMDK Disk Files into One

October 29th, 2011

I have a lot of VMWare machines lurking in my storage.  For whatever reason that made sense at the time, I created them with disks that were split into multiple files.  I didn’t know this until recently, you can actually consolidate all of them into a single file without breaking the VM.  I want to do this anyway, since I have heard somewhere that it can improve performance especially on non SSD mechanical drives.

In command prompt, navigate to where you have VMWare installed.  For me it was

C:\Program Files (x86)\VMware\VMware Workstation

In that folder you can use the vmware-vdiskmanager.exe program to perform this operation

vmware-vdiskmanager -r MyVirtualMachineDisk.vmdk -t 0 SingleDiskFile.vmdk

Replace MyVirtualMachineDisk.vmdk with the full path and file name of the first file of your split VMware disk set.

The “-t 0” means to turn it into a “single growable virtual disk“.  If you would rather pre-allocate all the storage for the disk, use “-t 2” instead, which means “preallocated virtual disk.

You can view more command line options by running the vmware-vdiskmanager.exe with no parameters.

After the operation is complete, you will want to delete the original VMware disk set.  Then rename the output SingleDiskFile.vmdk file to whatever the original name was for the first file of your original VMware disk set.  Also make sure it is moved to the same folder where the original files were before so that the VMWare machine can find it again when it is started back up.

VMWare , , , , ,