Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to run Windows 11 on ARM in QEMU 6.1 on Apple Silicon Mac

How to run Windows 11 on ARM in QEMU 6.1 on Apple Silicon Mac

  1. Follow the excellent gist here, up to and including step 7 : https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278

  2. I converted my VHDX to qcow2 - I doubt if that's significant, but YMMV:

./qemu-img convert -p -O qcow2 ~/Windows11_InsiderPreview_Client_ARM64_en-us__22454-orig.VHDX Windows11.img
  1. Run qemu with a slightly modified command-line. It may not be the most efficient, but it worked for me:
./qemu-system-aarch64 \
  -monitor stdio \
  -M virt,highmem=off \
  -accel hvf \
  -cpu host \
  -smp 8 \
  -m 8192 \
  -drive file=pflash0.img,format=raw,if=pflash,readonly=on  \
  -drive file=pflash1.img,format=raw,if=pflash \
  -device ramfb \
  -device qemu-xhci \
  -device usb-kbd  \
  -device usb-tablet \
  -device intel-hda \
  -device hda-duplex  \
  -nic user,model=virtio  \
  -drive file=Windows11.img,format=qcow2,if=none,id=boot \
  -device nvme,drive=boot,serial=boot \
  -boot c \
  -drive file=spice-guest-tools-0.164.iso,media=cdrom,if=none,id=drivers \
  -device usb-storage,drive=drivers
  1. Boot Windows and run the spice tool setup to install drivers to enable NICs, etc.
@gabonator
Copy link

Followed this guide and it hangs just after loading the system:

BdsDxe: failed to load Boot0002 “UEFI Misc Device” from VendHw{…}
BdsDxe: loading Boot0003 “UEFI QEMU NVMe Ctrl boot 1” from PciRoot(0x0)/Pci(0x4,0x0)/NVMe(…)
BdsDxe: starting Boot0003 “UEFI QEMU NVMe Ctrl boot 1” from PciRoot(0x0)/Pci(0x4,0x0)/NVMe(…)

Qemu does not show any suspicous:

QEMU 6.1.50 monitor - type 'help' for more information
(qemu) audio: Failed to create voice `adc'

I have used the same disk image as you Windows11_InsiderPreview_Client_ARM64_en-us__22454.VHDX , but I noticed your suffix "-orig", did you modify the image in any way?

Tested on macbook air M1 11.2.3

@CombinedEffort
Copy link
Author

@gabonator, I'm afraid my boot sequence looks quite different:

BdsDxe: loading Boot0007 "Windows Boot Manager" from HD (1,GPT 39774EB9-FAA4-42E3 -A3B1-793C26B1258B,0x80,0x64000 /\EFT\Microsoft\Boot\bootmgfw.efi 
BdsDxe: starting Boot0007 "Windows Boot Manager" from HD (1,GPT.39774EB9-FAA4-42E 3-A3B1-793C26B1258B,0x80,0x64000 /\EFT\Microsoft\Boot\bootmgfw.efi

I did not modify the VHDX before converting to qcow2 - the '-orig' was there as I was originally trying to boot straight from the VHDX and kept corrupting it, so I kept a pristine copy as -orig and booted off copies of that.

My macbook air is on 11.6

@brandonros
Copy link

image

qemu-system-aarch64 \
  -monitor stdio \
  -M virt,highmem=off \
  -accel hvf \
  -cpu host \
  -smp 4 \
  -m 4096 \
  -bios /opt/homebrew/Cellar/qemu/6.2.0/share/qemu/edk2-aarch64-code.fd \
  -device ramfb \
  -device qemu-xhci \
  -device usb-kbd  \
  -device usb-tablet \
  -device intel-hda \
  -device hda-duplex  \
  -nic user,model=virtio  \
  -drive file=~/Downloads/Windows11_InsiderPreview_Client_ARM64_en-us_22523.qcow2,format=qcow2,if=none,id=boot \
  -device nvme,drive=boot,serial=boot \
  -boot c 
 $ uname -a
Darwin Brandons-MacBook-Air.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:29:10 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T8101 arm64
$ qemu-system-aarch64 --version
QEMU emulator version 6.2.0
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers

@sergiyd
Copy link

sergiyd commented Jan 27, 2022

@brandonros were you able to handle it? I have the same issue.

@brandonros
Copy link

@sergiyd
Copy link

sergiyd commented Jan 28, 2022

@brandonros thanks!

@PaSaSaP
Copy link

PaSaSaP commented Feb 2, 2022

I am trying to start Win11 using Windows11_InsiderPreview_Client_ARM64_en-us_22533.VHDX official image but I have some problems:

  • I cannot pass more than 3072 (3G) RAM memory (-m parameter)
  • qemu-system-aarch64 patched with agraf/qemu@e8ffde9
  • First window that shows is to set language/keyboard/timezone, then there is window about no internet connection with "Next" button but when clicking on that button then after ~15 minutes "First window" shows again…

QEMU was built with:
../configure --target-list=aarch64-softmmu,x86_64-softmmu,i386-softmmu --enable-cocoa

The command I use:

../qemu/patched/qemu-system-aarch64 \
  -monitor stdio \
  -M virt,highmem=off \
  -accel hvf \
  -cpu host \
  -smp 4 \
  -m 3G \
  -drive file=pflash0.img,format=raw,if=pflash,readonly=on  \
  -drive file=pflash1.img,format=raw,if=pflash \
  -device ramfb \
  -device qemu-xhci \
  -device usb-kbd  \
  -device usb-tablet \
  -device intel-hda \
  -device hda-duplex  \
  -nic user,model=virtio  \
  -drive file=Windows11.qcow2,format=qcow2,if=none,id=boot \
  -device nvme,drive=boot,serial=boot \
  -boot c

image

If PC uses WiFi - connect to WiFi network, but if PC does not use WiFi then insert network cable. So… without internet connection nothing can be done? What am I missing? And why can I only put max 3GB of RAM?

@bzuruce
Copy link

bzuruce commented Jan 12, 2023

Just stuck at guest did not initialize screen yet.
Code:


qemu-system-aarch64 \
  -monitor stdio \
  -M virt \
  -accel hvf \
  -cpu host \
  -smp 8 \
  -m 8192 \
  -drive file=pflash0.img,format=raw,if=pflash,readonly=on  \
  -drive file=pflash1.img,format=raw,if=pflash \
  -device ramfb \
  -device qemu-xhci \
  -device usb-kbd  \
  -device usb-tablet \
  -device intel-hda \
  -device hda-duplex  \
  -nic user,model=virtio  \
  -drive file=Windows11.img,format=qcow2,if=none,id=boot \
  -device nvme,drive=boot,serial=boot \
  -boot c \
  -drive file=spice-guest-tools-0.164.iso,media=cdrom,if=none,id=drivers \
  -device usb-storage,drive=drivers

highmem caused another error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment