Skip to content

nvx-rs: provide a standalone image-backed sandbox cold-start path #541

Closed as not planned

Description

Parent: #535. Phase 4 (runnable cold profile). Depends on the shared host foundation #538, guest root/mapping core #539 and streaming exec #537; real cold acceptance also requires source-bound VMM #547 (no dormant virtio-fs on zero-export direct boot) and #548 (verified opened objects and pinned grants). Their independent VMM work need not block host/guest foundation implementation. Coordinate CLI/EROFS-scratch/artifact surfaces with #359, but do not make its unfinished Python-parity CLI port a hard prerequisite. Supply the minimal standalone adapter/commands here and reuse #359's CLI when it lands; do not fork nvx.py or a second policy engine. #358 must supply an accepted Rust guest build before claiming source-bound end-to-end results.

Goal

Run the image-backed sandbox cold path entirely from nvx-rs and its Rust guest with a versioned NVXC application adapter. A caller provides an explicitly authorized local read-only image/layer set, runtime bundle, resources and policy. Another runtime can use the same host/guest mechanics through a different application transport. A remote image registry, product error/C ABI, and unrelated container orchestration do not belong in this standalone profile.

Required flow and ownership

  1. Validate input and an explicit local host-object/proxy allowlist. Pin immutable runtime/image identity at admission; reject exposing state/runtime/cache/template roots. Bundle verification occurs at selection/load, not by hashing large binaries on start/exec.
  2. Use nvx-rs: share image-backed sandbox host launch, policy, and VM supervisor primitives #538 to plan the exact ExportPlan and network/proxy policy, emit a typed OpenVMM launch with a cold-plugged read-only image and openvmm: verify and receipt opened host attachments #548 opened-media receipt. For zero exports, select OpenVMM prerequisite: omit dormant virtio-fs on direct no-map cold boots #547's opt-in no-filesystem-device VMM topology; mapped cold launches attach an aggregate. A NIC is present only when connectivity is requested. Persist an owned VM record with PID+start-time/endpoint/capability and a recoverable launch-log claim.
  3. Guest PID 1 brings up minimal platform/time/namespace facilities, then a restricted authenticated control service before assembling the image overlay. Accept a bounded/versioned configuration; use nvx-rs: factor minimal guest rootfs and descriptor-rooted host mapping #539 for the selected read-only lowers and tmpfs/ext4-scratch upper and safe ordered/zero mappings. Configure the guest interface, DNS and proxy only after the VMM policy is enforced. Ready echoes the accepted configuration identity; no exec before Ready.
  4. Implement validate, provision, start, exec, bounded guest logs, stop, diagnostics and deprovision in the standalone adapter. nvx-rs: add bidirectional credit-based streaming exec to the matched host and guest #537 supplies one-active-exec/bounded-wait/credit behavior. This image-backed caller fixes root to a documented ceiling of CAP_CHOWN, CAP_DAC_OVERRIDE, CAP_FOWNER, CAP_FSETID, CAP_KILL, CAP_NET_BIND_SERVICE, CAP_SETGID, CAP_SETUID and CAP_AUDIT_WRITE, with other bounding/ambient capabilities dropped and no_new_privs; no CAP_SYS_ADMIN, CAP_MKNOD, raw-device or tracing powers. Private workload mount/PID namespaces and bounded cgroup resources protect PID 1. Raw exports, host control, configuration regions and device nodes remain inaccessible; nested read-only paths inside writable mappings must be host-enforced or demonstrably non-bypassable under this ceiling, otherwise rejected. Preserve existing non-root behavior of other public paths without a selectable isolation-profile flag.
  5. Recover/reattach a verified VMM after a host process restart, restore console/log ownership, and fail closed on partial launch, changed artifacts or mismatched guest identity. Stop takes priority over the finite cross-process exec queue and cancels its waiters. Attempt graceful guest shutdown; if an active exec keeps the sole broker session, terminate only the verified VM after the bounded timeout rather than claiming guaranteed graceful delivery.

Acceptance

  • A reproducible source-bound local bundle, including the static guest initramfs, minimal standalone commands and a reproducible public single-GPT image fixture (documenting p1 and p2+ roles), runs image-backed cold workloads end-to-end without ttrpc, protobuf, OCI/runc, a product image registry, or implicit unauthenticated host roots. An old running bundle never receives an unpinned new protocol after a host upgrade.
  • Both tmpfs and ext4-scratch upper modes work with their respective read-only layer formats. A no-map/no-network, single-workload cold launch omits the virtio-fs, NIC and image slot from the actual VMM and guest inventories using OpenVMM prerequisite: omit dormant virtio-fs on direct no-map cold boots #547; no --mount or guest mount is not enough. Mapped cold launches retain the aggregate slot; work for extra children/mappings occurs only when requested.
  • Measure cold-to-Ready and exec-start p50/p95, guest size and in-flight memory against source-matched artifacts and set a regression budget before declaring this profile efficient. Break out pre-ready control attach/activation latency until nvx-rs: replace activation RPC delivery with an uncaptured VMM configuration region #544 replaces its delivery; do not add per-start/exec large-file hashing or omit a required readiness step.
  • Cold no-network launches omit the NIC; image and object-pinned mapped roots are verified against the actual opened VMM handles and receipts from openvmm: verify and receipt opened host attachments #548. A renamed pinned file child never exposes its replacement, while an explicitly live-path child keeps follow-name behavior; mapped paths and network/proxy policies match host enforcement and guest configuration.
  • Ready/build identity, logs, shutdown, error outcomes and restart/reconciliation match the common lifecycle conformance matrix; credit streams handle arbitrarily long total output with bounded in-flight memory. Tests with separate CLI processes prove queue limits, priority Stop, verified force-stop fallback, root capability bounds, failed remount/user-namespace bypass, inaccessible raw devices/export and no surviving workload descendants.
  • Targeted KVM/MSHV/WHP runs where supported record exact host, guest, VMM and artifact revisions; no skipped stage is reported as a pass. The existing managed profile and nvx-rs: make the nvx-rs CLI the backend of nvx.py sandbox, egress, and artifact lookup #359 CLI contract remain intact.

Activity

  1. changed the title [-]nvx-rs: provide a standalone trusted-sandbox cold-start profile[/-] [+]nvx-rs: provide a standalone image-backed sandbox cold-start path[/+] on Oct 13, 2026
  2. esaurez commented on Oct 20, 2026

    @esaurez
    ContributorAuthor

    Replaced by the rewritten #535. The guest part of the cold-start path moves to #621 (A3), the host part to #622 (A4), and its retained acceptance to #624 (A6). Closing in favor of those issues.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions