Tuesday, April 1, 2008

Compacting a VirtualBox Hard Drive

I had a hard time figuring out how to reduce the size of my virtual hard drive. It is actually pretty simple once you figure it out. After "zeroing" out the free space with "nullfile-1.02", shut down VirtualBox and run (in a command prompt from the VirtualBox install directory):

VBoxManage modifyvdi "FullPathOfFileToCompact" compact