Repository navigation
NVX host/guest library wiring workstream: move NVX's binaries and tools onto the shared host and guest libraries #816
Description
Objective. NVX's own binaries and tools move onto the shared host and guest libraries, so that NVX keeps one implementation of each mechanism, and NVX's adapter is proven end to end on KVM, MSHV and WHP.
Rescoped (dev e42b1795). The nvx-rs slimming workstream (#1076) makes nvx a library of mechanisms and value types: the stores, the exec engine, the guest's process modules and the test adapter leave the library, and NVX's binaries (nvx-cli, nvx-init and nvx-control) keep what they need. This issue now tracks only what it keeps from its original scope, and the slimming workstream's groups deliver it. The libraries' interfaces change as the slimming workstream describes; they no longer stay as #535 delivered them.
What this issue keeps, and where it lands:
| Issue | What it keeps | Delivered by |
|---|---|---|
| #817 | NVX's Rust layered init, nvx-init: PID 1, the layered root's space, execs as plain processes, and capture and restore, for every layered root, which is always managed |
#1115, #1116 and #1117; #1110 and #1111 move the layered sandbox launches onto it; the old shell init and the managed agent's sandbox mode go in #1123; and the guest's space moves into nvx-init in #1127 |
| #818 | nvx-rs sandbox's GPT and EROFS images, scratch and capped RAM uppers, and protected paths |
#1110 and #1111; image staging and the path rules move into nvx-cli in #1124 and #1125 |
| #802 | nvx-rs run's shares, planned through the export planner |
#1109 |
| #819 | One exec at a time per sandbox, across CLI processes: an OS file lock with a bounded wait, then busy |
#1111 |
| #821 | NVXC v2: streamed stdin, stdout and stderr; CANCEL, STOP and BUSY; Ready with the protocol version; v1 and FEATURES removed | #1128 and #1129 |
| #837 | Snapshots in NVX's binaries: NVXC's capture and activate messages, nvx-cli's snapshot commands, nvx-init's capture and restore, and their acceptance in NVX's adapter | #1113, #1114, #1117 and #1118 |
| #860 | DNS inside a layered root, through the VM-wide view, with a bind that a teardown before the switch removes | #1104 |
| #624 | A minimal acceptance gate: public-API tests, smoke tests on real VMs, and nvx-cli's 12 cold cells | #1118; the release is #1132 |
Done: #581 (one EXEC and MAPS decoder), #822 (the test adapter end to end) and #780 (Windows checked images stay guarded).
Closed, because the slimming workstream no longer needs them:
- nvx-rs: give each guest build an identity from its build inputs, and package it #820: the runtime's labels already come from the build's provenance files or
SHA256SUMS, and NVXC v2's Ready checks only the protocol version; - runtime adapter: the consumer-contract scenarios C2, C3, C6 and C7 on real VMs #859: the test adapter goes (nvx-rs slimming 4.1.2: the test adapter is gone #1119), after a case matrix gives each of its tests a fate (nvx-rs slimming 4.1.1: public-API tests, and smoke tests on real VMs #1118);
- Test the managed agent's direct-mode launch without privileges #601: the new exec core's error paths are tested on VMs as root, with no fork-safe stubs and no
setprivshim; - nvx-rs: decide whether adapters' layered launches need OpenVMM's workload lifecycle #861: layered roots are always managed, blockless
runkeeps both modes through nvx-cli's own tokens, and NVX stops passing OpenVMM's lifecycle and identity flags.
Dropped from the original scope: nvx::guest::entry and nvx::exec (both deleted in #1123); the bounded FIFO of exec waiters, which #819's lock replaces; the guest build ID and bundled's re-pin (bundled goes in #1122); the test adapter's consumer-contract scenarios C0–C8, the coverage manifest and its zero-read check, which the case matrix and the smoke tests replace (#1118); and #855's test-adapter side, which goes with the adapter.
Not in scope:
- the blockless root's init, which keeps the shell, and other PID 1 profiles;
- snapshot tiers other than Fresh, and the rest of the snapshot/restore workstream (Snapshot/restore workstream: start sandboxes from captured templates through the shared host and guest libraries #833), except Snapshot/restore workstream, stage 5: templates and clones in NVX's adapter, and acceptance #837, which this workstream carries;
- performance measurements and budgets;
- exec concurrency in NVX's adapter, TTY and arbitrary signals;
- image slots, device hotplug and capability discovery.
Acceptance. #1118's: the public-API tests and the smoke tests on real VMs pass, and nvx-cli runs its 12 cold cells (EROFS and GPT, with a scratch or a RAM upper, on KVM, MSHV and WHP).
Related: the slimming workstream (#1076), which this issue's children now follow; the snapshot/restore workstream (#833); #591, the guide, which the slimming workstream's docs groups update (#1130 and #1131).
Activity
nvx-rs sandbox#818runthrough the export planner #802nvx-rs sandbox execthrough a bounded queue across CLI processes #819[-]Move NVX's binaries and tools onto the shared host and guest libraries[/-][+]NVX host/guest library wiring workstream: move NVX's binaries and tools onto the shared host and guest libraries[/+]