Compact VDI Image file

Compacted my Windows XP 6GB VDI Image to 4GB  today according to this article.

Steps:

  1. Defragment Guest
  2. Defragment Guest Again
  3. copy nullfile to guest, and run nullfile on guest
  4. shutdown guest
  5. On Host, Run: VBoxManage modifyvdi XP.vdi compact