You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash
windows10vhdx="disk_images/Windows10_InsiderPreview_Client_ARM64_en-us_21354.VHDX windows.qcow2"
virtio-win-iso="disk_images/virtio-win-0.1.190.iso"
efi_firm="$(dirname $(which qemu-img))/../share/qemu/edk2-aarch64-code.fd"
dd if=/dev/zero conv=sync bs=1m count=64 of=windows_ovmf_vars.fd
qemu-img convert -O qcow2 "$windows10vhdx" windows.qcow2
echo"starting"
qemu-system-aarch64 \
-machine virt,accel=hvf,highmem=off \
-cpu cortex-a72 -smp 4 -m 4G \
-device ramfb \
-device qemu-xhci,id=usb-bus \
-device usb-tablet,bus=usb-bus.0 \
-device usb-mouse,bus=usb-bus.0 \
-device usb-kbd,bus=usb-bus.0 \
-nic user,model=virtio \
-drive format=raw,file="$efi_firm",if=pflash,readonly=on \
-drive format=raw,file=windows_ovmf_vars.fd,if=pflash \
-drive if=none,media=disk,id=drive0,format=qcow2,file=windows.qcow2 \
-device nvme,drive=drive0,serial=drive0,bootindex=0 \
-device usb-storage,drive=drive2,removable=true,bootindex=2 \
-drive if=none,media=cdrom,id=drive2,file="$virtio-win-iso"# To enable networking after installing:# 1. run `bcdedit.exe -set TESTSIGNING ON`# 2. Open device manager and find the unknown ethernet device.# 3. Choose to update and search for the driver on the computer.# 4. Navigate to and select D:\NetKVM\w10\ARM64
You will need to download the Windows VHDX from here and the latest virtio-win iso from here
Be sure to update windows10vhdx and virtio-win-iso to have the proper paths to the VHDX and iso respectively. I created a directory within my vm directory called "disk_images" and put them there for organization's sake.
Something you could do with this is create an extra drive that can be used for multiple different machines. If you do that, however, be sure to only run one machine at any given time because I'm sure it would cause severe corruption if both were to write to the drive at the same time.
Another thing to be aware of:
Unfortunately ARM64 Windows doesn't have virtio-gpu drivers yet (as far as I can tell, and I've searched hard for them) so we're stuck with ramfb. I'm not entirely sure, but I think this means everything is rendered in software. Additionally, my machine appears to be restricted to three different resolutions: 640x480, 800x600, and 1024x768. You can set this by hitting escape on the "TianoCore" screen before the windows loading dot circle thing.