Skip to content

feat(vm): run the supervisor outside the guest workload - #2945

Open
drew wants to merge 4 commits into
codex/1737-rfc12-supervisor-primitivesfrom
codex/vm-host-supervisor
Open

feat(vm): run the supervisor outside the guest workload#2945
drew wants to merge 4 commits into
codex/1737-rfc12-supervisor-primitivesfrom
codex/vm-host-supervisor

Conversation

@drew

@drew drew commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adopt the RFC 0012 split in the VM driver. openshell-supervisor runs on the host, while openshell-sandbox runs as guest init and owns the agent process tree.

The private guest channel uses the same pinned TLS server identity and launch-scoped sandbox JWT as every other driver, carried over vsock or the hypervisor Unix-socket mapping.

Related Issue

Part of #1737.

Changes

  • Boot the guest with the sandbox runtime, TLS server material, and public JWT verification keys.
  • Keep both supervisor JWTs and the pinned sandbox CA on the host.
  • Run the external host supervisor with durable runtime state.
  • Remove the guest NIC, TAP, gvproxy, nftables, and direct guest egress path.
  • Carry lifecycle, process control, TCP, and DNS over the authenticated Sandbox Protocol.
  • Keep gateway, provider, and upstream network access outside the guest.

Testing

  • mise run pre-commit
  • Focused VM isolation tests
  • Full VM E2E validation delegated to remote CI

Checklist

  • Follows Conventional Commits
  • Authored commits are signed off (DCO)

Stack

  1. feat(isolation): implement the RFC 0012 sandbox architecture #2942 — RFC 0012 core architecture
  2. feat(vm): run the supervisor outside the guest workload #2945 — VM driver (this PR)
  3. feat(docker): isolate workloads behind the host supervisor #2965 — Docker driver
  4. feat(kubernetes): add proxy-pod isolation topology #3144 — Kubernetes proxy-pod driver
  5. feat(podman): isolate workloads behind the host supervisor #3230 — Podman driver
  6. perf(isolation): add TCP and DNS benchmark harnesses #3229 — performance harnesses

@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions

Copy link
Copy Markdown

@drew
drew force-pushed the codex/vm-host-supervisor branch from 4a8f295 to 532fa1b Compare August 26, 2026 07:08
@drew
drew changed the base branch from codex/rfc-0012-impl-base to codex/1737-rfc12-supervisor-primitives August 26, 2026 07:09
@drew
drew force-pushed the codex/vm-host-supervisor branch from 532fa1b to 02e80eb Compare August 26, 2026 08:50
@drew drew changed the title feat(vm): move supervisor outside guest boundary feat(isolation): prototype host-supervised VM and Docker boundaries Aug 26, 2026
@drew
drew force-pushed the codex/vm-host-supervisor branch from 7e10ae3 to 02e80eb Compare August 26, 2026 19:41
@drew drew changed the title feat(isolation): prototype host-supervised VM and Docker boundaries feat(vm): move supervisor outside guest boundary Aug 26, 2026
@drew
drew force-pushed the codex/vm-host-supervisor branch from 02e80eb to be91699 Compare September 1, 2026 00:13
@copy-pr-bot

copy-pr-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@drew
drew force-pushed the codex/vm-host-supervisor branch from be91699 to 273655b Compare September 1, 2026 08:00
@drew
drew force-pushed the codex/vm-host-supervisor branch from 273655b to f7c163d Compare September 1, 2026 08:06
@drew
drew force-pushed the codex/vm-host-supervisor branch from 0c5cd41 to 9291888 Compare September 3, 2026 01:45
@drew
drew marked this pull request as ready for review September 3, 2026 01:46
@drew
drew requested review from a team, derekwaynecarr, mrunalp and sjenning as code owners September 3, 2026 01:46
@drew
drew changed the base branch from codex/1737-rfc12-supervisor-primitives to codex/1737-rfc12-supervisor-modes September 3, 2026 01:46
@drew drew changed the title feat(vm): move supervisor outside guest boundary feat(vm): adopt shared supervisor boundary mode Sep 3, 2026
@drew
drew force-pushed the codex/vm-host-supervisor branch from fd784d6 to 36d8ef7 Compare September 3, 2026 14:34
@drew drew added the test:e2e Requires end-to-end coverage label Sep 3, 2026
@drew
drew added this pull request to stack #3231 September 9, 2026 04:42
@drew
drew force-pushed the codex/vm-host-supervisor branch 4 times, most recently from a43076b to 8355238 Compare September 9, 2026 05:50
@drew
drew force-pushed the codex/vm-host-supervisor branch from 17c81c7 to 45afac4 Compare September 11, 2026 05:57
@drew
drew force-pushed the codex/vm-host-supervisor branch from 45afac4 to 4363b64 Compare September 11, 2026 17:36
@drew
drew force-pushed the codex/vm-host-supervisor branch 2 times, most recently from 821b780 to 8c62fcf Compare September 11, 2026 19:48
@drew
drew force-pushed the codex/vm-host-supervisor branch 2 times, most recently from dc7fa5d to 36ecb98 Compare September 11, 2026 20:48
Base automatically changed from codex/1737-rfc12-supervisor-modes to codex/1737-rfc12-supervisor-primitives September 11, 2026 21:09
@drew
drew removed this pull request from stack #3231 September 11, 2026 21:09
@drew
drew added this pull request to stack #3293 September 11, 2026 21:12
@drew
drew force-pushed the codex/vm-host-supervisor branch from 36ecb98 to 56fc0b3 Compare September 11, 2026 22:13
Comment thread .github/workflows/build-vm-driver.yml Fixed
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
@drew
drew force-pushed the codex/vm-host-supervisor branch from 56fc0b3 to d88b884 Compare September 11, 2026 22:17

@johntmyers johntmyers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

PR Review Status

The VM slice is project-valid as the second implementation layer of accepted RFC 0012, reviewed incrementally against current stack base #2942. Two launch-contract regressions must be fixed before the VM runtime can reliably create and restart supported sandboxes.

Action required: @drew, please update the VM launch path to use fresh restart credentials and the already-resolved image/overlay identity, with the requested regression coverage.

Blocking findings:

  • GATOR-d88b8843-01: VM restart discards fresh launch authentication and reuses the deactivated create-time bundle.
  • GATOR-d88b8843-02: boundary and supervisor use fallback identity instead of the image/overlay identity used by guest init.

Carried findings:

  • None

Non-blocking suggestions:

  • None
Gator metadata
  • Validation: Implements the VM driver slice of accepted RFC 0012 / #1737, stacked directly on #2942.
  • Docs: Architecture and Fern reference docs are updated for the VM topology and configuration changes.
  • Checks: Current-head Branch Checks and E2E have completed with failures; pipeline handoff is deferred until review blockers are resolved.
  • E2E: test:e2e is present; current-head Branch E2E ran and failed before VM E2E execution.
  • Head SHA: d88b88430c289691f373487e91c9129fa902b98d
  • Base SHA: 07441545bab1241ba359eda5154236fbf775adfb
  • Merge base SHA: 07441545bab1241ba359eda5154236fbf775adfb
  • Patch ID: dfbb972145c87ceeb43a8e5e538f71cc75f3b860
  • Gator payload: 8
  • Review mode: initial
  • Previous reviewed SHA: none
  • Review budget exhausted: no
  • Maintainer decision required: no
  • Next state: gator:in-review

@@ -1068,6 +1234,29 @@ impl VmDriver {
let image_disk = image_plan.image_disk;
let owner_source_disk = image_disk.as_ref().unwrap_or(&root_disk).clone();
let overlay_disk = disk_paths.overlay_disk;
let boundary_generation = random_boundary_token();
let launch_authentication = sandbox

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

Warning — GATOR-d88b8843-01 · Restart reuses deactivated launch credentials

Summary: When an operator stops and restarts a VM sandbox, the gateway supplies a fresh launch bundle, but this path reloads the create-time bundle from sandbox.pb. The gateway has already deactivated that old session, so the new host supervisor registers with stale credentials and the sandbox cannot return to Ready.

Fix: Thread StartSandboxRequest.launch_authentication through the VM start path, validate it, replace the persisted spec value atomically before provisioning, and cover propagation to both boundary config and supervisor auth.

Verify: Create with session A, stop, then start with distinct session B. Assert the boundary and supervisor both receive B and the sandbox registers successfully.

Agent context
  • Location: crates/openshell-driver-vm/src/driver.rs:1238
  • Ownership: This PR makes launch authentication authoritative for the new VM host-supervisor boundary but leaves restart disconnected from its fresh request field.

})
})
.collect::<Result<Vec<_>, _>>()?;
let sandbox_user_id = self.config.resolve_sandbox_uid();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gator-agent

Warning — GATOR-d88b8843-02 · Boundary identity diverges from guest identity

Summary: For a supported image whose sandbox account is not 1000:1000, guest init uses the identity resolved from that image or its persisted overlay, while the new boundary and host supervisor independently fall back to 1000:1000. The boundary's exact identity check then fails and the sandbox never becomes Ready.

Fix: Pass the already-resolved sandbox_owner_state.uid and .gid into VmBoundarySpec and spawn_host_supervisor; remove the independent fallback lookup and cover image-owned and legacy-overlay identities.

Verify: Launch an image with sandbox:x:10001:10001 and no explicit UID/GID override. Assert guest init, boundary topology/config, and supervisor environment all use 10001:10001, then confirm startup succeeds.

Agent context
  • Location: crates/openshell-driver-vm/src/driver.rs:1437
  • Sibling site: crates/openshell-driver-vm/src/driver.rs:851 supplies the same fallback identity to the host supervisor.
  • Ownership: This PR adds both new identity consumers beside the existing resolved owner-state path.

@johntmyers johntmyers added the gator:in-review Gator is reviewing or awaiting PR review feedback label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gator:in-review Gator is reviewing or awaiting PR review feedback test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants