Skip to main content

Many small agent VMs on Macs: how the pieces fit

PieceWhat it doesDoc
Mac Studio optionsdisplays, clipboard, bridged and vmnet networking, custom virtiomacos.md
macOS guestsinstall from an IPSW through the API, first-boot SSH keysmacos.md
Agent densityprofiles, pressure admission, idle pause, hibernate, warm poolagent-density.md
Guest agent over vsockexec and files without SSH; token by cloud-initvsock-agent.md
vsock path for sandboxesagent first, SSH fallback; runner relayvsock-proxy.md
agent-micro imageDebian 13 arm64 with the agentagent-micro.md
Ballooningidle reclaim, sooner under pressureballooning.md
Fleet placementnodes report pressure and warm slots; placement avoids hot Macskairon-mac-scheduling.md
Topology labelsnodeSelector on fabric, rack, chiptopology.md

A request, end to end​

agent / MCP client
│ POST /fleet/vms or Kairon Machine
▼
fleet registry ── skips Macs at critical pressure, prefers normal, then most room
│
▼
fluxctl serve on the chosen Mac (vz)
├─ admission: policy.deny_host_pressure_level, min_host_mem_available_mib (vm_stat + kernel level)
├─ default shape: restore a warm slot (about 2 s); other shapes and images: cold boot
├─ /process, /fs/*: guest agent over vsock (agent-micro), else SSH
└─ AutoPause scan: balloon (sooner under pressure) → pause → hibernate; the next request undoes it

What to watch​

GET /v1/sandboxes/density per Mac, and in /metrics: fluxvm_host_memory_pressure_level, fluxvm_host_mem_available_mib, fluxvm_sandbox_warm_hits_total / _misses_total, fluxvm_sandbox_balloons_inflated, fluxvm_vz_agent_calls_total / fluxvm_vz_agent_ssh_fallbacks_total.

Testing on a Mac​

fluxctl serve &
scripts/e2e-smoke.sh # health, warm and profiled sandboxes, exec and files, density, metrics
AGENT_MICRO=1 scripts/e2e-smoke.sh # also requires the guest agent to answer (agent-micro in the catalog)
scripts/density-smoke.sh 8 tiny # how many tiny sandboxes this Mac carries
cargo test -p fluxvm-core -p fluxvm-scheduler -p fluxvm-apple -p fluxvm-api -p fluxvm-agent

Unattended Macs: deploy/launchd-notes.md.