Shrink VMDK File
- Power off the Virtual Machine, or disconnect the virtual Disk you want to shrink
- Connect to the ESXi Host with SSH
- Navigate to the Virtual Machine Folder
- Verify disk usage with du
- Run vmkfstools -K [disk]
- Verify disk usage with du
root@esx3:/vmfs/volumes/ds1/vma $ du -h vma_1-flat.vmdk
7.9G vma_1-flat.vmdk
root@esx3:/vmfs/volumes/ds1/vma $ vmkfstools -K vma_1.vmdk
vmfsDisk: 1, rdmDisk: 0, blockSize: 1048576
Hole Punching: 25% done.
root@esx3:/vmfs/volumes/ds1/vma $ du -h vma_1-flat.vmdk
1.9G vma_1-flat.vmdk
No comments:
Post a Comment