{"id":3863,"date":"2022-12-20T17:28:16","date_gmt":"2022-12-20T20:28:16","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/systemdmachined-service-man8\/"},"modified":"2022-12-20T17:28:16","modified_gmt":"2022-12-20T20:28:16","slug":"systemdmachined-service-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/systemdmachined-service-man8\/","title":{"rendered":"SYSTEMD&minus;MACHINED.SERVICE (man8)"},"content":{"rendered":"<h1 align=\"center\">SYSTEMD\u2212MACHINED.SERVICE<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd-machined.service, systemd-machined \u2212 Virtual machine and container registration manager<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd\u2212machined.service<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/usr\/lib\/systemd\/systemd\u2212machined<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd\u2212machined<\/b> is a system service that keeps track of locally running virtual machines and containers.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd\u2212machined<\/b> 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).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd\u2212machined<\/b> should <i>not<\/i> be used for registering\/keeping track of application sandbox containers. A <i>machine<\/i> in the context of <b>systemd\u2212machined<\/b> is supposed to be an abstract term covering both OS containers and full virtual machines, but not application sandboxes.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Machines registered with machined are exposed in various ways in the system. For example:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 Tools like <b>ps<\/b>(1) will show to which machine a specific process belongs in a column of its own, and so will <b><font color=\"#0000FF\">gnome\u2212system\u2212monitor<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">or <b>systemd-cgls<\/b>(1).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 systemd&#8217;s various tools (<b>systemctl<\/b>(1), <b>journalctl<\/b>(1), <b>loginctl<\/b>(1), <b>hostnamectl<\/b>(1), <b>timedatectl<\/b>(1), <b>localectl<\/b>(1), <b>machinectl<\/b>(1), &#8230;) support the <b>\u2212M<\/b> switch to operate on local containers instead of the host system.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 <b>systemctl list\u2212machines<\/b> will show the system state of all local containers, connecting to the container&#8217;s init system for that.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 systemctl&#8217;s <b>\u2212\u2212recursive<\/b> switch has the effect of not only showing the locally running services, but recursively showing the services of all registered containers.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The <b>machinectl<\/b> 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.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The <b>sd-bus<\/b>(3) library exposes the <b>sd_bus_open_system_machine<\/b>(3) call to connect to the system bus of any registered container.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The <b>nss-mymachines<\/b>(8) module makes sure all registered containers can be resolved via normal glibc <b>gethostbyname<\/b>(3) or <b>getaddrinfo<\/b>(3) calls.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">See <b>systemd-nspawn<\/b>(1) for some examples on how to run containers with OS tools.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">If you are interested in writing a VM or container manager that makes use of machined, please have look at<\/font> <b><font color=\"#0000FF\">Writing Virtual Machine or Container Managers<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">. Also see the<\/font> <b><font color=\"#0000FF\">New Control Group Interfaces<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The daemon provides both a C library interface (which is shared with <b>systemd-logind.service<\/b>(8)) as well as a D\u2212Bus 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 <b>sd-login<\/b>(3) and <b>org.freedesktop.machine1<\/b>(5). and <b>org.freedesktop.LogControl1<\/b>(5)<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">A small companion daemon <b>systemd-importd.service<\/b>(8) is also available, which implements importing, exporting, and downloading of container and VM images.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">For each container registered with systemd\u2212machined.service that employs user namespacing, users\/groups are synthesized for the used UIDs\/GIDs. These are made available to the system using the<\/font> <b><font color=\"#0000FF\">User\/Group Record Lookup API via Varlink<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">, and thus may be resolved with <b>userdbctl<\/b>(1) or the usual glibc NSS calls.<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>systemd<\/b>(1), <b>machinectl<\/b>(1), <b>systemd-nspawn<\/b>(1), <b>nss-mymachines<\/b>(8), <b>systemd.special<\/b>(7)<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">gnome-system-monitor<\/font><\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/help.gnome.org\/users\/gnome-system-monitor\/<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"69%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Writing Virtual Machine or Container Managers<\/font><\/p>\n<\/td>\n<td width=\"14%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/writing-vm-managers<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">3.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"43%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">New Control Group Interfaces<\/font><\/p>\n<\/td>\n<td width=\"40%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/ControlGroupInterface\/<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">4.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"61%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">User\/Group Record Lookup API via Varlink<\/font><\/p>\n<\/td>\n<td width=\"22%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/USER_GROUP_API<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  systemd-machined.service, systemd-machined \u2212 Virtual machine and container registration manager <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,956],"class_list":["post-3863","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-systemd-machined"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3863"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3863\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}