qemu-system-aarch64 for WoA
qemu-system-aarch64 \ -M virt -accel kvm -cpu host -smp 4 -m 1600 \ -monitor stdio \ -bios /usr/share/OVMF/QEMU_EFI.fd \ -netdev user,id=net0 \ -object iothread,id=disk-iothread \ -device qemu-xhci,p2=8,p3=8,id=xhci \ -device virtio-net,netdev=net0,id=netdev0,disable-legacy=on \ -device virtio-scsi-pci,id=scsi0,iothread=disk-iothread \ -drive if=none,file=/dev/nbd0,format=raw,id=disk,cache=none \ -device scsi-hd,drive=disk,bus=scsi0.0,rotation_rate=1,bootindex=0 \ -vga none -vnc none
(flock -n /PATH/qemu.lock qemu is recommended to prevent multi-run)
---
Windows 10 ARM64 Image (***1903*** or later, 1909 recommended) find ESD with "clientbusiness_vol_a64fre_en-us" in the filename, it includes Pro / Ent edition.
virtio-win ***0.1.187*** or later, for injecting netkvm & vioscsi drivers. thanks pmsjt for the final netkvm fix! download full ISO at https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/
additional things for the first boot:
-device ramfb -vnc :0 for VNC access (remove -vga none -vnc none), -device usb-kbd,bus=xhci.0 -device usb-tablet,bus=xhci.0 for USB input devices, and some kind of external storage (maybe -drive media=cdrom,if=none,id=cd -device usb-storage,drive=cd, type "change DEV ISOFILE" or "eject DEV").
hot plug usb device: device_add usb-host,vendorid=0xVEN,productid=0xPROD,bus=xhci.0,id=usbVENPROD
hot plug drive to virtio-scsi: drive_add 0 if=none,file=/dev/disk/by-id/SOMEDISK,format=raw,id=SOMEDISK,cache=none device_add scsi-hd,drive=SOMEDISK,bus=scsi0.0,id=devSOMEDISK
---
Notes: 1 Windows 10 1909 or maybe a earlier version no longer requires DBG2 ACPI table, so https://bugs.launchpad.net/qemu/+bug/1804961 is already resolved, feel free to just use "-M virt" instead of the workaround virt-2.12.
2 use io_uring (-drive aio=io_uring) on qemu-5.1 with linux kernel 5.1+ (5.4+ recommended).
3 disable several services to reduce memory usage BthAvctpSvc fdPHost defragsvc SSDPSRV wcncsvc TokenBroker DusmSvc iphlpsvc lfsvc SstpSvc upnphost
4 for some legacy apps: Windows on ARM x86 emulation, enable DLL injection (this will disable CHPE) Change Emulation Settings - Use advanced settings - [v] Disable hybrid execution mode
5 if you accidently forgot to download virtio-win drivers and still want to install via ISO: ahci storage is available AFTER booting windows (=UEFI AHCI drivers not compiled in OVMF), Windows Setup should work. (emulated) USB storage is not recommended because it is too slow.