Decrease VMDK ???

July 4, 2019

Yes, We can decrease VMDK ( VMware Virtual Machine Disk ) if somehow it got increased more, the steps are :-

1. Make sure unallocated space is there at OS end , if not shrink the Disk from OS end as per your need.

2. Login on ESXi Host with SSH via Putty session

3. Go to datastore with cmd.

# cd /vmfs/volumes/datastoreName/VMFolder/

4. Now you need to identify VMDK Descriptor file for which you want to reduce size >> Note down size in-front of RW for “flat.vmdk”

# Cat VMName.vmdk

5. Edit descriptor file (.VMDK)

# vi VMName.vmdk

6. Change no. as you need space (in front of RW)

For Example disk size is 125GB and you need only 60 GB disk then calculate like this:-

# 60*2097152=125829120
# 60*1024*1024*1024/512=125829120

7. Save Descriptor file (.VMDK) with :wq!

8. Migrate VM from one host to another host.

9. Validate VMDK Size on Summary tab of VM

10. Validate Disk Size at OS end too.

, That’s it 🙂

Only registered users can comment.

Leave a Reply

Your email address will not be published. Required fields are marked *