systemd-machined.service, systemd-machined - Virtual machine and container registration manager
systemd-machined is a system service that keeps track of locally running virtual machines and containers. systemd-machined is useful for registering and keeping track of both OS containers (containers that share the host kernel but run a full init system of their own and behave in most regards like a full virtual operating system rather than just one virtualized app) and full virtual machines (virtualized hardware running normal operating systems and possibly different kernels). systemd-machined should not be used for registering/keeping track of application sandbox containers. A machine in the context of systemd-machined is supposed to be an abstract term covering both OS containers and full virtual machines, but not application sandboxes. Machines registered with machined are exposed in various ways in the system. For example: · Tools like ps(1) will show to which machine a specific process belongs in a column of its own, and so will gnome-system-monitor or systemd-cgls(1). · systemd's various tools (systemctl(1), journalctl(1), loginctl(1), hostnamectl(1), timedatectl(1), localectl(1), machinectl(1), ...) support the -M switch to operate on local containers instead of the host system. · systemctl list-machines will show the system state of all local containers, connecting to the container's init system for that. · systemctl's --recursive switch has the effect of not only showing the locally running services, but recursively showing the services of all registered containers. · The machinectl command provides access to a number of useful operations on registered containers, such as introspecting them, rebooting, shutting them down, and getting a login prompt on them. · The sd-bus(3) library exposes the sd_bus_open_system_container(3) call to connect to the system bus of any registered container. · The nss-mymachines(8) module makes sure all registered containers can be resolved via normal glibc gethostbyname(3) or getaddrinfo(3) calls. See systemd-nspawn(1) for some examples on how to run containers with OS tools. If you are interested in writing a VM or container manager that makes use of machined, please have look at Writing Virtual Machine or Container Managers. Also see the New Control Group Interfaces. The daemon provides both a C library interface (which is shared with systemd-logind.service(8)) as well as a D-Bus interface. The library interface may be used to introspect and watch the state of virtual machines/containers. The bus interface provides the same but in addition may also be used to register or terminate machines. For more information please consult sd-login(3) and org.freedesktop.machine1(5). and org.freedesktop.LogControl1(5) A small companion daemon systemd-importd.service(8) is also available, which implements importing, exporting, and downloading of container and VM images.
systemd(1), machinectl(1), systemd-nspawn(1), nss-mymachines(8), systemd.special(7)
1. gnome-system-monitor https://help.gnome.org/users/gnome-system-monitor/ 2. Writing Virtual Machine or Container Managers https://www.freedesktop.org/wiki/Software/systemd/writing-vm-managers 3. New Control Group Interfaces https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/
This page is part of the systemd (systemd system and service manager) project. Information about the project can be found at ⟨http://www.freedesktop.org/wiki/Software/systemd⟩. If you have a bug report for this manual page, see ⟨http://www.freedesktop.org/wiki/Software/systemd/#bugreports⟩. This page was obtained from the project's upstream Git repository ⟨https://github.com/systemd/systemd.git⟩ on 2020-06-09. (At that time, the date of the most recent commit that was found in the repos‐ itory was 2020-06-09.) If you discover any rendering problems in this HTML version of the page, or you believe there is a better or more up-to-date source for the page, or you have corrections or improvements to the information in this COLOPHON (which is not part of the original manual page), send a mail to email@example.com systemd 245 SYSTEMD-MACHINED.SERVICE(8)
Pages that refer to this page: busctl(1), machinectl(1), sd_bus_default(3), sd_bus_default_system(3), sd_bus_default_user(3), sd_bus_get_address(3), sd_bus_open(3), sd_bus_open_system(3), sd_bus_open_system_machine(3), sd_bus_open_system_remote(3), sd_bus_open_system_with_description(3), sd_bus_open_user(3), sd_bus_open_user_with_description(3), sd_bus_open_with_description(3), sd_bus_set_address(3), sd_bus_set_exec(3), sd_machine_get_class(3), sd_machine_get_ifindices(3), sd_peer_get_cgroup(3), sd_peer_get_machine_name(3), sd_peer_get_owner_uid(3), sd_peer_get_session(3), sd_peer_get_slice(3), sd_peer_get_unit(3), sd_peer_get_user_slice(3), sd_peer_get_user_unit(3), sd_pid_get_cgroup(3), sd_pid_get_machine_name(3), sd_pid_get_owner_uid(3), sd_pid_get_session(3), sd_pid_get_slice(3), sd_pid_get_unit(3), sd_pid_get_user_slice(3), sd_pid_get_user_unit(3), org.freedesktop.import1(5), org.freedesktop.machine1(5), 30-systemd-environment-d-generator(7), systemd.directives(7), systemd.index(7), libnss_mymachines.so.2(8), nss-mymachines(8), systemd-importd(8), systemd-importd.service(8)