Download
Docs menu

Architecture and engines

The programs OSMates runs on your Mac, the two engines that run machines, and where each part lives in the code.

This page is for contributors. To choose an engine for a machine, see What each system supports.

The programs

Program What it does Folder
OSMates The library, New Machine, settings, and updates. It runs no machine. OSMates
Background service, osmatesd Keeps the library, jobs, networks, permissions, and the audit trail. Every client goes through it. OSMatesDaemon
Worker One process for each running machine, with its engine, window, display, and input. OSMatesWorker
osmates The command line, and the MCP server osmates mcp. OSMatesCLI
osmates-remoted Connections from your other Macs, the browser view, and MCP over HTTP. OSMatesRemoteHelper
Guest agent, osmates-agent Runs programs and copies files inside a guest. It's written in Rust. osmates-agent

The background service starts the workers, so quitting the app leaves machines running. A crash in a worker stops only its machine. Every program on your Mac runs in your login session, with no root process.

The OSMates engine

The OSMates engine is a virtual machine monitor written in Swift on Apple's Hypervisor framework. It runs Windows, FreeBSD, Linux desktops, and Linux from an ISO. Its own devices include TPM 2.0, your Mac's camera, a security key, and 3D acceleration for Linux.

It follows the memory map of QEMU's virt machine, so Debian's EDK2 firmware and the virtio-win drivers run unchanged. OSMates doesn't run or include QEMU. The code is in Packages/OSMatesKit/Sources/OSMatesHypervisor.

Apple Virtualization

Apple Virtualization is the framework built into macOS. It runs macOS and Linux servers, with Rosetta for x86_64 programs in Linux. The code is in Packages/OSMatesKit/Sources/OSMatesVirtualization.

Both engines take the same requests, so the background service and its clients need no path of their own for either. A machine keeps the engine it was created with.

Read further

  • docs/architecture.md describes every module, how a request crosses the processes, and the code conventions.
  • The ADRs record each decision and its reasons.
  • The threat model shows where untrusted input comes in, and what each process runs as.