From 4a91ace5bc737d552fa20444d99d1100d9c1f9f7 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 3 Jan 2023 18:11:04 +0100 Subject: creds: import 'vmm.notify_socket' and use it to set This is intended to be used with VSOCK, to notify the hypervisor/VMM, eg on the host: qemu <...> -smbios type=11,value=io.systemd.credential:vmm.notify_socket=vsock:2:1234 -device vhost-vsock-pci,id=vhost-vsock-pci0,guest-cid=42 (vsock:2:1234 -> send to host on vsock port 1234, default is to send to 0 which is the hypervisor itself) Also on the host: $ socat - VSOCK-LISTEN:1234,socktype=5 READY=1 STATUS=Ready. --- man/systemd.system-credentials.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'man') diff --git a/man/systemd.system-credentials.xml b/man/systemd.system-credentials.xml index 3eadf9b985..2a87139a11 100644 --- a/man/systemd.system-credentials.xml +++ b/man/systemd.system-credentials.xml @@ -190,6 +190,24 @@ + + vmm.notify_socket + + This credential is parsed looking for an AF_VSOCK or + AF_UNIX address where to send a READY=1 + notification datagram when the system has finished booting. See: + sd_notify3 + This is useful for hypervisors/VMMs or other processes on the host + to receive a notification via VSOCK when a virtual machine has finished booting. + Note that in case the hypervisor does not support SOCK_DGRAM + over AF_VSOCK, SOCK_SEQPACKET will be + tried instead. The credential payload for AF_VSOCK should be + in the form: vsock:CID:PORT, where CID is + optional and if omitted will default to talking to the hypervisor + (0). + + + -- cgit v1.2.1