Skip to content

NVX host/guest library wiring workstream: move NVX's binaries and tools onto the shared host and guest libraries #816

Open
0 of 14 issues completed

Description

Objective. #535 built the shared host and guest libraries in nvx-rs and proved them through the in-repo test adapter (tests/runtime-adapter), which embeds them through public APIs only. NVX's own binaries and tools still keep parts of their earlier implementations. This issue moves them onto the shared libraries, so that NVX keeps one implementation of each mechanism, and then proves both adapters end to end on KVM, MSHV and WHP.

It holds the work that #535 left: NVX's Rust layered init, the CLI's image formats and protected paths, the exec protocol cutover with its admission and build identity, the test adapter's end-to-end runs, and the final acceptance. The libraries' interfaces stay as #535 delivered them; each child lists any addition it makes: #822 an export mount for mapping tables, and #860 a resolver bind and removable runtime binds.

Today (dev c5a0dd7) and after:

Component Today After Issue
Layered root in the guest The shell init (guest/common/nvx-init-agent) bootstraps, assembles and tears down the root: one EROFS distro over an ext4 scratch. It refuses GPT and the RAM upper. A one-shot sandbox enters its workload through the shell helpers (nvx-container-launch, nvx-container-enter); managed executions already enter through nvx::guest::entry NVX's Rust PID 1 runs the root through nvx::guest::root and nvx::guest::entry, for managed and one-shot execution, in all four format and upper combinations #817
CLI images and shares nvx-rs sandbox takes --layer ROLE,PATH,EROFS_UUID only, and refuses shares only when they overlap each other. nvx-rs run, which boots a plain VM, renders its shares itself (extend_shares_and_network) sandbox run, provision and start take EROFS or GPT over scratch or tmpfs, and refuse a share that reaches the state directory, scratch, layers or bundle. nvx-rs run plans its shares with filesystem::plan #818, #802
Exec protocol NVXC v1 and FEATURES. The host and the guest still parse EXEC's body separately; MAPS entries and EXEC's fixed header are shared. The guest gives workloads stdin from /dev/null, kills one whose output passes 1 MiB, and answers BUSY to every request during an exec, Stop included. The CLI collects output in memory NVXC v2 over NVXS, driven by nvx::exec: stdin, stdout and stderr stream under credit, with no total output cap. A typed Ready is validated before MAPS and EXEC. v1 and FEATURES are removed #581, #821
Admission OpenVMM's broker admits one host at a time; nothing queues CLI processes A FIFO across CLI processes: one active exec, at most 8 waiters, a 60 s default wait, and a Stop that bypasses it #819
Guest identity and packaging No guest build identity. bundled stages v0.1.0-dev.9ceb89fcc31f, whose guest still has the C agent A build ID from canonical build inputs, bound to the initramfs and reported in Ready. bundled serves the final matched release #820, #624
Test adapter Its VMs assemble all four format and upper combinations outside PID 1 on every backend, but run no execution in a VM, attach no network, and pass their own launch arguments rather than a checked handoff Real cold launches with executions, mappings and network policy, through the adapter plan and the checked handoff; its consumer-contract scenarios on real VMs #822, with #805; #859
DNS in a layered root /init writes the initramfs's resolver; a layered root's workloads see the image's own /etc/resolv.conf, empty in NVX's images The runtime binds the guest's resolver over the root's /etc/resolv.conf when the policy allows DNS, for cold boots and clones #860
Windows checked handoff A launcher that ends before OpenVMM opens the images releases their guards The guards last until OpenVMM has opened the images #780
Tests and evidence #601's direct-mode cases are unported. No coverage manifest #601's cases run without privileges. The conformance matrix runs with both adapters, with durable evidence #601, #624

Children and order. Most children can start now. The table lists the real dependencies; each child's tests land with it.

Issue Scope Needs
#817 NVX's Rust layered init for managed and one-shot execution #822's PR 5 (the export mount); #860's PR 1 (the resolver)
#818 GPT images, the RAM upper and protected paths in nvx-rs sandbox #817 to boot GPT and tmpfs
#802 nvx-rs run's shares through the export planner —
#581 One EXEC body decoder for the host and the guest —
#819 The CLI's exec admission across processes —
#820 Guest build identity and packaging —
#821 NVXC v2 and a validated Ready #581 and #820; #817 for the layered root's activation identity
#822 The test adapter end to end, in eleven stacked PRs; #805 runs its executions in VMs —
#859 The test adapter's consumer-contract scenarios C2, C3, C6 and C7 on real VMs #822 and #805
#860 DNS inside a layered root, for cold boots and clones, and runtime binds that a teardown can remove — for its library PR; #822 for the test adapter's
#861 Whether adapters' layered launches need OpenVMM's workload lifecycle —
#601 The managed agent's direct-mode tests without privileges —
#780 Windows: checked images stay guarded until OpenVMM opens them —
#624 Final acceptance, the coverage manifest and the bundled re-pin All of the above; #782 for the released-artifact lane

Consumer-contract suite. Both adapters run #535's scenarios C0–C8. #535's phases added the library-side tests; the children above add NVX's adapter and the test adapter's remaining cases, and #624 runs the full suite.

Not in scope:

Acceptance. #624's: both adapters run the shared host and guest code end to end on KVM, MSHV and WHP, with exact provenance, the zero-read check with its positive control, recorded sizes, and bundled serving the final matched release.

Related:

Activity

  1. changed the title [-]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[/+] on Oct 24, 2026
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