Skip to content

Instantly share code, notes, and snippets.

@francoism90
Last active March 29, 2021 08:54
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save francoism90/bff2630d8eb568d6f790 to your computer and use it in GitHub Desktop.
Save francoism90/bff2630d8eb568d6f790 to your computer and use it in GitHub Desktop.
QEMU + Windows 10 x64 + KVM + IOMMU + AHCI + QXL & SPICE (as socket)
#!/bin/sh
qemu-system-x86_64 -enable-kvm -machine q35,accel=kvm \
-cpu host \
-m 4G \
-drive id=disk,file=/home/archie/Documents/Images/win10x64.img,if=none \
-drive file=/home/archie/Downloads/Win10_1709_English_x64.iso,index=3,media=cdrom \
-drive file=/home/archie/Downloads/drivers.iso,index=4,media=cdrom \
-device intel-iommu \
-device ich9-ahci,id=ahci \
-device ide-drive,drive=disk,bus=ahci.0 \
-netdev user,smb=/home/archie,id=vmnic -device virtio-net,netdev=vmnic \
-vga qxl \
-spice unix,addr=/run/user/1000/spice.sock,disable-ticketing \
-device virtio-serial \
-chardev spicevmc,id=vdagent,debug=0,name=vdagent \
-device virtserialport,chardev=vdagent,name=com.redhat.spice.0 \
-soundhw hda \
-balloon virtio \
-device usb-ehci,id=ehci -device usb-tablet,bus=ehci.0
# open VM
#spicy --uri="spice+unix:///run/user/1000/spice.sock"