How to shrink a VMware virtual disk (vmdk)

I tried to shrink the size of a VMware virtual disk by doing what I do with AIM/EC2/Xen images: use sdelete -c to clear the empty space on a drive. However, for VMware, this actually expands the size of the drive. It went from 2.7 gig to 4 gig.

So then I tried using VMware-vdiskmanager -k to shrink the drive. It did shrink but to only 3.8 gig.

If you've added then deleted a lot files from a VMware disk, how do you shrink it back down to its smallest size?


Solution 1:

The best way to do it is to use VMware Converter 4 to do a V2V while specifying a reduced disk size. Your mileage may vary depending on the type of OS - it's fine for Windows platforms - Linux support is relatively new.