openvmm
Copilot instructions1.9k starsChanged 2 months agoMITView on GitHub
OpenVMM is a modular, cross-platform Virtual Machine Monitor (VMM) written in Rust. This repository is home to both OpenVMM and OpenHCL (a paravisor). Documentation lives in Guide/ and is published at https://openvmm.dev. Restore required dependencies before building for the first time: The project supports cross-compilation for x86_64 and aarch64. OpenHCL can only be built from Linux (WSL2 counts). For cross-compilation from WSL2 to Windows, see Guide/src/dev_guide/getting_started/cross_compile.md and source . ./build_support/setup_windows_cross.sh. - Never amend commits that have already been pushed without…
- Deletes or force-pushes
- Commits and pushes
Trending
Steady talk.about the whole repository
Who's talking about microsoft/openvmm
- A Hacker News story“OpenVMM – A New VMM for Windows and Linux, Written in Rust”Hacker News · Oct 17, 2024 · 171 points
- @timclicks.dev“OpenHCL is a "paravisor" that can provide confidential computing to guest VMs that's hardware enforced. Its …”Bluesky · Nov 26, 2024 · 13 likes
- @github-trending.bsky.social“🎉 Celebrating! 🎉 (500+ new stars) 📦 microsoft / openvmm ⭐ 1,137 (+647) 🗒 Rust Home of OpenVMM and OpenHCL.”Bluesky · Oct 19, 2024 · 2 likes
- @jim-lawless.bsky.social“Microsoft's new cross-platform VM written in Rust: #rustlang github.com/microsoft/op...”Bluesky · Oct 19, 2024 · 2 likes
- @enrichthesoil.bsky.social“É guys github.com/microsoft/op...”Bluesky · Oct 17, 2024 · 2 likes
The biggest 5 of 34 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 34
Talked about on GitHub, Bluesky and Hacker News (34 times).
On GitHub · 27
- Mar 14, 2025doc: clarify the guaranteeds for `Zoned::{since,until}` — BurntSushi/jiff1 reaction
- Oct 2, 2026[FEATURE] 当最后一个实例关闭之后使用wsl --shutdown而不是wsl --terminate — owu/wsl-dashboard0 reactions · 1 comment
- Sep 30, 2026Switch to big PIC — microsoft/openvmm-deps0 reactions · 1 comment
- Sep 17, 2026Config: Fix DisableSha1Pcr configuration to also apply for ARM64 platforms — microsoft/mu_msvm0 reactions
- Sep 15, 2026【从能人智工到人工智能】第零篇——环境初始化 — WslzGmzs/WslzGmzs.github.io0 reactions
22 more on GitHub
- Aug 30, 2026[ENHANCEMENT][DEVICE] Exclusive physical PCIe device claim/release with full native guest access — iteathen/DevBridge0 reactions · 5 comments
- Aug 14, 2026openvmm: add new package — microsoft/azurelinux0 reactions · 14 comments
- Jul 17, 2026MsvmPkg: unify UEFI parameter configuration handoff — microsoft/mu_msvm0 reactions · 4 comments
- Jun 25, 2026Update Microsoft.WSL.DeviceHost to 1.2.39-0 — microsoft/WSL0 reactions
- May 12, 2026virtiofs: improve virtiofs performance by negotiating MAX_PAGES — microsoft/WSL0 reactions · 2 comments
- Apr 13, 2026mu_msvm: add support for hardware emulated pcie — microsoft/mu_msvm0 reactions
- Mar 23, 2026IGVM: Add support for booting non-SNP guests via native x86-64 VP context — cloud-hypervisor/cloud-hypervisor0 reactions · 3 comments
- Mar 17, 2026Enable DNS tunneling for VirtioProxy networking mode — microsoft/WSL0 reactions
- Mar 1, 2026build(deps): bump tracelimit from `fe7a562` to `dd3a530` — mripard/dradis0 reactions
- Jan 22, 2026refactoring for comments from upstream — hgarvison/openvmm0 reactions
- Jan 21, 2026virtiofs: add support for statx syscall — microsoft/WSL0 reactions
- Jan 9, 2026abstracting out the dll parser into its own package to be shared — hgarvison/openvmm0 reactions · 1 comment
- Jan 1, 2026build(deps): bump tracelimit from `79722f9` to `fe7a562` — mripard/dradis0 reactions
- Dec 1, 2025build(deps): bump tracelimit from `4ebc209` to `009339d` — mripard/dradis0 reactions
- Oct 1, 2025build(deps): bump tracelimit from `5ca22cb` to `4ebc209` — mripard/dradis0 reactions
- Sep 1, 2025build(deps): bump tracelimit from `b9a2abc` to `94889ca` — mripard/dradis0 reactions
- Aug 19, 2025build(deps): bump tracelimit from `53956a2` to `b9a2abc` — mripard/dradis0 reactions
- Aug 1, 2025build(deps): bump tracelimit from `01d7560` to `53956a2` — mripard/dradis0 reactions
- Jun 4, 2025structured logging: Add a list of fields to Metadata — rust-lang/log0 reactions · 5 comments
- May 22, 2025Add support for redirected VTL0 interrupts — microsoft/OHCL-Linux-Kernel0 reactions · 11 comments
- Jan 18, 2025OpenVMM- Project Proposal — confidential-computing/governance0 reactions · 2 comments
- Jan 2, 2025Updating tracing-core from 0.1.30 to 0.1.31 results in singificant binary size increase — tokio-rs/tracing0 reactions · 1 comment
On Bluesky · 6
- Nov 26, 2024OpenHCL is a "paravisor" that can provide confidential computing to guest VMs that's hardware enforced. Its virtual machine manager… — @timclicks.dev13 likes and reposts · 1 reply
- Oct 19, 2024🎉 Celebrating! 🎉 (500+ new stars) 📦 microsoft / openvmm ⭐ 1,137 (+647) 🗒 Rust Home of OpenVMM and OpenHCL. — @github-trending.bsky.social2 likes and reposts · 1 reply
- Oct 19, 2024Microsoft's new cross-platform VM written in Rust: #rustlang github.com/microsoft/op... — @jim-lawless.bsky.social2 likes and reposts
- Oct 17, 2024É guys github.com/microsoft/op... — @enrichthesoil.bsky.social2 likes and reposts · 2 replies
- Oct 17, 2024OpenVMM – A New VMM for Windows and Linux, Written in Rust Discussion — @hackernewsbot.bsky.social1 likes and repost
1 more on Bluesky
- Nov 20, 2024Discussion of OpenHCL (github.com/microsoft/op...) Confidential Containers, Confidential Containers in Azure Red Hat OpenShift (ARO) and… — @aaronw.dev0 likes and reposts · 1 reply
On Hacker News · 1
- Oct 17, 2024OpenVMM – A New VMM for Windows and Linux, Written in Rust171 points · 118 comments
In this repository4 other files it gives its agents.
- fuzzingSkill
- guide-maintenanceSkill
- openvmm-ci-investigationSkill
- vmm-testsSkill
The file
Show its rules and text
We split this copilot-instructions.md into the rules it gives an agent
18 rules. About 0 are common, 5 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Do NOT commit without completing all three steps.
- Distinctive: line 37
Run this last because fixing clippy/doc issues may introduce formatting changes that need to be cleaned up.
- Very specific: line 40
If cargo xtask fmt --fix still fails after auto-fixes, fix the remaining reported issues manually and re-run until it succeeds.
- Very specific: line 54
Use thiserror for typed error enums at library/API boundaries and protocol-facing code
- Very specific: line 56
Use anyhow with .context("...") for application-level plumbing and context propagation
- Very specific: line 58
Never .unwrap() or .expect() on data that crosses a trust boundary
- Distinctive: line 67
Avoid taking new external dependencies, especially those that significantly increase binary size
- Very specific: line 72
Do not introduce std-only dependencies or APIs into code that is compiled for the minimal_rt configuration in these crates
- Very specific: line 74
Prefer assert! over debug_assert!
- Very specific: line 84
Run tests with cargo-nextest using the agent profile, which suppresses output for passing tests and only shows slow/failing tests:
- Very specific: line 98
Do not pass --dir in most cases.
- Very specific: line 110
Should be fast, isolated, and not require root/administrator access.
- Very specific: line 111
Add use test_with_tracing::test.
- Very specific: line 116
Update Guide/ docs when adding features or changing behavior (see .github/instructions/doc-code-sync.instructions.md for the mapping)
- Very specific: line 132
Workspace dependencies: All dependency versions are centralized in the root Cargo.toml.
- Very specific: line 139
flowey nodes: Use flowey::shell_cmd! and rt.sh inside flowey nodes — not xshell::cmd!
- Distinctive: line 144
When running as a coding agent (GitHub Copilot coding agent or similar), follow this validation loop before pushing each commit.
- Distinctive: line 159
If any step fails, fix the issue and re-run from that step.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
OpenVMM Repository
OpenVMM is a modular, cross-platform Virtual Machine Monitor (VMM) written in Rust.
This repository is home to both OpenVMM and OpenHCL (a paravisor).
Documentation lives in Guide/ and is published at https://openvmm.dev.
Build & Setup
Restore required dependencies before building for the first time:
cargo xflowey restore-packagesThe project supports cross-compilation for x86_64 and aarch64.
OpenHCL can only be built from Linux (WSL2 counts).
For cross-compilation from WSL2 to Windows, see
Guide/src/dev_guide/getting_started/cross_compile.md and source
. ./build_support/setup_windows_cross.sh.
Git Commit Rules
- Never amend commits that have already been pushed without express permission from the user. Make new commits instead. PRs are squash-merged, so a clean history is unnecessary.
- Rebasing onto
mainto resolve conflicts is fine, but do not usegit commit --amend,git rebase -i, orgit push --forceto clean up history on already-pushed commits.
Pre-Commit Checklist (MANDATORY)
You MUST run these commands before every git commit in this repo.
Do NOT commit without completing all three steps.
cargo clippy --all-targets -p <package-name>— for each modified package.cargo doc --no-deps -p <package-name>— for each modified package.cargo xtask fmt --fix— fix formatting, headers, naming conventions. Run this last because fixing clippy/doc issues may introduce formatting changes that need to be cleaned up.
If cargo xtask fmt --fix still fails after auto-fixes, fix the remaining
reported issues manually and re-run until it succeeds. Do not run individual
--pass commands afterward.
Trust Boundaries & Safety
Both OpenVMM and OpenHCL process data from untrusted sources. Code must never panic on untrusted input.
- OpenVMM does not trust the guest — code must not panic on any guest input
- OpenHCL does not trust the root — code must not panic on any root input
- OpenHCL does not trust the VTL0 guest — the attack surface is subtle and needs human review
Error handling across trust boundaries:
- Use
thiserrorfor typed error enums at library/API boundaries and protocol-facing code - Use
anyhowwith.context("...")for application-level plumbing and context propagation - Never
.unwrap()or.expect()on data that crosses a trust boundary - For protocol/hardware enums where unknown values must round-trip without
panicking, use the
open_enum!macro instead of a normal Rustenum - Rate-limit trace events that can be triggered repeatedly by guest
interactions — use
tracelimit::warn_ratelimited!(orerror_ratelimited!,info_ratelimited!) instead of baretracing::warn!etc.
Other safety rules:
- Avoid
unsafecode - Avoid taking new external dependencies, especially those that significantly increase binary size
- Several OpenHCL crates (e.g.,
minimal_rt,openhcl_boot,sidecar,host_fdt_parser) must supportno_stdbuilds. In particular,minimal_rtandhost_fdt_parserare unconditionallyno_std, andopenhcl_bootandsidecarusecfg_attr(minimal_rt, no_std, no_main). Do not introducestd-only dependencies or APIs into code that is compiled for theminimal_rtconfiguration in these crates - Prefer
assert!overdebug_assert!for internal invariants — the performance cost is negligible in nearly all code, and catching invariant violations in release builds is more valuable. The project follows a "fail fast" philosophy: crash immediately on broken invariants rather than letting the process continue in an undefined state where bugs are harder to diagnose. (This does not apply to untrusted input — use error handling at trust boundaries, not assertions.)
Testing
Run tests with cargo-nextest using the agent profile, which suppresses
output for passing tests and only shows slow/failing tests:
cargo nextest run --profile agent -p <package-name>Do NOT pipe test output to grep, tail, or other filters. The agent
profile already minimizes output. Piping hides failures and makes hangs
invisible.
For VMM test validation during development, use cargo xflowey vmm-tests-run:
cargo xflowey vmm-tests-run --filter "test(my_test_name)"Do not pass --dir in most cases. When cross-compiling for Windows from WSL2,
--dir on the Windows filesystem (e.g., --dir /mnt/d/vmm_tests) is required
only when the selected tests use disk images that need a Windows filesystem
(Hyper-V tests, or VHDX / dynamic VHD1 images); vmm-tests-run detects this and
errors with a clear message when it's needed. For native host tests, and for
Windows-from-WSL2 tests that stream disks or use fixed VHD1 / VMGS / ISO images,
it is unnecessary.
This automatically discovers artifacts, builds dependencies, and runs tests.
See Guide/src/dev_guide/tests/vmm.md for details.
- Unit tests — spread throughout crates in
#[cfg(test)]blocks. Should be fast, isolated, and not require root/administrator access. Adduse test_with_tracing::test;in test modules so thattracingis initialized and traces appear in test output. - VMM tests — integration tests in
vmm_tests/using the petri framework (requires additional setup). - Mark tests requiring special setup with
#[ignore]. - Update
Guide/docs when adding features or changing behavior (see.github/instructions/doc-code-sync.instructions.mdfor the mapping) - CI failures — to investigate failing CI checks on a PR, load the
openvmm-ci-investigationskill.
Rust Edition
This project uses the Rust 2024 edition (edition = "2024" in root
Cargo.toml).
Common Pitfalls
guest_archnottarget_arch: For guest-architecture-specific code, usecfg(guest_arch = "x86_64")— notcfg(target_arch = "x86_64"). The VMM can run guests of a different architecture than the host. Usingtarget_archwill fail CI.- Workspace dependencies: All dependency versions are centralized in
the root
Cargo.toml. In crateCargo.tomlfiles, usedep_name.workspace = true— not inline version specifiers. Add new dependencies to[workspace.dependencies]in the root first. - Pipeline YAMLs are auto-generated: Files under
ci-flowey/(e.g.,openvmm-pr.yaml) are generated by the flowey framework — do not hand-edit them. Runcargo xflowey regento regenerate. - flowey nodes: Use
flowey::shell_cmd!andrt.shinside flowey nodes — notxshell::cmd!orxshell::Shell::new.
Autonomous Agent Inner Loop
When running as a coding agent (GitHub Copilot coding agent or similar), follow this validation loop before pushing each commit. This covers the common early CI failures (including the fmt + clippy checks from job0) locally, avoiding slow push-and-wait cycles.
- Identify modified packages. For each file you changed, find the
crate's
Cargo.tomland note the package name. - Check compilation:
cargo check -p <package>— fast type-check. - Clippy:
cargo clippy --all-targets -p <package>— lint. - Doc:
cargo doc --no-deps -p <package>— catch doc errors. - Unit tests:
cargo nextest run --profile agent -p <package>— run the crate's tests. If nextest is not installed, usecargo test -p <package>. - Formatting:
cargo xtask fmt --fix— run last, since earlier fixes may introduce formatting changes.
If any step fails, fix the issue and re-run from that step. Do not push until all six steps pass.
Cost notes: Steps 2–5 are scoped to the modified package (-p),
so they are fast even in this large workspace. Step 6 runs workspace-wide
but is also fast. The full cycle typically takes under 2 minutes for
a single-crate change.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

