Skip to content

Track a reusable image-backed sandbox runtime and standalone NVX implementation #535

Open

Description

Goal

Build a runnable NVX-only image-backed sandbox and reusable nvx-rs host/guest libraries that other runtimes can compose behind their own application transports. The standalone implementation must exercise the same essential cold-start, exec, and image-independent platform-restore mechanics as a richer consumer: read-only image layers plus a tmpfs or ext4-scratch writable root; safe host mappings and enforced network policy; one active exec with bounded waiting; bidirectional credit-based stdin/stdout/stderr without a total output cap; authenticated readiness, logs, stop, and verified recovery. A platform template is captured before image binding, overlay assembly, and exec and is reused across authorized images and policies within one immutable compatibility key. No device hotplug or workload-after-exec snapshots.

A standalone caller may supply an explicitly approved local image and policy; generic NVX code must not silently substitute for a product's image registry, authorization decisions, error model, or deployment modes. The shared root/process/policy mechanics must remain transport-neutral; a small NVXC adapter makes the NVX-only profile runnable. Other callers may use a different application transport without importing it into the small static guest core.

Builds on, rather than replacing

Existing work What we reuse What it does not deliver
#356; phase 1 #357 / merged #519 nvx-rs, public host process/platform/session, filesystem ExportPlan, network lowering, and typed protocol building blocks An image-backed, RAM-upper image-backed sandbox, a pre-ready activation state machine, or policy-independent platform templates
Phase 2 #358; open stacked PRs #528, #531, #533 Static Rust guest/tool substrate; managed-agent parsing, process and mapping seams; optional ingress announcer Guest images still ship C until the later build-switch PR. #531 intentionally retains /dev/null stdin, a 1-MiB total exec-output kill, public identity policy, and path-based mapping application. It does not port the shell rootfs assembler. Credits and the safer bind path here are follow-ups, not claims that #358 already implements them.
Phase 3 #359 (open) Planned nvx-rs CLI, EROFS/ext4-scratch host profile, egress compiler and artifact lookup The guest scratch-rootfs shell port, GPT-ext4/RAM-upper profile, standalone lifecycle, or snapshot activation. Reuse its CLI/policy code instead of forking it.
Completed multiple-mapping work #281 and nanvix/openvmm#127 Aggregate virtio-fs on cold boot and restore when an aggregate was captured Attaching an aggregate to a dormant snapshot slot.
nanvix/openvmm#116 and NVX #406 (prior art, not prerequisites) Demonstrate bind-once image0, authenticated host control and guest media discovery, but also implement unused multi-slot topology Public OpenVMM main has no image slot. #542 needs a separate source-pinned single-image-slot VMM/host/guest contract on the current baseline; neither full PR must merge.

The proposed replaceable region in NVX's filesystem/agent design is a later delivery optimization; first prove an authenticated activation RPC and a real restore. Phase #542 also owns the missing OpenVMM and guest-capture work for pre-image, pre-overlay, pre-exec platform-tier templates with both a blockless RAM-upper template and a scratch-only pre-image ext4 template with fresh scratch, without binding any lower image in either capture. Each upper has its own compatibility key; restored scratch is never reused from capture or another workload. The multi-slot PRs are useful references, not merge prerequisites; #542 owns the independent one-slot implementation and both tiered capture modes. Its minimum VMM contract is a stable, preexisting empty read-only image0 role, authenticated bind-once/query against the actual opened media, guest capacity/partition discovery and a versioned one-slot snapshot key. It has no image1-3, slot-prefix expansion or device hotplug; ordinary direct-image cold boots remain slot-free. Workload-after-exec snapshots are out of scope.

Phases and dependencies

Each phase has its own issue and acceptance gate. Host, guest and exec foundations can advance in parallel after their respective upstream work. Independent VMM #547 (no virtio-fs device on zero-export direct cold) and #548 (actual opened-object receipts and pinned-vs-live grants) must land before #541 cold acceptance; #548 also protects restored attachment acceptance. Dormant-aggregate #540 and fixed-NIC #536 can advance alongside #542 image-only RPC restore. Their implementation belongs in OpenVMM even though NVX tracks its source pin and integration here. Prerequisite gates are not circular acceptance gates: #538/#539/#537 close on composable core behavior exercised by small independent test adapters; #541 then runs the real standalone adapter, and #545 closes the roadmap only after actual second-consumer adoption and deletion evidence. #540/#536 close on reviewed VMM primitive tests; #543 owns their combined NVX guest-activated mapped/networked restore proof. The VMM image-slot, aggregate, NIC and later region changes must be composed into one reviewed, source-pinned revision without rolling back features already on dev.

Phase Issue Delivery Depends on / coordinates with
1 #538 Shared host launch, policy and verified VM supervisor #357 / merged #519; coordinate with #359; real VMM attachment receipts in parallel #548
1a #548 OpenVMM opened-object receipts and pinned/live attachment grants Independent of #538 closure; real cold/restore gates in #541/#542/#543
2 #539 Small guest rootfs, descriptor-rooted bind and ordered/zero maps #358, open #528/#531; respect #486
3 #537 Versioned bidirectional-credit exec and bounded admission #358/#531; regression guard #513
3a #547 Omit dormant virtio-fs on zero-export direct-image cold launches Independent VMM change before #541; templates retain the slot for #540
4 #541 Runnable NVX-only image-backed sandbox cold profile #538, #539, #537; reviewed VMM #547/#548 before cold acceptance; #359 CLI is not a hard prerequisite
5 #542 Image-only, zero-map/no-network platform restore via pre-ready RPC for both pre-workload upper templates #541 and opened-media guarantee #548; independent single-image0 VMM/host/guest work and two tier contracts; #116/#406 are references only
6a #540 Dormant aggregate filesystem attachment Merged nanvix/openvmm#127 and nanvix/openvmm#130; VMM tests first, guest-activated integration in #543
6b #536 Fixed NIC with pre-vCPU mutable network policy Independent VMM tests; guest-activated integration in #543
7 #543 Reuse each compatible template across images, mappings and network policies #542, reviewed VMM #540/#536 plus opened-attachment grants #548 in one combined revision
8 #544 Replace small activation RPC payload with an uncaptured VMM region #543; implement and pin the separate OpenVMM region contract
9 #545 Prove the same shared host/guest core through an independent downstream adapter Test-adapter seam can start with #538/#539/#537; real cold after #541 and full restore after #543/#544

End-to-end acceptance

  • A source-matched NVX-only host/guest bundle runs cold and restored image-backed workloads on supported hypervisors, with equivalent validated root/process/stdio/map/network semantics regardless of application adapter. Pre-workload platform restores prove both a blockless RAM-upper template and a distinct fresh-ext4-scratch template, with no dummy scratch on the RAM path or retained scratch contents on the ext4 path. The single GPT image supplies ordered read-only partitions; writable scratch is a separate device, not another image slot.
  • The NVX-only adapter and an independently built downstream adapter use the same pinned NVX host/guest mechanisms and pass shared cold/restore/exec conformance cases; keeping a second process, rootfs, credit or policy implementation does not satisfy this roadmap (nvx-rs: prove shared host and guest mechanics through two independent adapters #545).
  • Record source-matched cold-to-Ready, restore-to-Ready and exec-start p50/p95, guest ELF/initramfs size and bounded memory; agree regression budgets before acceptance. The no-map/no-network single-workload cold path does not pay for additional virtio-fs/NIC/image-slot devices, mapping work, or large artifact hashes on start/exec.
  • The standalone implementation exposes readiness/build identity, bounded guest logs distinct from exec output, stop, diagnostics and verified restart/recovery. Product-specific registry, authorization, and other cloud deployment modes remain outside the core.
  • No-network cold boot proves in both VMM and guest device inventories that no unnecessary NIC/filesystem/image-slot device exists (OpenVMM prerequisite: omit dormant virtio-fs on direct no-map cold boots #547); omitting --mount alone does not omit the current VMM's dormant virtio-fs slot. A reusable platform template instead declares exactly one bind-once image slot (image0), no image1-image3 or multi-slot prefix, plus its fixed dormant filesystem/NIC topology. Authorized network policy is enforced before restored vCPUs run. Zero host mappings are valid in the new activation profile.
  • One exec is active; cross-process overlapping requests have finite admission and queue-wait bounds, including when the broker has one host slot. Stop takes priority, cancels waiters and attempts graceful guest shutdown; if an active exec holds the sole slot, it may terminate only the verified VM after a bounded timeout. Both new host/guest paths use bidirectional credits and unbounded total output with bounded in-flight memory; retain old NVXC v1 semantics only for explicitly supported old bundles.
  • An object-pinned cold image or mapped root must match the actual VMM-opened handle and OpenVMM prerequisite: verify and receipt opened host attachments #548 receipt before Ready; an object-pinned file child cannot silently follow a new object after attachment, while explicit live-path grants keep their current replacement semantics. An explicitly requested restore fails closed instead of silently cold-booting. Cross-image and cross-policy restores require live hypervisor evidence; an ignored test or image-only proof is not full acceptance.

Activity

  1. changed the title [-]Track a reusable trusted-sandbox runtime and standalone NVX profile[/-] [+]Track a reusable image-backed sandbox runtime and standalone NVX implementation[/+] on Oct 13, 2026
  2. ppenna commented on Oct 15, 2026

    @ppenna
    Contributor

    #529 replaced doc/design/ with the architecture guide and dropped the proposed designs, so this issue's link to NVX's filesystem/agent design now returns 404 on dev. The proposal it refers to is still available at the last dev commit before that change: Replaceable configuration region (Proposed).

    The architecture guide describes only the current design. For the configuration and control paths that the region would replace, see 2.1.2 Configuration Ownership and 4.4 Host-Guest Control Interface.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions