UPGRADE(1)General Commands ManualUPGRADE(1)

upgrade — upgrade the VM to its image's OpenBSD

ssh chroot.dev upgrade [-r] name

A VM keeps the OpenBSD of the image it was created from. When the image is rebuilt on a newer -current, stat(1) says “upgrade available” on the image line, and upgrade brings the VM to it: the kernel and the base sets (base, comp and man), as sysupgrade(8) would on another machine. sysupgrade(8) itself does not work inside a VM, since the kernel comes from the host.

The VM shuts down cleanly, the installer upgrades its system disk, and it boots again, usually within two to three minutes. The command returns right away; ls(1) shows the VM as “upgrading” until it is running again, and stat(1) shows the result. A VM that was stopped stays stopped.

Files in /etc are merged by sysmerge(8) on the first boot. Files in /home, installed packages and the data disk are not touched. After an upgrade, update the packages with ‘doas pkg_add -u’.

The system disk and kernel from before the upgrade are kept until the next upgrade or rm(1). If the upgrade fails, the VM goes back to them on its own.

The options are:

Go back to the system from before the last upgrade. Anything written to the system disk since then is lost; /home on a data disk stays as it is.

$ ssh chroot.dev stat web | grep image
image    base (upgrade available: upgrade web)
$ ssh chroot.dev upgrade web
web: upgrading; ls shows it running again in a few minutes, stat shows the result

new(1), stat(1), chroot.dev(7)

chroot.devOctober 8, 2026UPGRADE(1)