systemd/man/systemd-detect-virt.html
2014-04-26 10:08:46 +02:00

53 lines
5.3 KiB
HTML

<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 204</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="idm259798803792"></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.</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: <code class="varname">qemu</code>,
<code class="varname">kvm</code>, <code class="varname">vmware</code>,
<code class="varname">microsoft</code>,
<code class="varname">oracle</code>, <code class="varname">xen</code>,
<code class="varname">bochs</code>, <code class="varname">chroot</code>,
<code class="varname">openvz</code>, <code class="varname">lxc</code>,
<code class="varname">lxc-libvirt</code>,
<code class="varname">systemd-nspawn</code>.</p><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="idm259798722624"></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="-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>Prints a short help
text and exits.</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>Prints a short version
string and exits.</p></dd><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></dl></div></div><div class="refsect1"><a name="idm259798859232"></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="idm259798857936"></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>
</p></div></div></body></html>