nvx README

The project's README from github.com/microsoft/nvx. As one markdown file: README.md.

NVX: An Ultra-Light Micro-VM Sandbox

NVX is an ultra-light micro-VM sandbox for running untrusted workloads with hardware-enforced isolation. It is built on top of OpenVMM and runs Linux as a guest.

NVX was jointly developed by the MSR Systems Research Group and Azure Research - Systems, building on research results from the Nanvix system.

This repository includes version pins for Linux and OpenVMM, along with the patches, guest source files, build tools, and benchmarks needed to use NVX.

Quick Start

Python 3.10 or newer is required. The commands below download the latest NVX release for the selected platform, so no local build is required. A successful boot prints NVX-GUEST-BOOT-OK: alpine and opens a root shell. Select Ubuntu userland with the same NVX kernel by passing --guest ubuntu.

Exit cleanly from the guest with /sbin/nvx-exit 0. See the setup and run guides for detailed prerequisites and runtime options.

ℹ️ For direct OpenVMM integration without the scripts/nvx.py runtime harness, see Run OpenVMM directly.

Linux / KVM

Requires KVM configured with read/write access to /dev/kvm.

git clone https://github.com/microsoft/nvx.git && cd nvx
python3 scripts/nvx.py download
python3 scripts/nvx.py run

Linux / MSHV

Requires MSHV configured with read/write access to /dev/mshv.

git clone https://github.com/microsoft/nvx.git && cd nvx
python3 scripts/nvx.py download --hypervisor mshv
python3 scripts/nvx.py run --hypervisor mshv

Windows / WHP

Requires Windows Hypervisor Platform enabled.

git clone https://github.com/microsoft/nvx.git; Set-Location nvx
python scripts\nvx.py download
python scripts\nvx.py run

Documentation

Usage

Development

nvx (microsoft/nvx)

Searching Database…

404 ·GitHub
这是什么?NVX 是一个超轻量的微型虚拟机沙箱,用于以硬件强制隔离的方式运行不受信任的负载,构建在 OpenVMM 之上,guest 操作系统为 Linux。
这是我导入的库,还是独立工具?它是一个命令行运行时套壳(scripts/nvx.py),负责启动和管理微型虚拟机,不是导入你自己代码的库;也可以不经这个套壳直接驱动 OpenVMM。
怎么把沙箱跑起来?安装 Python 3.10 或更新版本,然后运行针对你平台的快速开始命令;它们会下载最新的 NVX 发行版,无需本地构建,启动成功会打印 boot-OK 消息并打开一个 root shell。
我的机器上需要预先配置好什么虚拟机监控器?你需要操作系统上启用一个虚拟机监控器:Linux 上是有 /dev/kvm 读写权限的 KVM 或 MSHV,Windows 上是启用 Windows Hypervisor Platform(WHP)。
让 NVX 启动的主要坑是什么?每个后端都有自己的前置条件,必须提前就绪——例如 MSHV 需要对 /dev/mshv 有正确的读写权限,Windows 需要开启 WHP——否则微型虚拟机无法启动。
它是为谁打造的?它面向需要硬件隔离沙箱来运行不受信任代码或智能体生成代码的工程师和研究人员,例如智能体编程类负载。
我能选择默认之外的 guest 操作系统吗?可以,NVX 默认启动 Alpine Linux guest,传入 --guest ubuntu 即可在同一个 NVX 内核下切换到 Ubuntu 用户空间。
OpenVMM 是什么?NVX 为什么依赖它?OpenVMM 是 NVX 构建其上的虚拟机监控器运行时;该仓库锁定特定的 Linux 和 OpenVMM 版本,并添加了让它们作为 NVX 一起运行所需的补丁、guest 源码、构建工具和基准测试。
这个项目测试自己的沙箱隔离性吗?测试,它记录了“Copilot 驱动的对抗性测试”——用有界的自适应压力测试和遏制验证行动来探测沙箱隔离的健壮性。
What are similar projects?coop, smolvm, CubeSandbox, brig, quicksand, ProxmoxVE, agentbox, qemu
Creator
microsoft
Size
32.9 MB
Stars
404
Updated
CommitOct 16
Age
1mo
Commits · 90 Days