Reduce VirtualBox vdi image

if your vdi is larger than the space you’re using, you can reduce its size by installing “zerofree” inside your vm, and booting it in “recovery”, “failsafe” or “single user” mode, remount your “/” filesystem readonly, and supposing “/” is in /dev/sda1

# zerofree /dev/sda1

Shutdown your vm and in the VirtualBox host

# VBoxManage modifyhd linuxy.vdi compact

Leave a Reply

Your email address will not be published. Required fields are marked *