]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/org.freedesktop.machine1.xml
man: fix link markup
[thirdparty/systemd.git] / man / org.freedesktop.machine1.xml
CommitLineData
de2efb75
ZJS
1<?xml version='1.0'?>
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
4<!-- SPDX-License-Identifier: LGPL-2.1+ -->
5
6<refentry id="org.freedesktop.machine1" conditional='ENABLE_MACHINED'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8 <refentryinfo>
9 <title>org.freedesktop.machine1</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>org.freedesktop.machine1</refentrytitle>
15 <manvolnum>5</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>org.freedesktop.machine1</refname>
20 <refpurpose>The D-Bus interface of systemd-machined</refpurpose>
21 </refnamediv>
22
23 <refsect1>
24 <title>Introduction</title>
25
26 <para>
27 <citerefentry><refentrytitle>systemd-machined.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
28 is a system service that keeps track of locally running virtual machines and containers.
29 This page describes the D-Bus interface.</para>
30 </refsect1>
31
32 <refsect1>
33 <title>The Manager Object</title>
34
35 <para>The service exposes the following interfaces on the Manager object on the bus:</para>
36
48f99d7c 37 <programlisting executable="systemd-machined" node="/org/freedesktop/machine1" interface="org.freedesktop.machine1.Manager">
de2efb75
ZJS
38node /org/freedesktop/machine1 {
39 interface org.freedesktop.machine1.Manager {
40 methods:
41 GetMachine(in s name,
42 out o machine);
43 GetImage(in s name,
44 out o image);
45 GetMachineByPID(in u pid,
46 out o machine);
47 ListMachines(out a(ssso) machines);
4fb222c4 48 ListImages(out a(ssbttto) images);
de2efb75
ZJS
49 CreateMachine(in s name,
50 in ay id,
51 in s service,
52 in s class,
53 in u leader,
54 in s root_directory,
55 in a(sv) scope_properties,
56 out o path);
57 CreateMachineWithNetwork(in s name,
58 in ay id,
59 in s service,
60 in s class,
61 in u leader,
62 in s root_directory,
63 in ai ifindices,
64 in a(sv) scope_properties,
65 out o path);
66 RegisterMachine(in s name,
67 in ay id,
68 in s service,
69 in s class,
70 in u leader,
71 in s root_directory,
72 out o path);
73 RegisterMachineWithNetwork(in s name,
74 in ay id,
75 in s service,
76 in s class,
77 in u leader,
78 in s root_directory,
79 in ai ifindices,
80 out o path);
4fb222c4
ZJS
81 UnregisterMachine(in s name);
82 TerminateMachine(in s id);
de2efb75
ZJS
83 KillMachine(in s name,
84 in s who,
4fb222c4 85 in i signal);
de2efb75
ZJS
86 GetMachineAddresses(in s name,
87 out a(iay) addresses);
88 GetMachineOSRelease(in s name,
89 out a{ss} fields);
90 OpenMachinePTY(in s name,
91 out h pty,
92 out s pty_path);
93 OpenMachineLogin(in s name,
94 out h pty,
95 out s pty_path);
96 OpenMachineShell(in s name,
97 in s user,
98 in s path,
99 in as args,
100 in as environment,
101 out h pty,
102 out s pty_path);
103 BindMountMachine(in s name,
104 in s source,
105 in s destination,
106 in b read_only,
107 in b mkdir);
108 CopyFromMachine(in s name,
109 in s source,
110 in s destination);
111 CopyToMachine(in s name,
112 in s source,
113 in s destination);
4fb222c4
ZJS
114 OpenMachineRootDirectory(in s name,
115 out h fd);
116 GetMachineUIDShift(in s name,
117 out u shift);
de2efb75
ZJS
118 RemoveImage(in s name);
119 RenameImage(in s name,
120 in s new_name);
121 CloneImage(in s name,
122 in s new_name,
123 in b read_only);
124 MarkImageReadOnly(in s name,
125 in b read_only);
4fb222c4
ZJS
126 GetImageHostname(in s name,
127 out s hostname);
128 GetImageMachineID(in s name,
129 out ay id);
130 GetImageMachineInfo(in s name,
131 out a{ss} machine_info);
132 GetImageOSRelease(in s name,
133 out a{ss} os_release);
de2efb75
ZJS
134 SetPoolLimit(in t size);
135 SetImageLimit(in s name,
136 in t size);
4fb222c4
ZJS
137 CleanPool(in s mode,
138 out a(st) images);
de2efb75
ZJS
139 MapFromMachineUser(in s name,
140 in u uid_inner,
141 out u uid_outer);
142 MapToMachineUser(in u uid_outer,
143 out s machine_name,
144 out o machine_path,
4fb222c4 145 out u uid_inner);
de2efb75
ZJS
146 MapFromMachineGroup(in s name,
147 in u gid_inner,
148 out u gid_outer);
149 MapToMachineGroup(in u gid_outer,
150 out s machine_name,
151 out o machine_path,
152 out u gid_inner);
153 signals:
154 MachineNew(s machine,
155 o path);
156 MachineRemoved(s machine,
157 o path);
158 properties:
4fb222c4
ZJS
159 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
160 readonly s PoolPath = '...';
161 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
162 readonly t PoolUsage = ...;
163 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
164 readonly t PoolLimit = ...;
de2efb75 165 };
4fb222c4
ZJS
166 interface org.freedesktop.DBus.Peer { ... };
167 interface org.freedesktop.DBus.Introspectable { ... };
168 interface org.freedesktop.DBus.Properties { ... };
de2efb75 169};
00bb75d7
ZJS
170 </programlisting>
171
172 <!--method UnregisterMachine is not documented!-->
173
174 <!--method OpenMachineRootDirectory is not documented!-->
175
176 <!--method GetMachineUIDShift is not documented!-->
177
178 <!--method GetImageHostname is not documented!-->
179
180 <!--method GetImageMachineID is not documented!-->
181
182 <!--method GetImageMachineInfo is not documented!-->
183
184 <!--method GetImageOSRelease is not documented!-->
185
186 <!--method CleanPool is not documented!-->
187
188 <!--Autogenerated cross-references for systemd.directives, do not edit-->
189
190 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.machine1.Manager"/>
191
192 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.machine1.Manager"/>
193
194 <variablelist class="dbus-method" generated="True" extra-ref="GetMachine()"/>
195
196 <variablelist class="dbus-method" generated="True" extra-ref="GetImage()"/>
197
198 <variablelist class="dbus-method" generated="True" extra-ref="GetMachineByPID()"/>
199
200 <variablelist class="dbus-method" generated="True" extra-ref="ListMachines()"/>
201
202 <variablelist class="dbus-method" generated="True" extra-ref="ListImages()"/>
203
204 <variablelist class="dbus-method" generated="True" extra-ref="CreateMachine()"/>
205
206 <variablelist class="dbus-method" generated="True" extra-ref="CreateMachineWithNetwork()"/>
207
208 <variablelist class="dbus-method" generated="True" extra-ref="RegisterMachine()"/>
209
210 <variablelist class="dbus-method" generated="True" extra-ref="RegisterMachineWithNetwork()"/>
211
212 <variablelist class="dbus-method" generated="True" extra-ref="UnregisterMachine()"/>
213
214 <variablelist class="dbus-method" generated="True" extra-ref="TerminateMachine()"/>
215
216 <variablelist class="dbus-method" generated="True" extra-ref="KillMachine()"/>
217
218 <variablelist class="dbus-method" generated="True" extra-ref="GetMachineAddresses()"/>
219
220 <variablelist class="dbus-method" generated="True" extra-ref="GetMachineOSRelease()"/>
221
222 <variablelist class="dbus-method" generated="True" extra-ref="OpenMachinePTY()"/>
223
224 <variablelist class="dbus-method" generated="True" extra-ref="OpenMachineLogin()"/>
225
226 <variablelist class="dbus-method" generated="True" extra-ref="OpenMachineShell()"/>
227
228 <variablelist class="dbus-method" generated="True" extra-ref="BindMountMachine()"/>
229
230 <variablelist class="dbus-method" generated="True" extra-ref="CopyFromMachine()"/>
231
232 <variablelist class="dbus-method" generated="True" extra-ref="CopyToMachine()"/>
233
234 <variablelist class="dbus-method" generated="True" extra-ref="OpenMachineRootDirectory()"/>
235
236 <variablelist class="dbus-method" generated="True" extra-ref="GetMachineUIDShift()"/>
237
238 <variablelist class="dbus-method" generated="True" extra-ref="RemoveImage()"/>
239
240 <variablelist class="dbus-method" generated="True" extra-ref="RenameImage()"/>
241
242 <variablelist class="dbus-method" generated="True" extra-ref="CloneImage()"/>
243
244 <variablelist class="dbus-method" generated="True" extra-ref="MarkImageReadOnly()"/>
245
246 <variablelist class="dbus-method" generated="True" extra-ref="GetImageHostname()"/>
247
248 <variablelist class="dbus-method" generated="True" extra-ref="GetImageMachineID()"/>
249
250 <variablelist class="dbus-method" generated="True" extra-ref="GetImageMachineInfo()"/>
251
252 <variablelist class="dbus-method" generated="True" extra-ref="GetImageOSRelease()"/>
253
254 <variablelist class="dbus-method" generated="True" extra-ref="SetPoolLimit()"/>
255
256 <variablelist class="dbus-method" generated="True" extra-ref="SetImageLimit()"/>
257
258 <variablelist class="dbus-method" generated="True" extra-ref="CleanPool()"/>
259
260 <variablelist class="dbus-method" generated="True" extra-ref="MapFromMachineUser()"/>
261
262 <variablelist class="dbus-method" generated="True" extra-ref="MapToMachineUser()"/>
263
264 <variablelist class="dbus-method" generated="True" extra-ref="MapFromMachineGroup()"/>
265
266 <variablelist class="dbus-method" generated="True" extra-ref="MapToMachineGroup()"/>
267
268 <variablelist class="dbus-signal" generated="True" extra-ref="MachineNew"/>
269
270 <variablelist class="dbus-signal" generated="True" extra-ref="MachineRemoved"/>
271
272 <variablelist class="dbus-property" generated="True" extra-ref="PoolPath"/>
273
274 <variablelist class="dbus-property" generated="True" extra-ref="PoolUsage"/>
275
276 <variablelist class="dbus-property" generated="True" extra-ref="PoolLimit"/>
277
278 <!--End of Autogenerated section-->
de2efb75
ZJS
279
280 <refsect2>
281 <title>Methods</title>
282
283 <para><function>GetMachine()</function> may be used to get the machine object path for the machine with
ca264f7d 284 the specified name. Similarly, <function>GetMachineByPID()</function> gets the machine object the
de2efb75
ZJS
285 specified PID belongs to if there is any.</para>
286
ca264f7d 287 <para><function>GetImage()</function> may be used to get the image object path of the image with the
de2efb75
ZJS
288 specified name.</para>
289
ca264f7d 290 <para><function>ListMachines()</function> returns an array of all currently registered machines. The
de2efb75
ZJS
291 structures in the array consist of the following fields: machine name, machine class, an identifier for
292 the service that registered the machine and the machine object path.</para>
293
ca264f7d 294 <para><function>ListImages()</function> returns an array of all currently known images. The
de2efb75 295 structures in the array consist of the following fields: image name, type, read-only flag, creation
ca264f7d 296 time, modification time, current disk space, and image object path.</para>
de2efb75
ZJS
297
298 <para><function>CreateMachine()</function> may be used to register a new virtual machine or container
ca264f7d
DDM
299 with <command>systemd-machined</command>, creating a scope unit for it. It accepts the following arguments: a
300 machine name chosen by the registrar, an optional UUID as a 32 byte array, a string that identifies the
de2efb75
ZJS
301 service that registers the machine, a class string, the PID of the leader process of the machine, an
302 optional root directory of the container, and an array of additional properties to use for the scope
ca264f7d
DDM
303 registration. The virtual machine name must be suitable as a hostname, and hence should follow the usual
304 DNS hostname rules, as well as the Linux hostname restrictions. Specifically, only 7 bit ASCII is
de2efb75
ZJS
305 permitted, a maximum length of 64 characters is enforced, only characters from the set
306 <literal>a-zA-Z0-9-_.</literal> are allowed, the name may not begin with a dot, and it may not contain
307 two dots immediately following each other. Container and VM managers should ideally use the hostname
308 used internally in the machine for this parameter. This recommendation is made in order to make the
309 machine name naturally resolvable using
310 <citerefentry><refentrytitle>nss-mymachines</refentrytitle><manvolnum>8</manvolnum></citerefentry>. If
311 a container manager needs to embed characters outside of the indicated range, escaping is required,
312 possibly using <literal>_</literal> as the escape character. Another (somewhat natural) option would be
ca264f7d
DDM
313 to utilize Internet IDNA encoding. The UUID is passed as a 32 byte array or, if no suitable UUID is
314 available, an empty array (zero length) or zeroed out array shall be passed. The UUID should identify
315 the virtual machine/container uniquely and should ideally be the same UUID that
de2efb75
ZJS
316 <filename>/etc/machine-id</filename> in the VM/container is initialized from. The service string can be
317 free-form, but it is recommended to pass a short lowercase identifier like
318 <literal>systemd-nspawn</literal>, <literal>libvirt-lxc</literal> or similar. The class string should
319 be either <literal>container</literal> or <literal>vm</literal> indicating whether the machine to
320 register is of the respective class. The leader PID should be the host PID of the init process of the
ca264f7d
DDM
321 container or the encapsulating process of the VM. If the root directory of the container is known and
322 available in the host's hierarchy, it should be passed. Otherwise, pass the empty string instead. Finally, the
de2efb75 323 scope properties are passed as array in the same way as to PID1's
ca264f7d
DDM
324 <function>StartTransientUnit()</function> method. Calling this method will internally register a transient scope
325 unit for the calling client (utilizing the passed scope_properties) and move the leader PID into
89fc6fd3 326 it. The method returns an object path for the registered machine object that implements the
de2efb75
ZJS
327 <interfacename>org.freedesktop.machine1.Machine</interfacename> interface (see below). Also see the
328 <ulink url="https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/">New Control Group
ca264f7d 329 Interfaces</ulink> for details about scope units and how to alter resource control settings on the
de2efb75
ZJS
330 created machine at runtime.</para>
331
ca264f7d
DDM
332 <para><function>RegisterMachine()</function> is similar to <function>CreateMachine()</function>.
333 However, it only registers a machine and does not create a scope unit for it. Instead, the caller's unit is
334 registered. We recommend to only use this method for container or VM managers that are run
de2efb75
ZJS
335 multiple times, one instance for each container/VM they manage, and are invoked as system
336 services.</para>
337
338 <para><function>CreateMachineWithNetwork()</function> and
339 <function>RegisterMachineWithNetwork()</function> are similar to <function>CreateMachine()</function>
340 and <function>RegisterMachine()</function> but take an extra argument: an array of network interface
ca264f7d
DDM
341 indices that point towards the virtual machine or container. The interface indices should reference one
342 or more network interfaces on the host that can be used to communicate with the guest. Commonly, the
343 passed interface index refers to the host side of a "veth" link (in case of containers), a
344 "tun"/"tap" link (in case of VMs), or the host side of a bridge interface that bridges access to the
de2efb75 345 VM/container interfaces. Specifying this information is useful to enable support for link-local IPv6
ca264f7d 346 communication to the machines since the scope field of sockaddr_in6 can be initialized by the
de2efb75
ZJS
347 specified ifindex.
348 <citerefentry><refentrytitle>nss-mymachines</refentrytitle><manvolnum>8</manvolnum></citerefentry>
349 makes use of this information.</para>
350
ca264f7d 351 <para><function>KillMachine()</function> sends a UNIX signal to the machine's processes. As its arguments, it takes a
de2efb75 352 machine name (as originally passed to <function>CreateMachine()</function> or returned by
ca264f7d
DDM
353 <function>ListMachines()</function>), an identifier that specifies what precisely to send the signal to (either
354 <literal>leader</literal> or <literal>all</literal>), and a numeric UNIX signal integer.</para>
de2efb75
ZJS
355
356 <para><function>TerminateMachine()</function> terminates a virtual machine, killing its processes. It
ca264f7d 357 takes a machine name as its only argument.</para>
de2efb75 358
89fc6fd3 359 <para><function>GetMachineAddresses()</function> retrieves the IP addresses of a container. This method
de2efb75
ZJS
360 returns an array of pairs consisting of an address family specifier (<constant>AF_INET</constant> or
361 <constant>AF_INET6</constant>) and a byte array containing the addresses. This is only supported for
362 containers that make use of network namespacing.</para>
363
364 <para><function>GetMachineOSRelease()</function> retrieves the OS release information of a
ca264f7d 365 container. This method returns an array of key value pairs read from the
de2efb75 366 <citerefentry><refentrytitle>os-release</refentrytitle><manvolnum>5</manvolnum></citerefentry> file in
ca264f7d 367 the container and is useful to identify the operating system used in a container.</para>
de2efb75
ZJS
368
369 <para><function>OpenMachinePTY()</function> allocates a pseudo TTY in the container and returns a file
370 descriptor and its path. This is equivalent to transitioning into the container and invoking
b7a47345
ZJS
371 <citerefentry project='man-pages'><refentrytitle>posix_openpt</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
372 </para>
de2efb75
ZJS
373
374 <para><function>OpenMachineLogin()</function> allocates a pseudo TTY in the container and ensures that
ca264f7d
DDM
375 a getty login prompt of the container is running on the other end. It returns the file descriptor of
376 the PTY and the PTY path. This is useful for acquiring a pty with a login prompt from the
de2efb75
ZJS
377 container.</para>
378
379 <para><function>OpenMachineShell()</function> allocates a pseudo TTY in the container, as the specified
ca264f7d
DDM
380 user, and invokes the executable at the specified path with a list of arguments (starting from
381 argv[0]) and an environment block. It then returns the file descriptor of the PTY and the PTY
de2efb75
ZJS
382 path.</para>
383
384 <para><function>BindMountMachine()</function> bind mounts a file or directory from the host into the
ca264f7d
DDM
385 container. Its arguments consist of a machine name, the source directory on the host, the destination directory in the
386 container, and two booleans, one indicating whether the bind mount shall be
de2efb75
ZJS
387 read-only, the other indicating whether the destination mount point shall be created first, if it is
388 missing.</para>
389
390 <para><function>CopyFromMachine()</function> copies files or directories from a container into the
ca264f7d
DDM
391 host. It takes a container name, a source directory in the container and a destination directory on the
392 host as arguments. <function>CopyToMachine()</function> does the opposite and copies files from a source
de2efb75
ZJS
393 directory on the host into a destination directory in the container.</para>
394
ca264f7d 395 <para><function>RemoveImage()</function> removes the image with the specified name.</para>
de2efb75 396
ca264f7d 397 <para><function>RenameImage()</function> renames the specified image.</para>
de2efb75 398
ca264f7d
DDM
399 <para><function>CloneImage()</function> clones the specified image under a new name. It also takes a
400 boolean argument indicating whether the resulting image shall be read-only or not.</para>
de2efb75
ZJS
401
402 <para><function>MarkImageReadOnly()</function> toggles the read-only flag of an image.</para>
403
404 <para><function>SetPoolLimit()</function> sets an overall quota limit on the pool of images.</para>
405
406 <para><function>SetImageLimit()</function> sets a per-image quota limit.</para>
407
408 <para><function>MapFromMachineUser()</function>, <function>MapToMachineUser()</function>,
ca264f7d
DDM
409 <function>MapFromMachineGroup()</function>, and <function>MapToMachineGroup()</function> may be used to map
410 UIDs/GIDs from the host user namespace to a container user namespace or vice versa.</para>
de2efb75
ZJS
411 </refsect2>
412
413 <refsect2>
414 <title>Signals</title>
415
416 <para><function>MachineNew</function> and <function>MachineRemoved</function> are sent whenever a new
ca264f7d 417 machine is registered or removed. These signals carry the machine name and the object path to the corresponding
de2efb75
ZJS
418 <interfacename>org.freedesktop.machine1.Machine</interfacename> interface (see below).</para>
419 </refsect2>
420
421 <refsect2>
422 <title>Properties</title>
423
424 <para><varname>PoolPath</varname> specifies the file system path where images are written to.</para>
425
426 <para><varname>PoolUsage</varname> specifies the current usage size of the image pool in bytes.</para>
427
428 <para><varname>PoolLimit</varname> specifies the size limit of the image pool in bytes.</para>
429 </refsect2>
430 </refsect1>
431
432 <refsect1>
433 <title>Machine Objects</title>
434
48f99d7c 435 <programlisting executable="systemd-machined" node="/org/freedesktop/machine1/machine/rawhide" interface="org.freedesktop.machine1.Machine">
4fb222c4 436node /org/freedesktop/machine1/machine/rawhide {
de2efb75
ZJS
437 interface org.freedesktop.machine1.Machine {
438 methods:
439 Terminate();
440 Kill(in s who,
4fb222c4 441 in i signal);
de2efb75
ZJS
442 GetAddresses(out a(iay) addresses);
443 GetOSRelease(out a{ss} fields);
4fb222c4
ZJS
444 GetUIDShift(out u shift);
445 OpenPTY(out h pty,
446 out s pty_path);
447 OpenLogin(out h pty,
448 out s pty_path);
449 OpenShell(in s user,
450 in s path,
451 in as args,
452 in as environment,
453 out h pty,
454 out s pty_path);
455 BindMount(in s source,
456 in s destination,
457 in b read_only,
458 in b mkdir);
459 CopyFrom(in s source,
460 in s destination);
461 CopyTo(in s source,
462 in s destination);
463 OpenRootDirectory(out h fd);
de2efb75 464 properties:
4fb222c4
ZJS
465 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
466 readonly s Name = '...';
467 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
468 readonly ay Id = [...];
469 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
470 readonly t Timestamp = ...;
471 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
472 readonly t TimestampMonotonic = ...;
473 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
474 readonly s Service = '...';
475 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
476 readonly s Unit = '...';
477 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
478 readonly u Leader = ...;
479 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
480 readonly s Class = '...';
481 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
482 readonly s RootDirectory = '...';
483 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
484 readonly ai NetworkInterfaces = [...];
485 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
486 readonly s State = '...';
de2efb75 487 };
4fb222c4
ZJS
488 interface org.freedesktop.DBus.Peer { ... };
489 interface org.freedesktop.DBus.Introspectable { ... };
490 interface org.freedesktop.DBus.Properties { ... };
de2efb75
ZJS
491};
492 </programlisting>
493
00bb75d7
ZJS
494 <!--method GetUIDShift is not documented!-->
495
496 <!--method OpenPTY is not documented!-->
497
498 <!--method OpenLogin is not documented!-->
499
500 <!--method OpenShell is not documented!-->
501
502 <!--method BindMount is not documented!-->
503
504 <!--method CopyFrom is not documented!-->
505
506 <!--method CopyTo is not documented!-->
507
508 <!--method OpenRootDirectory is not documented!-->
509
510 <!--Autogenerated cross-references for systemd.directives, do not edit-->
511
512 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.machine1.Machine"/>
513
514 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.machine1.Machine"/>
515
516 <variablelist class="dbus-method" generated="True" extra-ref="Terminate()"/>
517
518 <variablelist class="dbus-method" generated="True" extra-ref="Kill()"/>
519
520 <variablelist class="dbus-method" generated="True" extra-ref="GetAddresses()"/>
521
522 <variablelist class="dbus-method" generated="True" extra-ref="GetOSRelease()"/>
523
524 <variablelist class="dbus-method" generated="True" extra-ref="GetUIDShift()"/>
525
526 <variablelist class="dbus-method" generated="True" extra-ref="OpenPTY()"/>
527
528 <variablelist class="dbus-method" generated="True" extra-ref="OpenLogin()"/>
529
530 <variablelist class="dbus-method" generated="True" extra-ref="OpenShell()"/>
531
532 <variablelist class="dbus-method" generated="True" extra-ref="BindMount()"/>
533
534 <variablelist class="dbus-method" generated="True" extra-ref="CopyFrom()"/>
535
536 <variablelist class="dbus-method" generated="True" extra-ref="CopyTo()"/>
537
538 <variablelist class="dbus-method" generated="True" extra-ref="OpenRootDirectory()"/>
539
540 <variablelist class="dbus-property" generated="True" extra-ref="Name"/>
541
542 <variablelist class="dbus-property" generated="True" extra-ref="Id"/>
543
544 <variablelist class="dbus-property" generated="True" extra-ref="Timestamp"/>
545
546 <variablelist class="dbus-property" generated="True" extra-ref="TimestampMonotonic"/>
547
548 <variablelist class="dbus-property" generated="True" extra-ref="Service"/>
549
550 <variablelist class="dbus-property" generated="True" extra-ref="Unit"/>
551
552 <variablelist class="dbus-property" generated="True" extra-ref="Leader"/>
553
554 <variablelist class="dbus-property" generated="True" extra-ref="Class"/>
555
556 <variablelist class="dbus-property" generated="True" extra-ref="RootDirectory"/>
557
558 <variablelist class="dbus-property" generated="True" extra-ref="NetworkInterfaces"/>
559
560 <variablelist class="dbus-property" generated="True" extra-ref="State"/>
561
562 <!--End of Autogenerated section-->
563
de2efb75
ZJS
564 <refsect2>
565 <title>Methods</title>
566
ca264f7d 567 <para><function>Terminate()</function> and <function>Kill()</function> terminate/kill the machine. These methods
de2efb75 568 take the same arguments as <function>TerminateMachine()</function> and
ca264f7d 569 <function>KillMachine()</function> on the Manager interface, respectively.</para>
de2efb75 570
ca264f7d
DDM
571 <para><function>GetAddresses()</function> and <function>GetOSRelease()</function> get the IP address and OS
572 release information from the machine. These methods take the same arguments as
de2efb75 573 <function>GetMachineAddresses()</function> and <function>GetMachineOSRelease()</function> of the
ca264f7d 574 Manager interface, respectively.</para>
de2efb75
ZJS
575 </refsect2>
576
577 <refsect2>
578 <title>Properties</title>
579
ca264f7d 580 <para><varname>Name</varname> is the machine name as it was passed in during registration with
de2efb75
ZJS
581 <function>CreateMachine()</function> on the manager object.</para>
582
583 <para><varname>Id</varname> is the machine UUID.</para>
584
585 <para><varname>Timestamp</varname> and <varname>TimestampMonotonic</varname> are the realtime and
ca264f7d 586 monotonic timestamps when the virtual machines where created in microseconds since the epoch.</para>
de2efb75 587
ca264f7d 588 <para><varname>Service</varname> contains a short string identifying the registering service as passed
de2efb75
ZJS
589 in during registration of the machine.</para>
590
591 <para><varname>Unit</varname> is the systemd scope or service unit name for the machine.</para>
592
593 <para><varname>Leader</varname> is the PID of the leader process of the machine.</para>
594
ca264f7d 595 <para><varname>Class</varname> is the class of the machine and is either the string "vm" (for real VMs
de2efb75
ZJS
596 based on virtualized hardware) or "container" (for light-weight userspace virtualization sharing the
597 same kernel as the host).</para>
598
ca264f7d
DDM
599 <para><varname>RootDirectory</varname> is the root directory of the container if it is known and
600 applicable or the empty string.</para>
de2efb75 601
ca264f7d
DDM
602 <para><varname>NetworkInterfaces</varname> contains an array of network interface indices that point
603 towards the container, the VM or the host. For details about this information see the description of
de2efb75
ZJS
604 <function>CreateMachineWithNetwork()</function> above.</para>
605
ca264f7d
DDM
606 <para><varname>State</varname> is the state of the machine and is one of <literal>opening</literal>,
607 <literal>running</literal>, or <literal>closing</literal>. Note that the state machine is not considered
de2efb75
ZJS
608 part of the API and states might be removed or added without this being considered API breakage.
609 </para>
610 </refsect2>
611 </refsect1>
612
48f99d7c
ZJS
613 <refsect1>
614 <title>Examples</title>
615
616 <example>
617 <title>Introspect <interfacename>org.freedesktop.machine1.Manager</interfacename> on the bus</title>
618
619 <programlisting>
620$ gdbus introspect --system \
621 --dest org.freedesktop.machine1 \
622 --object-path /org/freedesktop/machine1
623 </programlisting>
624 </example>
625
626 <example>
627 <title>Introspect <interfacename>org.freedesktop.machine1.Machine</interfacename> on the bus</title>
628
629 <programlisting>
630$ gdbus introspect --system \
631 --dest org.freedesktop.machine1 \
632 --object-path /org/freedesktop/machine1/machine/rawhide
633 </programlisting>
634 </example>
635 </refsect1>
636
de2efb75
ZJS
637 <refsect1>
638 <title>Versioning</title>
639
640 <para>These D-Bus interfaces follow <ulink url="http://0pointer.de/blog/projects/versioning-dbus.html">
641 the usual interface versioning guidelines</ulink>.</para>
642 </refsect1>
643</refentry>