Lima is devvm's only backend. The backend architecture stays (Backend, Caps, Features, Review/Require, the registry, backendtest.Fake), so another backend is an addition. State from a smolvm VM reads as an unknown backend (backend_unknown_vm, gc_orphans_unknown); nothing migrates it. The image keys of layers/docker.sh, layers/nix.sh and features/desktop.sh change, so images rebuild once. Lima's port forwarder moves off smolvm's files first: newForwarderCmd and forwarderMain from internal/cli/smolvmports.go to limaports.go, and assets/container/ports.sh to assets/guest/ports.sh (sent by the forwarder at run time, so no image key changes). Removed: - internal/backend/smolvm (4,070 lines with tests), _smolvm-ports, its registry entry, registry.Experimental and backend_experimental. - The decider: backend.Decider/UsesDecider, Confinement.Decider and DeciderToken, internal/proxy/decider.go and its test, the proxy's -decider, -decider-to and -decider-token-file, netpolicy's KeyDeciderPort, KeyDeciderToken and deciderToken, the decider port in vm's forwarding and UsedPorts. - backend.AgentStarter/AgentUnchosen, vm's checkAgentStart and agent_unchosen_stop. - vmssh/key.go (EnsureKey, Public, HostKey, ServicesArgs, Capped). - paths.Smolvm/SmolvmImage and space's smolvm folders; paths.VM's Record, Key, KnownHosts and ProxyURL; project.Detect, which nothing called (a test helper now). - ubuntu.ContainerRepo/ContainerDigest/ContainerRef/ContainerOrigin and bump.sh's ubuntu_image, with its part of bump.txtar. - assets/smolvm/ and assets/container/; the no-init-system branches of layers/docker.sh, layers/nix.sh and guest/sync.sh, and the notes in features/desktop.sh and guest/ca.sh. - Messages: smolvm_* (14), vm_no_ssh, vm_no_sshd, ports_no_ssh, creating_from_image, packing_image, pack_failed, backend_experimental, agent_unchosen_stop; descriptions naming smolvm reworded. - Tests: smolvm.txtar, the smolvm stub, registry, decider, netpolicy and sshagent cases; gc_backend, gc_skipped, gc_orphans and space test a failing or hanging Lima listing instead (the limactl stub's list-fails and list-hangs); the --backend smolvm examples; e2e's --backend smolvm and its section (about 1,130 lines), the smol_* helpers and the link section's backend switch. - Coverage: internal/backend/smolvm's lines in both baselines. - Docs: backends/smolvm.md, internals/smolvm.md, design.md's smolvm notes (Ports on Lima now holds the forwarder's description), the backends table's smolvm column, every page naming smolvm, the README, the home page's backends art, and AGENTS.md's smolvm rows and gotchas (and the Docker bind-mount gotcha, which nothing refers to). Kept: the docker layer, on Lima; --from's local Docker; --backend, the BACKEND column and setup's backend choice, which the next commit removes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
10 KiB
title, weight
| title | weight |
|---|---|
| Installing | 1 |
This page gets devvm installed and working on your machine, then covers upgrading and uninstalling it.
Installing devvm
To install devvm, run the command for your system:
{{< install >}}
The install script needs curl, tar, and sha256sum or shasum to check what it downloads, and it never needs sudo for devvm itself. It takes options after bash -s --, such as curl -fsSL … | bash -s -- --yes:
--yes: answer yes to every question.--version 0.1.0: install that release.DEVVM_VERSION=0.1.0does the same.--no-deps: install devvm only.--force: install even when Homebrew installed devvm, which leaves you with two copies (One devvm).DEVVM_PREFIX=/some/dir: install under that folder instead of~/.local.
The script checks the download's checksum and signature before it installs anything, as Installing and updating explains.
One devvm
Install devvm one way, with Homebrew or with the install script, but not both. With two copies, the one that comes first on your PATH is the one that runs, and brew upgrade devvm may update the one you don't run. So when Homebrew installed devvm, the install script stops before it downloads anything and says to run brew upgrade devvm instead, or brew uninstall devvm first if you want to use the script. It stops whether or not it runs in a terminal, and --force installs a second copy anyway.
To switch from one way to the other, remove devvm with the command for the way you installed it, as step 4 of Uninstalling shows, and then install it the other way. Your images, VMs and settings stay, because they don't live with devvm.
After it installs devvm, the script warns when another devvm comes before ~/.local/bin on your PATH. The warning names that copy's path and says to remove it, or to put ~/.local/bin before its folder in PATH. devvm doctor warns the same way when the devvm first on your PATH isn't the one you ran, naming both, and the warning doesn't make it fail.
Requirements
devvm runs its VMs on Lima, its default backend. For your system, the table lists what devvm needs, how to check each requirement and how to get it, and whether the install script offers to install it for you.
{{< os-tabs >}} {{< os-tab name="macOS" >}}
| You need | To check | To get it | The install script |
|---|---|---|---|
| macOS 13 or newer, on arm64 or x86_64 | sw_vers and uname -m |
{{< no >}} doesn't | |
| 8 GiB of memory and 4 CPUs, recommended | sysctl hw.memsize hw.ncpu |
{{< no >}} doesn't | |
| Lima 2.0 or newer | limactl --version |
brew install lima, or Lima's install guide |
{{< yes >}} offers it: Homebrew's when you have Homebrew, otherwise Lima's latest release into ~/.local |
| OpenSSH 8.7 or newer, for ssh and editors by name | ssh -V |
macOS 13's has it | {{< no >}} doesn't |
Docker Desktop, only for --from with an image only Docker has |
docker version |
Docker Desktop | {{< no >}} doesn't |
{{< /os-tab >}} {{< os-tab name="Linux" >}}
| You need | To check | To get it | The install script |
|---|---|---|---|
| Linux on arm64 or x86_64 | uname -m |
{{< no >}} doesn't | |
| 8 GiB of memory and 4 CPUs, recommended | free -g and nproc |
{{< no >}} doesn't | |
| Lima 2.0 or newer | limactl --version |
brew install lima, or Lima's install guide |
{{< yes >}} offers it: Homebrew's when you have Homebrew, otherwise Lima's latest release into ~/.local |
| QEMU | qemu-img --version |
your package manager: apt, dnf, pacman or zypper | {{< yes >}} offers it, with sudo |
Access to /dev/kvm |
ls -l /dev/kvm |
sudo usermod -aG kvm $USER, then log out and back in |
{{< yes >}} offers it, with sudo |
| OpenSSH 8.7 or newer, for ssh and editors by name | ssh -V |
Ubuntu 22.04's has it | {{< no >}} doesn't |
Docker's engine, only for --from with an image only Docker has |
docker version |
Docker's engine | {{< no >}} doesn't |
{{< /os-tab >}} {{< /os-tabs >}}
The Homebrew formula installs Lima along with devvm. ssh and editors reach VMs through devvm's ssh config, and OpenSSH versions older than 8.7 refuse its PermitRemoteOpen (SSH access by name). Docker on this machine is optional, because only --from with an image only Docker has needs it.
devvm also runs on a smaller machine, because it fits base to the machine. Base asks for 4 CPUs and 8 GiB of memory. On a machine with fewer than 4 CPUs, base gets as many CPUs as the machine has, and when 8 GiB would leave the machine less than 2 GiB of its own, base gets half of the machine's memory, which is 4 GiB on an 8 GiB machine. The VMs made from base get the same unless you give them a size, as size and ports explains. When devvm builds base on such a machine, it says how many CPUs and how much memory base gets. devvm size -g sets the size that new VMs get instead, and devvm doctor warns when this machine has less than 8 GiB of memory or fewer than 4 CPUs.
Your first VM needs at least 8 GiB of free disk space, because devvm builds the base image first and then the VM's own image and shared tools. Each VM then grows its own disk as you work in it, and the disk never shrinks. devvm checks the free space before each build and each new VM, and refuses when it's low (free space).
Everything else is installed inside the VMs, including the toolchains, the agents, and Docker for your projects with the docker layer.
On Linux hosts, devvm has a few limits, such as no .git protection, that Known limits lists.
Checking what devvm needs
devvm never installs anything on this machine itself. Every command that needs the backend checks it first, and stops at the first thing that's missing.
devvm doctor checks the backend new VMs get, or another one with --backend NAME. It lists everything that backend lacks, each with what to do, which is the command that installs it when there's one to run. It then lists what each backend can do, which it calls the backend's features, each as native, emulated, unreviewed for an emulation that devvm refuses until it's reviewed, or none. It also says whether Docker is installed, which only --from with an image only Docker has needs. When HTTPS_PROXY is set and ~/.config/devvm/ca has no CA certificates, it says that a proxy that inspects TLS needs its CA there (a company's CA). It warns when another devvm comes first on your PATH (One devvm), when the disk that devvm's images and VMs go on has less free space than building base needs, when this machine has less than the 8 GiB of memory or the 4 CPUs that devvm recommends (Requirements), and for each line of your policy files that isn't a rule, which VMs' proxies skip (rules). Then it says devvm has everything it needs, or it fails. The warnings never make it fail, so a small machine with everything installed passes.
When devvm doctor finds nothing missing, you're ready for your first VM. Before you make it, read staying safe, which lists the habits that close most of what devvm leaves open.
Upgrading
To upgrade devvm, run the command for the way you installed it:
{{< os-tabs >}} {{< os-tab name="macOS" >}}
brew upgrade devvm
If you installed devvm with the install script instead, run the script again, as on Linux.
{{< /os-tab >}} {{< os-tab name="Linux" >}}
curl -fsSL https://github.com/w3cj/devvm/releases/latest/download/install.sh | bash
Running the install script again installs the newest release.
{{< /os-tab >}} {{< /os-tabs >}}
Your images and VMs stay, because they live in ~/.local/share/devvm, and your settings, layers and features stay in ~/.config/devvm, apart from devvm itself.
Images whose inputs changed are built again the next time you use them. Existing VMs keep working, and devvm tools update moves a VM to the new shared tools. devvm gc deletes the copies of devvm's files that older versions wrote out, except those that a VM's proxy was started with.
Uninstalling
-
Delete your VMs:
devvm ls, thendevvm rmin each folder. For a--cloneVM, this also removes thedevvmgit remote from the repo. -
Delete the images:
devvm gc, thendevvm images rmwith every namedevvm imageslists. Images built--froma container image need the same--from:devvm images rm --from node:24 base. -
Free Lima's cache. In a terminal,
devvm gc --cachesfrees devvm's share of it, after asking. If you don't use Lima yourself, you can also empty its cache: Lima keeps Ubuntu's cloud images in~/Library/Caches/limaon macOS and~/.cache/limaon Linux, andlimactl prunedeletes that whole cache. -
Delete your saved secrets:
devvm secret rm NAMEfor each onedevvm secretlists. On macOS they're in the Keychain under the servicedevvm, and on Linux in~/.local/share/devvm/secrets/. -
Remove devvm itself, with the command for the way you installed it:
{{< os-tabs >}} {{< os-tab name="macOS" >}}
brew uninstall devvmIf you installed devvm with the install script instead, remove it as on Linux.
{{< /os-tab >}} {{< os-tab name="Linux" >}}
rm -rf ~/.local/lib/devvm ~/.local/bin/devvm{{< /os-tab >}} {{< /os-tabs >}}
-
Remove its state:
rm -rf ~/.local/share/devvm ~/.config/devvm. That includes your layers and features, in~/.config/devvm/layersand~/.config/devvm/features, so copy them somewhere first to keep them. It also includes your exports, the agents' history thatdevvm rmsaved. On macOS, the Time Machine exclusion that devvm set on its CA folder goes with the folder. -
If you let devvm add it, remove the
Include ~/.local/share/devvm/ssh_configline from~/.ssh/config.