Index of every page on this site: llms.txt
All skills
microsoft avatar

/nvx-prepare-host

@fef56ac
by microsoftmicrosoft/nvx857 stars
66
Run it yourself

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 and the artifacts. Use before running, debugging, or benchmarking NVX on a host, or to diagnose a host's prerequisites.

  • 1 file
  • 5.5 KB
  • Updated 4 days ago
  • GitHub
Use this Skill: https://skilld.dev/gh/microsoft/nvx/nvx-prepare-host

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈85 tokens for metadata: the name and description. ≈1.3k when used: this file.

Description uses 4.3% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈341 characters, or 4.3%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Prepare An NVX Host

Establish a verified execution context, report it, and stop; then continue with nvx-run-microvm or nvx-collect-benchmarks. Run the commands from the NVX checkout. They use python3; use python on Windows.

1. Choose The Host

Work locally when the user asks for it or the local host provides the backend. Otherwise, list the profiles of the developer's inventory, the ignored .nvx-hosts.json that Setup describes, which the tool reads from the main worktree when you work in a linked one:

python3 scripts/nvx_hosts.py list
  • When remote_enabled is false, no remote host is configured: say so and work locally.
  • Use the profile that the user or the calling skill named, or ask the user to choose one. python3 scripts/nvx_hosts.py show PROFILE returns its ssh_target, backend, platform, host_type, and remote_repo, which are authoritative: never connect to a target outside the inventory, override its backend, or infer bare metal or a virtual machine from probes. When remote_repo is null, ask for the checkout's absolute path, and pass it as --cwd.

2. Safety

  • Never ask for or handle passwords, keys, tokens, or passphrases; when SSH asks for one, the user types it in the terminal. Never disable host-key checking, and stop on a changed host key.
  • Never reset, clean, switch, pull, overwrite, or update submodules in a dirty checkout. Test another revision in a temporary worktree, and ask before copying uncommitted files to a host.
  • Never install packages, enable Windows features, change device permissions, edit sudoers, load kernel modules, reboot, or use sudo to get past an access check without the user's approval.
  • Select one backend explicitly, never both.
  • Never terminate an OpenVMM process that this session did not start.

3. Probe

Probe the local host or the profile's checkout:

python3 scripts/host_probe.py --backend BACKEND
python3 scripts/nvx_hosts.py probe PROFILE

Both report the OS, Python, HEAD, the dirty state, the OpenVMM pin and checkout, nvx.py verify, the backend's access (/dev/kvm, /dev/mshv, or WHP), nvx and the artifacts, and running OpenVMM processes. On a host, nvx_hosts.py runs this checkout's copy of the probe, so the host's checkout may predate it. Report a failed access check as the probe states it. When KVM and MSHV are both usable and no backend was named, ask which one to use. A smoke run is the definitive WHP check.

4. Revision

Use the checkout as it is only when it is clean and at the requested revision, or when the user approves. To test another revision, such as a branch that you pushed, without touching the checkout, add a temporary worktree, which checks the remotes, fetches the branch, and checks out the worktree's OpenVMM pin:

python3 scripts/nvx_hosts.py worktree PROFILE -- add FETCH_HEAD --fetch BRANCH

On a host, this runs this checkout's host_worktree.py, as probe does; locally, run python3 scripts/host_worktree.py add ... directly. Work in the worktree that it prints, passing it as --cwd on a remote host, and remove it at the end with the same command, remove PATH taking the place of add ....

5. Artifacts

Build nvx, which runs microVMs and sandboxes and downloads releases, from the checkout's root, and again after nvx changes; no package contains it:

cargo build --release --locked --features cli --manifest-path nvx/Cargo.toml --target-dir nvx/target

Then stage the artifacts that the task's provenance calls for:

  • Packaged: nvx/target/release/nvx download --hypervisor BACKEND installs the release built from HEAD, or from its nearest released first-parent ancestor; report that release. It replaces every artifact, so never run it over artifacts that the user wants to keep.
  • Changed inputs: the matching nvx.py build-guest, build-openvmm, or build command of Build.
  • Changes to the coordinator only: the matching release artifacts in place, with their provenance reported.
  • The public sandbox scenarios of test-microvm also need build/ubuntu-smoke-scratch.ext4, which download installs from the releases that ship it. For an older release, format it on a Linux host with python3 scripts/nvx.py build-scratch-template and copy it to a Windows host.

A run downloads a release only into a checkout that holds no artifacts; NVX_AUTO_DOWNLOAD=0 turns that off. Check the generated command and its files without starting a VM:

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

Handoff

Report the host or local execution, the checkout and any temporary worktree, the OS, backend, platform, and host type, the commit and dirty state, the artifact source and the commands that staged it, the dry run's result, any running OpenVMM process, and every privilege or platform limitation. For interactive work on a remote host, open ssh -tt <ssh_target> and change to that directory.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at fef56ac. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 7 hours ago.

Activeupdated 4 days ago
argument-hint
[local|host-profile] [revision]

README badge

README badge for microsoft/nvx/nvx-prepare-host