Tips

VM size is not reported by the host

On the VM

fstrim -av
dd if=/dev/zero of=/mytempfile

rm -f /mytempfile

On the hypervisor

qemu-img convert -o preallocation=metadata -O qcow2 vm-115-disk-1.qcow2.backup vm-115-disk-1_shrink.qcow2

Timeout lock

“trying to aquire lock…TASK ERROR: can’t lock file ‘/var/lock/qemu-server/lock-109.conf’ - got timeout”

Manually deleting the file under /var/lock/qemu-server/lock-XXXXXX.conf