← Back to BLACKWIRE EMBER BUREAU TECH RESEARCH Screenshot of macOS desktop running inside an arm64 Linux VM, showing Safari and a terminal window side by side.

The hosted macOS 27.2.1 desktop rendered at 1280×800 on an Apple Silicon M1 VM, powered by the XNULinux kernel module.

XNU LINUX PROJECT RUNS FULL MACOS GUI ON ARM64 LINUX

*A GitHub project loads Apple’s XNU kernel as a module inside an unmodified arm64 Linux distro, delivering a native macOS desktop without a hypervisor. The proof‑of‑concept boots macOS 27.2.1 in under a minute and survives a 30‑minute stress test.*

By EMBER Bureau - BLACKWIRE  |  November 23, 2026, 07:01 CET  |  XNULinux, macOS on Linux, ARM64, kernel module, Apple Silicon

A small team of developers has turned a GitHub repository into a bridge between two rival operating systems. By compiling Apple’s open‑source XNU kernel into a loadable module, they run a full macOS 27.2.1 desktop inside an unmodified arm64 Linux kernel. The result is a dual‑userspace machine where macOS apps sit side‑by‑side with Linux processes, sharing CPU threads, memory and even the host GPU. No hypervisor intervenes; Linux simply hands over control to XNU via a thin foreign‑kernel interface. The proof‑of‑concept demonstrates that a macOS system disk created by Apple’s installer can boot to the desktop, launch Safari, Chrome and Finder, and stay stable through a half‑hour stress test. For a field that watches every cross‑platform hack, the speed and stability of this setup raise the stakes.

How does XNU run inside Linux?

The xnulinux repo builds XNU from Apple’s published sources and compiles it into a loadable kernel module named xnu.ko. The module is inserted into a stock Ubuntu arm64 kernel with insmod. Linux supplies memory, timers, files, network and GPU through a companion module fki.ko. XNU drives the CPU and MMU directly, so macOS processes such as launchd, WindowServer and Safari execute as native threads pinned to Linux CPUs. The two userspaces share the same address space half, while Linux retains its own exception vectors. GPU support routes Metal calls through a Metal‑to‑Vulkan layer (venus driver) to the host GPU; if no render node exists the system falls back to CPU rendering.

How does performance stack up against native macOS VMs?

Booting a macOS 27.2.1 system disk created by Apple’s installer takes 31–48 seconds on xnulinux, marginally faster than the 49‑second boot of an Apple Virtualization macOS VM on the same Apple Silicon host. A 30‑minute stress run—40 rounds of Safari, Notes, Calculator, TextEdit, System Settings, Spotlight and a disk walk—completed with no kernel panic or crash report. Apps open and quit, Spotlight indexes, and the file system operates normally. The test ran on an Apple Silicon M1‑class machine inside a krunkit VM with 1 to 6 hosted CPUs, confirming that the module can sustain real‑world workloads without a hypervisor overhead.

Running a macOS GUI natively on Linux without a hypervisor shatters the traditional VM barrier.

What hardware and software are needed?

The host must be an arm64 Linux system with Pointer Authentication (PAC), typically an Apple Silicon M1 or later running in a VM such as krunkit or tart. The kernel must use 4K pages and the machine should have roughly 24 GB RAM, reserving 8 GB for the hosted kernel. A Mac with Xcode is required to create the macOS system disk and to compile the GPU bridge components. No Apple binaries are shipped in the repository; the user supplies the macOS installer disk and Apple‑signed kexts. The build scripts compile XNU (xnu‑12377.121.6) and the fki and xnu modules against the running Linux kernel, then install them as a systemd service.

What limitations remain?

The project is a stopgap, not a production‑ready solution. The OS cryptex is merged into the system volume, AMFI is patched and System Integrity Protection (SIP) is relaxed, which reduces the security posture compared with a genuine macOS installation. Memory access runs on 4K pages versus the 16K pages of a native macOS VM, making it slower. GPU acceleration depends on a present Linux render node; otherwise the system falls back to CPU rendering via Mesa lavapipe. The repository contains no Apple‑distributed binaries, so users must provide their own macOS disk and trust cache. Ongoing work is documented in docs/production.md.

Frequently asked questions

How does XNULinux boot a macOS system disk?

It builds XNU from Apple’s sources, loads it as xnu.ko into a stock Ubuntu arm64 kernel, and uses fki.ko to provide memory, files, network and GPU, allowing a macOS 27 system disk made by Apple’s installer to reach the desktop.

What are the performance numbers for XNULinux compared to an Apple Virtualization VM?

XNULinux boots macOS 27.2.1 in 31–48 seconds, slightly faster than the 49‑second boot of an Apple Virtualization macOS VM on the same hardware, and completes a 30‑minute stress run with no panic.

What hardware is required to run XNULinux?

An arm64 Linux host with Pointer Authentication, such as an Apple Silicon M1 or later in a VM, 4K pages, about 24 GB RAM (8 GB reserved for XNU), and a Mac with Xcode to create the macOS disk and GPU components.

XNULinux proves that the line between macOS and Linux can be erased on Apple Silicon, offering developers a new sandbox for cross‑platform testing and security research. While security compromises and performance quirks keep it from replacing official macOS VMs, the project opens a path toward tighter integration of divergent ecosystems. Future iterations may tighten the security model, improve memory handling, and streamline GPU bridging, turning this experimental module into a viable tool for engineers and analysts alike.

Sources: Hacker News, GitHub repository https://github.com/AFK-surf/xnulinux