Repository navigation
Description
Summary
Add userspace networking to minvmd-managed VMs using gvproxy (containers/gvisor-tap-vsock) as the default transport, with TSI remaining selectable as a fallback. Applies to both macOS and Linux host paths.
Problem
VM sessions currently have no outbound network connectivity. The existing TSI socket-emulation approach caps at ~62 concurrent connections — incompatible with the parallel cache-fetch path (target: 200 concurrent connects) and causing EMFILE-class failures at scale.
Desired outcome
- VM sessions get outbound connectivity via gvproxy by default; TSI selectable.
- 200 concurrent outbound connects sustained without EMFILE.
minvmdspawns a gvproxy child per VM, wired to libkrun virt-net, and reaps it on VM stop — no orphans afterminimal stopor crash.- The taskspec
networkallowlist enforcement hook is wired and called with the resolved network declaration, even while the policy default is open.
Scope notes
Design questions for the spec:
- Deny-vs-allow default for the network allowlist; warn-vs-silent for declared-but-unenforced capabilities.
- Per-Task vs per-VM enforcement granularity when multiple tasks share a VM.
- Whether the Linux namespace sandbox path shares the same gvproxy servicing code as the VM path (one packet-pipe consumer for both isolation modes).
Approach: (1) minvmd spawns gvproxy per VM and wires it to libkrun virt-net; lifecycle (start/stop/reap) owned by the VM supervisor. (2) Expose the enforcement hook for the taskspec network allowlist (declaration surface already specced in the capability envelope issue). (3) DNS and port-forwarding as explicit sub-items.
Related: minimal#311 (macOS minvmd base), minimal#396 (Linux minvmd), minimal#204 (TSI EMFILE root cause)
This issue is the tracking issue for this work. The sdd:spec lifecycle
label is applied by the inbox router once the issue tree is linked, so
sdd-spec will draft a spec PR from it automatically.
Steer the pipeline with these comment commands. Each is gated to commenters
with write access to the repository.
| Command | Where | Effect |
|---|---|---|
/spec |
this tracking issue | re-run sdd-spec to draft or revise the spec |
/fastpath |
this tracking issue | confirm a single-session change; sdd-spec produces a stub spec PR and an execution plan comment in one run (ADR 0012) |
/triage |
this tracking issue, after the spec PR is merged | start sdd-triage phase A (architecture) |
/approve |
this tracking issue | full path: confirm the proposed plan so sdd-triage creates the Unit and task sub-issues. Fast path: dispatch the execution plan against sdd-execute-{tier} |
/dispatch |
this tracking issue (full path only) | arm the cascade across the task tree |
/revise <note> |
a spec, architecture, or implementation PR, or this tracking issue | re-run the owning agent with the note as an added instruction |
/execute |
a task sub-issue | run sdd-execute for that task ahead of the schedule |
Merging the spec PR advances to the architecture phase; merging the
architecture PR advances to a plan-comment phase, where sdd-triage posts
the proposed plan as one comment on this tracking issue. When an agent needs
a human decision it applies the needs-human label and posts one comment;
clear the label once you have answered and the agent resumes.
Routed from gominimal/inbox#225 (now gominimal/inbox#242).
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABFU-b1w
Activity
norrietaylor commentedon Jun 13, 2026
/spec
docs(spec-minvmd-networking-gvproxy): spec for minvmd gvproxy userspa…
gominimal-aw-bot commentedon Jun 13, 2026
Pull request created: #407
gominimal-aw-bot commentedon Jun 13, 2026
Spec PR opened: docs(spec-minvmd-networking-gvproxy): minvmd networking — gvproxy userspace net for VM sessions.
Please review and merge the spec PR to advance the tracking issue from the spec phase into triage.
What the spec covers:
src/net.rsnew,cmd/run.rs,state.rs)krun_set_passt_fdFFI +VmConfigvirtio-net wiring (krun/raw.rs,krun/ctx.rs,vm.rs,cmd/vmm_child.rs)Open questions flagged for ADRs: deny-vs-allow default, warn-vs-silent for unenforced capabilities, per-task vs per-VM enforcement granularity, Linux namespace sandbox path sharing.
Merging the spec PR will close the spec sub-issue (
Closes gominimal/minimal#406is added to the PR body bysdd-pr-sanitize).gominimal-aw-bot commentedon Jun 13, 2026
A spec PR is already open for this tracking issue: docs(spec-minvmd-networking-gvproxy): minvmd networking — gvproxy userspace net for VM sessions (PR #407).
/specon the tracking issue does not revise an open spec PR. To change the spec, please comment/revise <note>on PR #407.gominimal-aw-bot commentedon Jun 13, 2026
The spec PR has merged. ✅
Spec file:
docs/specs/03-spec-minvmd-networking-gvproxy/03-spec-minvmd-networking-gvproxy.mdNext step: a write-access author comments
/triageon this tracking issue to start the architecture phase.norrietaylor commentedon Jun 14, 2026
/triage
norrietaylor commentedon Jun 17, 2026
/triage
13 remaining items
norrietaylorcommentedon Jun 18, 2026
Scope-note update: the design question "whether the Linux namespace sandbox path shares the same gvproxy servicing code as the VM path (one packet-pipe consumer for both isolation modes)" is now partially answered. #463 factored the transport-agnostic gvproxy spawn/lookup into a shared
gvproxycrate, sosandbox2can reuse the samegvproxy --fdinvocation. The two paths still differ in FD source — a socketpair end handed to libkrunkrun_set_passt_fd(one per VM) vs hakoniwaChild::rustslirp_tapfdfrom aNetwork::RustSlirpcontainer (one per sandbox) — so they compose rather than replace each other. Thesandbox2wiring itself stays out of scope here (deferred follow-up). See updated spec "Shared gvproxy crate and per-path FD sources" + Open Question 4.norrietaylor commentedon Jun 19, 2026
/dispatch
gominimal-aw-bot commentedon Jun 19, 2026
Every open task is either blocked or already in flight; the cascade remains armed. The next task close under this tracking issue will resume dispatch.
gominimal-aw-bot commentedon Jun 19, 2026
/dispatch
sdd-monitor: re-dispatching stranded tasks #454, #455, #456, #458 on #404 (no PR, no in-flight run; attempt 1 of 3).
norrietaylor commentedon Jun 19, 2026
Abandoning this spec. Resuming it after the blocker cleared was the wrong call — the task decomposition split the
State.gvproxy_pidfield (Task 1.3) from itsrun.rsconstructors (Task 1.2) into independent sibling tasks that could not compile alone on macOS, producing an unrecoverable wedge. Closing the tree and reverting all merged changes.Closed unmerged: PR #471, PR #473.
Reverting merged: PR #463 (net.rs + gvproxy crate) and the spec/arch docs — see revert PR (linked below).
No further work planned on minvmd gvproxy userspace networking.
revert(minvmd): back out abandoned gvproxy networking spec (#404) (#477)
norrietaylor commentedon Jun 19, 2026
Superseded by #478