Archive

Archive for September, 2012

How to Shrink a Thin VMDK on ESXi 5.0

September 6, 2012 28 comments

I always like to keep my template small.  This means the files inside the VM, but the size of the VMDK as well.  The reason for this is that I often need to download the VM to USB storage of whatever and transfer it to remote sites.

 

So I wanted to shrink my VMDK size as much as possible.  After cleaning up the VM itself and running sdelete, it’s time to shrink the VMDK.

 

First let’s review the actual usage of it:

The virtual disk size can be seen with ls –lh *.vmdk.  In my example, I have a 40 GB virtual size.

image

To see the ‘real’ size of the vmdk, run du –h *.vmdk.  This gives us a 36 GB size (while the VM itself actually uses about 10 GB).

Read more…

Advertisements