8000 feature: minvmd networking — gvproxy userspace net for VM sessions · Issue #404 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

feature: minvmd networking — gvproxy userspace net for VM sessions #404

Closed
5 of 5 issues completed

Description

@norrietaylor

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.
  • minvmd spawns a gvproxy child per VM, wired to libkrun virt-net, and reaps it on VM stop — no orphans after minimal stop or crash.
  • The taskspec network allowlist 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

  1. added
    priority:should-haveShould be done. Applied by the inbox-route classifier or a human.
    kind:featureA new feature or capability. Applied by the inbox-route classifier.
    on Jun 12, 2026
  2. norrietaylor commented on Jun 13, 2026

    @norrietaylor
    MemberAuthor

    /spec

  3. gominimal-aw-bot commented on Jun 13, 2026

    @gominimal-aw-bot
    Contributor

    Pull request created: #407

    Generated by sdd-spec · sonnet46 7M

  4. gominimal-aw-bot commented on Jun 13, 2026

    @gominimal-aw-bot
    Contributor

    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:

    • Unit 1 — gvproxy child spawn, lifecycle, reap (src/net.rs new, cmd/run.rs, state.rs)
    • Unit 2 — krun_set_passt_fd FFI + VmConfig virtio-net wiring (krun/raw.rs, krun/ctx.rs, vm.rs, cmd/vmm_child.rs)
    • Unit 3 — network allowlist enforcement hook: wired call site + no-op stub

    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#406 is added to the PR body by sdd-pr-sanitize).

    Generated by sdd-spec for issue #404 · sonnet46 7M · ◷

  5. gominimal-aw-bot commented on Jun 13, 2026

    @gominimal-aw-bot
    Contributor

    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).

    /spec on the tracking issue does not revise an open spec PR. To change the spec, please comment /revise <note> on PR #407.

    Generated by sdd-spec for issue #404 · sonnet46 1.1M · ◷

  6. gominimal-aw-bot commented on Jun 13, 2026

    @gominimal-aw-bot
    Contributor

    The spec PR has merged. ✅

    Spec file: docs/specs/03-spec-minvmd-networking-gvproxy/03-spec-minvmd-networking-gvproxy.md

    Next step: a write-access author comments /triage on this tracking issue to start the architecture phase.

    Generated by sdd-spec for issue #407 · sonnet46 1.2M · ◷

  7. norrietaylor commented on Jun 14, 2026

    @norrietaylor
    MemberAuthor

    /triage

  8. norrietaylor commented on Jun 17, 2026

    @norrietaylor
    MemberAuthor

    /triage

  9. 13 remaining items

  10. norrietaylorcommented on Jun 18, 2026

    @norrietaylor
    MemberAuthor

    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 gvproxy crate, so sandbox2 can reuse the same gvproxy --fd invocation. The two paths still differ in FD source — a socketpair end handed to libkrun krun_set_passt_fd (one per VM) vs hakoniwa Child::rustslirp_tapfd from a Network::RustSlirp container (one per sandbox) — so they compose rather than replace each other. The sandbox2 wiring itself stays out of scope here (deferred follow-up). See updated spec "Shared gvproxy crate and per-path FD sources" + Open Question 4.

  11. norrietaylor commented on Jun 19, 2026

    @norrietaylor
    MemberAuthor

    /dispatch

  12. gominimal-aw-bot commented on Jun 19, 2026

    @gominimal-aw-bot
    Contributor

    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.

  13. gominimal-aw-bot commented on Jun 19, 2026

    @gominimal-aw-bot
    Contributor

    /dispatch

    sdd-monitor: re-dispatching stranded tasks #454, #455, #456, #458 on #404 (no PR, no in-flight run; attempt 1 of 3).

  14. norrietaylor commented on Jun 19, 2026

    @norrietaylor
    MemberAuthor

    Abandoning this spec. Resuming it after the blocker cleared was the wrong call — the task decomposition split the State.gvproxy_pid field (Task 1.3) from its run.rs constructors (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.

  15. norrietaylor commented on Jun 19, 2026

    @norrietaylor
    MemberAuthor

    Superseded by #478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:featureA new feature or capability. Applied by the inbox-route classifier.priority:should-haveShould be done. Applied by the inbox-route classifier or a human.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0