VMWare shrink *nix / OS X virtual disk (VMDK)

It’s quite easy to shrink dynamic disk files in VMWare – just go to VM Settings -> select the desired disk -> Utilities -> Compact or use command line tool vmware-vdiskmanager. You’ve done this and… the VMDK size is still the same.

So… before you shrink the virtual drive make sure you fill the empty disk space with zeros!
On linux/unix/OS X – Lion start terminal / shell and execute:
cat /dev/zero > disk.fill;sync;sleep 1;sync;rm -f disk.fill
after the job is finished you can shrink your VMDK drive.

Have fun.

1 thought on “VMWare shrink *nix / OS X virtual disk (VMDK)”

Leave a Reply to michael Cancel Reply

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

*

Scroll to Top