qemu-img convert -f qcow2 win7.qcow2 -O raw win7.raw
qemu-img convert -f vpc -O qcow2 windows7.vhd windows7.qcow2
virsh snapshot-revert win7 before_patches
| Setting | Recommendation |
|---------|----------------|
| Disk bus | VirtIO (best performance) |
| Cache | writeback or unsafe (for speed) |
| CPU | host passthrough (-cpu host) |
| QEMU agent | Install qemu-ga in Windows 7 for better integration | windows 7qcow2
Run QEMU with these optimized parameters:
qemu-system-x86_64 \
-drive file=windows7.qcow2,if=virtio,format=qcow2 \
-cdrom /path/to/en_windows_7_professional_x64.iso \
-cdrom /path/to/virtio-win.iso \
-m 4G \
-cpu host \
-smp 4 \
-netdev user,id=net0 \
-device virtio-net-pci,netdev=net0 \
-usb -device usb-tablet \
-vga qxl \
-machine type=q35,accel=kvm
Critical notes for Windows 7:
echo 1 > /sys/kernel/mm/ksm/run
This is the killer feature for Windows 7 testing. Keep one pristine windows7-base.qcow2 (read-only) and create multiple overlay images. qemu-img convert -f qcow2 win7
Create the base (DO NOT boot this directly):
qemu-img create -f qcow2 windows7-base.qcow2 40G
# Install Windows 7 on this base
Create an overlay for testing:
qemu-img create -f qcow2 -b windows7-base.qcow2 -F qcow2 test-instance1.qcow2
Now run test-instance1.qcow2. All writes go to the overlay; the base remains untouched. To discard changes, delete the overlay and create a new one.
You can download the latest version of Mist right here (it's completely free!) or you can also get the source code directly from the GitHub repo if you prefer.
DownloadYou can get in touch with me via Steam, or if you have a code-related issue you can create a new issue on the Github repository.