]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/systemd-detect-virt.xml
Merge pull request #221 from utezduyar/man-cgtop-explain-max-cpu
[thirdparty/systemd.git] / man / systemd-detect-virt.xml
CommitLineData
2c4ff634
LP
1<?xml version='1.0'?> <!--*-nxml-*-->
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
681eb9cf
FB
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4<!ENTITY % entities SYSTEM "custom-entities.ent" >
5%entities;
6]>
2c4ff634
LP
7
8<!--
9 This file is part of systemd.
10
11 Copyright 2010 Lennart Poettering
12
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
17
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25-->
26
dfdebb1b 27<refentry id="systemd-detect-virt"
798d3a52
ZJS
28 xmlns:xi="http://www.w3.org/2001/XInclude">
29
30 <refentryinfo>
31 <title>systemd-detect-virt</title>
32 <productname>systemd</productname>
33
34 <authorgroup>
35 <author>
36 <contrib>Developer</contrib>
37 <firstname>Lennart</firstname>
38 <surname>Poettering</surname>
39 <email>lennart@poettering.net</email>
40 </author>
41 </authorgroup>
42 </refentryinfo>
43
44 <refmeta>
45 <refentrytitle>systemd-detect-virt</refentrytitle>
46 <manvolnum>1</manvolnum>
47 </refmeta>
48
49 <refnamediv>
50 <refname>systemd-detect-virt</refname>
51 <refpurpose>Detect execution in a virtualized environment</refpurpose>
52 </refnamediv>
53
54 <refsynopsisdiv>
55 <cmdsynopsis>
56 <command>systemd-detect-virt <arg choice="opt" rep="repeat">OPTIONS</arg></command>
57 </cmdsynopsis>
58 </refsynopsisdiv>
59
60 <refsect1>
61 <title>Description</title>
62
63 <para><command>systemd-detect-virt</command> detects execution in
64 a virtualized environment. It identifies the virtualization
65 technology and can distinguish full VM virtualization from
66 container virtualization. <filename>systemd-detect-virt</filename>
67 exits with a return value of 0 (success) if a virtualization
68 technology is detected, and non-zero (error) otherwise. By default
69 any type of virtualization is detected, and the options
70 <option>--container</option> and <option>--vm</option> can be used
71 to limit what types of virtualization are detected.</para>
72
73 <para>When executed without <option>--quiet</option> will print a
74 short identifier for the detected virtualization technology. The
75 following technologies are currently identified:</para>
76
77 <table>
78 <title>Known virtualization technologies (both
79 VM, i.e. full hardware virtualization,
80 and container, i.e. shared kernel virtualization)</title>
81 <tgroup cols='3' align='left' colsep='1' rowsep='1'>
82 <colspec colname="type" />
83 <colspec colname="id" />
84 <colspec colname="product" />
85 <thead>
86 <row>
87 <entry>Type</entry>
88 <entry>ID</entry>
89 <entry>Product</entry>
90 </row>
91 </thead>
92 <tbody>
93 <row>
94 <entry morerows="8">VM</entry>
95 <entry><varname>qemu</varname></entry>
96 <entry>QEMU software virtualization</entry>
97 </row>
98
99 <row>
100 <entry><varname>kvm</varname></entry>
101 <entry>Linux KVM kernel virtual machine</entry>
102 </row>
103
104 <row>
105 <entry><varname>zvm</varname></entry>
106 <entry>s390 z/VM</entry>
107 </row>
108
109 <row>
110 <entry><varname>vmware</varname></entry>
111 <entry>VMware Workstation or Server, and related products</entry>
112 </row>
113
114 <row>
115 <entry><varname>microsoft</varname></entry>
116 <entry>Hyper-V, also known as Viridian or Windows Server Virtualization</entry>
117 </row>
118
119 <row>
120 <entry><varname>oracle</varname></entry>
121 <entry>Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</entry>
122 </row>
123
124 <row>
125 <entry><varname>xen</varname></entry>
126 <entry>Xen hypervisor (only domU, not dom0)</entry>
127 </row>
128
129 <row>
130 <entry><varname>bochs</varname></entry>
131 <entry>Bochs Emulator</entry>
132 </row>
133
134 <row>
135 <entry><varname>uml</varname></entry>
136 <entry>User-mode Linux</entry>
137 </row>
138
139 <row>
140 <entry morerows="5">container</entry>
141 <entry><varname>openvz</varname></entry>
142 <entry>OpenVZ/Virtuozzo</entry>
143 </row>
144
145 <row>
146 <entry><varname>lxc</varname></entry>
147 <entry>Linux container implementation by LXC</entry>
148 </row>
149
150 <row>
151 <entry><varname>lxc-libvirt</varname></entry>
152 <entry>Linux container implementation by libvirt</entry>
153 </row>
154
155 <row>
156 <entry><varname>systemd-nspawn</varname></entry>
157 <entry>systemd's minimal container implementation, see <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></entry>
158 </row>
159
160 <row>
161 <entry><varname>docker</varname></entry>
162 <entry>Docker container manager</entry>
163 </row>
164 </tbody>
165 </tgroup>
166 </table>
167
168 <para>If multiple virtualization solutions are used, only the
169 "innermost" is detected and identified. That means if both VM
170 virtualization and container virtualization are used in
171 conjunction, only the latter will be identified (unless
172 <option>--vm</option> is passed).</para>
173 </refsect1>
174
175 <refsect1>
176 <title>Options</title>
177
178 <para>The following options are understood:</para>
179
180 <variablelist>
181 <varlistentry>
182 <term><option>-c</option></term>
183 <term><option>--container</option></term>
184
185 <listitem><para>Only detects container virtualization (i.e.
186 shared kernel 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 virtualization (i.e. full
194 hardware virtualization).</para></listitem>
195 </varlistentry>
196
197 <varlistentry>
198 <term><option>-q</option></term>
199 <term><option>--quiet</option></term>
200
201 <listitem><para>Suppress output of the virtualization
202 technology identifier.</para></listitem>
203 </varlistentry>
204
205 <xi:include href="standard-options.xml" xpointer="help" />
206 <xi:include href="standard-options.xml" xpointer="version" />
207 </variablelist>
208
209 </refsect1>
210
211 <refsect1>
212 <title>Exit status</title>
213
214 <para>If a virtualization technology is detected, 0 is returned, a
215 non-zero code otherwise.</para>
216 </refsect1>
217
218 <refsect1>
219 <title>See Also</title>
220 <para>
221 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
222 <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>
223 </para>
224 </refsect1>
2c4ff634
LP
225
226</refentry>