VMware vSphere ESXi (all versions)
1. Ensure the VM is not running on snapshots
2. Zero unused blocks on the Linux guestOS:
This may be achieved using a guest level utility, if available, or via dd command:
dd if=/dev/zero of=/<mounted-volume>/zeroes rm -f /<mounted-volume>/zeroes
where <mounted-volume> is the name/path to the volume:
Note: the dd command will create a file of zeroes named "zeroes" which consumes all free space on the disk. This causes the thin disk to inflate to its full provisioned size. The file is then deleted.
3. Power off the VM and, via SSH to the ESXi host, run:
vmkfstools --punchzero /vmfs/vo/umes/<datastore>/<VmName>/<Name>.vmdk
where /vmfs/vo/umes/<datastore>/<VmName>/<Name>.vmdk is the full path to the vmdk. (The command is run against the descriptor file, not the -flat.vmdk file)
Note: The time to complete the process will vary with the size of the disk and number of blocks to be reclaimed.