The question
Running an AI coding agent inside a VM is the obvious way to give it real isolation — its own filesystem, its own blast radius, nothing to clean up when you're done. On Apple Silicon that runs into a wall: Apple's Virtualization.framework doesn't pass the host GPU through to a Linux guest, so a model loaded inside the VM is CPU-bound only. Velo Workspaces' answer is AI Bridge — a vsock-based channel that lets the VM reach a model server running on the host's own GPU, exposed inside the guest as a plain OpenAI-compatible endpoint.
The question that actually matters if you're going to rely on this setup day to day: what does that channel cost you? I ran three separate benchmarks, at three different scales, to find out — against MLX, Apple's own array framework, running natively on the Metal GPU via mlx_lm.server.
- Raw single-request speed — time-to-first-token and sustained throughput
- Concurrent load — 8 parallel requests, wall-clock time
- A real agentic coding loop — an actual coding agent (OpenCode) writing and running code against the model, end to end
Setup
- Host: Mac mini, Apple M4, 10 cores, 16GB RAM, macOS 26.6.2
- Guest: Ubuntu Server 26.04 LTS VM, 4 vCPU, 4GB RAM — Velo Workspaces' AI Sandbox profile
- Model:
mlx-community/Qwen2.5-Coder-7B-Instruct-4bit, served bymlx_lm.serveron the host - Protocol: every run was preceded by stopping all VMs and restarting the model server fresh, to rule out leftover contention from a previous run.
Tools
Open source: veloworkspace-tools — ai_perf_test.py, ai_load_test.py, opencode_perf_test.py.
Results
Single-request speed (5-run average)
A ~1% difference in either direction is inside normal run-to-run noise — this is not a measurable cost of the VM boundary.
Concurrent load (8 parallel clients, averaged across 4 runs)
The VM runs a few percent behind the host here, consistently across all 4 repeated runs — small, but real rather than noise.
Agentic loop (OpenCode, 5 iterations per task, mean)
Same pattern: the VM trails by roughly 1–5% across all three tasks, with tight run-to-run variance (standard deviation under 0.2s on every task) — meaning this is a repeatable, low-noise gap, not a fluke of one run.
Conclusion
At single-request scale, routing inference through a vsock proxy into a VM costs nothing measurable — the architecture does what it's supposed to do. Under concurrent load and in a real agentic workflow, there's a small, consistent, low single-digit-percent gap rather than perfect parity — worth stating precisely rather than rounding to zero in either direction.
Practically: if you're running an AI coding agent inside a disposable Linux VM to keep it off your host filesystem, and reaching a model served by MLX on your Mac's own GPU, you're not trading away meaningful inference speed to get that isolation. The vsock hop AI Bridge adds is close to free.
Raw output, methodology notes, and the benchmark scripts themselves are in the repo if you want to reproduce this against a different model or Mac — these numbers are specific to this hardware, model, and workload, and won't necessarily generalize to a 70B model or an 8GB Mac.
Appendix — raw test output
Terminal output from each test, host and VM side by side.
Single-request speed test
Concurrent load test
Agentic-loop latency test (OpenCode)