Here are the steps to convert a thick VMDK file to thin.  Steps 2-4 are optional, but if you want to shrink it down as small as possible then don’t skip them!

  1. Evaluate how much space you have on the datastore.  You will be creating 2 copies of the .vmdk file before we’re all done, so don’t fill up the datastore and crash all the VMs!
  2. Within the VM run a defrag of the disk. (this is optional but recommended)
  3. Download MS Windows Sysinternals ‘SDelete’ exe to the VM: 
  4. Run ‘sdelete -c’ on the the disk.  This will zero out unused space.
  5. Power offthe VM and make a note of what what datastore(s) the virtual disks are on and what they are named.
  6. SSH in to (or go the console of) the ESXi host and go to the path where the .vmdk files are.  (Somewhere under /vmfs/volumes/ )
  7. Convert the original thick .vmdk into a 2GBspare one:
    vmkfstools -i SERVERNAME.vmdk -d 2gbsparse SERVERNAME-temp.vmdk
    (This will clone the file while shrinking it down)
  8. Now convert it again from the 2gbspare temp .vmdk to a thin disk.  (If you convert straight to a thin disk and skip the 2gbsparse conversion it will not shrink!)
    vmkfstools -i SERVERNAME-temp.vmdk -d thin SERVERNAME-thin.vmdk
  9. Now edit the settings of the VM and detach the thick drives and attach the thin drive(s).  Boot the VM and make sure everything is working.
  10. Delete the thick and temp 2gbspare .vmdk files.
  11. Profit