microvm-nix/microvm.nix

Explicitly set `systemd.ssh_listen` for ssh vsock support

Open

#512 geöffnet am 27. Apr. 2026

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Nix (205 Forks)github user discovery
good first issuehelp wanted

Repository-Metriken

Stars
 (2.626 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

According to https://github.com/yuwata/systemd/blob/f0483f308a4daed188deee776aa7a7a733293642/src/core/kmod-setup.c#L83, systemd sets up the vsock listener only when it sees a vsock PCI device. This means if devType is not pci, https://github.com/microvm-nix/microvm.nix/blob/2f2f62fdfdca2750e3399f66bd03986ab967e5ca/lib/runners/qemu.nix#L345 sets it up as a normal device, and systemd won't detect it automatically.

A more reliable way would be to configure ssh generator explicitly via kernel parameters systemd.ssh_listen=vsock::22 (https://www.freedesktop.org/software/systemd/man/latest/systemd-ssh-generator.html)

Contributor Guide