Skip Navigation

Testing qemu-system-aarch64 on Windows

This document explains how to test the QEMU AArch64 emulator on a Windows host.

Page Contents

Video Demonstration


Watch at Internet Archive

Preparing the Virtual Machine

These steps only need to be completed once when the virtual machine is first created. When restarting the VM at a later time, simply double-click the batch file.

  1. Download the latest Alpine Linux “Virtual” ISO file for the aarch64 architecture.
  2. Create a dedicated folder on your host system to contain this virtual machine.
  3. Move the downloaded ISO file from the first step into the newly created folder.
  4. Copy the edk2-arms-vars.fd file from C:\Program Files\qemu\share into the new folder.
  5. Open the command interpreter or PowerShell, and use the cd command to navigate to the folder you created.
  6. Create the disk image by running the following command:
qemu-img create -f qcow2 alpine.qcow2 40G
  1. Proceed to create a batch file (in the same folder) to run QEMU. An example is shown in the next section.
  2. You should be able to run the virtual machine by double-clicking the batch file in Explorer.

Batch File

I have improved the batch file from the version I used when creating the video. In particular, this version correctly uses the edk2-arm-vars.fd file. Save the batch file into the same folder you prepared above.

:: Alpine Linux (AArch64)

qemu-system-aarch64 ^
    -name "Alpine Linux AArch64" ^
    -machine type=virt,iommu=smmuv3 ^
    -accel tcg ^
    -cpu cortex-a57 ^
    -m 2048 ^
    -rtc base=utc ^
    -drive if=pflash,format=raw,file="C:\Program Files\qemu\share\edk2-aarch64-code.fd",readonly=on ^
    -drive if=pflash,format=raw,file=edk2-arm-vars.fd ^
    -drive file="alpine.qcow2",if=virtio,format=qcow2 ^
    -drive file="alpine-virt-3.16.2-aarch64.iso",format=raw,readonly=on ^
    -boot menu=on ^
    -display gtk ^
    -device virtio-vga ^
    -nic user,id=NAT,model=virtio-net-pci,mac=02:00:00:00:00:01 ^
    -device qemu-xhci ^
    -device usb-kbd ^
    -device usb-tablet

echo QEMU has finished
pause

If a newer version of Alpine Linux has been released, be sure to edit the 4th “-drive” argument accordingly. You should be able to run the VM by double-clicking the batch file.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.