Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e6a5aa1
build: build the guest binaries from nvx-rs
ppenna Oct 14, 2026
0012ca0
docker: build the guest binaries in a pinned Rust stage
ppenna Oct 14, 2026
46db4e6
release: record the Rust guest sources and toolchain
ppenna Oct 14, 2026
334c885
ci: key guest artifacts on the Rust guest sources
ppenna Oct 14, 2026
8142d4e
guest: delete the replaced C programs and tests
ppenna Oct 14, 2026
f1b8428
doc: describe the Rust guest binaries
ppenna Oct 15, 2026
3574edd
nvx-rs: port the egress policy compiler to nvx::host::network
ppenna Oct 17, 2026
5301905
nvx-rs: check the egress policy port against the Python compiler
ppenna Oct 17, 2026
ec45cd1
aci_edge_sandboxes: lower egress rules with the policy compiler
ppenna Oct 17, 2026
6f41a5a
doc: describe the egress policy compiler of nvx-rs
ppenna Oct 17, 2026
78e77c3
nvx-rs: share a rule's addresses among its selectors
ppenna Oct 17, 2026
10be349
nvx-rs: port the sandbox launch profile
ppenna Oct 17, 2026
3aa5ca2
nvx-rs: port the sandbox option checks of nvx.py
ppenna Oct 17, 2026
6c46965
nvx-rs: check the sandbox port against golden Python fixtures
ppenna Oct 17, 2026
e1b2359
nvx-rs: look up the guest artifacts that nvx.py runs
ppenna Oct 17, 2026
1fa32b8
doc: describe the sandbox port and guest artifact lookup of nvx-rs
ppenna Oct 17, 2026
0441360
nvx-rs: add the nvx-rs CLI with artifacts, egress, and sandbox run
ppenna Oct 17, 2026
a7c803d
nvx-rs: port the sandbox lifecycle of nvx.py to nvx-rs sandbox
ppenna Oct 17, 2026
6ae9554
nvx-rs: port the control-session tests of nvx.py
ppenna Oct 17, 2026
388d6fc
nvx-rs: require the guest features of layered sandboxes
ppenna Oct 17, 2026
579813e
nvx-rs: serve sandboxes from the fake OpenVMM
ppenna Oct 17, 2026
cbdb791
nvx-rs: replay golden nvx.py sandbox scenarios
ppenna Oct 17, 2026
2ea9de3
doc: describe the nvx-rs CLI
ppenna Oct 17, 2026
e74e3c6
nvx-rs: end an interrupted sandbox run as interrupted
ppenna Oct 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ kernel/config-microvm-debug text eol=lf
# Linux hosts read the setup tool manifest, including copies staged from Windows.
scripts/setup/tool-versions.conf text eol=lf

.github/workflows/*.lock.yml linguist-generated=true
.github/workflows/*.lock.yml linguist-generated=true
# Generated from Python by scripts/nvx_rs_fixtures.py.
nvx-rs/src/host/python/unicode.rs linguist-generated=true
nvx-rs/tests/fixtures/cli.json linguist-generated=true
nvx-rs/tests/fixtures/egress-policy.json linguist-generated=true
nvx-rs/tests/fixtures/python.json linguist-generated=true
nvx-rs/tests/fixtures/sandbox.json linguist-generated=true
nvx-rs/tests/fixtures/sandbox_options.json linguist-generated=true
18 changes: 10 additions & 8 deletions .github/actions/build-guest-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,23 @@ runs:
AZURELINUX_VERSION: ${{ steps.guest-versions.outputs.azurelinux-version }}
KERNEL_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'kernel/config-microvm', 'kernel/patches/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py') }}
DEBUG_KERNEL_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'kernel/config-microvm', 'kernel/config-microvm-debug', 'kernel/patches/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py') }}
ALPINE_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'guest/alpine/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/guests.py') }}
UBUNTU_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'guest/ubuntu/**', 'ubuntu/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/guests.py', 'scripts/nvx_tools/ubuntu.py') }}
AZURELINUX_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'azurelinux/**', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/azurelinux.py', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/guests.py') }}
ALPINE_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'guest/alpine/**', 'nvx-rs/**', '!nvx-rs/target/**', 'rust-toolchain.toml', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/elf.py', 'scripts/nvx_tools/guest_binaries.py', 'scripts/nvx_tools/guests.py') }}
UBUNTU_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'guest/ubuntu/**', 'ubuntu/**', 'nvx-rs/**', '!nvx-rs/target/**', 'rust-toolchain.toml', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/elf.py', 'scripts/nvx_tools/guest_binaries.py', 'scripts/nvx_tools/guests.py', 'scripts/nvx_tools/ubuntu.py') }}
AZURELINUX_INPUT_HASH: ${{ hashFiles('SOURCE-MANIFEST.json', 'guest/common/**', 'azurelinux/**', 'nvx-rs/**', '!nvx-rs/target/**', 'rust-toolchain.toml', 'docker/Dockerfile', '.dockerignore', 'scripts/nvx_tools/azurelinux.py', 'scripts/nvx_tools/build.py', 'scripts/nvx_tools/build_config.py', 'scripts/nvx_tools/build_constants.py', 'scripts/nvx_tools/common.py', 'scripts/nvx_tools/elf.py', 'scripts/nvx_tools/guest_binaries.py', 'scripts/nvx_tools/guests.py') }}
run: |
set -euo pipefail
# hashFiles hashes contents only, so the kernel keys also name each patch
# path and its order.
# path and its order, and the guest image keys the path-aware digest of
# the Rust guest sources that their package manifests record.
patch_identity=$(python3 scripts/nvx.py kernel-patch-identity)
rust_source_identity=$(python3 scripts/nvx.py guest-binary-source-identity)
{
echo "kernel=linux-kernel-v1-${KERNEL_VERSION}-${KERNEL_INPUT_HASH}-${patch_identity}"
echo "kernel-debug=linux-kernel-debug-v1-${KERNEL_VERSION}-${DEBUG_KERNEL_INPUT_HASH}-${patch_identity}"
echo "alpine=alpine-image-v1-${ALPINE_VERSION}-${ALPINE_INPUT_HASH}"
echo "ubuntu=ubuntu-initramfs-v1-${UBUNTU_VERSION}-${UBUNTU_INPUT_HASH}"
echo "ubuntu-distro=ubuntu-distro-v1-${UBUNTU_VERSION}-${UBUNTU_INPUT_HASH}"
echo "azurelinux=azurelinux-initramfs-v1-${AZURELINUX_VERSION}-${AZURELINUX_INPUT_HASH}"
echo "alpine=alpine-image-v2-${ALPINE_VERSION}-${ALPINE_INPUT_HASH}-${rust_source_identity}"
echo "ubuntu=ubuntu-initramfs-v2-${UBUNTU_VERSION}-${UBUNTU_INPUT_HASH}-${rust_source_identity}"
echo "ubuntu-distro=ubuntu-distro-v2-${UBUNTU_VERSION}-${UBUNTU_INPUT_HASH}-${rust_source_identity}"
echo "azurelinux=azurelinux-initramfs-v2-${AZURELINUX_VERSION}-${AZURELINUX_INPUT_HASH}-${rust_source_identity}"
} >> "${GITHUB_OUTPUT}"

- name: Restore Linux kernel (zstd)
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/validate-nvx/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ runs:
run: |
set -euo pipefail
python3 -m compileall -q scripts
python3 -m unittest scripts/test_performance.py scripts/test_nvx_tools.py scripts/test_guest_binaries.py scripts/test_microvm_tests.py scripts/test_development_release.py scripts/test_egress_policy.py scripts/test_control_session.py scripts/test_managed_agent.py scripts/test_guest_time.py scripts/test_guest_ingress.py scripts/test_host_telemetry.py scripts/test_time_abi.py scripts/test_tool_versions.py scripts/test_markdown_links.py -v
python3 -m unittest scripts/test_performance.py scripts/test_nvx_tools.py scripts/test_guest_binaries.py scripts/test_microvm_tests.py scripts/test_development_release.py scripts/test_egress_policy.py scripts/test_control_session.py scripts/test_host_telemetry.py scripts/test_time_abi.py scripts/test_tool_versions.py scripts/test_markdown_links.py -v
python3 scripts/test_adversarial.py -v
python3 .github/skills/nvx-host-connect/scripts/test_hosts.py -v
python3 scripts/nvx.py --help
Expand All @@ -30,7 +30,7 @@ runs:
$ErrorActionPreference = "Stop"
python -m compileall -q scripts
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
python -m unittest scripts/test_performance.py scripts/test_nvx_tools.py scripts/test_guest_binaries.py scripts/test_microvm_tests.py scripts/test_development_release.py scripts/test_egress_policy.py scripts/test_control_session.py scripts/test_managed_agent.py scripts/test_guest_time.py scripts/test_guest_ingress.py scripts/test_host_telemetry.py scripts/test_time_abi.py scripts/test_tool_versions.py scripts/test_markdown_links.py -v
python -m unittest scripts/test_performance.py scripts/test_nvx_tools.py scripts/test_guest_binaries.py scripts/test_microvm_tests.py scripts/test_development_release.py scripts/test_egress_policy.py scripts/test_control_session.py scripts/test_host_telemetry.py scripts/test_time_abi.py scripts/test_tool_versions.py scripts/test_markdown_links.py -v
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
python scripts\test_adversarial.py -v
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
Expand Down
7 changes: 4 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@
[copilot-setup-steps](./workflows/copilot-setup-steps.yml) prepares. It
initializes `openvmm/`; installs `requirements-dev.txt` into a Python virtual
environment on `PATH`, the Rust release that `rust-toolchain.toml` pins with
the OpenVMM test targets, the minimum supported Rust versions of the
`aci_edge_sandboxes` and `nvx-rs` crates, cargo-nextest, and the native guest build
prerequisites; grants `/dev/kvm` access; pulls the pinned shell linter images;
the OpenVMM test targets and the `x86_64-unknown-linux-musl` target used by
the Rust guest binaries, the minimum supported Rust versions of the
`aci_edge_sandboxes` and `nvx-rs` crates, cargo-nextest, and the remaining
native guest build prerequisites; grants `/dev/kvm` access; pulls the pinned shell linter images;
and stages the pinned Linux and Ubuntu Base archives in `.cache/downloads`.
When CI has cached them for the checked-out inputs, it also restores the guest
artifacts into `build/` and the KVM OpenVMM binary into
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
- .gitmodules
- SOURCE-MANIFEST.json
- aci_edge_sandboxes/Cargo.toml
- nvx-rs/Cargo.toml
- nvx-rs/**
- openvmm
- requirements-dev.txt
- rust-toolchain.toml
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ NVX was jointly developed by the [MSR Systems Research Group][msr-systems] and
[msr-systems]: https://www.microsoft.com/en-us/research/group/systems-research-group-redmond/
[azure-systems]: https://www.microsoft.com/en-us/research/group/azure-research-systems/

This repository includes version pins for Linux and OpenVMM, along with the patches, guest source
files, build tools, and benchmarks needed to use NVX.
This repository includes version pins for Linux, OpenVMM, and the Rust guest
toolchain, along with the patches, guest source files, build tools, and
benchmarks needed to use NVX. Alpine, Ubuntu, and Azure Linux ship the nine
static guest binaries from [`nvx-rs`](nvx-rs/README.md#guest-binaries) at
their common `/sbin/nvx-*` paths.

## Quick Start

Expand Down
16 changes: 13 additions & 3 deletions SOURCE-MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"control_session_protocol_version": 1,
"control_contract_revision": "nvx-microvm-v2-control-v2"
},
"guest_rust": {
"toolchain": "1.95.0",
"target": "x86_64-unknown-linux-musl"
},
"linux": {
"version": "6.18.38",
"upstream_url": "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.18.38.tar.xz",
Expand All @@ -31,7 +35,9 @@
"minirootfs_sha256": "41f73e3cf5fa919b8aa5ca6b30dc48f0da2720776d7423e2a7748211456fe081",
"guest_sources": [
"guest/common",
"guest/alpine"
"guest/alpine",
"nvx-rs",
"rust-toolchain.toml"
],
"package_manifests": [
"build/initramfs.cpio.gz.packages.json"
Expand All @@ -52,7 +58,9 @@
"guest_sources": [
"guest/common",
"guest/ubuntu",
"ubuntu/packages.lock.json"
"ubuntu/packages.lock.json",
"nvx-rs",
"rust-toolchain.toml"
],
"package_manifests": [
"build/initramfs-ubuntu.cpio.gz.packages.json",
Expand All @@ -70,7 +78,9 @@
"package_lock_sha256": "f2014a858f46482778f138b374f80c36df389206ae677870d58a7e919bec182b",
"guest_sources": [
"guest/common",
"azurelinux/packages.lock.json"
"azurelinux/packages.lock.json",
"nvx-rs",
"rust-toolchain.toml"
],
"package_manifests": [
"build/initramfs-azurelinux.cpio.gz.packages.json"
Expand Down
12 changes: 10 additions & 2 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ the distribution tooling.
| --- | --- | --- |
| Linux 6.18.38 | Generated under `.cache/linux` | GPL-2.0-only; the upstream archive and patch series are pinned in `SOURCE-MANIFEST.json` and `kernel/patches`. Each build exports its exact config, and `collect-sources` emits the complete patched tree. |
| OpenVMM | `openvmm` | MIT; see `openvmm/LICENSE`. Source is a private Git submodule and is available only to authorized users. |
| NVX guest/build sources | `guest`, `ubuntu`, `kernel`, `scripts/nvx_tools` | MIT; see `LICENSE`. |
| musl libc (Debian 12 `musl`) | statically linked into `/sbin/nvx-time`, `/sbin/nvx-time-probe`, and `/sbin/nvx-exit` in generated initramfs images | MIT; Copyright © 2005-2020 Rich Felker, et al. The build image's `/usr/share/doc/musl/copyright` carries the full notice, and the source is Debian's `musl` source package. |
| NVX guest/build sources | `guest`, `nvx-rs`, `ubuntu`, `kernel`, `scripts/nvx_tools` | MIT; see `LICENSE`. |
| Rust core and standard libraries | linked into all nine Rust guest binaries listed in the musl row | MIT OR Apache-2.0; the exact release is pinned by `rust-toolchain.toml`. Source and license files are under [`rust-lang/rust/library`](https://github.com/rust-lang/rust/tree/master/library), with `LICENSE-MIT` and `LICENSE-APACHE` at the repository root. |
| Rust `compiler_builtins` | Rust target runtime routines used by the guest binaries | MIT OR Apache-2.0 for `rust-lang/compiler-builtins`; routines derived from LLVM compiler-rt are Apache-2.0 WITH LLVM-exception. Source is the revision bundled by the pinned Rust release under [`rust-lang/compiler-builtins`](https://github.com/rust-lang/compiler-builtins) and its [`llvm-project/compiler-rt`](https://github.com/llvm/llvm-project/tree/main/compiler-rt) sources. |
| Rust `libc` crate 0.2.189 | linked into the guest binaries through `nix` and `getrandom` | MIT OR Apache-2.0; the exact crate checksum is pinned in `nvx-rs/Cargo.lock`, and source and license files are at [`rust-lang/libc` tag 0.2.189](https://github.com/rust-lang/libc/tree/0.2.189). |
| Rust `nix` crate 0.31.3 | system-call wrappers used by the guest binaries | MIT; the exact crate checksum is pinned in `nvx-rs/Cargo.lock`, and the source is published by [`nix-rust/nix`](https://crates.io/crates/nix/0.31.3). |
| Rust `getrandom` crate 0.4.3 | random bytes for the guest binaries, such as `nvx-reseed --sample` | MIT OR Apache-2.0; the exact crate checksum is pinned in `nvx-rs/Cargo.lock`, and the source is published by [`rust-random/getrandom`](https://crates.io/crates/getrandom/0.4.3). |
| Rust `bitflags` crate 2.13.2 | transitive `nix` dependency in the guest binaries | MIT OR Apache-2.0; the exact crate checksum is pinned in `nvx-rs/Cargo.lock`, and the source is published by [`bitflags/bitflags`](https://crates.io/crates/bitflags/2.13.2). |
| Rust `cfg-if` crate 1.0.5 | transitive `nix` and `getrandom` dependency in the guest binaries | MIT OR Apache-2.0; the exact crate checksum is pinned in `nvx-rs/Cargo.lock`, and the source is published by [`rust-lang/cfg-if`](https://crates.io/crates/cfg-if/1.0.5). |
| Rust `memoffset` crate 0.9.1 | transitive `nix` dependency in the guest binaries | MIT; the exact crate checksum is pinned in `nvx-rs/Cargo.lock`, and the source is published by [`Gilnaa/memoffset`](https://crates.io/crates/memoffset/0.9.1). |
| musl libc | statically linked into `/sbin/nvx-console-pending`, `/sbin/nvx-mmio-write`, `/sbin/nvx-reseed`, `/sbin/nvx-exit`, `/sbin/nvx-device-io`, `/sbin/nvx-managed-agent`, `/sbin/nvx-ingress`, `/sbin/nvx-time`, and `/sbin/nvx-time-probe` in every generated initramfs | MIT; Copyright © 2005-2020 Rich Felker, et al. The exact implementation is supplied by the pinned Rust release's `x86_64-unknown-linux-musl` target. Upstream source and the full copyright notice are at [musl libc](https://musl.libc.org/). |
| Alpine Linux packages | generated initramfs images | Per-package licenses. Every build emits `*.packages.json`; retain that manifest and collect the corresponding aports recipes and upstream sources before distributing an image. |
| Azure Linux 3.0 packages | generated Azure Linux initramfs | Per-package licenses, including GPLv2 BusyBox. The base image is digest-pinned in `SOURCE-MANIFEST.json`, every supplemental RPM is SHA-256 pinned in `azurelinux/packages.lock.json`, and every build emits `initramfs-azurelinux.cpio.gz.packages.json`. `collect-sources` does not collect this corresponding source yet, so `--include-source` packages omit the Azure Linux initramfs; publish the matching source before distributing a binary-only package that contains it. |
| Ubuntu Base 26.04.1 LTS and supplemental packages | generated Ubuntu initramfs and EROFS images | Per-package licenses. The base archive and every supplemental `.deb` are SHA-256 pinned. Retain the generated Ubuntu manifests and publish the matching `.dsc` plus all referenced source members before distributing an image. Ubuntu artifacts contain Ubuntu userland with the NVX kernel, not the Ubuntu kernel. |
Expand Down
Loading
Loading