COPIES(7)Miscellaneous Information ManualCOPIES(7)

copies — first-boot scripts, copies and sizes

‘new -s’ runs a script once, as , on the first boot. /dev/stdin reads it from your side:

$ cat setup.sh
doas pkg_add -I git go
git clone https://github.com/alice/app
$ ssh chroot.dev new -n app -w -s /dev/stdin < setup.sh

Copying a running VM copies its memory too: the copy resumes with the same processes. Prepare a VM once, copy it for each job:

$ ssh chroot.dev cp app job-1 -w
$ ssh vm+job-1@chroot.run 'cd app && go test ./...'
$ ssh chroot.dev rm job-1

Asking for different cpus, memory or disk copies only the disks; the copy boots cold.

Memory in MiB or with an M or G suffix, data disk in GiB or with a G or T suffix. Resizing restarts the VM; disks only grow.

$ ssh chroot.dev resize -c 2 -m 512M -d 4G app

cp(1), new(1), resize(1), chroot.dev(7)

chroot.devOctober 7, 2026COPIES(7)