QEMU

QEMU is an open-source emulator and virtualization tool. https://www.qemu.org/

QEMU can be used as a system emulator and supports multiple CPU architectures and devices. A full guest operating system can be run on the system emulator. Qemu also provides hypervisor acceleration where it can use hypervisor frameworks like KVM, Hyper-v etc. to provide a near native speed for guest operating systems.

QEMU also supports a user mode emulator, but it is limited to Linux. User mode emulators let you run user mode binaries for a different architecture to be executed on a linux host running another CPU architecture. In this case, QEMU implements syscall translation between architecture. On Windows, this approach is not possible, because the syscall ABI is not stable nor documented.

Status

  • QEMU system emulator has been ported to run on a Windows Arm64 host. It will be available from QEMU v8.0

  • QEMU system emulator with hyper-v acceleration is not yet available for Windows Arm64.

  • QEMU user mode emulator is not yet available for Windows host, there is no plan to add such a feature.

  • QEMU on a Linux/Mac host can run Windows Arm64 images with Hypervisor acceleration (kvm/hvf).

CI

QEMU uses gitlab-ci: QEMU / QEMU ยท GitLab

Dependencies

On Windows11, you may need to install before installing QEMU

pacman -S mingw-w64-clang-aarch64-glib2

Installer

Install QEMU on a windows machine using MSYS2 package

pacman -S mingw-w64-clang-aarch64-qemu

Issue with the above command:

Nov 20, 2024 Update from Pierrick: It [above command] was disabled recently, as you can see from the MSYS2 pkgbuild history [1]. In short, it was disabled upstream recently in QEMU [2] - August 2024, because of an attribute (gcc_struct) clang does not support. I ran into this a few weeks ago when doing some cleanup around windows builds [3], and tried to force enabled it, but the developer who introduced the restriction seems to be against it. I'm a bit afraid to say that I don't expect clang support to come soon. The only thing that could help us move forward is to have someone external who comes to request for this on GitLab issues or on the mailing list and pushes that enabling this for windows-arm64 is important enough to relax the constraint introduced. Or, push for someone on toolchain side to enable this in clang (the PR is already there, but seems not active). Even with that, it will be another 6 months - waiting for next llvm release - to get it enabled. Definitely, it's a bit sad overall. To end on a positive side, I'm currently applying those patches locally and building QEMU with MSYS2/clang regularly [4], so hopefully, it should keep working without any build error. And as soon as GitHub Actions will add arm64 runners, which should come in next months, I'll add it as a built target. [1] https://github.com/msys2/MINGW-packages/commits/master/mingw-w64-qemu [2] https://gitlab.com/qemu-project/qemu/-/commit/e25264fe7b0455b45a6eb519d8e9ba2a708228fb [3] https://patchew.org/QEMU/20241031040426.772604-1-pierrick.bouvier@linaro.org/ [4] https://github.com/pbo-linaro/qemu-ci

ย 

ย