VirtualBox
How to reduce the size of the virtual disk image
- Delete / uninstall some stuff
- Defrag hard drive (Windows VM only) e.g. using Defraggler
- Write zeros to hard drive blocks of free space to enayble compression of the disk image
- 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