I wanted a throwaway macOS guest for an AI agent, one I could clone, hand to a script, and delete without touching the host. Tart already does that job for me, so I tried Lume to see whether its local HTTP API and built-in MCP server earn it a place next to Tart. The first surprise came before any VM booted: github.com/trycua/lume now redirects to the trycua/cua monorepo, and Lume lives there under libs/lume.
These are my notes from one long evening on a rented Mac, failures included, because the failures are where a headless setup differs from the quickstart. You’ll see the create path that deleted my VM, the run check that thought a half empty disk was full, the workaround that held a guest up, and an agent task running inside it. I ran all of it on November 24, 2026 on an AWS mac-m4.metal host running macOS 27.2.1 with Lume 0.9.0, and every command and output in the screenshots comes from that box.
Choosing Lume over Tart for an agent VM
Both tools sit on Apple’s Virtualization framework, so they share the same ceiling: two macOS guests running at once per host, which the Lume docs call Apple’s limit and which I hit later in this run. Where they differ is in how an agent talks to the VM, and that is the part I cared about.
| What I needed | Lume | Tart |
|---|---|---|
| Golden image to start from | lume pull or a fresh install from Apple’s restore image | OCI images pulled from a registry |
| Run a command in the guest | lume ssh, or lume_exec over MCP | tart exec |
| Control from a script | HTTP API on 127.0.0.1:7777 | The CLI |
| Control from an AI client | lume serve --mcp, ten tools built in | Wrap the CLI yourself |
| Unattended first boot | YAML presets with an SSH health check | Prebuilt images with SSH ready |
So which one should you reach for? After this run my answer depends on who is in charge of the VM:
- A script runs one task per VM: Tart is enough
- An MCP client creates and deletes guests itself: Lume
- The host has no GUI login: either works, Lume needs a workaround
If you already run Tart, our Tart VM walkthrough on Apple Silicon covers tart exec and the image cache, and nothing below will make you switch for plain scripted jobs. Lume earns its place when the agent itself should manage guests, because the MCP server ships in the same binary and needs no wrapper code from you.
Installing Lume on a headless Mac
My host was a mac-m4.metal I reached only over SSH as ec2-user, the same kind of box our EC2 Mac instance guide rents for a day. The installer is one line, and it pulls the release tarball from the cua repo’s GitHub releases:
/bin/bash -c "$(curl -fsSL https://cua.ai/lume/install.sh)"
It finished in seconds, and three lines of its output deserve more attention than the green “successfully installed” banner:
Using baked Lume release: lume-v0.9.0
Lume installed to /Users/ec2-user/.local/share/lume/lume.app
CLI available at /Users/ec2-user/.local/bin/lume
...
Telemetry defaults to enabled for new installations; saved preferences and environment overrides are honored.
Disable persistently at any time: /Users/ec2-user/.local/bin/lume config telemetry disable
...
Loading LaunchAgent...
Load failed: 5: Input/output error
Try running `launchctl bootstrap` as root for richer errors.
Lume daemon LaunchAgent installed and loaded. It will start automatically on login!
The CLI lands in ~/.local/bin, which is not on PATH, and telemetry starts enabled. The last pair of lines contradicts itself: the LaunchAgent failed with error 5 because there was no GUI login for it to join, yet the script still reports it as loaded. That matters later, because the HTTP API it was meant to start is not running, so on a headless host you start lume serve yourself. Fix the PATH first so the rest of the commands work as typed:
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.zshrc
source ~/.zshrc
lume --version
It printed 0.9.0. If you don’t want the pseudonymous usage data leaving the box, run the lume config telemetry disable command the installer prints.
Creating a VM from Apple’s restore image
My first attempt followed the quickstart word for word: download the newest restore image, install macOS, then let the tahoe preset patch the guest so SSH and autologin are ready on first boot. The download of the 27.2.1 image took 55 seconds and the install another nine minutes, which felt promising.
lume create lume-agents-vm --ipsw latest --unattended tahoe
Then the SSH health check started. Sixty tries five seconds apart, all refused, and when the last one failed Lume stopped the guest and deleted it. Seventeen minutes of work were gone, and the restore image it had fetched sat in a temp folder rather than anywhere I’d chosen.

Deleting a VM that installed cleanly is a harsh default, and it is the part to plan around. A failed health check tells you nothing about why SSH never answered, and with the guest gone you can’t open it over VNC to look. If you’re testing a new macOS build with --unattended, download the restore image yourself, create the VM without the flag, and run the preset as a separate lume setup step, so a failure leaves you a guest to inspect. The quickstart says lume ipsw prints the download URL for the newest image; with the file on disk, the create looks like mine:
lume create lume-agents-vm --ipsw ~/lume-macos-vm-agents/UniversalMac_27.2.1_26B131_Restore.ipsw
Use your own path and file name there. Without --unattended, the VM stays put whatever happens on first boot.
Health check ‘ssh’ failed after all retries
That split is exactly what I did next. The plain lume create above took 9 minutes 12 seconds and kept the VM. Then I ran the preset on its own with lume setup lume-agents-vm --unattended tahoe, and it failed the same way after 7 minutes 19 seconds. Why would a guest that installed cleanly never answer on port 22?
Before that second run I’d read trycua/cua issue #7573, which reports that macOS Local Network privacy blocks connections to the vmnet subnet from processes an SSH session starts. Apple’s TN3179 technote documents a system default for allowing a subnet on macOS 15.5 and later, so I added Lume’s NAT range before the setup run:
sudo defaults write com.apple.network.local-network AllowedEthernetLocalNetworkAddresses -array "192.168.64.0/24"
Read TN3179 to the end before you copy that. It says the change takes effect only after a restart, which I did not do on the rented host. It also says tools run over SSH are already allowed. So in my run the allowance most likely changed nothing; if you want it, reboot after the write. What mattered was the next probe: nc -v -z -G 3 192.168.64.5 22 from the SSH session got Connection refused, which means sshd in the guest wasn’t listening. Opening the guest over VNC showed why: macOS 27 was sitting on Setup Assistant’s Accessibility screen, waiting for someone to press Not Now (1).

The same issue explains it. The offline patcher writes Setup Assistant’s “last seen” keys for one specific Tahoe build, so any other build still walks through the first boot screens, and the guest never reaches the point where Lume’s finalization turns sshd on. The libs/lume README calls Tahoe “E2E verified from a local IPSW”, and this is a good guess at why other builds aren’t. I stopped fighting macOS 27 here and switched to a prebuilt Tahoe image, which is what I’d tell anyone on a deadline to start with.
Pulling a golden image and cloning it
lume pull fetches a ready VM from cua’s registry. The macos-tahoe-vanilla image is 61 layers and 19.5 GB compressed, and it came down at about 90 MB/s:
lume pull macos-tahoe-vanilla:latest lume-tahoe-golden
Three minutes and 44 seconds from start to a stopped VM named lume-tahoe-golden, which beat the restore image path by a wide margin before counting any setup. If you’d rather bake your own golden image than trust a vendor’s, the Packer and Tart image build guide shows that pipeline for Tart.

I never boot the golden copy. Every agent task gets a clone, so a task that wrecks its guest costs me one lume delete:
lume clone lume-tahoe-golden agent-task-01
It took 0.13 seconds. du reports 24G for each VM, and no tool copies 24G in a tenth of a second, so the files are APFS clones that share blocks until the guest writes to its sparse 100G disk.img.

Instant clones change how you treat agent VMs. Rebuilding a guest from scratch costs minutes, so people are tempted to reuse one, and a reused guest carries the last task’s files, defaults and login state into the next. Cloning is cheap enough to do per task. Each VM folder holds only config.json, disk.img and a 32M nvram.bin, and the docs warn never to copy the disk without its NVRAM, so let lume clone make copies rather than cp.
Starting the VM without a GUI session
I expected lume run to be the easy step. It wasn’t. My first try was on the macOS 27 VM from the restore image, while the Tahoe pull was still running. Lume refused to start it, claiming the host volume had zero bytes free. df on the same volume showed 254Gi available a few minutes later. The screenshot puts the two side by side.

That message sends you hunting for disk space you don’t need. The error has its own heading below, because it’s the one a headless reader is most likely to search for.
Not enough free space on host volume, Zero KB (0 bytes) is available
I read Lume’s source to find the check. HostDiskSpace.swift asks macOS for volumeAvailableCapacityForImportantUsage, and from my SSH session that value came back as zero, so Lume concluded the guest’s writes would fail and stopped before booting. The check only runs on the lume run path, so it would likely hit any VM started that way, the clone included. Running the golden image with sudo lume run did not help either: Lume got past the check, then stopped with “Unable to access security information. The virtual machine encountered a security error.”
The intended fix on a host like this is a logged-in GUI session, either at the console or through Screen Sharing, which is what the installer’s LaunchAgent assumes too. I couldn’t open one on the rented Mac, so I went looking for a code path that boots a VM without the space check. If you can log in to your Mac’s desktop, do that instead and skip the next section.
Holding the VM up with lume setup
So why does lume setup boot a guest that lume run refuses? It drives the VM through its own code path, and the setup log shows the order it works in:
- Boot once to create first boot state
- Stop and patch the Data volume offline
- Boot again and run the SSH health check
- Run each
post_ssh_commandsentry over SSH - Stop the VM when the list ends
None of those steps calls the free space check. That gave me the idea: if the first post SSH command installs a key for my agent and the rest keep the session busy, the guest stays up for as long as the list lasts. First the key:
ssh-keygen -q -t ed25519 -N '' -C lume-agent -f ~/agent_ed25519
Then save this as ~/agent-window.yml. Replace the key line with the contents of your own agent_ed25519.pub. The lume/lume login is what Lume’s unattended images use:
boot_wait: 0
boot_commands: []
health_check:
type: ssh
user: lume
password: lume
timeout: 5
retries: 60
retry_delay: 5
post_ssh_commands:
- "mkdir -p ~/.ssh && chmod 700 ~/.ssh && echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5...<public key> lume-agent >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
- "sleep 55"
Sixteen short sleeps rather than one long one, because each command runs over its own SSH call and I didn’t want to find out what timeout sits on a single fifteen minute call. Run it in a second terminal or a tmux pane, since it holds the shell until the last sleep returns:
lume setup agent-task-01 --unattended ~/agent-window.yml
This time the health check passed on attempt one, 22 seconds after the second boot, and the post SSH commands started ticking through. The Local Network allowance from earlier was still in place during this run.

It’s a hack, and it has a hard edge: when the last sleep returns, Lume stops the VM whether your agent is finished or not. For a short task that was fine, because I knew it would take seconds. For a long agent session I would not trust it. Get a GUI login on the host and use lume run --detach the way the docs show, or add more sleeps and stop the VM yourself when the task ends.
The number of virtual machines exceeds the limit
An earlier setup run failed in two seconds with that message. Two other jobs on the same Mac had Tart macOS guests running, and Apple counts every macOS guest on the host, whichever tool started it. Check with lume ls and tart list before you blame Lume, and size an agent fleet at two guests per Mac.
Clicking through Setup Assistant over VNC
Every Lume VM starts a VNC server bound to the host’s loopback, and lume ls prints its URL with a random passphrase and port. I tunnelled it from my workstation with ssh -f -N -L 15900:127.0.0.1:53401 [email protected] and pointed a VNC client at 127.0.0.1:15900. Treat that URL as a secret, since it also shows up in lume get and in the HTTP API’s JSON.
The clone had SSH working, yet the desktop showed Setup Assistant again. Issue #7573 explains this one too: lume clone generates a new machine identifier, so macOS treats each clone as a new Mac. These are the screens I clicked through, in order:
- Accessibility: Not Now
- Apple Account: Other Sign-In Options, then Sign in Later in Settings, then Skip
- Age Range: Adult
- Analytics: Continue
- Screen Time: Set Up Later
- FileVault: Not Now, then Continue
- Choose Your Look: Continue, then Get Started
The Apple Account screen is the one that costs time, because the skip isn’t on the first page. Press Other Sign-In Options (1) and the Sign in Later in Settings (2) choice appears below it.

- 1Other Sign-In Options
- 2Sign in Later in Settings
An agent that only uses SSH never needs these screens, so skip this section if yours works in a shell. A desktop agent is a different story, because every fresh clone puts the same seven screens between it and the apps it was meant to drive. The issue’s author suggests copying the source VM’s identifier with lume set --machine-identifier, which I haven’t tried, so for now I click through by hand on each clone that needs a desktop.
Connecting to the guest over ssh
Lume hands out guest addresses from Apple’s NAT range, and lume ls shows the IP plus a yes or no for SSH. lume ssh logs in with the default account, so you don’t need a key for quick checks:
lume ls
lume ssh agent-task-01 "sw_vers; id -un; uptime"
The guest answered as the lume user, running the Tahoe build from the image, with 54 seconds of uptime.

For anything scripted I prefer plain ssh with the agent key from the YAML. That way the agent never sees the default password, and you can revoke its access by deleting one line in the guest. A script can poll lume get agent-task-01 --format json for the ipAddress and sshAvailable fields before it connects.
Running an agent task inside the VM
My test task was small on purpose: fetch a file from the internet, change a macOS default the way an agent would, and pack the results for the host to collect. If all three work, the guest has outbound network, a writable home and a real defaults database, which covers most of what a coding agent touches. This is task.sh:
#!/bin/zsh
set -e
mkdir -p ~/agent-run && cd ~/agent-run
echo "== task started $(date -u +%H:%M:%SZ) on $(scutil --get ComputerName) =="
sw_vers -productVersion
curl -sS -o cua-readme.md https://raw.githubusercontent.com/trycua/cua/main/README.md
wc -l cua-readme.md
grep -c -i lume cua-readme.md | xargs echo "lines mentioning lume:"
defaults read com.apple.finder AppleShowAllFiles 2>/dev/null || echo "Finder AppleShowAllFiles: unset"
defaults write com.apple.finder AppleShowAllFiles -bool true
echo "Finder AppleShowAllFiles now: $(defaults read com.apple.finder AppleShowAllFiles)"
tar czf ~/agent-run.tgz -C ~ agent-run
ls -lh ~/agent-run.tgz
echo "== task finished $(date -u +%H:%M:%SZ) =="
I reached for lume cp to upload it and hit a quoting bug. With an absolute guest path, scp failed on dest open "'/Users/lume/task.sh'". With a relative path it reported success but created a file literally named 'task.sh', quotes and all, which is worse because nothing tells you it went wrong. Plain scp with the agent key works, so that’s what I used. Swap in the IP lume ls shows for your guest:
chmod +x task.sh
scp -i ~/agent_ed25519 task.sh [email protected]:
ssh -i ~/agent_ed25519 [email protected] ./task.sh
scp -i ~/agent_ed25519 [email protected]:agent-run.tgz .
The whole task ran in 0.73 seconds: a 319 line README with 12 lines mentioning Lume, the Finder default flipped from unset to 1, and a 7.3K tarball copied back to the host.

I also opened Terminal in the guest over VNC to make sure the files were really on its disk and not some artefact of my SSH session. They were, owned by lume, next to the kernel version the task never printed.

Swap my script for whatever your agent runs, such as Claude Code in headless mode with its permissions locked down. If you set up agents like that often, the AI coding agent cheat sheets for Claude Code, Codex and Gemini CLI keep the install, headless sign in, MCP and permission commands for all three in one place.
Driving the VM from an MCP client
MCP is the feature that made me try Lume in the first place. lume serve --mcp speaks MCP over stdio, so your AI client launches it as a subprocess. The docs give this client config, with the path that which lume prints:
{
"mcpServers": {
"lume": {
"command": "/Users/ec2-user/.local/bin/lume",
"args": ["serve", "--mcp"]
}
}
}
Before trusting a client with it, I spoke the protocol by hand. Three JSON lines on stdin are enough: initialize, the initialized notification, then a request. This is the lume_exec call as I ran it; for the tool list, swap the last line for {"jsonrpc":"2.0","id":2,"method":"tools/list"}.
( printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"cfg-test","version":"0.1"}}}' '{"jsonrpc":"2.0","method":"notifications/initialized"}' '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"lume_exec","arguments":{"name":"agent-task-01","command":"sw_vers -productVersion; defaults read com.apple.finder AppleShowAllFiles; ls ~/agent-run"}}}'; sleep 8 ) | lume serve --mcp 2>/dev/null > mcp-exec.json
The server introduced itself as lume 1.0.0 with ten tools, and lume_exec ran my command in the guest and returned its stdout. My first call passed vm_name and failed. The argument is name.

Read that tool list as a permission list. Three of the ten deserve a second look before you hand the server to a client:
lume_delete_vm: can remove the golden imagelume_create_vm: starts a long install and fills disklume_exec: runs any shell command in any running guest
A client with this server can wipe your golden image as easily as clone it, so keep that copy under a name the agent’s prompts never mention and allow only the tools a task needs. If you’re wiring this into Claude Code, our Claude Code cheat sheet covers its permission modes and how to pre-approve only the tools you want.
Scripts get the same control over HTTP. Since the LaunchAgent never loaded, start plain lume serve yourself in another pane; it listened on 127.0.0.1:7777 only, and curl -s localhost:7777/lume/vms returned all three VMs with their state and IP. Mind that the response also carries each running VM’s VNC URL with its passphrase.
Measuring what one guest costs the host
With the clone idle at the desktop, I sampled the VM process and the host. The guest was configured with 4 vCPUs and 8 GB, Lume’s defaults. Replace 22407 with the PID of your own VM process from Activity Monitor or ps:
ps -o pid,etime,%cpu,rss,vsz -p 22407
memory_pressure | tail -1
top -l 1 -n 0 | grep -E "PhysMem|CPU usage"
du -sh ~/.lume/agent-task-01 ~/.lume/lume-tahoe-golden
Four numbers from that sample are worth keeping:
- VM process RSS: 10,616,688 KiB, about 10.1 GiB for an 8 GiB guest
- CPU at idle: 1.4 percent in that sample
- Host memory free: 94 percent per
memory_pressure - Disk per VM: 24G, golden and clone alike
Budget roughly a quarter more host memory than you assign to each guest, because the process overhead is real even when the desktop sits idle.

Memory is the number that decides your fleet size, not CPU. On this 24 GB M4, two idle 8 GB guests would take about 20 GiB between them, which fits under Apple’s two VM limit but leaves little for the agent’s own tools on the host. If you’re buying hardware for this, our Mac mini for AI agents buyer’s guide weighs memory configs against that ceiling, and I’d lean toward more RAM over a faster chip.
Stopping and cleaning up
lume stop finds the process holding the VM’s config.json lock and sends it SIGTERM. It took 0.14 seconds and also ended my lume setup window early, which is how you close that hack before the sleeps run out:
lume stop agent-task-01
lume delete agent-task-01 --force
lume delete lume-tahoe-golden --force
lume delete lume-agents-vm --force
lume prune
On a shared or rented host, also put things back the way you found them. Remove the Local Network allowance key (only that key, so any Wi-Fi allowance in the same domain survives), the LaunchAgent the installer wrote, and the restore image you downloaded:
sudo defaults delete com.apple.network.local-network AllowedEthernetLocalNetworkAddresses
rm ~/lume-macos-vm-agents/UniversalMac_27.2.1_26B131_Restore.ipsw
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/com.trycua.lume_daemon.plist
rm ~/Library/LaunchAgents/com.trycua.lume_daemon.plist
The bootout line may complain that nothing is loaded, which is expected after the failed load at install. Per TN3179 the allowance removal also needs a restart to take effect. After this, ~/.lume was empty and the volume was back to 428Gi free.
What I still don’t know
Lume’s MCP server is the best reason to pick it over Tart for agents, and the clone and exec loop worked well once a guest was up. Getting a guest up on a headless Mac was the hard part, and a few questions are still open after this run:
- Does a GUI login on the host make
lume runsee real free space? - Was the Local Network allowance needed for the Tahoe clone, or only for macOS 27?
- When will the
tahoepreset cover macOS 27 builds? - Is the
lume cpquoting bug fixed in a newer release?
I couldn’t log in to the rented Mac’s console, so the first question stays open until I repeat this on a Mac mini at my desk. If you run Lume on one, try lume run --detach from a logged-in session first. My guess is that the space check passes there and you won’t need my setup trick at all, but I have not tested that, and I’d like to hear if it fails for you.