systemd-detect-virt.html 5.36 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<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>·
Michael Biebl's avatar
Michael Biebl committed
22
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</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="idm214176292544"></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
23 24 25 26 27 28 29 30 31 32 33
                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>,
Michael Biebl's avatar
Michael Biebl committed
34
                <code class="varname">uml</code>,
35 36
                <code class="varname">openvz</code>, <code class="varname">lxc</code>,
                <code class="varname">lxc-libvirt</code>,
Michael Biebl's avatar
Michael Biebl committed
37
                <code class="varname">systemd-nspawn</code>.</p><p>If multiple virtualization solutions are used,
38 39
                only the "innermost" is detected and identified. That
                means if both VM virtualization and container
Michael Biebl's avatar
Michael Biebl committed
40
                virtualization are used in conjunction, only the latter
41
                will be identified (unless <code class="option">--vm</code> is
Michael Biebl's avatar
Michael Biebl committed
42
                passed).</p></div><div class="refsect1"><a name="idm214180477776"></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
43 44 45 46 47
                                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
48
                                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.
Michael Biebl's avatar
Michael Biebl committed
49 50
    </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="idm214180374080"></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="idm214180372784"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
51 52
                        <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
                </p></div></div></body></html>