I located the vmware-vdiskmanager.exe at C:\Program Files (x86)\VMware\VMware Workstation and ran the command (-k is for shrinking a vmdk):
vmware-vdiskmanager.exe -k d:\MyVM\MyVeryLargeDisk.vmdk
Shrinking began, and I thought I was in the home straight now. On the first of the 9 vmdk files, the shrinkage was extremely poor (your mileage may vary). It only shrink about 2%. I tried this on the remaining vmdk files and the result was the same. Shrinking had not solved my problem, and in my case the overall VM reduced from 240BG to 235GB. I have no idea why shrinkage was so ineffective, especially as I knew I had a good 30% of free space within the VMs themselves. Plan B.
Since my D drive was preallocated at 50GB, there was 1 nice file of size 52,428,800kBs (50 x 1024 x1024). I need to convert my ballooned C drive into a prealloacted drive. I tried the follow command:
vmware-vdiskmanager.exe -r d:\MyVM\MyVeryLargeDisk.vmdk -t 2 d:\MyVM\newsmallerdisk.vmdk
The console app started ...
..."Creating disk 'd:\MyVM\newsmallerdisk.vmdk'" ...
And eventually (after about 3 hours on a SATA drive)
Convert: 100% done.
Virtual disk conversion successful.
Last steps were to :
- go into VMware Workstation
- open the VM (not power on)
- remove the non-preallocated hard drive
- add the new pre-allocated hard drive (newsmallerdisk.vmdk)
- Save and Start.
Done. I could then backup and delete those remaining old 9 vmdk files and happy days. Moved everything back to my modest SSD.
PS - some of those options like "-t 2" ... related to the disk type:
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
6 : thin provisioned virtual disk - ESX 3.x and above