Yes, I know, many of you now said “Misha is going to talk about Shrink”. You know what, you pretty true, but ...
Everybody knows What the "shrink" does. Shrink removes an empty space from .VMDK file.
However, the problem is this: What is empty space?
When Windows deletes a file, it doesn't actually delete the data on the disk, it just deletes the references/pointers in the file allocation table. So when “Shrink” is processing a vmdk and is looking at the raw disk, it's seeing values that aren't empty (non-zero), and exports them as such.
You can easily test this out. Create a new vmdk on a VM. Export the VMDK right after you've created it. The exported files will be very small. Now fill the vmdk up with files and export; it will be very big. Now, delete all the files in the vmdk and export; it'll still be big! If you will try to do a "Shrink", you will see that the vmdk file is still big.
So, before doing a Shrink, I’m always using a really cool command line tool developed by Mark Russinovich, SDelete. Simply, execute SDelete with parameter -c inside running Virtual machine, then shut down the Guest and do a Shrink.
Last note. Just in case you forget how to do a shrink ;). From command line go to C:\Programme\VMware\VMware Server\ and execute the vmware-vdiskmanager.exe as shown in following example:
"C:\Programme\VMware\VMware Server\vmware-vdiskmanager.exe" -k "ITSTUFF-SRV-1.vmdk"
If you enjoyed this post consider subscribing via or Email