chiark / gitweb /
man: xinclude --help/--version/--no-pager
[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: <varname>qemu</varname>,
70                 <varname>kvm</varname>, <varname>vmware</varname>,
71                 <varname>microsoft</varname>,
72                 <varname>oracle</varname>, <varname>xen</varname>,
73                 <varname>bochs</varname>, <varname>chroot</varname>,
74                 <varname>uml</varname>,
75                 <varname>openvz</varname>, <varname>lxc</varname>,
76                 <varname>lxc-libvirt</varname>,
77                 <varname>systemd-nspawn</varname>.</para>
78
79                 <para>If multiple virtualization solutions are used,
80                 only the "innermost" is detected and identified. That
81                 means if both VM virtualization and container
82                 virtualization are used in conjunction, only the latter
83                 will be identified (unless <option>--vm</option> is
84                 passed).</para>
85         </refsect1>
86
87         <refsect1>
88                 <title>Options</title>
89
90                 <para>The following options are understood:</para>
91
92                 <variablelist>
93                         <varlistentry>
94                                 <term><option>-c</option></term>
95                                 <term><option>--container</option></term>
96
97                                 <listitem><para>Only detects container
98                                 virtualization (i.e. shared kernel
99                                 virtualization).</para></listitem>
100                         </varlistentry>
101
102                         <varlistentry>
103                                 <term><option>-v</option></term>
104                                 <term><option>--vm</option></term>
105
106                                 <listitem><para>Only detects VM
107                                 virtualization (i.e. full hardware
108                                 virtualization).</para></listitem>
109                         </varlistentry>
110
111                         <varlistentry>
112                                 <term><option>-q</option></term>
113                                 <term><option>--quiet</option></term>
114
115                                 <listitem><para>Suppress output of the
116                                 virtualization technology
117                                 identifier.</para></listitem>
118                         </varlistentry>
119
120                         <xi:include href="standard-options.xml" xpointer="help" />
121                         <xi:include href="standard-options.xml" xpointer="version" />
122                 </variablelist>
123
124         </refsect1>
125
126         <refsect1>
127                 <title>Exit status</title>
128
129                 <para>If a virtualization technology is detected, 0 is
130                 returned, a non-zero code otherwise.</para>
131         </refsect1>
132
133         <refsect1>
134                 <title>See Also</title>
135                 <para>
136                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
137                 </para>
138         </refsect1>
139
140 </refentry>