Skip to content

Shrink a thin provisioned VMDK disk

March 17, 2014
tags: ,

ref: http://miketabor.com/shrink-thin-provisioned-vmdk-disk/

sdelete.exe -z [DRIVE:]

Power off the VM and SSH into your ESXi host and navigate to the VMDK’s datastore -> directory and check the VM’s current size by typing:
Check virtual disk size:

ls -lh *.vmdk

 

Check actual size:

du -h *.vmdk

Now we’ll punch all the zeroed blocks out of the VMDK file by typing, replacing [DISK] with the name of the VM VMDK file:

vmkfstools –punchzero [DISK].vmdk

Once complete, again check the size by repeating step 2. If all went well you should now have a smaller VMDK file and newly reclaimed space!

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: