Linux command should look the same, just omit. VBoxManage.exe modifyhd -compact "C:\Users\k\VMs\CentOS Dev.vdi" If you want to try a dry run without modifying the hard-drive, add the -n flag.įor LVM, there might also be a _home partition that needs a zerofree run as well.įinally, boot down your virtual machine, and run VBoxManage on the host to resize the. zerofree -v /dev/mapper/vg_rheldev-lv_root If not possible, close the Virtualbox window for the guest with the Power Off option set. Run until you see the problem happen, then shut down the guest from within the guest OS if possible. Start the guest from full power off, not save-state. In our example we will run it on the LVM root partition. Re: Virtualbox not working with any Linux image. Mount it as a CD on your virtual machine and boot into the live distro.įind all available partition and LVM (volume groups) with: fdisk -lĪfter we find our partition run zerofree to zero out the free space. To fix this, we need to fill the empty space on the vdi with zeros and resize it: VirtualBox sparse VDI images always take up as much space as they have maximally had utilized at some point in time. Shrinking VirtualBox Linux images with ZeroFree Stanislav Khromov
0 Comments
Leave a Reply. |