If the space on disk is larger than expected, you can reclaim space on your thin provisioned VMDKs to free up local space in the datastore.

Step-by-step guide

Add the steps involved:

  1. Back up the VM.

    Since we are modifying the VMDK files, make a good backup of the entire VM folder in case something happens.


  2. Download SDelete from SysInternals (Microsoft).
    1. https://docs.microsoft.com/en-us/sysinternals/downloads/sdelete
  3. Zero the free space on the affected drive.
    1. sdelete.exe -z C:
  4. Power off the VM.
  5. SSH into the ESXi host.
  6. CD into the VM folder.
    1. cd /vmfs/volumes/DATASTORE_NAME/VM_NAME
  7. Run the cleanup command.
    1. vmkfstools -K disk_name.vmdk

      The file used here is descriptor file .vmdk file not the data file -flat.vmdk


  8. Verify disk size has decreased.
  9. Power on the VM and return to normal operation.


Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.



Related issues