AGENT SKILL

nvx-run-microvm

Boot an NVX microVM with nvx-rs on Linux/KVM, Linux/MSHV, or Windows/WHP, exercise the guest, and debug failed boots. Use for boot smoke tests, guest shell sessions, virtio-fs mounts, networking, kernel command lines, missing boot markers, OpenVMM errors, guest hangs, and benchmark acceptance failures.

License 许可
MIT
所属仓库
microsoft/nvx
最近更新
2026-11-15
Stars
★ 841
Forks
59

01 前言 Front Matter

name
nvx-run-microvm
description
Boot an NVX microVM with nvx-rs on Linux/KVM, Linux/MSHV, or Windows/WHP, exercise the guest, and debug failed boots. Use for boot smoke tests, guest shell sessions, virtio-fs mounts, networking, kernel command lines, missing boot markers, OpenVMM errors, guest hangs, and benchmark acceptance failures.
argument-hint
[local|host-profile] [kvm|mshv|whp] [run options or failure]

03 SKILL.md 正文

Run And Debug An NVX MicroVM

Prepare the host with nvx-prepare-host first, and reuse its host, checkout, backend, revision, and artifacts. Run the commands below from that checkout in an interactive terminal, locally or in ssh -tt <ssh_target> on a remote host. They read the same in bash and PowerShell, except where noted; use python instead of python3 on Windows.

Run

  1. Assemble the run with only the options that the task needs, and check it:

    nvx-rs/target/release/nvx-rs run --hypervisor BACKEND --dry-run
    

    Usage documents the options, such as --memory-mib, --net 10.0.0.2/24 --network-profile portable, --cmdline "quiet loglevel=0", and --mount "/mnt/host,HOST_PATH,ro", whose guest path is absolute and whose mode follows the last comma, so the host path may hold commas. Mount ro unless the guest must write.

  2. From the checkout that holds this skill, since the prepared one may predate the probe, check that no OpenVMM process runs, with python3 scripts/nvx_hosts.py probe HOST --cwd CHECKOUT --no-verify on a remote host, or python3 scripts/host_probe.py --repo CHECKOUT --no-verify locally. Start a competing VM only when the user confirms that the existing one is expected and that the host has room for both.

  3. Run the same command without --dry-run, with standard input attached to the guest; never pipe it through a logger.

  4. Success is the guest's NVX-GUEST-BOOT-OK: <guest> marker, such as NVX-GUEST-BOOT-OK: alpine for the default guest, and a responsive root shell. Exercise the request, exit with /sbin/nvx-exit 0 in the guest, and record the host's exit status. When the guest hangs, interrupt only the command that this terminal started; never run a host-wide killall or an unscoped Stop-Process.

Debug A Failure

  1. Before retrying, keep the baseline: local or SSH execution, the host, backend, platform, commit, dirty state, artifact source, Python version, the --dry-run output, the exact command, its exit status and complete error, and any OpenVMM process left behind.
  2. Change one variable at a time. Rerun the same command with OpenVMM logging, export OPENVMM_LOG=debug in bash or $env:OPENVMM_LOG = 'debug' in PowerShell, and use trace only when debug does not show the failing component. The terminal transcript is the record.
  3. Run the OpenVMM command that --dry-run prints directly only for options that nvx-rs lacks, and record every deviation.
  4. Reduce a benchmark acceptance failure to one run before changing the measured suite: python3 scripts/nvx.py benchmark --suite e2e --backend BACKEND --warmups 1 --runs 1 --skip-build --output <fresh file>. The benchmark suppresses most OpenVMM logging to protect its measurements, so reproduce the boot through run for traces.
Failure Action
SSH authentication or host key Stop; the user repairs trust or credentials
Missing or inaccessible hypervisor device Report the probe's check; do not elevate
WHP unavailable Report it; enabling WHP needs an administrator and a reboot
Dirty or wrong revision Stop changing it; use a temporary worktree or ask
Missing artifacts download or build them, by the provenance that the task needs
Boot marker timeout Trace the same backend and command before widening the scope
SSH disconnect Look for the original process and its output before another run

Report

Report local or SSH execution, the host, backend, commit, dirty state, artifact source, exact command, boot marker, guest checks, and the host's exit status. For a failure, add the smallest reproduction, the observed against the expected behavior, the relevant trace lines, the layer that appears to control the failure, the next discriminating check, every changed option, and any privilege or transport limitation.

04 同仓库更多 Skills

microsoft
microsoft/nvx

nvx-triage-ci-run

Triage a failed, cancelled, or hanging microsoft/nvx GitHub Actions run: classify supersession and queueing, find the first causal failure for the exact head, reproduce it on the matching platform, and fix it locally without committing. Use for workflow run URLs or IDs, red pull-request checks, runner, matrix, and artifact-handoff failures, and performance-gate or benchmark-host failures.

★ 841
microsoft
microsoft/nvx

nvx-rebase-openvmm-chain

Rebase or reorganize the OpenVMM microVM chain onto the latest upstream main as a new feature/microvm/release branch, validate and publish it, pin it in NVX with a remapped roadmap, and land it. Use for microVM release rebases and reorganizations, chain commits that upstream landed, rebase conflicts and fixups, and the release landing order.

★ 841
microsoft
microsoft/nvx

nvx-promote-openvmm-pin

Pin a reviewed OpenVMM revision in NVX: verify its provenance and signature, commit the gitlink and the OpenVMM roadmap mapping, validate the exact pin, and land the OpenVMM pull request by fast-forward. Use for OpenVMM pin updates, clean replacement pull requests, source-equivalence checks, and mapping new chain commits in the OpenVMM upstream roadmap.

★ 841
microsoft
microsoft/nvx

nvx-prepare-host

Prepare a local host or a configured SSH host for NVX work: resolve its profile, probe its KVM, MSHV, or WHP backend and checkout, check out the requested revision in a temporary worktree, and stage nvx-rs and the artifacts. Use before running, debugging, or benchmarking NVX on a host, or to diagnose a host's prerequisites.

★ 841
microsoft
microsoft/nvx

nvx-fix-issue

Fix one microsoft/nvx issue end to end: reproduce it on the configured hosts, commit signed fixes, open a Ready pull request against dev, and drive CI and review until only a maintainer's approval remains. Use when invoked with an NVX issue number or URL.

★ 841
microsoft
microsoft/nvx

nvx-collect-benchmarks

Collect fresh NVX benchmark results on a prepared Linux/KVM, Linux/MSHV, or Windows/WHP host with the smoke, CI-equivalent, or canonical profile. Use for acceptance runs, performance suites, p50 collection, benchmark artifacts, and same-host performance comparisons.

★ 841