systemd/man/systemd-detect-virt.html
2015-02-17 11:22:16 +01:00

49 lines
7.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-detect-virt</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
visibility: visible;
}
</style><a href="index.html">Index </a>·
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="systemd-detect-virt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-detect-virt — Detect execution in a virtualized environment</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">systemd-detect-virt [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm139691031994560"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>systemd-detect-virt</strong></span> detects execution in
a virtualized environment. It identifies the virtualization
technology and can distinguish full VM virtualization from
container virtualization. <code class="filename">systemd-detect-virt</code>
exits with a return value of 0 (success) if a virtualization
technology is detected, and non-zero (error) otherwise. By default
any type of virtualization is detected, and the options
<code class="option">--container</code> and <code class="option">--vm</code> can be used
to limit what types of virtualization are detected.</p><p>When executed without <code class="option">--quiet</code> will print a
short identifier for the detected virtualization technology. The
following technologies are currently identified:</p><div class="table"><a name="idm139691031990000"></a><p class="title"><b>Table 1. Known virtualization technologies (both
VM, i.e. full hardware virtualization,
and container, i.e. shared kernel virtualization)</b></p><div class="table-contents"><table summary="Known virtualization technologies (both
VM, i.e. full hardware virtualization,
and container, i.e. shared kernel virtualization)" border="1"><colgroup><col align="left" class="type"><col align="left" class="id"><col align="left" class="product"></colgroup><thead><tr><th align="left">Type</th><th align="left">ID</th><th align="left">Product</th></tr></thead><tbody><tr><td rowspan="9" align="left">VM</td><td align="left"><code class="varname">qemu</code></td><td align="left">QEMU software virtualization</td></tr><tr><td align="left"><code class="varname">kvm</code></td><td align="left">Linux KVM kernel virtual machine</td></tr><tr><td align="left"><code class="varname">zvm</code></td><td align="left">s390 z/VM</td></tr><tr><td align="left"><code class="varname">vmware</code></td><td align="left">VMware Workstation or Server, and related products</td></tr><tr><td align="left"><code class="varname">microsoft</code></td><td align="left">Hyper-V, also known as Viridian or Windows Server Virtualization</td></tr><tr><td align="left"><code class="varname">oracle</code></td><td align="left">Oracle VM VirtualBox (historically marketed by innotek and Sun Microsystems)</td></tr><tr><td align="left"><code class="varname">xen</code></td><td align="left">Xen hypervisor (only domU, not dom0)</td></tr><tr><td align="left"><code class="varname">bochs</code></td><td align="left">Bochs Emulator</td></tr><tr><td align="left"><code class="varname">uml</code></td><td align="left">User-mode Linux</td></tr><tr><td rowspan="6" align="left">container</td><td align="left"><code class="varname">openvz</code></td><td align="left">OpenVZ/Virtuozzo</td></tr><tr><td align="left"><code class="varname">lxc</code></td><td align="left">Linux container implementation by LXC</td></tr><tr><td align="left"><code class="varname">lxc-libvirt</code></td><td align="left">Linux container implementation by libvirt</td></tr><tr><td align="left"><code class="varname">systemd-nspawn</code></td><td align="left">systemd's minimal container implementation, see <a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a></td></tr><tr><td align="left"><code class="varname">docker</code></td><td align="left">Docker container manager</td></tr></tbody></table></div></div><br class="table-break"><p>If multiple virtualization solutions are used, only the
"innermost" is detected and identified. That means if both VM
virtualization and container virtualization are used in
conjunction, only the latter will be identified (unless
<code class="option">--vm</code> is passed).</p></div><div class="refsect1"><a name="idm139691035904992"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-c"><span class="term"><code class="option">-c</code>, </span><span class="term"><code class="option">--container</code></span><a class="headerlink" title="Permalink to this term" href="#-c"></a></dt><dd><p>Only detects container virtualization (i.e.
shared kernel virtualization).</p></dd><dt id="-v"><span class="term"><code class="option">-v</code>, </span><span class="term"><code class="option">--vm</code></span><a class="headerlink" title="Permalink to this term" href="#-v"></a></dt><dd><p>Only detects VM virtualization (i.e. full
hardware virtualization).</p></dd><dt id="-q"><span class="term"><code class="option">-q</code>, </span><span class="term"><code class="option">--quiet</code></span><a class="headerlink" title="Permalink to this term" href="#-q"></a></dt><dd><p>Suppress output of the virtualization
technology identifier.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm139691035895648"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>If a virtualization technology is detected, 0 is returned, a
non-zero code otherwise.</p></div><div class="refsect1"><a name="idm139691035894352"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd-nspawn.html"><span class="citerefentry"><span class="refentrytitle">systemd-nspawn</span>(1)</span></a>
</p></div></div></body></html>