| 6 Mar 2025 |
ElvishJerricco | ish | 19:36:28 |
ElvishJerricco | assuming systemd can handle waiting for the module to load | 19:37:03 |
ElvishJerricco | but maybe it's not a module at all | 19:37:12 |
ElvishJerricco | 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 | for 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 IMHO | 19:41:04 |
ElvishJerricco | wait wut | 19:41:42 |
ElvishJerricco | clearly I don't understand systemd-ssh-generator and its relationship to vsoc | 19:42:06 |
ElvishJerricco | * clearly I don't understand systemd-ssh-generator and its relationship to vsock | 19:42:08 |
gdamjan | and on my Arch VM - seems to be generated by default | 19:42:19 |
ElvishJerricco | needing to load a module means the generator won't do the right thing | 19:43:12 |
gdamjan | 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 | i'm so confused | 19:43:53 |
gdamjan | ah, and also the generator needs to find that sshd is "installed" | 19:44:29 |
gdamjan | not sure, but didn't the kernel automatically load socket modules ? | 19:44:44 |
ElvishJerricco | 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 | (really, the .socket unit should just depend on modprobe@whatever-the-vsock-module-is-called.service) | 19:46:32 |
gdamjan | considering I haven't configured any vsock module to be loaded explicitly, and yet they are :) | 19:46:43 |
ElvishJerricco | $ git grep vsock | wc -l
220
jfc
| 19:47:42 |
ElvishJerricco | * $ cd systemd
$ git grep vsock | wc -l
220
jfc
| 19:47:56 |
gdamjan | the generator does seem to check that the system is a guest | 19:48:46 |
ElvishJerricco | ok so we've got some kind of option here | 19:49:10 |
ElvishJerricco | do we need the ssh generator? | 19:49:32 |
ElvishJerricco | * gdamjan: do we need the ssh generator? | 19:49:39 |
gdamjan | in theory you can just add a static unit for vsock, right? | 19:49:58 |
ElvishJerricco | I don't understand | 19:50:11 |
ElvishJerricco | I thought we just don't need anything? | 19:50:31 |
gdamjan | how do you mean? :D | 19:50:56 |
gdamjan | sshd will not natively listen on vsock, so you need "something" | 19:51:09 |
gdamjan | # /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 | this is the generated .socket unit ^ | 19:51:26 |