scrotwmos
SWM-VMM(8) System Manager's Manual SWM-VMM(8)

swm-vmm — scrotwmos virtual machine monitor

swm-vmm [-d blobdir] [-F flavor] [-k fd [-B] [-K sha256] [-i fd [-I sha256]]] [-t seconds] [-b fd] [-p [-r fd]] [-M fd] [-m bytes] [-c vcpus] [-G path [-R fd [-E fd]]] [-u name:uid:gid] [-C fd -V fd [-V fd ...] -A addr[,addr ...] [-U]] [[-f fd] [-s fd -g gid [-S peers]] [-n fd [-N ip]] [-Q fd] | -T fd [-D resolver] [-P servers] | -W fd [-Y n:rfd:ffd:efd ...]]

swm-vmm runs one virtual machine as one host process, on KVM. It is the session daemon of a VM session. The root monitor starts it and hands it every file and socket as an open descriptor. Nobody runs it by hand. The guest's vCPUs are its threads, and the guest's memory is its own. When the process ends, everything the guest held is gone.

The guest's devices are virtio devices. With -V, they are also whole PCI devices, a GPU or the net VM's network cards, passed through with VFIO.

By default, it boots the signed guest kernel. It checks the signature before it maps any byte of the kernel. An image that does not check out boots nothing. The launcher starts it as the session's user. Once it is set up, it installs a seccomp filter that leaves it only the system calls a guest needs.

The options are as follows:

addr[,addr ...]
The functions of the devices the groups of -V hold, 1 to 8 of them in all, each as the kernel names a PCI device, 0000:bb:dd.f in lowercase. Each device sits on a slot of its own on the guest's bus: the first named at 00:02, the next at 00:03. Each function sits at its own function number less the lowest named on its device, so the slot has its function 0: 00:14.3 named alone is the guest's 00:02.0.
The kernel on -k is the signed guest kernel, which the launcher found and checked against the signed index itself. The guest's console is then hvc0, as for the signed kernel swm-vmm finds itself. Without it, a kernel on -k is a configuration's own, and its console is the serial port, ttyS0.
fd
The guest's disk, an open file, shown to the guest as a virtio disk.
fd, -V fd
Whole devices for the guest alone: the VFIO container, /dev/vfio/vfio, and a device's group, /dev/vfio/n. Each -V names one group, at most 4 in all. The launcher opens each one read-write, with its devices bound to vfio-pci. -C, -V and -A go together. They give the guest a whole GPU, or the net VM its NICs. -V takes no -G. swm-vmm resets each device and maps all of the guest's memory for their DMA. The map pins the memory under RLIMIT_MEMLOCK, which the launcher sets to the guest's memory. swm-vmm closes the container and every group before the guest runs. The guest gets no memory balloon.
vcpus
The guest's processors, 1 to 64; one without -c.
resolver
With -T only: the address of the name server the net VM gives its clients, one IPv4 address.
blobdir, -F flavor
Where the signed kernels are, and which flavor to boot. The flavor is guest-std unless -T, -W, or -p names another. Neither goes with -k.
fd
With -R: the write end of a pipe, closed when the GPU device ends, so the root monitor learns of it.
fd
The bus to the host compositor, wired to a port of the guest's virtio console. When the other end hangs up, the guest ends.
path, -R fd
A GPU device for the guest, on the path the root monitor picked: none, drawn by the guest's processors and shown through the pixel window; nctx or venus, the guest's GPU commands sent to vmm-gfx(8) on -R, a connected SOCK_SEQPACKET socket that takes descriptors. When vmm-gfx fails, the GPU device ends and the guest runs on. The GPU device needs -f, as its frames go to the pixel window.
fd
Boot this kernel instead of the signed one, with -i its initramfs. -K and -I give the sha256 each must have. A file that reads otherwise boots nothing.
fd
/dev/kvm, opened read-write by the launcher. Under the root monitor, the VMM's root holds no /dev. Without -M, it opens /dev/kvm itself.
bytes
The guest's memory. The default is 3 GiB. The guest hands back the pages it frees, except with -V.
fd, -N ip
The guest's network device and its address.
servers
With -T only: the net VM's time servers, 1 to 4 IPv4 addresses separated by commas, none 0.0.0.0 and none twice.
The guest is ttvm, with no pixel window. Standalone, the flavor is ttvm. Needs -f; takes no -G, -T, -W, -s, -V, -C, -A, -Q, or -u.
fd
The root monitor's socket to quiesce a session VM's disk: its messages go to the guest's PID 1 on a third port of the virtio console, and back. Needs -b; takes no -p, -T, or -W.
fd
With -p, a second disk, an open file read-only, shown to the guest as a read-only virtio disk. swm-vmm refuses a write.
peers
The sessions in the share, as name:uid pairs separated by commas, so the guest shows their files by name. Needs -s.
fd, -g gid
The share, served to the guest as a virtio file system, and its group.
fd
The net VM's trunk: the control socket that the root monitor sends the switch's ports on. The trunk is the guest's network device, so it takes no -n, -N, or -s.
seconds
End the guest after this many seconds.
With -C, -V, and -A: the GPU is for computing too. The guest is told so on its command line and loads the driver for it.
name:uid:gid
The session's user, which the guest runs its programs as.
fd
The gfx VM: the guest serves up to four client VMs' GPU devices. The root monitor gives each client's socket on fd. The guest's virtio console carries their messages on a third port. swm-vmm checks every message on its way in and out. The guest is told its role on its command line. It takes no -G, -R, -E, -T, -n, -N, -s, -g, -S, -C, -V, -A, -b, -p, or -u. Its bus takes no descriptor and has no pixel window. Standalone, the flavor is gfxvm.
n:rfd:ffd:efd
With -W only, once for each slot n from 1 to 4, or not at all: slot n's GPU device, on the native context path. rfd is the socket to the slot's vmm-gfx(8) in the host, ffd its frame channel, and efd the write end of its end pipe. Each socket must be a connected SOCK_SEQPACKET socket that takes descriptors. The four devices are set up together. A slot whose vmm-gfx(8) fails at setup is dead and never falls back to a 2D device.

The net VM is started with -T, -D, and -P in place of -n, -N, and -s: its trunk to the switch, its name server, and its time servers. Its uplinks are its NICs, whole, by -C, -V, and -A.

The guest's console goes to the standard output: hvc0 on the virtio console for the signed guest kernel, the serial port, ttyS0, for any other. The serial port goes there too. SIGTERM and SIGINT end the guest cleanly.

0
The guest stopped cleanly: it powered off, its bus closed, or a signal ended it.
1
swm-vmm failed.
2
The guest lied to a device and was stopped as hostile.
3
The guest crashed.
4
The guest asked to reboot.
5
The GPU of -V could not be set up.
6
The GPU's group was refused: the host has no interrupt remapping.
7
The GPU could not be reset.
8
The GPU had ATS turned on after it was attached.
9
The host reported an error of the GPU while the guest ran.
10
The host asked for the GPU back while the guest ran.

The worst of these wins: once a guest is stopped as hostile, the exit is 2, however it ends.

swm-wl(1), scrotwmos.conf(5), scrotwmos(7), gpu-probe(8), scrotwmd(8), swm-ntp(8), swm-tt(8), vmm-gfx(8)

Marco Peereboom <marco@peereboom.us>

October 19, 2026 Void Linux