!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

611 Members
NixOS ❤️ systemd173 Servers

Load older messages


SenderMessageTime
6 Mar 2025
@elvishjerricco:matrix.orgElvishJerriccoish19:36:28
@elvishjerricco:matrix.orgElvishJerriccoassuming systemd can handle waiting for the module to load19:37:03
@elvishjerricco:matrix.orgElvishJerriccobut maybe it's not a module at all19:37:12
@elvishjerricco:matrix.orgElvishJerricco Arian: seems like no: /run/booted-system/kernel-modules/lib/modules/6.12.13/kernel/net/vmw_vsock/vsock.ko.xz 19:38:35
@gdamjan:spodeli.orggdamjanfor the server, it's just a .socket that's generated by systemd-ssh-generator https://www.freedesktop.org/software/systemd/man/257/systemd-ssh-generator.html so the generator needs to run after the module is loaded IMHO19:41:04
@elvishjerricco:matrix.orgElvishJerriccowait wut19:41:42
@elvishjerricco:matrix.orgElvishJerriccoclearly I don't understand systemd-ssh-generator and its relationship to vsoc19:42:06
@elvishjerricco:matrix.orgElvishJerricco* clearly I don't understand systemd-ssh-generator and its relationship to vsock19:42:08
@gdamjan:spodeli.orggdamjanand on my Arch VM - seems to be generated by default19:42:19
@elvishjerricco:matrix.orgElvishJerricconeeding to load a module means the generator won't do the right thing19:43:12
@gdamjan:spodeli.orggdamjan for the client side (ssh client, but actually VM host), you need the systemd-ssh-proxy executable and some ssh config magic (shipped with systemd) 19:43:14
@elvishjerricco:matrix.orgElvishJerriccoi'm so confused19:43:53
@gdamjan:spodeli.orggdamjanah, and also the generator needs to find that sshd is "installed"19:44:29
@gdamjan:spodeli.orggdamjannot sure, but didn't the kernel automatically load socket modules ?19:44:44
@elvishjerricco:matrix.orgElvishJerricco ok so we have a .socket unit, which depends on a vsock, and we're hoping the kernel auto-loads the module? 19:45:48
@elvishjerricco:matrix.orgElvishJerricco (really, the .socket unit should just depend on modprobe@whatever-the-vsock-module-is-called.service) 19:46:32
@gdamjan:spodeli.orggdamjanconsidering I haven't configured any vsock module to be loaded explicitly, and yet they are :)19:46:43
@elvishjerricco:matrix.orgElvishJerricco
$ git grep vsock | wc -l
220

jfc

19:47:42
@elvishjerricco:matrix.orgElvishJerricco *
$ cd systemd
$ git grep vsock | wc -l
220

jfc

19:47:56
@gdamjan:spodeli.orggdamjanthe generator does seem to check that the system is a guest19:48:46
@elvishjerricco:matrix.orgElvishJerriccook so we've got some kind of option here19:49:10
@elvishjerricco:matrix.orgElvishJerriccodo we need the ssh generator?19:49:32
@elvishjerricco:matrix.orgElvishJerricco * gdamjan: do we need the ssh generator? 19:49:39
@gdamjan:spodeli.orggdamjanin theory you can just add a static unit for vsock, right?19:49:58
@elvishjerricco:matrix.orgElvishJerriccoI don't understand19:50:11
@elvishjerricco:matrix.orgElvishJerriccoI thought we just don't need anything?19:50:31
@gdamjan:spodeli.orggdamjanhow do you mean? :D19:50:56
@gdamjan:spodeli.orggdamjansshd will not natively listen on vsock, so you need "something"19:51:09
@gdamjan:spodeli.orggdamjan
# /run/systemd/generator/sshd-vsock.socket
# Automatically generated by systemd-ssh-generator

[Unit]
Description=OpenSSH Server Socket (systemd-ssh-generator, AF_VSOCK)
Documentation=man:systemd-ssh-generator(8)
Wants=ssh-access.target
Before=ssh-access.target

[Socket]
ListenStream=vsock::22
Accept=yes
PollLimitIntervalSec=30s
PollLimitBurst=50
19:51:17
@gdamjan:spodeli.orggdamjanthis is the generated .socket unit ^19:51:26

Show newer messages


Back to Room ListRoom Version: 6