Jul 13
2024
Reducing the size of a QEMU virtual disk (thin disk)
On all mounting points
dd if=/dev/zero of=/nul;sync;sync;sync;rm -f /nul;sync
- Stop VM
- Convert disk
qemu-img convert -O qcow2 -c disk1.qcow disk1.new.qcow
On all mounting points
dd if=/dev/zero of=/nul;sync;sync;sync;rm -f /nul;sync
qemu-img convert -O qcow2 -c disk1.qcow disk1.new.qcow