跳到正文
Skillpedia
部署与云(DevOps)6.9k · #13720

install

它能做什么

逐步说明如何安装 smolvm 虚拟机工具,并检查你的电脑能否运行它。它适合在新电脑、服务器或 CI 运行器上进行设置的开发者和管理员。

适用场景

  • ✓当你在新电脑、服务器或 CI 运行器上设置 smolvm 时。
  • ✓当首次启动虚拟机时出现与权限或就绪状态相关的错误时。
  • ✓当你想检查电脑是否满足 smolvm 的基本要求时。

技能链接

https://github.com/smol-machines/smolvm/blob/main/docs/install/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/smol-machines/smolvm/blob/main/docs/install/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请在我的笔记本电脑上安装 smolvm,并确保它真的能够启动一个虚拟机。”

每周 5 个新技能,1 分钟读完。

工作原理

预检脚本会先检查电脑。然后该技能安装 smolvm,并运行一个一次性虚拟机,因此成功意味着虚拟机真正启动,而不仅仅是打印出版本号。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Installing smolvm and proving it works

Verified on smolvm v1.29.0 on macOS arm64, 2026-10-15, and on v1.18.2 on Linux aarch64, 2026-09-24. Done means smolvm --version prints the release version and a throwaway VM has run one command and exited. A version number alone proves nothing: on every platform here there is at least one way for the install to succeed and every VM start to fail. The Linux runs used the scripts of their date; this version's preflight and cleanup scripts ran on Linux aarch64 on v1.22.2 on 2026-10-03.

scripts/preflight.sh reports the host as key=value lines and ends with result=ready, result=not_installed or result=blocked. Run it first, and run it again after the install if the first boot fails.

Procedure

1. Preflight. Read-only. It starts no VM and writes no smolvm state.

scripts/preflight.sh

result=not_installed on a fresh host means the host is fit and smolvm is simply missing: go on to step 2 and run this again afterwards. With another smolvm first on PATH, it describes that one instead and can end result=ready: read smolvm_path= and the note= before trusting it. Stop on result=blocked and read the note= lines. The two that block a fresh host are accel_access=denied on Linux (your user cannot open /dev/kvm) and socket_path_status=too_long on macOS (the install path is too deep for a VM's Unix socket). Both have a fix in references/traps.md, and neither announces itself later: the installer warns about KVM and continues, and before v1.28.0 the path limit surfaces as an error about disks.

2. Install from the published release.

curl -sSL https://smolmachines.com/install.sh | bash
export PATH="$HOME/.local/bin:$PATH"
smolvm --version

The installer writes under $HOME only: ~/.smolvm, the launcher in ~/.local/bin, and the agent rootfs in ~/Library/Application Support/smolvm on macOS or ~/.local/share/smolvm on Linux. When ~/.local/bin is not already on PATH it appends a # smolvm export PATH=... line to your shell profile (~/.zshrc for zsh); --no-modify-path skips that.

Install the newest release. The installer with no --version takes the latest published release, and a later release is expected to work with this packet. The version in the banner above is what the packet was last verified on, not what you should install. Pin only to reproduce a recorded run:

curl -sSL https://smolmachines.com/install.sh | bash -s -- --version 1.23.0   # a recorded run

On macOS two warning: lines about notarization appear on every install and are not a problem. On Linux info: KVM access verified appears only when your user can already open /dev/kvm.

To install without touching an existing one, point HOME at a scratch directory: every path smolvm uses moves with it on macOS, and on Linux once XDG_DATA_HOME and XDG_CACHE_HOME are unset, since both outrank HOME there. Keep that directory shallow on macOS. This does not work on Windows, where state cannot be relocated at all. See references/layout.md.

Windows does not use this installer. See references/windows.md.

3. Prove it boots. This is the step that decides whether smolvm works here.

scripts/verify-boot.sh

It runs one ephemeral alpine VM and asserts two values: a marker the guest printed, and that the guest kernel is not the host's. --image <ref> boots another image; when Docker Hub answers TOOMANYREQUESTS, its anonymous pull limit, name the same image from a mirror, scripts/verify-boot.sh --image mirror.gcr.io/library/alpine or public.ecr.aws/docker/library/alpine, and the step tells you so when it sees that error. On failure it prints the three misreadings that cost the most time, before you clean up and lose the evidence.

It boots a 2048 MiB guest, and a machine you create without --mem asks for 8192. A host can pass this step and still fail every default-size machine with agent did not become ready within 30 seconds; if your work uses the default, boot one at that size too. references/traps.md has the measurement. From v1.22.0 the first run of each registry image also starts a seed helper at 8192 MiB whatever --mem says. When that helper cannot start the run prints WARN no image seed; pulling in the guest and goes on: after the helper's 30 s timeout on a host that cannot boot 8192 MiB, or at once when the helper's own pull is refused, as it is under the rate limit.

**4. C

常见问题

预检检查做什么?

它是一个只读脚本,报告电脑的状态,并说明它是否已就绪、未安装或被阻止。

它会更改我的系统吗?

预检检查不会启动虚拟机,也不会写入 smolvm 的状态。

涵盖哪些系统?

该技能在 macOS 和 Linux 上进行过检验,并列出了阻碍每个系统的常见问题。

详情

作者的原始描述

Installs smolvm from a published release and proves the host can actually boot a microVM before any other work starts. Use when setting smolvm up on a new machine, a CI runner or an agent's own environment; when a first boot fails with krun_start_enter -22, KVM_DENIED or "agent did not become ready"; when checking whether a host meets smolvm's requirements at all; or when an install has to be isolated from an existing one and then removed. Do not use it to remove an existing install (see the teardown packet) or for anything after the first boot has succeeded.

repo: smol-machines/smolvm

热度

GitHub 星标
6.9k
排名
#13720
许可证
Apache-2.0
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能