Repository navigation
host: spawn prepared VMs with verified ownership - #1403
Merged
Pedro Henrique Penna (ppenna) merged 2 commits intoNov 9, 2026
Merged
Pedro Henrique Penna (ppenna) merged 2 commits into
Pedro Henrique Penna (ppenna) merged 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved relative executable and input paths can prevent VM startup or select the wrong files when spawning changes the child’s working directory.
2 open issues
What changed in this PR
Adds caller-owned VM spawning to the library’s two-phase launch API, advancing the separation of VM mechanisms from durable state management.
Changes:
- Adds
vm::spawn(Prepared)andLaunched, retaining prepared resources, outputs, and capability. - Adds confirmed child cleanup after verification failures and requires trusted Windows log jobs for library launches.
- Adds lifecycle tests, documentation, and public API snapshots.
| File | Description |
|---|---|
nvx-rs/src/host/vm/tests.rs |
Adds ownership, cleanup, inheritance, caller-survival, and boot tests. |
nvx-rs/src/host/vm.rs |
Adds prepared spawning and the caller-owned launch result. |
nvx-rs/src/host/spawn.rs |
Shares spawn mechanics and adds confirmed child cleanup. |
nvx-rs/src/host/platform/windows/tests.rs |
Adds Windows inheritance and job-test helpers. |
nvx-rs/src/host/platform/windows/spawn.rs |
Adds termination with confirmed process exit. |
nvx-rs/src/host/platform/tests.rs |
Reexports Windows test helpers. |
nvx-rs/README.md |
Documents launch ownership, platform behavior, and smoke testing. |
nvx-rs/public-api/windows.txt |
Records the new Windows public API. |
nvx-rs/public-api/linux.txt |
Records the new Linux public API. |
Review effort: Balanced
Enrique Saurez (esaurez)
marked this pull request as draft
November 9, 2026 00:03
Contributor
This pull request changes existing testsIt modifies or removes 1 existing test asset(s), listed below. Review each with care: a change to a test can hide a regression that the test caught. See doc/contribute.md#changes-to-existing-tests. Test code
Relocated unchanged: 0; added: 20. Compared the merge base |
Consume the prepared launch without reopening its resources and return its verified detached process, outputs and capability. Confirm the owned child exits if process verification fails. Preserve Linux umask handling and require a trusted Windows log-named job, with internal inheritance locking. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b4a2ff9d-56d5-4635-9dc8-a5f78c8cbc6a Copilot-Session: d5e2370f-2500-4250-a1da-70d1661912e1
Resolve caller-relative executable, kernel, initramfs, root and scratch paths before rendering and checking the final launch command. Honor the configured hypervisor in the real-VM fixture and reuse the existing bounded job-claim release check without weakening the unrelated-child assertion. Cover relative inputs outside the VM directory and preserve required-path errors, log rollback and legacy spawn behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: d5e2370f-2500-4250-a1da-70d1661912e1
Enrique Saurez (esaurez)
force-pushed
the
esaurez/slim-2.4.1-sl7.2-20261106
branch
from
November 9, 2026 04:43
9c9b018 to
0f9a26b
Compare
Enrique Saurez (esaurez)
force-pushed
the
esaurez/slim-2.2.1-sl2.9-rebase-20261108
branch
from
November 9, 2026 04:43
0f0de71 to
0cf1316
Compare
Pedro Henrique Penna (ppenna)
merged commit Nov 9, 2026
207548c
into
esaurez/slim-2.4.1-sl7.2-20261106
58 of 59 checks passed
Pedro Henrique Penna (ppenna)
deleted the
esaurez/slim-2.2.1-sl2.9-rebase-20261108
branch
November 9, 2026 05:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Part of #1076. Refs #1099.
Add
vm::spawn(Prepared)and the caller-ownedLaunchedresult. Reuse the opened log, inherited resources, outputs, and capability; return a verified detached process. On a post-spawn verification failure, terminate only that child and confirm its exit. Preserve legacy spawn behavior, Linux child-local umask handling, and Windows trusted log-job and inheritance isolation.This is SL2.9 directly on SL7.2 (#1339), replaying only original leaf
d217471b; no private merge or additional ancestor is imported. The README context conflict preserves the parent's snapshot, configuration, and restore descriptions. Review follow-up0f0de71cresolves caller-relative runtime and block-image paths before the final command-line check, and honorsNVX_HYPERVISORin the real-VM fixture.The tests cover verified ownership, cleanup, caller survival, opened-resource identity, umask, Windows job claims, and relative inputs outside the VM directory. The existing
cold_runtimehelper now supplies explicit absolute placeholder paths. Windows platform helpers and their reexports support these cases, including the existing bounded job-claim release check; the unrelated child's survival assertion remains intact. No CI wiring changes.Validation
b9ed7d7e. The material review correction is 23 CORE / 1 counted path / 5 raw paths.cold_runtime), 0 relocated, 20 added test items. NVX and OpenVMM worktrees are clean; the native pin remains14dc4116.check-nvx-rsgates pass on the exact pushed source, including feature-matrix tests and clippy, artifact bundling, warning-denied rustdoc, MSRV, and runtime-adapter checks. The relative-path regression fails before the fix and passes afterward; the focused VM suite reports 22 passed / 0 failed / 2 ignored. Linux-only and opt-in real-guest cases are not claimed as locally executed.0f0de71cis COMMENTED / approval recommended / no open issues; both threads are resolved and every thread page was checked. This is not a formal maintainer approval. The first-run result and historical private qualification remain separate evidence, not promoted to new-head CI.