The following is taken from https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5 with modifications to introduce Vulkan support. Since we need custom patches to QEMU, virglrenderer, MoltenVK, and libepoxy, the provided script will pull the right refs and build everything with the right params. Feel free to inspect the script to find the source for all the modifications. We are actively working to upstream everything so please do not build anything long-term with these patches.
- Xcode (relatively recent version)
- Vulkan SDK for macOS (Make sure to select "System Global Installation" during Select Components.)
1. Open a terminal.
2. Install GLib, Meson, Pixman, pkg-config and spice-protocol with Homebrew.
brew install glib meson pixman pkg-config spice-protocol3. Make a empty directory and change the working directory to it.
4.
curl -L https://gist.github.com/osy/a8f705050eed1c8421ad1a0855a8faa9/raw/run.sh | bash -5.
bin/qemu-img create var/virtio.raw 64GIt doesn't consume the physical space until it has data, so you can make the image very large. However, you will see odd behavior if you try to write data more than the physical disk allows.
6.
curl -LO https://cdimage.ubuntu.com/releases/25.10/release/ubuntu-25.10-desktop-arm64.iso7.
./run -cdrom ubuntu-25.10-desktop-arm64.isoProceed the installation process, and now you can run Ubuntu by executing ./run.
Note: you won't get keyboard to work before Linux boots because TianoCore, the UEFI firmware does not support virtio-keyboard used in this configuration.
You can also run bin/qemu-system-aarch64 yourself. The important arguments are:
-display cocoa,gl=es
and
-device virtio-gpu-gl-pci,hostmem=8G,blob=true,venus=true
For Vulkan to work on Ubuntu 25.10, you need to patch Mesa with the patches below. The first patch adds 16KiB page alignment to blob mappings. Hopefully this will not be required in the long term as we plan to add 4KiB page emulation to virglrenderer in the future. The second patch works around a bug introduced in Mesa 25 which breaks everything. Hopefully it will be fixed upstream soon. If you don't want to build Mesa yourself, pre-build .debs are provided:
Just download the latest run.sh and execute it in your workspace directory.
- Epoxy: anholt/libepoxy#312
- QEMU: https://patchew.org/search?q=project%3AQEMU+from%3Aj%40getutm.app
- virglrenderer: https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/?sort=created_date&state=opened&author_username=osy&first_page_size=20
- MoltenVK: https://github.com/KhronosGroup/MoltenVK/issues?q=author%3Aosy