Run运行 for架构 on宿主 via加速
$ pip install anyvm.py $ brew install anyvm-org/tap/anyvm # macOS $ winget install anyvm-org.anyvm # Windows $ anyvm --os netbsd --arch sparc64 -- uname -sm NetBSD sparc64 $ python3 anyvm.py --os haiku # no install# 免安装
MIT licensed · Python 3, standard library only · MIT 许可 · 只用 Python 3 标准库 · pypi.org/project/anyvm.py
Five ways in, one command out
怎么装都行,用法就一条命令
anyvm.py is a single Python file with no third-party dependencies. It fetches a prebuilt image, configures QEMU with settings that actually work for that guest on that architecture, and drops you into a shell -- or runs your command and exits.
anyvm.py 就是一个 Python 文件,不依赖任何第三方库。它会下载预先构建好的镜像, 按这个系统在这个架构上真正跑得通的参数配好 QEMU,然后把你丢进 shell; 也可以直接跑完你给的命令就退出。
Windows, macOS and Linux hosts, the same command on
each -- no per-platform setup, no configuration file, nothing to
provision. Pick whichever way suits your machine; all five leave you
with anyvm, and QEMU is the only other thing you need.
Windows、macOS、Linux 都能当宿主,命令一模一样:不用分平台配置,不用写配置文件,
不用预先准备任何东西。挑个顺手的装法就行,五种最后都是同一条
anyvm 命令,另外只要有 QEMU。
$ pip install anyvm.py $ anyvm --os freebsd
Debian and Ubuntu block this under PEP 668. Use
pipx install anyvm.py or a virtualenv --
details.
Debian 和 Ubuntu 会按 PEP 668 把这条命令拦下来。改用
pipx install anyvm.py ,或者装进虚拟环境 ——
详见文档。
$ brew install anyvm-org/tap/anyvm $ anyvm --os freebsd
The tap pulls in qemu and zstd, so there is
nothing else to install.
这个 tap 会顺带把 qemu 和 zstd 装上,不用再管别的。
$ winget install anyvm-org.anyvm $ anyvm --os freebsd
A self-contained build with Python bundled in, so a Windows box needs nothing on it but QEMU.
打包了 Python 的独立版本,Windows 上除了 QEMU 什么都不用装。
$ docker run --rm -it ghcr.io/anyvm-org/anyvm:latest --os freebsd
A VM inside a container, QEMU already set up. More tags in anyvm-org/docker.
在容器里跑虚拟机,QEMU 都配好了。更多标签见 anyvm-org/docker。
$ curl -O https://raw.githubusercontent.com/anyvm-org/anyvm/main/anyvm.py $ python3 anyvm.py --os freebsd
Nothing outside the standard library is imported, so this one file is the whole program. Commit it, bake it into a CI image, scp it to a jump host.
它不 import 标准库以外的任何东西,所以这一个文件就是全部。可以直接提交进 仓库、打进 CI 镜像、scp 到跳板机。
The part that usually costs you an afternoon
通常得搭进去一个下午的活
Getting an unfamiliar operating system to boot under QEMU is firmware flags, installer prompts and disk-image surgery. That work is already done, per guest and per architecture.
让一个没碰过的系统在 QEMU 里跑起来,得调固件参数、过安装器、动磁盘镜像。 这些活已经干完了,每个系统、每个架构都干过一遍。
Images are built, booted and verified
镜像都真启动验证过
Every image comes from its own builder repository, which installs the OS from scratch under QEMU and boots it in CI on each release. A filled cell in the matrix means that guest really starts on that architecture today.
每个镜像都有自己的 builder 仓库,在 QEMU 里从零装好系统,每次发版都在 CI 里 真跑一遍。矩阵里填了色的格子,意思是这个系统今天确实能在这个架构上起来。
Acceleration resolves itself
加速不用你管
KVM on Linux, HVF on macOS, WHPX on Windows -- detected and used when present, with a clean fall back to TCG when it is not. Emulated architectures still work; they just take longer.
Linux 上用 KVM,macOS 上用 HVF,Windows 上用 WHPX:有就自动用上,没有就退回 TCG。模拟架构照样能跑,就是慢一些。
Directory sync on every host
目录共享哪种宿主都能用
Six backends -- rsync, sshfs,
nfs, sys-nfs, scp,
9p -- including a bundled pure-Python NFS server, so a
Windows or macOS host can export a directory without root.
六种后端:rsync、sshfs、nfs、
sys-nfs、scp、9p。其中的 NFS 服务器是
纯 Python 写的,一并打包在内,所以 Windows 和 macOS 上不用 root 也能共享目录。
A console in your browser
图形界面直接开在浏览器里
The VNC web UI starts by default on localhost:6080, with
clipboard paste, fullscreen and an optional password.
--remote-vnc puts it behind a public tunnel.
VNC 网页控制台默认跑在 localhost:6080,能粘贴剪贴板、能全屏,
也能设密码。加上 --remote-vnc 就把它挂到公网隧道上。
Desktops, not just shells
不止命令行,还有完整桌面
XFCE, GNOME, KDE, MATE, LXQt, Lumina and Enlightenment ship as
bootable desktop images for several guests. Ask for
--release 7.9-xfce and you get a desktop.
XFCE、GNOME、KDE、MATE、LXQt、Lumina、Enlightenment 都有现成的桌面镜像,
好几个系统都能用。写上 --release 7.9-xfce,开出来就是个桌面。
Awkward platforms handled quietly
冷门平台的坑都填过了
Where a guest needs a newer QEMU or patched firmware than your distribution ships, AnyVM notices and fetches exactly that, for exactly those cases. Nothing to configure.
有些系统需要比你发行版更新的 QEMU,或者打过补丁的固件。AnyVM 认得出这些情况, 只在需要的时候去取,不用你操心。
The matrix, spelled out
把矩阵摊开看
The same 33 combinations from the hero, in a form you can read and link to. Each builder repository owns the full release list for its guest.
还是上面那 33 种组合,换成能读、能引用的表格。每个系统支持哪些版本,由它 自己的 builder 仓库说了算。
| Guest客户机 | x86_64 | aarch64 | riscv64 | powerpc64 | sparc64 | s390x | loongarch64 |
|---|---|---|---|---|---|---|---|
| FreeBSDfreebsd-builder | |||||||
| OpenBSDopenbsd-builder | |||||||
| NetBSDnetbsd-builder | |||||||
| DragonFlyBSDdragonflybsd-builder | |||||||
| MidnightBSDmidnightbsd-builder | |||||||
| GhostBSDghostbsd-builder | |||||||
| NextBSDnextbsd-builder | |||||||
| Solarissolaris-builder | |||||||
| OmniOSomnios-builder | |||||||
| OpenIndianaopenindiana-builder | |||||||
| Tribblixtribblix-builder | |||||||
| Ubuntuubuntu-builder | |||||||
| OpenEuleropeneuler-builder | |||||||
| BlissOSAndroid x86 · blissos-builder | |||||||
| HaikuOShaiku-builder | |||||||
| GNU HurdDebian · also i386 | |||||||
| Plan 99front · plan9-builder |
Hosts: Linux, macOS and Windows. A Linux x86_64 host -- including WSL -- runs every guest architecture above. Per-guest notes and the host matrix live in the docs.
宿主支持 Linux、macOS 和 Windows。一台 Linux x86_64(WSL 也算)能跑上面所有 架构。每个系统的说明和 宿主对照表都在文档里。
What makes the matrix possible
这张矩阵背后是什么
AnyVM is the front end. Behind it are the builders that produce every image, plus the pieces that make the awkward parts work identically on every host.
AnyVM 只是前台。后面有一整套 builder 在产出镜像,还有几个组件专门负责把最 麻烦的那些事在每种宿主上抹平。
Image builders
镜像 builder
One repository per guest, all generated from a single template. Each installs its operating system from scratch, boots it, verifies it, and publishes the image as a release.
一个系统一个仓库,都从同一份模板生成。每个仓库自己从零装系统、启动、验证, 最后把镜像作为 release 发出来。
Agents
AI 智能体
An MCP server and a skill file, so Claude Code, Copilot or any other MCP-capable assistant can boot a guest and run your build in it because you asked in a sentence.
一个 MCP 服务器加一份 skill 文件。装上以后,你跟 Claude Code 或 Copilot 说一句 话,它就能开好虚拟机、在里面把你的构建跑完。
Also powering vmactions
vmactions 用的也是这批镜像
The same images run inside the vmactions GitHub Actions --
freebsd-vm, openbsd-vm,
netbsd-vm, solaris-vm and friends -- which
run your CI steps inside a real BSD or illumos guest on GitHub's
Linux runners.
vmactions 那套 GitHub Actions —— freebsd-vm、openbsd-vm、
netbsd-vm、solaris-vm 等等 —— 用的就是这些镜像:在
GitHub 的 Linux runner 上,把你的 CI 步骤丢进真正的 BSD 或 illumos 里跑。