mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 21:36:40 -10:00
A new VM gets network policy unless it's turned off. In a terminal devvm shows the tradeoff and asks yes by default ([Y/n]); without a terminal it's on. A VM that can't have network policy gets no question, only a warning, and is made without it: on a backend without egress-proxy (or with it unreviewed), and a Docker VM made for the docker layer, whether named or from a devcontainer.json's docker-in-docker. An explicit --network-policy on such a VM is still refused (net_docker_layer, or backend_lacks from Require). Existing VMs keep their state's choice. - netpolicy.Proxy.Choose: no terminal gives on; in a terminal net_about, then Confirm (yes by default). Proxy's Ask field and netpolicy.UI's Ask removed (unused); vm.UI asks Ask itself. - vm.creation.chooseNet: --no-network-policy first; the docker layer warns (net_off_docker_layer) or refuses --network-policy; a backend Registry.Allowed doesn't let egress-proxy through warns (net_off_backend); otherwise Choose. - Messages: new net_off_docker_layer, net_off_backend (with doc links); net_about rewritten as the two-line tradeoff with a doc link (safety/network#turning-it-on-or-off); net_ask is "Turn it on?" (no fields); devcontainer_docker_net removed (no caller). - --network-policy's help: secrets, default on, asked in a terminal; CLI reference regenerated. - Tests: TestChoose (flags, terminal yes/no, no terminal on, what's said); TestChooseNet replaces TestChooseNetDockerLayer (docker layer named and from the file, no egress-proxy, unreviewed egress-proxy, flags, with and without a terminal); TestUpWithoutEgressProxy (backend_lacks for --network-policy, the warning and net=off by default). network.txtar: --no-network-policy for the off VM, and a VM made without a flag or terminal gets net=on. docker.txtar: another machine's engine (backend_lacks, then the warning and net=off), and the sysbox VM's warning. e2e's docker sysbox check expects the warning. - Docs: first-vm, commands, safety/network (the prompt, the VMs that can't have it), security, attack-vectors, devcontainer, backends index and docker, design notes, README. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1.7 KiB
1.7 KiB
title, weight
| title | weight |
|---|---|
| devvm gc | 9 |
Delete stale images and unused tool images
Synopsis
Delete what devvm images lists as stale or unfinished, on every backend, with their records, the shared tool images it lists as unused, and the copies of devvm's own files older versions wrote out. It lists them first, and in a terminal asks. VMs are never deleted; on Linux hosts, an image whose disk VMs use stays.
devvm gc [flags]
Options
-h, --help help for gc
Options inherited from parent commands
--backend NAME the NAME of the backend a new VM or image gets (default: the default backend file's, else lima)
--cpus N the N CPUs a new VM gets (default: the size file's, else the image's)
--disk GiB a new VM's disk in GiB, at least the image's (default: the size file's, else the image's)
--from IMAGE the container IMAGE a new VM's or image's base starts from instead of Ubuntu's cloud image: node:24, debian:13, ghcr.io/org/image@sha256:… (default: $DEVVM_FROM's)
--memory GiB a new VM's memory in GiB: 16, 16G or 16GiB (default: the size file's, else the image's)
--network-policy create the VM with network policy: it reaches only the hosts you allow, through a proxy on this machine, and your secrets stay on this machine (default: on, asked in a terminal)
--no-network-policy create the VM without network policy: it reaches anything this machine can
--ports PORTS which PORTS a new VM forwards to this machine's localhost: all, none, or a list like 5173,8000-8010 (default: the ports file's, else all)
See also
- devvm: Open a shell in this folder's VM, creating it first