]> git.ipfire.org Git - thirdparty/systemd.git/blame - docs/VM_INTERFACE.md
mkosi: Install procps-ng in all images
[thirdparty/systemd.git] / docs / VM_INTERFACE.md
CommitLineData
34c6b7d9
LP
1---
2title: VM Interface
3category: Interfaces
4layout: default
5SPDX-License-Identifier: LGPL-2.1-or-later
6---
7
8# The VM Interface
9
10Also consult [Writing Virtual Machine or Container
11Managers](https://systemd.io/WRITING_VM_AND_CONTAINER_MANAGERS).
12
13systemd has a number of interfaces for interacting with virtual machine
14managers, when systemd is used inside of a VM. If you work on a VM manager,
15please consider supporting the following interfaces.
16
171. systemd supports passing immutable binary data blobs with limited size and
18 restricted access to services via the `ImportCredential=`, `LoadCredential=`
19 and `SetCredential=` settings. These credentials may be passed into a system
20 via SMBIOS Type 11 vendor strings, see
21 [systemd(1)](https://www.freedesktop.org/software/systemd/man/latest/systemd.html)
6e0abf5f 22 for details. This concept may be used to flexibly configure various facets
34c6b7d9
LP
23 ot the guest system. See
24 [systemd.system-credentials(7)](https://www.freedesktop.org/software/systemd/man/latest/systemd.system-credentials.html)
25 for a list of system credentials implemented by various systemd components.
26
272. Readiness, information about various system properties and functionality, as
28 well as progress of boot may be reported by systemd to a machine manager via
29 the `sd_notify()` protocol via `AF_VSOCK` sockets. The address of this
30 socket may be configured via the `vmm.notify_socket` system credential. See
31 [systemd(1)](https://www.freedesktop.org/software/systemd/man/latest/systemd.html).
32
333. The
34 [systemd-ssh-generator(8)](https://www.freedesktop.org/software/systemd/man/latest/systemd-ssh-generator.html)
35 functionality will automatically bind SSH login functionality to `AF_VSOCK`
36 port 22, if the system runs in a VM.
37
384. If not initialized yet the system's
39 [machine-id(5)](https://www.freedesktop.org/software/systemd/man/latest/machine-id.html)
40 is automatically set to the SMBIOS product UUID if available and invocation
41 in an VM environment is detected.
42
435. The
44 [`systemd-boot(7)`](https://www.freedesktop.org/software/systemd/man/latest/systemd-boot.html)
45 and
46 [`systemd-stub(7)`](https://www.freedesktop.org/software/systemd/man/latest/systemd-stub.html)
47 components support two SMBIOS Type 11 vendor strings that may be used to
48 extend the kernel command line of booted Linux environments:
49 `io.systemd.stub.kernel-cmdline-extra=` and
50 `io.systemd.boot.kernel-cmdline-extra=`.
51
52Also see
53[smbios-type-11(7)](https://www.freedesktop.org/software/systemd/man/latest/smbios-type-11.html)
54for a list of supported SMBIOS Type 11 vendor strings.