Repository navigation
nvx-rs: aggregate exports for clones #857
Copy link
Copy link
Description
Parent: #836 (#833). Needs: stage 1 (#834), and #540 in NVX's OpenVMM pin. Removes: one directory export per clone.
Goal. A clone exports what a cold boot exports: an aggregate of up to 256 host directories and files, each read-only or read-write, with OpenVMM's hidden, re-exposed and writable paths and the owner mode.
Today, after stage 1:
- A clone's export plan must have exactly one child, a directory. The restore passes it as the dormant slot's one
--mount, and its binds' sources drop the child index (nvx-rs: exports, MAPS and network templates for clones #846). filesystem::planbuilds every sandbox'sExportPlanas an aggregate: one child per outermost mapped directory, and one per mapped file outside them (nvx-rs/src/host/filesystem.rs:1-35,:145-188). A cold launch attaches it with--mount-aggregateand--mount-child, and MAPS binds<child>/<path>sources (:200-230).- At restore, OpenVMM's dormant slot accepts only
--mountuntil microvm: at a platform restore, attach an aggregate export to the dormant filesystem slot #540 (openvmm/openvmm_entry/src/microvm/filesystem.rs:983-995).
Implementation:
- Host: the clone plan takes any
ExportPlanthatfilesystem::planbuilds. The restore attaches it to the dormant slot as an aggregate, through microvm: at a platform restore, attach an aggregate export to the dormant filesystem slot #540, rendered as a cold launch renders it. The binds keep their child indices. - Guest: no change. It mounts the filesystem tag at its agent-only root, and MAPS binds the host's sources, as at a cold boot.
- Record: no change. The export plan's identity covers its children, and the mapping count stays 1 to 4,096.
Tests, in the test adapter's CI hook on KVM, MSHV and WHP:
- one template restored with an aggregate of several directories and a file, read-only and read-write children, and hidden and re-exposed paths;
- a mapped object that changed since planning, refused before launch;
- a clone without an export keeps the slot dormant.
Guide (#591's numbering): 2.1.4 (the export at restore), 3.6.2, 3.6.9 and 3.6.10 (an aggregate on the dormant slot). The interim rule leaves the guide.
Done when: merged, with the interim rule's tests replaced by these.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
runtime-adapter: show hidden paths again, and pause a start once checked
runtime-adapter: restore clones with aggregate exports, in VMs
runtime-adapter: show hidden paths again, and pause a start once checked
runtime-adapter: restore clones with aggregate exports, in VMs
runtime-adapter: show hidden paths again, and pause a start once checked
runtime-adapter: restore clones with aggregate exports, in VMs