7 Qcow2 File: Windows
-drive file=windows7.qcow2,format=qcow2,if=virtio,cache=writeback The true power of the QCOW2 format is external snapshots. This is perfect for testing software on Windows 7 without damaging your base install. Creating a Snapshot First, ensure your VM is off. Then:
-drive file=windows7.qcow2,format=qcow2,if=virtio,discard=unmap This allows the guest OS to tell the host which blocks are free, shrinking the QCOW2 file automatically. Over time, even after deleting files, the QCOW2 file may stay large. To shrink it: windows 7 qcow2 file
qemu-img create -f qcow2 -o encrypt.format=luks,encrypt.key-secret=sec0 windows7_encrypted.qcow2 50G You need to pass a secret via --object secret,... when launching QEMU. If you are dual-booting Linux, you can boot your Windows 7 QCOW2 file using qemu-nbd : -drive file=windows7