Booting ARM64 builds of Windows 10 in QEMU

Published ยท Last revised

QEMU boot Windows 10... on ARM(64)

As you may know, the venerable Quick Emulator (QEMU) supports emulation of the AArch64/ARM64 architecture. With some fiddling over the weekend, I was able to boot and install arm64 builds of Windows 10.

QEMU actually running Windows 10... on ARM(64)

Here's how I did it (feedback welcome):

  1. Warning: This is slow as dirt on an Intel Core i7 4770K

  2. Warning: I have not yet compiled the VirtIO drivers for network and other ancillary devices. That means these machines don't support networking.

  3. Download and install QEMU for Windows

  4. Download the Windows 10 (arm64) ESDs from adguard's whizzbang download page and glue them together using UUPtoISO (patched for arm64) to create a usable ISO

  5. Download my hand-crafted UEFI firmware and recompiled/signed arm64 storage drivers

  6. Create a system.vhdx that's around 23GB or larger (fixed size, not expanding, initialized using GPT partitioning scheme)

  7. Generally glue all the above together in a folder somewhere and create a windows.cmd with the following contents:

  8. Run the script.

  9. During setup, you will need to provide VirtIO drivers (browse to the mounted disk).

  10. Complete setup as usual. (This will take a long time.)

For those curious, here's the break down of the QEMU arguments, in order of appearance:
- virtualize a Cortex A57 CPU (with 3 cores)
- set up 4GiB of RAM
- use my recompiled TianoCore EDKII ArmVirtPkg firmware, with minor edits to re-enable VGA support and include a whimsical boot logo to discourage serious usage. (This is similar to the build provided by Googulator in that I reverted two VGA commits. No other changes were made. Latest master.)
- use some scratch space for UEFI variable storage (e.g. boot order)
- use VGA for graphics needs
- set up a NEC USB XHCI Host Controller
- ... and plug four virtualized USB devices into it
- a USB keyboard
- a USB mouse
- a CDROM hosting our install media
- a removable hard drive hosting the VirtIO driver package vhdx
- set up a VirtIO Block Device hosting the main system vhdx

I encourage you to read the QEMU documentation for additional options.

Tips

  • Add --accel tcg,thread=multi for additional per-core performance gains (Thanks @never_released!)
  • The Windows guest may panic at device detection. Click skip when given the option and you should slowly get through.
  • The Windows guest may intermittently panic with a Kernel Security Check Failure.
  • At first boot, the Windows guest's Compatibility Telemetry runner process will spin up and eat all your CPU cores. Kill the process and performance should greatly increase.