Microsoft Open-Sources NVX: Ultra-Light Micro-VM Sandbox for Agentic Workloads
MSR and Azure Research have open-sourced NVX, an OpenVMM-based ultra-light micro-VM sandbox offering hardware-enforced isolation for untrusted AI agent executio
Microsoft Research Systems Research Group (MSR Systems) and Azure Research - Systems have officially released NVX under the permissive MIT license. NVX is an open-source, ultra-lightweight micro-VM sandbox designed to run untrusted agentic AI workloads inside hardware-enforced isolation boundaries.

Image source: Coolcaesar 쨌 CC BY-SA 4.0 쨌 https://creativecommons.org/licenses/by-sa/4.0 쨌 https://commons.wikimedia.org/wiki/File:Building92microsoft.jpg
Autonomous AI agents increasingly write, compile, and execute arbitrary shell commands and application scripts on local hosts. Running untrusted generated code inside regular Linux process namespaces or standard container runtimes poses containment challenges, as kernel surface vulnerabilities can lead to host breakouts. Built on prior research results from the Nanvix system, NVX eliminates non-essential virtualization components to deliver an ultra-lean hardware-isolated micro-VM tailored specifically for autonomous agent execution.
OpenVMM Foundation and Hardware Isolation Architecture
NVX is built on top of OpenVMM, Microsoft's modular virtual machine monitor implementation, and boots Linux as its guest operating system. Rather than emulating an entire legacy PC architecture with complex emulated peripherals, NVX strips out unnecessary virtual hardware components to achieve minimal boot latency and tiny memory footprints.
Because the guest kernel is scheduled through the host CPU's hardware virtualization extensions, any malicious script or corrupted execution path inside the guest cannot touch host memory or kernel structures.
NVX supports three primary host hypervisor backends:
- Linux / KVM: Uses
/dev/kvmread/write device access for standard Linux virtualization. - Linux / MSHV: Uses
/dev/mshvfor environments running the Microsoft Hypervisor driver. - Windows / WHP: Leverages the native Windows Hypervisor Platform APIs on Windows 10 and later hosts.
The nvx-rs crate acts as the host supervisor CLI. It manages OpenVMM control protocols, launches micro-VM instances, lowers security policies, and monitors execution state across both operating system families.
Multi-Userland Guest Support and Common Binaries
While booting an optimized custom NVX Linux kernel, NVX provides runtime flexibility by supporting three distinct Linux userlands out of the box:
- Alpine Linux: The default userland choice, engineered for minimal memory overhead and rapid boot cycles.
- Ubuntu: Best suited for agentic developer tasks that depend on standard Debian packaging, Python dependencies, and common development toolchains.
- Azure Linux: Geared toward enterprise workflows requiring compatibility with Microsoft's cloud-standard distribution images.
All three supported userland images embed ten static guest binaries compiled directly from the nvx-rs project. These binaries reside under /sbin/nvx-* across Alpine, Ubuntu, and Azure Linux. Because the binaries share identical paths and protocol contracts, the supervisor CLI can enforce identical guest control, telemetry, and lifecycle semantics regardless of which distribution rootfs is active.
Build and Execution Workflow
Getting started with NVX requires only Git, a working Rust installation managed through rustup, and host support for curl and tar.
1. Building the Supervisor CLI
Clone the repository and compile the nvx-rs command-line utility with locked dependencies:
Linux with KVM:
git clone https://github.com/microsoft/nvx.git && cd nvx
cargo build --release --locked --features cli \
--manifest-path nvx-rs/Cargo.toml --target-dir nvx-rs/target
nvx-rs/target/release/nvx-rs run
Linux with MSHV:
git clone https://github.com/microsoft/nvx.git && cd nvx
cargo build --release --locked --features cli \
--manifest-path nvx-rs/Cargo.toml --target-dir nvx-rs/target
nvx-rs/target/release/nvx-rs run --hypervisor mshv
Windows with WHP (PowerShell):
git clone https://github.com/microsoft/nvx.git; Set-Location nvx
cargo build --release --locked --features cli `
--manifest-path nvx-rs/Cargo.toml --target-dir nvx-rs/target
nvx-rs\target\release\nvx-rs.exe run
2. Automated Artifact Fetching and Shell Access
During the first invocation of nvx-rs run, the supervisor CLI checks the local cache. If no pre-built guest kernel or rootfs artifacts exist, it automatically downloads the matching pre-built NVX package from CI releases using the host's native curl and tar. This allows developers to run sandboxed guest environments without compiling OpenVMM or the guest Linux kernel from scratch.
Once initialization succeeds, the terminal logs the boot banner and launches an interactive root shell:
NVX-GUEST-BOOT-OK: alpine
To switch from the default Alpine environment to Ubuntu or Azure Linux, append the --guest parameter:
nvx-rs run --guest ubuntu
nvx-rs run --guest azurelinux
To exit the micro-VM cleanly from inside the guest shell, execute:
/sbin/nvx-exit 0
System Requirements and Considerations
Before integrating NVX into local development workflows, several configuration details should be kept in mind:
- Hypervisor Permissions: Linux hosts require read and write permissions to
/dev/kvmor/dev/mshv. On Windows, the optional 'Windows Hypervisor Platform' feature must be toggled on in Windows Features prior to execution. - Source Compilation and Submodules: The standard
git clonecommand omits submodules. Developers intending to build NVX and OpenVMM entirely from source rather than relying on automated prebuilt packages must explicitly initialize theopenvmmsubmodule. - Lean Runtime Surface: Because NVX strips away non-essential device emulation to maximize performance and isolation, workloads requiring legacy synthetic PCI hardware or desktop subsystem emulations will need explicit adaptation.
NVX provides an agile, hardware-level isolation substrate for engineering teams deploying autonomous agents capable of generating and executing arbitrary system commands.
Sources
- GitHub: microsoft/nvx