chiark / gitweb /
man: rework VM/container identifier list into a table, and include descriptions for...
[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           xmlns:xi="http://www.w3.org/2001/XInclude">
26
27         <refentryinfo>
28                 <title>systemd-detect-virt</title>
29                 <productname>systemd</productname>
30
31                 <authorgroup>
32                         <author>
33                                 <contrib>Developer</contrib>
34                                 <firstname>Lennart</firstname>
35                                 <surname>Poettering</surname>
36                                 <email>lennart@poettering.net</email>
37                         </author>
38                 </authorgroup>
39         </refentryinfo>
40
41         <refmeta>
42                 <refentrytitle>systemd-detect-virt</refentrytitle>
43                 <manvolnum>1</manvolnum>
44         </refmeta>
45
46         <refnamediv>
47                 <refname>systemd-detect-virt</refname>
48                 <refpurpose>Detect execution in a virtualized environment</refpurpose>
49         </refnamediv>
50
51         <refsynopsisdiv>
52                 <cmdsynopsis>
53                         <command>systemd-detect-virt <arg choice="opt" rep="repeat">OPTIONS</arg></command>
54                 </cmdsynopsis>
55         </refsynopsisdiv>
56
57         <refsect1>
58                 <title>Description</title>
59
60                 <para><command>systemd-detect-virt</command> detects
61                 execution in a virtualized environment. It identifies
62                 the virtualization technology and can distinguish full
63                 VM virtualization from container
64                 virtualization.</para>
65
66                 <para>When executed without <option>--quiet</option>
67                 will print a short identifier for the detected
68                 virtualization technology. The following technologies
69                 are currently identified:</para>
70
71                 <table>
72                   <title>Known VM virtualization technologies</title>
73                   <tgroup cols='2' align='left' colsep='1' rowsep='1'>
74                     <colspec colname="id" />
75                     <colspec colname="product" />
76                     <thead>
77                       <row>
78                         <entry>ID</entry>
79                         <entry>VM Product</entry>
80                       </row>
81                     </thead>
82                     <tbody>
83                       <row>
84                         <entry><varname>qemu</varname></entry>
85                         <entry>QEMU software virtualization</entry>
86                       </row>
87                       <row>
88                         <entry><varname>kvm</varname></entry>
89                         <entry>Linux KVM kernel virtual machine</entry>
90                       </row>
91
92                       <row>
93                         <entry><varname>vmware</varname></entry>
94                         <entry>VMware Workstation or Server, and related products</entry>
95                       </row>
96
97                       <row>
98                         <entry><varname>microsoft</varname></entry>
99                         <entry>Hyper-V, also known as Viridian or Windows Server Virtualization</entry>
100                       </row>
101
102                       <row>
103                         <entry><varname>oracle</varname></entry>
104                         <entry>Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</entry>
105                       </row>
106
107                       <row>
108                         <entry><varname>xen</varname></entry>
109                         <entry>Xen hypervisor</entry>
110                       </row>
111
112                       <row>
113                         <entry><varname>bochs</varname></entry>
114                         <entry>Bochs Emulator</entry>
115                       </row>
116
117                       <row>
118                         <entry><varname>uml</varname></entry>
119                         <entry>User-mode Linux</entry>
120                       </row>
121
122                     </tbody>
123                   </tgroup>
124                 </table>
125
126                 <table>
127                   <title>Known container virtualization technologies</title>
128                   <tgroup cols='2' align='left' colsep='1' rowsep='1'>
129                     <colspec colname="id" />
130                     <colspec colname="product" />
131                     <thead>
132                       <row>
133                         <entry>ID</entry>
134                         <entry>Container Product</entry>
135                       </row>
136                     </thead>
137                     <tbody>
138                       <row>
139                         <entry><varname>openvz</varname></entry>
140                         <entry>OpenVZ/Virtuozzo</entry>
141                       </row>
142
143                       <row>
144                         <entry><varname>lxc</varname></entry>
145                         <entry>Linux container implementation by LXC</entry>
146                       </row>
147
148                       <row>
149                         <entry><varname>lxc-libvirt</varname></entry>
150                         <entry>Linux container implementation by libvirt</entry>
151                       </row>
152
153                       <row>
154                          <entry><varname>systemd-nspawn</varname></entry>
155                          <entry>systemd's minimal container implementation, see <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></entry>
156                       </row>
157
158                       <row>
159                         <entry><varname>docker</varname></entry>
160                         <entry>Docker container manager</entry>
161                       </row>
162                     </tbody>
163                   </tgroup>
164                 </table>
165
166                 <para>If multiple virtualization solutions are used,
167                 only the "innermost" is detected and identified. That
168                 means if both VM virtualization and container
169                 virtualization are used in conjunction, only the latter
170                 will be identified (unless <option>--vm</option> is
171                 passed).</para>
172         </refsect1>
173
174         <refsect1>
175                 <title>Options</title>
176
177                 <para>The following options are understood:</para>
178
179                 <variablelist>
180                         <varlistentry>
181                                 <term><option>-c</option></term>
182                                 <term><option>--container</option></term>
183
184                                 <listitem><para>Only detects container
185                                 virtualization (i.e. shared kernel
186                                 virtualization).</para></listitem>
187                         </varlistentry>
188
189                         <varlistentry>
190                                 <term><option>-v</option></term>
191                                 <term><option>--vm</option></term>
192
193                                 <listitem><para>Only detects VM
194                                 virtualization (i.e. full hardware
195                                 virtualization).</para></listitem>
196                         </varlistentry>
197
198                         <varlistentry>
199                                 <term><option>-q</option></term>
200                                 <term><option>--quiet</option></term>
201
202                                 <listitem><para>Suppress output of the
203                                 virtualization technology
204                                 identifier.</para></listitem>
205                         </varlistentry>
206
207                         <xi:include href="standard-options.xml" xpointer="help" />
208                         <xi:include href="standard-options.xml" xpointer="version" />
209                 </variablelist>
210
211         </refsect1>
212
213         <refsect1>
214                 <title>Exit status</title>
215
216                 <para>If a virtualization technology is detected, 0 is
217                 returned, a non-zero code otherwise.</para>
218         </refsect1>
219
220         <refsect1>
221                 <title>See Also</title>
222                 <para>
223                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
224                         <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>
225                 </para>
226         </refsect1>
227
228 </refentry>