- shrink HDD using windows disk management.
- connect to host using SSH
- turn off windows computer
- cd /vmfs/volumes/<datastore name>/<VM foldername>
- use cat “VM name.vmdk” (not the flat one) to make a note of the RW number#
- calculate new size 128GB= 128 * 1024 * 1024 * 1024 /512 = 268435456
- vi “VM name.vmdk” replace RW with the new number
- vi edit shift I is to edit text; ESC to end editing; exit and save changes shift :x; shift:q! is to exit without changes
- use vSphere to migrate or move VM to a temporary host (this will resize the HDD to the new size)
- be patient depending on the HDD size it can take some time
- verify size in temporary location using vSphere
- move back to original location
Links:
https://www.experts-exchange.com/articles/12938/HOW-TO-Shrink-a-VMware-Virtual-Machine-Disk-VMDK-in-15-minutes.html