This is a trick I use to squeeze a .vmdk file for a guest VM on ESX.
The process is pretty straight forward. What is good with it, that you do not need to shut down the guest machine (if you have VMotion, of course ;o))
- Delete all files you do not need, empty recycle bin and defragment all the drives on guest machine
- Run SDelete to clean up the free space on all the drives. Use SDelete -c X:\ and do not forget about backslash after colon. Otherwise you’ll get the error: Could not determine disk cluster size
- In VI center right click on the machine and select Migrate
- Select Change Datastore -> select storage -> Thin Provisioned Format
No, the disk size visible from Windows will not be changed. However, the .vmdk file will be converted to a thin provisioned format and will be squeezed to the size the data really take