Sun Virtualbox – How to shrink your VDI files
VirtualBox, Virtualisation September 27th, 2009
Shrinking sparse hard disk images in VMware is easy. Sun’s VirtualBox requires a little bit more work.
- Power up the VM and defragment the disk.
- If you plan to compress the machine afterwards fill it’s hard disk with zerosĀ (nullfile works quite well – you can download it from here)
- Power the VM down.
- Open a cmd on the host machine and change into the VirtualBox install directory
- Execute
VBoxManage modifyvdi path_to_your_vdi_file compact

This will take a while!
Tags: Sparse images, VirtualBox, Virtualisation
:-)
