Repository navigation
Enable process-owned NVX snapshot execution - #1738
Draft
Enrique Saurez (esaurez) wants to merge 1 commit into
Draft
Enrique Saurez (esaurez) wants to merge 1 commit into
Enrique Saurez (esaurez) wants to merge 1 commit into
Conversation
Reuse native validation and execution setups for create-and-run and lifecycle start. Preserve per-operation trust and cleanup, surface cold fallback warnings, and require functional snapshot coverage in nightly CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c97dd74f-cbe7-4314-8d24-262fa60f5c6c
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Switching existing V1 lifecycle starts to process-owned clones breaks cross-process control, causing run and stop calls from another process to fail while the owner remains alive.
2 open issues
What changed in this PR
Enables snapshot-backed execution in MXC’s experimental NVX backend using the native library’s process-owned cache, covering create-and-run requests and lifecycle starts without adding public API signatures.
Changes:
- Adds snapshot initialization, cold-boot fallback warnings, and boot diagnostics.
- Updates the native SDK dependencies and approved signed bundle.
- Extends lifecycle, snapshot, cancellation, and isolation tests, with required nightly CI markers and documentation.
| File | Description |
|---|---|
src/mxc-sdk/tests/nvx_e2e.rs |
Adds snapshot reuse, fallback, lifecycle handoff, and interruption scenarios. |
src/mxc-sdk/src/core/mxc_engine/state_aware.rs |
Includes NVX operation warnings in lifecycle responses. |
src/mxc-sdk/src/backends/nvx/state_aware.rs |
Enables snapshot-backed lifecycle starts and warning collection. |
src/mxc-sdk/src/backends/nvx/signature_verification.rs |
Updates the approved bundle checksum. |
src/mxc-sdk/src/backends/nvx/runner.rs |
Prepares snapshot execution and logs boot mode and fallback warnings. |
src/mxc-sdk/src/backends/nvx/crate_runtime.rs |
Opens the execution host with stable snapshot settings. |
src/mxc-sdk/Cargo.toml |
Pins the native SDK dependency to 0.1.2. |
src/Cargo.lock |
Records updated native SDK, model, and NVX dependencies. |
scripts/tests/microvm-validation.test.js |
Adds negative checks for missing test discovery and execution markers. |
scripts/ci/stage-nvx-validation-tests.ps1 |
Requires discovery of snapshot and lifecycle tests. |
scripts/ci/run_backend_validation_tests.ps1 |
Requires the expanded VM execution markers. |
docs/development/build-and-test/ci-validation-infrastructure.md |
Documents snapshot coverage and nightly validation requirements. |
docs/backends/nvx/nvx.md |
Explains snapshots, process ownership, fallback, upgrades, and proxy limits. |
Review effort: Balanced
Comment on lines
+171
to
+172
| super::runner::prepare_execution(client, true, None, &mut self.logger)?; | ||
| super::runner::start_sandbox(client, &sandbox_id, true, &mut self.logger)?; |
Comment on lines
+296
to
+299
| // Opening the execution host can capture templates, so validation and probing must precede it. | ||
| if let Some(error) = client | ||
| .open_execution_host() | ||
| .map_err(|error| protect_native_error(error, "platform_snapshots", sensitive_proxy))? |
This branch has not been deployed
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.


📖 Description
Enable snapshot-backed MicroVM create-and-run execution and lifecycle
startusing the native library's existing process-owned platform cache. Keep two
stable configurations per state root: validation without VM creation, and
execution with 1-vCPU/256-MiB platform templates. No daemon, running-VM pool,
additional Rust platform cache, public ownership API, or response metadata is
introduced.
Align the SDK/model to 0.1.2 and independently approve the complete signed
v0.2.0-build189870623bundle. Preserve per-operation signature, revocation,inventory, file-guard, module-lifetime, and explicit-close checks. Validate and
probe before capture; surface initialization fallback through existing warning
channels, with sensitive details withheld.
Preserve lifecycle IDs and their unversioned state directory. A restored VM
has one controlling process; different VMs can share a template concurrently,
and another process can adopt a VM after its controller exits. Document this
restriction, upgrade handling, template limits, and native proxy constraints.
Require snapshot/lifecycle discovery and execution markers in nightly CI, with
negative tests for missing coverage.
No separate spec is required: this uses the existing experimental backend and
request/lifecycle contracts, without a new backend, contract field, published
SDK signature/type, workspace crate, or lifecycle ownership API. Profiling
instrumentation and evaluation artifacts are excluded.
🔗 References
Related: #1693. This is an independent change from
main, not a stack; thatdraft PR is unchanged. No issue was supplied.
🔍 Validation
Local Windows x64/WHP, Rust 1.93.1, complete unchanged Microsoft-signed bundle.
Cargo commands below ran from
srcunless an explicit manifest is shown.cargo fmt --manifest-path F:\source\mxc-mxc-profile\src\Cargo.toml --all -- --checkcargo clippy --release --locked -p mxc-sdk --features microvm --all-targets --target x86_64-pc-windows-msvc --jobs 4 --message-format=json-render-diagnostics -- -D warningscargo test --release --locked -p mxc-sdk --features microvm --lib --target x86_64-pc-windows-msvc --jobs 4 --message-format=json-render-diagnostics nvx::cargo test --release --locked -p mxc-sdk --features microvm --test nvx_bundle_integrity --test nvx_e2e --target x86_64-pc-windows-msvc --jobs 4 --message-format=json-render-diagnosticscargo test --release --locked -p mxc-sdk --features microvm --test nvx_e2e --target x86_64-pc-windows-msvc --jobs 4 --message-format=json-render-diagnostics -- --ignored --nocapture --test-threads=1node --test scripts\tests\microvm-validation.test.jsActual VM coverage includes NIC/noNIC template reuse, repeated SDK requests,
proxy and filesystem activation, cold fallback warnings and recovery,
lifecycle continuity and controller handoff, concurrent image/template use,
console interruption, controlled TCP/UDP policy, binary output, timeouts,
capture limits, and cleanup. An initial Node fixture run encountered a
PowerShell CLR crash; its isolated retry and the final full 59-test run passed
without changing assertions. Architecture and material implementation review
used Opus 5.5 with maximum reasoning and long context.
Linux/macOS and remote PR checks have not run here.
dependency-feed-checkremains pending; no feed publication or manual Azure pipeline run was queued.
CLA status was not verified. Build and architecture conventions are unchanged.
✅ Checklist
feature-acceptedCargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow