How to reclaim size of a thin provisioned vmdk file in ESXi 5.0?


When we use thin provisioned vmdk, the size of the vmdk expands as we pile up data in the OS. But if we delete some data from OS, the reclaimed space in the OS will not be reclaimed from the vmdk. It will continue to occupy the maximum space it have ever used after creation.


There is no resolution to reduce the size using vSphere client. For this you may need to seek the help of putty or cli.

- Login to the ESXi using putty
- Browse to the vmdk location (eg: cd vmfs/volumes/datastore1/VMname
- List the available vmdk files in this location using the command:

          ls –lh *.vmdk
      - To know the actual size occupied by the vmdk file
         du –h *.vmdk
- To shrink the size of the vmdk file

         vmkfstools -K AD01.vmdk

- Re check the actual size of vmdk now. You will see the difference !!!


  1. is there any chance of losing the data if we shrink the vmdk file?
    thanks in advance!


Post a Comment

Popular posts from this blog

VMware and Windows Interview Questions: Part 2

VMware and Windows Interview Questions: Part 3

VMware vMotion error at 14%