VirtualBox

From Torben's Wiki

How to reduce the size of the virtual disk image

[1] [2]

  1. Delete / uninstall some stuff
  2. Defrag hard drive (Windows VM only) e.g. using Defraggler
  3. Write zeros to hard drive blocks of free space to enayble compression of the disk image
  4. Compact the VDI virtual disk image (in host system) by running
VBoxManage modifyvdi image.vdi --compact

To zero-fill the free space:
Linux

cat /dev/zero > zero.fill;sync;sleep 1;sync;rm -f zero.fill 

Windows: use nullfule

Solution for Slow Ubuntu in VirtualBox

see [3]

Change UUID of Disk Image (for duplication of images)

VBoxManage internalcommands sethduuid image.vdi