chiark / gitweb /
bus: make sd_bus_request_name() and sd_bus_release_name() behave more like other...
[elogind.git] / man / systemd-detect-virt.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of systemd.
7
8   Copyright 2010 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="systemd-detect-virt">
25
26         <refentryinfo>
27                 <title>systemd-detect-virt</title>
28                 <productname>systemd</productname>
29
30                 <authorgroup>
31                         <author>
32                                 <contrib>Developer</contrib>
33                                 <firstname>Lennart</firstname>
34                                 <surname>Poettering</surname>
35                                 <email>lennart@poettering.net</email>
36                         </author>
37                 </authorgroup>
38         </refentryinfo>
39
40         <refmeta>
41                 <refentrytitle>systemd-detect-virt</refentrytitle>
42                 <manvolnum>1</manvolnum>
43         </refmeta>
44
45         <refnamediv>
46                 <refname>systemd-detect-virt</refname>
47                 <refpurpose>Detect execution in a virtualized environment</refpurpose>
48         </refnamediv>
49
50         <refsynopsisdiv>
51                 <cmdsynopsis>
52                         <command>systemd-detect-virt <arg choice="opt" rep="repeat">OPTIONS</arg></command>
53                 </cmdsynopsis>
54         </refsynopsisdiv>
55
56         <refsect1>
57                 <title>Description</title>
58
59                 <para><command>systemd-detect-virt</command> detects
60                 execution in a virtualized environment. It identifies
61                 the virtualization technology and can distinguish full
62                 VM virtualization from container
63                 virtualization.</para>
64
65                 <para>When executed without <option>--quiet</option>
66                 will print a short identifier for the detected
67                 virtualization technology. The following technologies
68                 are currently identified: <varname>qemu</varname>,
69                 <varname>kvm</varname>, <varname>vmware</varname>,
70                 <varname>microsoft</varname>,
71                 <varname>oracle</varname>, <varname>xen</varname>,
72                 <varname>bochs</varname>, <varname>chroot</varname>,
73                 <varname>uml</varname>,
74                 <varname>openvz</varname>, <varname>lxc</varname>,
75                 <varname>lxc-libvirt</varname>,
76                 <varname>systemd-nspawn</varname>.</para>
77
78                 <para>If multiple virtualization solutions are used,
79                 only the "innermost" is detected and identified. That
80                 means if both VM virtualization and container
81                 virtualization are used in conjunction, only the latter
82                 will be identified (unless <option>--vm</option> is
83                 passed).</para>
84         </refsect1>
85
86         <refsect1>
87                 <title>Options</title>
88
89                 <para>The following options are understood:</para>
90
91                 <variablelist>
92                         <varlistentry>
93                                 <term><option>-h</option></term>
94                                 <term><option>--help</option></term>
95
96                                 <listitem><para>Prints a short help
97                                 text and exits.</para></listitem>
98                         </varlistentry>
99
100                         <varlistentry>
101                                 <term><option>--version</option></term>
102
103                                 <listitem><para>Prints a short version
104                                 string and exits.</para></listitem>
105                         </varlistentry>
106
107                         <varlistentry>
108                                 <term><option>-c</option></term>
109                                 <term><option>--container</option></term>
110
111                                 <listitem><para>Only detects container
112                                 virtualization (i.e. shared kernel
113                                 virtualization).</para></listitem>
114                         </varlistentry>
115
116                         <varlistentry>
117                                 <term><option>-v</option></term>
118                                 <term><option>--vm</option></term>
119
120                                 <listitem><para>Only detects VM
121                                 virtualization (i.e. full hardware
122                                 virtualization).</para></listitem>
123                         </varlistentry>
124
125                         <varlistentry>
126                                 <term><option>-q</option></term>
127                                 <term><option>--quiet</option></term>
128
129                                 <listitem><para>Suppress output of the
130                                 virtualization technology
131                                 identifier.</para></listitem>
132                         </varlistentry>
133
134                 </variablelist>
135
136         </refsect1>
137
138         <refsect1>
139                 <title>Exit status</title>
140
141                 <para>If a virtualization technology is detected, 0 is
142                 returned, a non-zero code otherwise.</para>
143         </refsect1>
144
145         <refsect1>
146                 <title>See Also</title>
147                 <para>
148                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
149                 </para>
150         </refsect1>
151
152 </refentry>