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.
Info | ||
---|---|---|
| ||
https://knowledge.broadcom.com/external/article/340005/reclaiming-disk-space-from-thin-provisio.html |
Step-by-step guide
Back up the VM.
Warning title Make a Backup! Since we are modifying the VMDK files, make a good backup of the entire VM folder in case something happens.
- Download SDelete from SysInternals (Microsoft).
Zero the free space on the affected drive.
z C:Code Block language text sdelete.exe -
z C:
Info If the VM has more than one drive letter, substitute the drive letter affected, or all of them if they are in the same VMDK.
- Power off the VM.
SSH into the ESXi host.
Info SSH is usually disabled on ESXi hosts. Enable it for this procedure, then turn it back off again for security reasons.
- CD into the VM folder.
- cd /vmfs/volumes/DATASTORE_NAME/VM_NAME
- Run the cleanup command.
vmkfstools -K disk_name.vmdk
Info The file used here is descriptor file .vmdk file not the data file -flat.vmdk
- Verify disk size has decreased.
- Power on the VM and return to normal operation.
...
Page properties | ||
---|---|---|
| ||
|