OhMyself

Jack's notes on AI, the industry around it, and the tools he uses

Why AI Agents Need a Mac: The Hidden Virtualization Limits

AI Agents, Cloud Infrastructure

A square-faced golden cat manages a queue of AI agents waiting for physical Mac hardware

Over the past six months, competition among autonomous AI coding agents has quietly migrated from model benchmarks to physical hardware: whether your agent has access to a real Mac.

Cursor’s Cloud Agent now provisions ephemeral M5 Mac environments through Namespace Devboxes. Cognition launched Devin Outposts so developers can turn an office Mac mini into Devin’s execution environment. WarpBuild provides per-second macOS runners as sandboxes for Claude Managed Agents. Blacksmith landed pallets of Mac minis in data centers, having their own agent build their M4 Mac runner fleet from scratch to General Availability in three weeks.

The underlying driver is straightforward: native iOS and macOS applications can only be compiled and code-signed on macOS. No matter how fast Linux microVMs become, they cannot run Xcode.

Once an agent touches native Apple development, it must run on Apple’s virtualization stack. And once you land there, you run into hard technical and legal constraints that product announcements rarely mention.

The mobile bottleneck: Why Linux sandboxes hit a wall

As cloud-hosted agent architectures matured throughout 2026, Linux containers and microVMs became the standard sandbox. Systems built on Firecracker spin up in under 50 milliseconds, snapshot memory on demand, and cost fractions of a cent per minute.

For web development, Python data pipelines, and backend APIs, that runtime model is virtually solved. But native mobile development broke that assumption.

To build, test, and package an iOS app, an agent requires:

  1. The full Apple Xcode toolchain.
  2. Apple developer certificates and code-signing identity checks.
  3. The native iOS Simulator runtime or connected hardware.

None of these exist on Linux. Cross-compilation frameworks like Flutter or React Native can draft UI code in a container, but testing native modules or cutting release builds eventually requires a machine running macOS.

As Hugo Santos, CEO of Namespace, put it when discussing macOS support for Devin Outposts: “Without a Mac, you can’t build iOS apps. So we gave Devin a Mac.”

Yet running macOS in the cloud is fundamentally different from running Linux.

Limit 1: The two-guest hard cap is enforced in the XNU kernel

On Apple Silicon, virtualizing macOS requires Apple’s native Virtualization.framework (unlike older Intel Macs, which could run Linux hypervisors with different constraints).

If you attempt to launch a third concurrent macOS guest on a single host machine, the framework immediately fails with VZErrorVirtualMachineLimitExceeded.

Error Domain=VZErrorDomain Code=1 "Virtual machine limit exceeded."
UserInfo={NSLocalizedDescription=Virtual machine limit exceeded.}

Most engineers initially assume this limit is a software policy check inside userspace frameworks like Virtualization.framework or Hypervisor.framework.

It is not. Kernel reverse engineering (notably documented by khronokernel) revealed that this quota is enforced directly inside Apple’s XNU kernel:

  • The kernel maintains a global variable: hv_apple_isa_vm_quota.
  • On production builds, its default value is strictly set to 2.
  • The quota is host-wide and process-agnostic. If two different applications each launch one macOS VM, neither application can launch a second.
  • Linux guests do not touch this variable; you can run as many Linux virtual machines on the same Apple Silicon host as memory and CPU cores allow.
+-------------------------------------------------------------+
|                     Apple Silicon Host                      |
|                                                             |
|   XNU Kernel: hv_apple_isa_vm_quota = 2                     |
|                                                             |
|   +-------------------+  +-------------------+              |
|   |  macOS Guest #1   |  |  macOS Guest #2   |  [Guest #3]  |
|   |     (Running)     |  |     (Running)     |   BLOCKED    |
|   +-------------------+  +-------------------+      X       |
|                                                             |
|   +-----------------------------------------------------+   |
|   | Linux Guests (Uncapped, limited only by RAM & CPU)  |   |
|   +-----------------------------------------------------+   |
+-------------------------------------------------------------+

There is an even nastier edge case: when a macOS guest VM terminates abnormally (such as an unhandled crash or a killed orchestrator process), the XNU kernel occasionally fails to decrement hv_apple_isa_vm_quota.

When that leak occurs, the host machine cannot even launch a second VM, let alone a third. Because the state sits inside the live kernel, no userspace daemon restart can clear it. The only recovery mechanism is a full reboot of the physical host. For cloud runner providers managing hundreds of bare-metal Mac minis, an unreleased kernel lock turns physical servers into dead weight requiring remote IPMI power cycles.

A square-faced cat inspects the XNU kernel quota gate allowing two macOS guests and bouncing the third while Linux guests pass through

Limit 2: Snapshot save and restore is locked behind a private Apple entitlement

In Linux virtualization, instant sandbox execution relies on memory and device snapshots. Tools like Firecracker serialize the entire VM memory state to disk. When an agent requests a fresh environment, the system restores the snapshot in milliseconds rather than cold-booting the operating system.

Apple’s Virtualization.framework appears to offer identical functionality on paper. The API exposes saveMachineStateToURL:completionHandler:, and the inspection method validateSaveRestoreSupport returns true on modern Apple Silicon Macs.

However, when engineering teams (including Encore’s microVM team) attempted to implement save-and-restore in production, the call consistently failed with VZErrorInternal:

Error Domain=VZErrorDomain Code=1000 "An internal error occurred."

The underlying cause is an entitlement gate:

  • Running a virtual machine requires the publicly available entitlement com.apple.security.virtualization.
  • Saving and restoring virtual machine state requires a separate, private entitlement: com.apple.private.virtualization.

Apple does not grant com.apple.private.virtualization to third-party developers. Because validateSaveRestoreSupport does not verify whether the calling process holds the private entitlement, it reports that save/restore is supported by the hardware, even though any attempt to execute it will be rejected by the system.

Third-Party App Request
       |
       v
+---------------------------------------------+
| Check: validateSaveRestoreSupport           |
| Result: TRUE (Hardware supports it)         |
+---------------------------------------------+
       |
       v
+---------------------------------------------+
| Execution: saveMachineStateToURL            |
| Check: com.apple.private.virtualization     |
| Status: WITHHELD BY APPLE                   |
| Result: VZErrorInternal (Rejected)          |
+---------------------------------------------+

This missing entitlement creates severe architectural bottlenecks for agent infrastructure:

  1. Mandatory cold boots: macOS agent sessions cannot resume from warm memory snapshots. Every session must execute a cold operating system boot.
  2. Ephemeral process lifetimes: A VZVirtualMachine instance exists strictly within the memory space of its parent host process. If the host process exits, the VM terminates instantly. It cannot be handed off, re-parented, or migrated across physical machines.

This is why macOS cloud infrastructure providers do not market Firecracker-style sub-second resumption. Instead, they compete on high-throughput NVMe storage, APFS copy-on-write clone trees, and pre-warmed idle pools.

A square-faced cat holds a public virtualization key that runs the VM but hits a locked vault requiring Apple's private entitlement for snapshots

Limit 3: The 24-hour leasing rule shapes the entire cloud business

Even if you navigate the kernel cap and lack of snapshot restore, Apple’s legal licensing creates an inescapable economic constraint.

Under Section 2B(iii) of the macOS Software License Agreement (SLA):

  • You may run up to two additional copies of macOS in virtual machines on an Apple computer that is already running macOS.
  • These copies are licensed exclusively for software development, testing during development, running macOS Server, or personal non-commercial use.
  • The SLA explicitly forbids using these VMs for timesharing, computer service bureau services, or providing remote hosting services to third parties.

If a company intends to offer macOS compute to external customers as a commercial service, it must operate under Section 3 (Leasing):

  1. The lease must be for a minimum continuous period of twenty-four (24) consecutive hours.
  2. The lessee must retain exclusive electronic control of the entire hardware machine during that 24-hour window.
  3. The provider must give prior written notification to Apple.

This single paragraph defines the business model of Mac cloud hosting:

Linux MicroVM Model:
[ Tenant A: 12s ] [ Tenant B: 45s ] [ Tenant C: 30s ] ---> Shared bare metal

macOS Cloud Model (Section 3 SLA):
[ Tenant A: Dedicated hardware lock for 24 continuous hours ]

Because a physical Mac cannot be multiplexed across multiple commercial customers in fractional time slices, providers must dedicate the entire physical chassis to one tenant for at least a full day.

That structural difference explains the pricing gap between Linux and macOS compute across the industry:

InfrastructureExecution ModelMinimum CommitmentTypical Price
GitHub Actions LinuxShared container / VMPer-minute$0.006 / min
GitHub Actions macOSDedicated Mac runnerPer-minute$0.062 / min (~10x)
AWS EC2 Mac (M2 Pro / M3)Dedicated bare-metal host24 hours mandatory~$0.65 – $1.20 / hour
Namespace M5 macOS DevboxDedicated agent sandboxPer-minute billingFrom $0.060 / min
WarpBuild macOS RunnerSelf-hosted agent poolPer-second billingCustom pool tier

Mac compute is not elastic cloud compute sliced by the millisecond; economically and legally, it is a fleet of dedicated physical appliances leased by the day.

A square-faced cat measures a 24-hour dedicated hardware block against sub-second Linux microVM slices on a pricing scale

Four practical traps engineering teams run into

Beyond the kernel quota, snapshot lock, and leasing restrictions, teams building AI agent sandboxes on macOS routinely encounter four additional traps:

1. No Intel (x86) macOS testing on Apple Silicon

Apple Silicon hypervisors do not support x86 macOS guests. While Apple provides Rosetta 2 translation inside Linux guest VMs to execute x86 Linux binaries, it cannot run x86 macOS operating systems. If an agent must test legacy Intel macOS applications, the infrastructure must retain physical Intel Mac hardware.

2. Apple Account and iCloud authentication are crippled

Signing into an Apple Account inside a virtual machine requires both the physical host and the guest VM to run macOS 15 Sequoia or newer. Even on macOS 15+, Mac App Store logins remain unsupported inside VMs. On macOS 14 Sonoma and earlier, Apple Account logins fail entirely. Workflows that require iCloud synchronization, receipt verification, or App Store licensing cannot be fully automated inside VMs.

3. Virtualizing iOS is explicitly prohibited

The iOS software license explicitly bans running iOS, iPadOS, watchOS, or tvOS inside a virtual machine. Teams hoping to run lightweight iOS virtual machines for parallel test fleets cannot do so legally. The Xcode iOS Simulator operates as a userspace development tool—a long-standing legal exception—but it simulates UI and APIs on top of the macOS kernel rather than booting a genuine iOS kernel. Furthermore, nested virtualization introduced in macOS 15 on M3 chips is restricted to Linux guests, offering no path for nested Apple mobile operating systems.

4. Heavy base images eliminate instant boot times

A complete macOS installation configured with Xcode, Command Line Tools, Android SDKs, and mobile build toolchains ranges from 40 GB to 100 GB. Without memory snapshot restoration, every new VM instance must boot that image from disk. Infrastructure teams like Blacksmith manage this by keeping physical Mac minis powered in racks, maintaining local APFS snapshot trees, and using copy-on-write image cloning to compress boot times down to 15–25 seconds—an impressive feat, but far from the 50-millisecond cold starts common in Linux microVMs.

Apple’s real answer: Not macOS VMs, but Linux Container Machines

Apple is aware of the friction surrounding macOS virtualization in developer workflows. However, rather than loosening macOS multi-tenancy limits, Apple introduced a different architecture at WWDC26: Container Machines.

Container Machines provide lightweight, persistent Linux environments running inside microVMs directly on top of macOS. They feature:

  • Bidirectional, high-performance virtio-fs filesystem sharing with macOS.
  • Automatic host-to-guest user and group ID mapping.
  • Sub-second boot times.
  • Full access to local Apple Silicon hardware.

This architecture reveals Apple’s intended division of labor: general agent computation, tool execution, and code synthesis should run inside lightweight Linux containers, not full macOS VMs. macOS itself is treated as a specialized build target, reserved for compilation and code signing.

Simultaneously, in the macOS 27 (“Golden Gate”) SLA, Apple amended Section 2B(iii) with new language: “except as otherwise permitted in writing by an authorized Apple representative.”

This contractual carve-out confirms that Apple will not democratize macOS multi-tenancy through open APIs. Instead, high-density macOS virtualization will remain gated behind direct enterprise licensing agreements with major cloud partners.

How engineering teams are navigating the bottleneck

Faced with these technical and licensing constraints, teams building autonomous coding agents currently adopt one of three architectures:

1. Devin Outposts (Local Hardware)
   [ Cloud Brain ] ---> Outbound Tunnel ---> [ Office Mac mini ] (Free of SLA leasing)

2. Dedicated Cloud Mac Pool (Namespace / Blacksmith / WarpBuild)
   [ Agent Task ] ---> [ Pre-warmed M4/M5 Pool ] (Absorb 24h lease, APFS CoW clones)

3. Hybrid Task Routing
   [ Agent Reasoning & Git ]  ---> Ultra-cheap Linux MicroVM ($0.006/min)
   [ Xcode Build & Codesign ] ---> Dedicated macOS Runner ($0.062/min)
  1. The Outposts Model (Devin): Rather than paying cloud Mac premiums, Cognition lets teams connect their own physical office Mac minis to Devin via secure outbound agents. Because the hardware is owned by the developer or enterprise, it falls under standard single-tenant development clauses rather than commercial leasing restrictions.
  2. The Dedicated Warm Pool (Namespace, WarpBuild, Blacksmith): Cloud runner providers accept the 24-hour hardware lock, deploy racks of Mac minis on fast NVMe drives, and maintain pre-warmed standby pools using APFS copy-on-write clones to minimize cold-boot delays.
  3. Hybrid Task Routing: Advanced agent platforms separate planning and reasoning from compilation. As discussed in our analysis of how modern agent runtimes isolate execution and SWE coding agent architectures, agents can perform repository indexing, plan generation, and code edits inside sub-cent Linux sandboxes, switching to expensive macOS runners only for the final xcodebuild and codesign execution.

The explosion of AI coding agents has elevated Mac virtualization from a sleepy CI maintenance task into critical AI infrastructure. But developers designing automated agent systems must design around reality: in Apple’s ecosystem, scale cannot be solved by spinning up more virtual slices on demand. You either stack physical Macs in a rack, or you sign a bespoke agreement with Apple.


Fact sheet

ParametermacOS Guest VMLinux Guest VMContainer Machines
Concurrent instance limit2 per physical host (hv_apple_isa_vm_quota)Uncapped (limited by RAM/CPU)Uncapped (microVM-based)
Enforcement mechanismXNU kernel global variableNoneNone
Snapshot save/restoreBlocked (com.apple.private.virtualization)Supported (standard Linux)Ephemeral / lightweight
Commercial leasing minimum24 consecutive hours (SLA Section 3)No restrictionGoverned by host OS SLA
Relative compute cost~10x Linux ($0.062/min vs $0.006/min)Baseline ($0.006/min)Local / host-integrated
Xcode & codesign supportNativeNoneNone

Primary sources and references

  • macOS Tahoe 26 Software License Agreement: Section 2B(iii) virtualization limits and Section 3 leasing provisions.
  • macOS 27 Golden Gate Software License Agreement: Updated commercial carve-out language (“except as otherwise permitted in writing”).
  • Apple Virtualization Documentation: Virtualization.framework, saveMachineStateToURL:completionHandler:, and validateSaveRestoreSupport.
  • khronokernel Research: Reverse engineering analysis of hv_apple_isa_vm_quota inside the Apple Silicon XNU kernel.
  • Encore Engineering Blog: “Rebuilding the Linux microVM stack on Apple Silicon” (investigation into private virtualization entitlements and VZErrorInternal).
  • Namespace Engineering: Cursor Cloud Agents integration with Namespace Devboxes and M5 Mac runners.
  • Cognition AI: Technical announcement of Devin Outposts and local macOS environment support.
  • Blacksmith Infrastructure Postmortem: “How We Shipped Mac Runners in 3 Weeks” (APFS CoW cloning and hardware fleet deployment).
  • Apple WWDC26 Session 389: “Container Machines: Lightweight Linux Environments on macOS”.
  • Parallels Knowledge Base (KB 131160): Apple Account and App Store limitations in virtualized macOS environments.

← All posts