windows-arm64 VM using qemu-system
This page describes the process to run a windows-arm64 VM using qemu-system-aarch64.
Prerequisites
Windows ISO
Microsoft distribute official ISO for windows-arm64
https://www.microsoft.com/en-us/software-download/windows11arm64
If you only want to boot the windows kernel and a limited user-space, you can use Microsoft Validation OS instead (see instructions here).
Virtio drivers
Virtio windows drivers (virtio-win-pkg-scripts/README.md at master ยท virtio-win/virtio-win-pkg-scripts) are needed to make your disk recognized by windows. Pick latest iso from link above.
In our example, latest version is 0.1.266.
EFI
Download latest EFI from Debian -- Details of package qemu-efi-aarch64 in sid . This will be used to boot windows image. Download package from โallโ link, and extract it using:
ar x qemu-efi-aarch64*.deb
tar xvf data.tar.xz
mv ./usr/share/qemu-efi-aarch64/QEMU_EFI.fd .
Create disk
qemu-img create win11-arm64.img 100G
Check
You should now have those files available in current folder:
Win11_24H2_EnglishInternational_Arm64.iso
virtio-win-0.1.266.iso
QEMU_EFI.fd
win11-arm64.img
Run QEMU
qemu-system-aarch64 \
-M virt -m 8G -cpu max,pauth-impdef=on -smp 8 \
-bios ./QEMU_EFI.fd\
--accel tcg,thread=multi\
-device ramfb \
-device qemu-xhci -device usb-kbd -device usb-tablet \
-nic user,model=virtio-net-pci \
-device usb-storage,drive=install \
-drive if=none,id=install,format=raw,media=cdrom,file=./Win11_24H2_EnglishInternational_Arm64.iso \
-device usb-storage,drive=virtio-drivers \
-drive if=none,id=virtio-drivers,format=raw,media=cdrom,file=./virtio-win-0.1.266.iso \
-drive if=virtio,id=system,format=raw,file=./win11-arm64.img
Notes:
--accel tcg,thread=multi is to speed up emulation
devices are added for graphics output (ramfb), keyboard/mouse (usb*) and network (-nic)
pauth-impdef=on speeds up pointer authentication https://www.qemu.org/docs/master/system/arm/cpu-features.html#tcg-vcpu-features
Run QEMU on aarch64 hardware
In case you have access to a linux-aarch64 machine:
replace
--accel tcg
with--accel kvm
(or--accel hvf
on MacOS)replace cpu with
-cpu=host
Note: It has been successfully booted on a 80-core aarch64 server, running Linux 6.0 and qemu-system 6.2.
Setup Windows
Setup will take between 1 and 2 hours on a high end x64 processor. It requires several manual steps.
Enter setup
Click on QEMU window and press enter when this appears
Installer is now loadingโฆ
Click on next, and Install now. Then select, โI donโt have a product keyโ.
The setup will now complain that your pc canโt run Windows 11.
Yes, this vm CAN run windows 11
Itโs possible to force windows 11 installation by using those instructions (This PC can't run Windows 11 - Bypass/Fix ). We details them here:
Open a cmd prompt by using Shift + F10, and type
regedit
.Navigate to HKEY_LOCAL_MACHINE\SYSTEM\Setup.
Right click on โSetupโ folder, and select New โ Key, named LabConfig
Right click on LabConfig, and select New โ Dword (32-bit) Value. Create those 5 new values:
BypassCPUCheck
BypassRAMCheck
BypassSecureBootCheck
BypassStorageCheck
BypassTPMCheck
Set all their values to 1.
You should have something like this:
Now, close regedit, command prompt, go back to previous page (using top left arrow), and click again on โi donโt have a product keyโ. Windows is now happy to be installed on your VM
Find your disk
Keep on advancing, select a โCustom installโ, and you should now hit this screen:
Select load driver, then browse, drive โvirtio-win-โฆโ, and viostor/w11/ARM64. Install driver found and your disk will appear.
Click next, take a coffee, and come back later.
Yes, you can install without any internet connection
After several screen/reboot, the installer will complain that no internet connection can be found.
By following this (How to Install and Set Up Windows 11 Without an Internet Connection ), we can skip this and continue installation.
In short: Open a command prompt (using Shift + F10), and type OOBE\BYPASSNRO
VM will reboot, and you can now continue installation without a network connection.
Now, continue with โlimited setupโ, add a user, and you should finally reach Windows Desktop.
Letโs get a network connection
The last bit is to connect the VM to Internet. For this open โDevice managerโ and update driver for Ethernet controller. Select folder E:\NetKVM.
Complete!
Setup is now complete, and your machine can access internet.
ย