Qemu Disk Management

Festplattenimage erzeugen

qemu-img create -f qcow2 /path/to/newdisk.qcow2 20G

Für beste Performance

qemu-img create -f qcow2 -o preallocation=full,cluster_size=128k disk.qcow2 40G

Festplatte von vdi nach qcow2 umwandeln (mit -p kann der Progress angezeigt werden)

qemu-img convert -f vdi -O qcow2 input.vdi output.qcow2

Festplatte von qcow2 nach vmdk umwandeln (im Verzeichnis oder volle Pfadangaben)

qemu-img convert -p -f qcow2 -O vmdk suse.qcow2 suse.vmdk

Festplatte nach dem Aufräumen komprimieren

Linux easy way

dd if=/dev/zero of=/mytempfile
# that could take a some time
rm -f /mytempfile
qemu-img convert -p -O qcow2 old.qcow2 new.qcow2

ODER

virt-sparsify --compress old.qcow2 new.qcow2