If like me, you originally implemented some of your VMs in VMware Server (or Workstation) as thick provisioned, and have subsequently changed your mind, the process for converting them back to thin is very simple. In my case, the driver was the purchase of a couple of new SSDs, which obviously have a lot less space than my old 7200RPM SATA disks, but the performance is obviously significantly better.
The process of migrating to a new datastore and shrinking / converting the VMDK files to thin provisioned, is as follows:
- Create your new datastore directory on the new drive and specify the location in VMware Server (if required), e.g.
D:\VMs - Create a new directory for the VM to be migrated, e.g.
D:\VMs\TestVM - Run the following command:
“<path-to-vmware-install>\vmware-vdiskmanager” -r “<old-ds-path>\<VM-Name>.vmdk” -t 0 “<new-ds-path>\<VM-Name>.vmdk”
e.g.
“C:\Program Files (x86)\VMware\VMware Server\vmware-vdiskmanager” -r “C:\VMs\TextVM\TextVM.vmdk” -t 0 “D:\VMs\TextVM\TextVM.vmdk” - The VM will be converted and copied to the new location with no risk to the original file.
- Copy the remaining files from the original datastore location (minus the VMDK / vmdk-flat of course).
- Remove the old VM from your VMware Server/Workstation inventory (don’t delete the originals until you have tested the new VM!).
- Add the VM back into VMware Server / Workstation using the new datastore location, and start it up, specifying “I moved it” when prompted.
- Sit back and enjoy the extra space!
Note the same process will work for converting VMDK files between all file types, by simply replacing -t 0 with your preferred option from the list below:
0 : single growable virtual disk
1 : growable virtual disk split in 2GB files
2 : preallocated virtual disk
3 : preallocated virtual disk split in 2GB files
4 : preallocated ESX-type virtual disk
5 : compressed disk optimized for streaming
I came across a very irritating issue today. When doing an import of HD videos using Panasonic’s HD Writer AE, it automatically puts all the files into folders named with a format DD-MM-YYYY (47 of them!).