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…
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…