There are two utilities that can help discard unused blocks so that VMs can be shrunk. zerofree finds unused blocks with non-zero content in ext2, ext3 and ext4 filesystems and fills them with zeros. The volume can’ be mounted which makes the process of running it a bit convoluted. fstrim…
Ubuntu 20.4: Virtualbox not running after the last upgrade
When launching a VM in Virtualbox I got an error saying that it can’t be started because a required module isn’t loaded. It suggests to manually load it. Re-installing Virtualbox also fails because the virtualbox-dkms package can’t be configured The last system update upgraded the kernel from 5.4 to 5.8,…
KVM/QEMU: Reduce the size of your VM files
When virt-manager creates new images by default they will take the full size assigned to the virtual storage on the VM. If your host system is using a filesystem with built-in compression like ZFS or BTRFS it won’t affect the amount of free space left on the host. But if…
AMD/Gigabyte: Enable hardware acceleration for virtualisation in the BIOS
In the Gigabyte BIOS you need to activate a series of settings on different sections in order for KVM to be able to use hardware acceleration. M.I.T. -> Advanced Frequency Settings -> Advanced CPU Core Settings -> SVM Mode set to Enable Chipset -> IOMMU set to Enabled Save settings…