Skip to content

NVX phase 1: minimal signed MicroVM integration - #1528

Open
Huzaifa Danish (huzaifa-d) wants to merge 4 commits into
mainfrom
user/modanish/nvx-phase1-signed-integration
Open

Huzaifa Danish (huzaifa-d) wants to merge 4 commits into
mainfrom
user/modanish/nvx-phase1-signed-integration

Conversation

@huzaifa-d

@huzaifa-d Huzaifa Danish (huzaifa-d) commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

📖 Description

Phase 1 of the NVX integration stack.
Replace the active Nanvix integration with the minimum Windows x64 NVX captured create-and-run path, behind the existing microvm feature.

Phase 1 Image limitation: The workload image is fixed to mcr.microsoft.com/azurelinux/base/core:3.0. Requests cannot select another image. This is temporary and handled in phase two.

🔗 References

✅ Checklist

📋 Issue Type

  • Bug fix
  • Feature
  • Task

GitHub Actions runs the PR validation build automatically. The ADO pipeline
(MXC-PR-Build) is the Azure version of the PR pipeline, kept in parity with the GitHub
Actions build; it runs on merge to main, and Microsoft reviewers with write access can trigger it
on a PR with /azp run. See pull request builds.

If the dependency-feed-check check fails on a new dependency, the crate must be added to
the feed before the PR can pass. See pull request builds
for the steps.

Microsoft Reviewers: Open in CodeFlow

Add the minimal signed create-and-run NVX0430 bundle.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: aee99423-dfee-4d61-86e9-421b944c4cc0
Copilot AI balanced review requested due to automatic review settings October 19, 2026 17:58
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Output preservation and test-validation defects remain unresolved.

3 open issues
What changed in this PR

Introduces phase 1 of NVX integration, replacing active Nanvix execution with experimental Windows x64 captured create-and-run support.

Changes:

  • Adds NVX execution, policy validation, and engine routing.
  • Pins, verifies, and stages the signed runtime bundle.
  • Updates tests, build scripts, and documentation; disables Linux MicroVM execution.
File Description
tests/​scripts/​run_microvm_tests.ps1 Adapts tests to the signed NVX bundle.
tests/​scripts/​README.md Documents active and legacy test helpers.
tests/​configs/​microvm_timeout.json Uses a shell timeout workload.
tests/​configs/​microvm_stdlib.json Checks guest shell and OS.
tests/​configs/​microvm_multiline.json Uses shell Fibonacci logic.
tests/​configs/​microvm_large_output.json Generates output through the shell.
tests/​configs/​microvm_hello.json Adds shell greeting.
tests/​configs/​microvm_exit_code.json Tests shell exit propagation.
tests/​configs/​microvm_error.json Tests shell stderr and failure.
src/​testing/​fuzz/​fuzz_targets/​validator.rs Routes supported fuzz validation to NVX.
src/​mxc-sdk/​tests/​wxc_e2e_tests_e2e_windows.rs Gates and adapts MicroVM tests.
src/​mxc-sdk/​tests/​wxc_e2e_tests_e2e_linux_microvm.rs Disables historical Linux coverage.
src/​mxc-sdk/​tests/​nvx_e2e.rs Adds rejection and runtime integration tests.
src/​mxc-sdk/​tests/​nvx_bundle_integrity.rs Tests bundle integrity enforcement.
src/​mxc-sdk/​src/​lib.rs Supports captured JSON execution results.
src/​mxc-sdk/​src/​core/​mxc_engine/​run.rs Replaces Nanvix runner dispatch.
src/​mxc-sdk/​src/​core/​mxc_engine/​mod.rs Adds captured execution orchestration.
src/​mxc-sdk/​src/​core/​mxc_common/​models.rs Tracks explicit policy-field presence.
src/​mxc-sdk/​src/​core/​mxc_common/​config_parser.rs Preserves presence and tests backend rejection.
src/​mxc-sdk/​src/​core/​mxc_common/​cmdline.rs Selects POSIX quoting for MicroVM.
src/​mxc-sdk/​src/​backends/​nvx/​runtime.rs Configures the bundled agent and workload image.
src/​mxc-sdk/​src/​backends/​nvx/​runner.rs Implements execution and cleanup.
src/​mxc-sdk/​src/​backends/​nvx/​policy.rs Rejects unsupported phase-1 policy.
src/​mxc-sdk/​src/​backends/​nvx/​mod.rs Declares NVX modules.
src/​mxc-sdk/​src/​backends/​mod.rs Gates NVX to Windows x64.
src/​mxc-sdk/​README.md Documents experimental execution support.
src/​mxc-sdk/​Cargo.toml Adds pinned dependency and disables publishing.
src/​mxc-sdk/​build/​build_nvx_bundled.rs Verifies and stages bundle contents.
src/​mxc-sdk/​build.rs Invokes NVX staging.
src/​Cargo.lock Records NVX dependencies.
README.md Updates platform support and scope.
docs/​schema.md Documents NVX request restrictions.
docs/​development/​build-and-test/​ci-validation-infrastructure.md Clarifies phase-1 validation boundaries.
docs/​backends/​nanvix/​nanvix.md Replaces legacy guidance with NVX documentation.
build.sh Rejects Linux MicroVM builds.
build.bat Copies the signed Windows bundle.
.github/​workflows/​microvm-e2e.yml Builds and tests NVX integration.
.cargo/​config.toml Pins bundle download and verification settings.

Review effort: Balanced

Comment thread .github/workflows/microvm-e2e.yml Outdated
Comment thread src/mxc-sdk/src/backends/nvx/runner.rs Outdated
Comment thread src/mxc-sdk/tests/nvx_e2e.rs Outdated
Preserve executor output bytes and propagate test failures. Correct timeout assertions and simplify review wording and documentation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
huzaifa-msft and others added 2 commits October 19, 2026 12:52
Link the root README to the SDK integration notes and document host prerequisites and policy restrictions there.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore the Nanvix guide unchanged from the PR base and keep the README and CI notes focused on the current integration.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Unbounded output capture risks host memory exhaustion, and incomplete preflight validation lets invalid requests reach VM startup.

No open issues 🎉

2 previously missed issues

In code that hasn't changed since last review

Medium severity Validator misses NVX execution request constraints

src/​mxc-sdk/​src/​backends/​nvx/​policy.rs:78

This validator accepts whitespace-only commands, guest working directories longer than 4095 bytes, and more than 256 short environment entries, although the pinned NVX API rejects them. --dry-run therefore reports success, and actual execution can pull the image and boot a VM before client.exec rejects the request. Reject these deterministic cases here and cover them in the host-only request matrix. Calling client.validate_exec before provisioning can additionally guard the execution path, but does not replace validation used by dry-run.

Medium severity Unbounded command output can exhaust executor memory

src/​mxc-sdk/​src/​backends/​nvx/​runner.rs:90

The pinned NVX agent has no total output limit, and wait_with_output() collects both streams with read_to_end into growing vectors. An allowed command such as while :; do printf 'xxxxxxxxxxxxxxxx\n'; done with timeout disabled can exhaust the executor or embedding application's memory and abort it before stop/deprovision runs. Read both streams concurrently with a bounded capture budget, cancel execution on overflow, and still perform cleanup.

3 resolved since last review

Review effort: Balanced

@huzaifa-d
Huzaifa Danish (huzaifa-d) marked this pull request as ready for review October 20, 2026 18:07
@huzaifa-d
Huzaifa Danish (huzaifa-d) requested a review from a team as a code owner October 20, 2026 18:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants