chiark / gitweb /
man: include zVM in systemd-detect-virt list
[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 (i.e. full hardware virtualization)</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
88                       <row>
89                         <entry><varname>kvm</varname></entry>
90                         <entry>Linux KVM kernel virtual machine</entry>
91                       </row>
92
93                       <row>
94                         <entry><varname>zvm</varname></entry>
95                         <entry>s390 z/VM</entry>
96                       </row>
97
98                       <row>
99                         <entry><varname>vmware</varname></entry>
100                         <entry>VMware Workstation or Server, and related products</entry>
101                       </row>
102
103                       <row>
104                         <entry><varname>microsoft</varname></entry>
105                         <entry>Hyper-V, also known as Viridian or Windows Server Virtualization</entry>
106                       </row>
107
108                       <row>
109                         <entry><varname>oracle</varname></entry>
110                         <entry>Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</entry>
111                       </row>
112
113                       <row>
114                         <entry><varname>xen</varname></entry>
115                         <entry>Xen hypervisor (only domU, not dom0)</entry>
116                       </row>
117
118                       <row>
119                         <entry><varname>bochs</varname></entry>
120                         <entry>Bochs Emulator</entry>
121                       </row>
122
123                       <row>
124                         <entry><varname>uml</varname></entry>
125                         <entry>User-mode Linux</entry>
126                       </row>
127
128                     </tbody>
129                   </tgroup>
130                 </table>
131
132                 <table>
133                   <title>Known container virtualization technologies (i.e. shared kernel virtualization)</title>
134                   <tgroup cols='2' align='left' colsep='1' rowsep='1'>
135                     <colspec colname="id" />
136                     <colspec colname="product" />
137                     <thead>
138                       <row>
139                         <entry>ID</entry>
140                         <entry>Container Product</entry>
141                       </row>
142                     </thead>
143                     <tbody>
144                       <row>
145                         <entry><varname>openvz</varname></entry>
146                         <entry>OpenVZ/Virtuozzo</entry>
147                       </row>
148
149                       <row>
150                         <entry><varname>lxc</varname></entry>
151                         <entry>Linux container implementation by LXC</entry>
152                       </row>
153
154                       <row>
155                         <entry><varname>lxc-libvirt</varname></entry>
156                         <entry>Linux container implementation by libvirt</entry>
157                       </row>
158
159                       <row>
160                          <entry><varname>systemd-nspawn</varname></entry>
161                          <entry>systemd's minimal container implementation, see <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></entry>
162                       </row>
163
164                       <row>
165                         <entry><varname>docker</varname></entry>
166                         <entry>Docker container manager</entry>
167                       </row>
168                     </tbody>
169                   </tgroup>
170                 </table>
171
172                 <para>If multiple virtualization solutions are used,
173                 only the "innermost" is detected and identified. That
174                 means if both VM virtualization and container
175                 virtualization are used in conjunction, only the latter
176                 will be identified (unless <option>--vm</option> is
177                 passed).</para>
178         </refsect1>
179
180         <refsect1>
181                 <title>Options</title>
182
183                 <para>The following options are understood:</para>
184
185                 <variablelist>
186                         <varlistentry>
187                                 <term><option>-c</option></term>
188                                 <term><option>--container</option></term>
189
190                                 <listitem><para>Only detects container
191                                 virtualization (i.e. shared kernel
192                                 virtualization).</para></listitem>
193                         </varlistentry>
194
195                         <varlistentry>
196                                 <term><option>-v</option></term>
197                                 <term><option>--vm</option></term>
198
199                                 <listitem><para>Only detects VM
200                                 virtualization (i.e. full hardware
201                                 virtualization).</para></listitem>
202                         </varlistentry>
203
204                         <varlistentry>
205                                 <term><option>-q</option></term>
206                                 <term><option>--quiet</option></term>
207
208                                 <listitem><para>Suppress output of the
209                                 virtualization technology
210                                 identifier.</para></listitem>
211                         </varlistentry>
212
213                         <xi:include href="standard-options.xml" xpointer="help" />
214                         <xi:include href="standard-options.xml" xpointer="version" />
215                 </variablelist>
216
217         </refsect1>
218
219         <refsect1>
220                 <title>Exit status</title>
221
222                 <para>If a virtualization technology is detected, 0 is
223                 returned, a non-zero code otherwise.</para>
224         </refsect1>
225
226         <refsect1>
227                 <title>See Also</title>
228                 <para>
229                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
230                         <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>
231                 </para>
232         </refsect1>
233
234 </refentry>