Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 0a67499d76b7ed32632abafb78e24a2f > files > 69

libvirt-docs-5.5.0-1.3.mga7.armv7hl.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <!--
        This file is autogenerated from auditlog.html.in
        Do not edit this file. Changes will be lost.
      -->
  <!--
        This page was generated at Tue Jul  2 19:50:20 UTC 2019.
      -->
  <head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <link rel="stylesheet" type="text/css" href="main.css"/>
    <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"/>
    <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/>
    <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/>
    <link rel="manifest" href="/manifest.json"/>
    <meta name="theme-color" content="#ffffff"/>
    <title>libvirt: Audit log</title>
    <meta name="description" content="libvirt, virtualization, virtualization API"/>
    <script type="text/javascript" src="js/main.js">
      <!--// forces non-empty element-->
    </script>
  </head>
  <body onload="pageload()">
    <div id="body">
      <div id="content">
        <h1>Audit log</h1>
        <ul>
          <li>
            <a href="#intro">Introduction</a>
          </li>
          <li>
            <a href="#config">Configuration</a>
          </li>
          <li>
            <a href="#types">Message types</a>
            <ul>
              <li>
                <a href="#typecontrol">VIRT_CONTROL</a>
              </li>
              <li>
                <a href="#typemachine">VIRT_MACHINE_ID</a>
              </li>
              <li>
                <a href="#typeresource">VIRT_RESOURCE</a>
                <ul>
                  <li>
                    <a href="#typeresourcevcpu">Virtual CPU</a>
                  </li>
                  <li>
                    <a href="#typeresourcemem">Memory</a>
                  </li>
                  <li>
                    <a href="#typeresourcedisk">Disk</a>
                  </li>
                  <li>
                    <a href="#typeresourcenic">Network interface</a>
                  </li>
                  <li>
                    <a href="#typeresourcefs">Filesystem</a>
                  </li>
                  <li>
                    <a href="#typeresourcehost">Host device</a>
                  </li>
                  <li>
                    <a href="#typeresourcetpm">TPM</a>
                  </li>
                  <li>
                    <a href="#typeresourcerng">RNG</a>
                  </li>
                  <li>
                    <a href="#typeresourcechardev">console/serial/parallel/channel</a>
                  </li>
                  <li>
                    <a href="#typeresourcesmartcard">smartcard</a>
                  </li>
                  <li>
                    <a href="#typeresourceredir">Redirected device</a>
                  </li>
                  <li>
                    <a href="#typeresourcecgroup">Control group</a>
                  </li>
                  <li>
                    <a href="#typeresourceshmem">Shared memory</a>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
        </ul>
        <h2>
          <a id="intro">Introduction</a>
          <a class="headerlink" href="#intro" title="Permalink to this headline">¶</a>
        </h2>
        <p>
      A number of the libvirt virtualization drivers (QEMU/KVM and LXC) include
      support for logging details of important operations to the host's audit
      subsystem. This provides administrators / auditors with a canonical historical
      record of changes to virtual machines' / containers' lifecycle states and
      their configuration. On hosts which are running the Linux audit daemon,
      the logs will usually end up in <code>/var/log/audit/audit.log</code>
    </p>
        <h2>
          <a id="config">Configuration</a>
          <a class="headerlink" href="#config" title="Permalink to this headline">¶</a>
        </h2>
        <p>
      The libvirt audit integration is enabled by default on any host which has
      the Linux audit subsystem active, and disabled otherwise. It is possible
      to alter this behaviour in the <code>/etc/libvirt/libvirtd.conf</code>
      configuration file, via the <code>audit_level</code> parameter
    </p>
        <ul>
          <li><code>audit_level=0</code> - libvirt auditing is disabled regardless
        of host audit subsystem enablement.</li>
          <li><code>audit_level=1</code> - libvirt auditing is enabled if the host
        audit subsystem is enabled, otherwise it is disabled. This is the
        default behaviour.</li>
          <li><code>audit_level=2</code> - libvirt auditing is enabled regardless
        of host audit subsystem enablement. If the host audit subsystem is
        disabled, then libvirtd will refuse to complete startup and exit with
        an error.</li>
        </ul>
        <p>
      In addition to have formal messages sent to the audit subsystem it is
      possible to tell libvirt to inject messages into its own logging
      layer. This will result in messages ending up in the systemd journal
      or <code>/var/log/libvirt/libivrtd.log</code> on non-systemd hosts.
      This is disabled by default, but can be requested by setting the
      <code>audit_logging=1</code> configuration parameter in the same file
      mentioned above.
    </p>
        <h2>
          <a id="types">Message types</a>
          <a class="headerlink" href="#types" title="Permalink to this headline">¶</a>
        </h2>
        <p>
      Libvirt defines three core audit message types each of which will
      be described below. There are a number of common fields that will
      be reported for all message types.
    </p>
        <dl>
          <dt>
            <code>pid</code>
          </dt>
          <dd>Process ID of the libvirtd daemon generating the audit record.</dd>
          <dt>
            <code>uid</code>
          </dt>
          <dd>User ID of the libvirtd daemon process generating the audit record.</dd>
          <dt>
            <code>subj</code>
          </dt>
          <dd>Security context of the libvirtd daemon process generating the audit record.</dd>
          <dt>
            <code>msg</code>
          </dt>
          <dd>String containing a list of key=value pairs specific to the type of audit record being reported.</dd>
        </dl>
        <p>
      Some fields in the <code>msg</code> string are common to audit records
    </p>
        <dl>
          <dt>
            <code>virt</code>
          </dt>
          <dd>Type of virtualization driver used. One of <code>qemu</code> or <code>lxc</code></dd>
          <dt>
            <code>vm</code>
          </dt>
          <dd>Host driver unique name of the guest</dd>
          <dt>
            <code>uuid</code>
          </dt>
          <dd>Globally unique identifier for the guest</dd>
          <dt>
            <code>exe</code>
          </dt>
          <dd>Path of the libvirtd daemon</dd>
          <dt>
            <code>hostname</code>
          </dt>
          <dd>Currently unused</dd>
          <dt>
            <code>addr</code>
          </dt>
          <dd>Currently unused</dd>
          <dt>
            <code>terminal</code>
          </dt>
          <dd>Currently unused</dd>
          <dt>
            <code>res</code>
          </dt>
          <dd>Result of the action, either <code>success</code> or <code>failed</code></dd>
        </dl>
        <h3>
          <a id="typecontrol">VIRT_CONTROL</a>
          <a class="headerlink" href="#typecontrol" title="Permalink to this headline">¶</a>
        </h3>
        <p>
      Reports change in the lifecycle state of a virtual machine. The <code>msg</code>
      field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>op</code>
          </dt>
          <dd>Type of operation performed. One of <code>start</code>, <code>stop</code> or <code>init</code></dd>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the operation to happen</dd>
          <dt>
            <code>vm-pid</code>
          </dt>
          <dd>ID of the primary/leading process associated with the guest</dd>
          <dt>
            <code>init-pid</code>
          </dt>
          <dd>ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
          <dt>
            <code>pid-ns</code>
          </dt>
          <dd>Namespace ID of the <code>init</code> process in a container. Only if <code>op=init</code> and <code>virt=lxc</code></dd>
        </dl>
        <h3>
          <a id="typemachine">VIRT_MACHINE_ID</a>
          <a class="headerlink" href="#typemachine" title="Permalink to this headline">¶</a>
        </h3>
        <p>
      Reports the association of a security context with a guest. The <code>msg</code>
      field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>model</code>
          </dt>
          <dd>The security driver type. One of <code>selinux</code> or <code>apparmor</code></dd>
          <dt>
            <code>vm-ctx</code>
          </dt>
          <dd>Security context for the guest process</dd>
          <dt>
            <code>img-ctx</code>
          </dt>
          <dd>Security context for the guest disk images and other assigned host resources</dd>
        </dl>
        <h3>
          <a id="typeresource">VIRT_RESOURCE</a>
          <a class="headerlink" href="#typeresource" title="Permalink to this headline">¶</a>
        </h3>
        <p>
      Reports the usage of a host resource by a guest. The fields include will
      vary according to the type of device being reported. When the guest is
      initially booted records will be generated for all assigned resources.
      If any changes are made to the running guest configuration, for example
      hotplug devices, or adjust resources allocation, further records will
      be generated.
    </p>
        <h4>
          <a id="typeresourcevcpu">Virtual CPU</a>
          <a class="headerlink" href="#typeresourcevcpu" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>vcpu</code></dd>
          <dt>
            <code>old-vcpu</code>
          </dt>
          <dd>Original vCPU count, or 0</dd>
          <dt>
            <code>new-vcpu</code>
          </dt>
          <dd>Updated vCPU count</dd>
        </dl>
        <h4>
          <a id="typeresourcemem">Memory</a>
          <a class="headerlink" href="#typeresourcemem" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>mem</code></dd>
          <dt>
            <code>old-mem</code>
          </dt>
          <dd>Original memory size in bytes, or 0</dd>
          <dt>
            <code>new-mem</code>
          </dt>
          <dd>Updated memory size in bytes</dd>
        </dl>
        <h4>
          <a id="typeresourcedisk">Disk</a>
          <a class="headerlink" href="#typeresourcedisk" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>disk</code></dd>
          <dt>
            <code>old-disk</code>
          </dt>
          <dd>Original host file or device path acting as the disk backing file</dd>
          <dt>
            <code>new-disk</code>
          </dt>
          <dd>Updated host file or device path acting as the disk backing file</dd>
        </dl>
        <h4>
          <a id="typeresourcenic">Network interface</a>
          <a class="headerlink" href="#typeresourcenic" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>net</code></dd>
          <dt>
            <code>old-net</code>
          </dt>
          <dd>Original MAC address of the guest network interface</dd>
          <dt>
            <code>new-net</code>
          </dt>
          <dd>Updated MAC address of the guest network interface</dd>
        </dl>
        <p>
      If there is a host network interface associated with the guest NIC then
      further records may be generated
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>net</code></dd>
          <dt>
            <code>net</code>
          </dt>
          <dd>MAC address of the host network interface</dd>
          <dt>
            <code>rdev</code>
          </dt>
          <dd>Name of the host network interface</dd>
        </dl>
        <h4>
          <a id="typeresourcefs">Filesystem</a>
          <a class="headerlink" href="#typeresourcefs" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>fs</code></dd>
          <dt>
            <code>old-fs</code>
          </dt>
          <dd>Original host directory, file or device path backing the filesystem </dd>
          <dt>
            <code>new-fs</code>
          </dt>
          <dd>Updated host directory, file or device path backing the filesystem</dd>
        </dl>
        <h4>
          <a id="typeresourcehost">Host device</a>
          <a class="headerlink" href="#typeresourcehost" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>hostdev</code> or <code>dev</code></dd>
          <dt>
            <code>dev</code>
          </dt>
          <dd>The unique bus identifier of the USB, PCI or SCSI device, if <code>resrc=dev</code></dd>
          <dt>
            <code>disk</code>
          </dt>
          <dd>The path of the block device assigned to the guest, if <code>resrc=hostdev</code></dd>
          <dt>
            <code>chardev</code>
          </dt>
          <dd>The path of the character device assigned to the guest, if <code>resrc=hostdev</code></dd>
        </dl>
        <h4>
          <a id="typeresourcetpm">TPM</a>
          <a class="headerlink" href="#typeresourcetpm" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>tpm</code> or <code>tpm-emulator</code></dd>
          <dt>
            <code>device</code>
          </dt>
          <dd>The path of the host TPM device assigned to the guest</dd>
        </dl>
        <h4>
          <a id="typeresourcerng">RNG</a>
          <a class="headerlink" href="#typeresourcerng" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>rng</code></dd>
          <dt>
            <code>old-rng</code>
          </dt>
          <dd>Original path of the host entropy source for the RNG</dd>
          <dt>
            <code>new-rng</code>
          </dt>
          <dd>Updated path of the host entropy source for the RNG</dd>
        </dl>
        <h4>
          <a id="typeresourcechardev">console/serial/parallel/channel</a>
          <a class="headerlink" href="#typeresourcechardev" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>chardev</code></dd>
          <dt>
            <code>old-chardev</code>
          </dt>
          <dd>Original path of the backing character device for given emulated device</dd>
          <dt>
            <code>new-chardev</code>
          </dt>
          <dd>Updated path of the backing character device for given emulated device</dd>
        </dl>
        <h4>
          <a id="typeresourcesmartcard">smartcard</a>
          <a class="headerlink" href="#typeresourcesmartcard" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>smartcard</code></dd>
          <dt>
            <code>old-smartcard</code>
          </dt>
          <dd>Original path of the backing character device, certificate store or
          "nss-smartcard-device" for host smartcard passthrough.
      </dd>
          <dt>
            <code>new-smartcard</code>
          </dt>
          <dd>Updated path of the backing character device, certificate store or
          "nss-smartcard-device" for host smartcard passthrough.
      </dd>
        </dl>
        <h4>
          <a id="typeresourceredir">Redirected device</a>
          <a class="headerlink" href="#typeresourceredir" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>redir</code></dd>
          <dt>
            <code>bus</code>
          </dt>
          <dd>The bus type, only <code>usb</code> allowed</dd>
          <dt>
            <code>device</code>
          </dt>
          <dd>The device type, only <code>USB redir</code> allowed</dd>
        </dl>
        <h4>
          <a id="typeresourcecgroup">Control group</a>
          <a class="headerlink" href="#typeresourcecgroup" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>cgroup</code></dd>
          <dt>
            <code>cgroup</code>
          </dt>
          <dd>The name of the cgroup controller</dd>
        </dl>
        <h4>
          <a id="typeresourceshmem">Shared memory</a>
          <a class="headerlink" href="#typeresourceshmem" title="Permalink to this headline">¶</a>
        </h4>
        <p>
      The <code>msg</code> field will include the following sub-fields
    </p>
        <dl>
          <dt>
            <code>resrc</code>
          </dt>
          <dd>The type of resource assigned. Set to <code>shmem</code></dd>
          <dt>
            <code>reason</code>
          </dt>
          <dd>The reason which caused the resource to be assigned to happen</dd>
          <dt>
            <code>size</code>
          </dt>
          <dd>The size of the shared memory region</dd>
          <dt>
            <code>shmem</code>
          </dt>
          <dd>Name of the shared memory region</dd>
          <dt>
            <code>source</code>
          </dt>
          <dd>Path of the backing character device for given emulated device</dd>
        </dl>
      </div>
    </div>
    <div id="nav">
      <div id="home">
        <a href="index.html">Home</a>
      </div>
      <div id="jumplinks">
        <ul>
          <li>
            <a href="downloads.html">Download</a>
          </li>
          <li>
            <a href="contribute.html">Contribute</a>
          </li>
          <li>
            <a href="docs.html">Docs</a>
          </li>
        </ul>
      </div>
      <div id="search">
        <form id="simplesearch" action="https://www.google.com/search" enctype="application/x-www-form-urlencoded" method="get">
          <div>
            <input id="searchsite" name="sitesearch" type="hidden" value="libvirt.org"/>
            <input id="searchq" name="q" type="text" size="12" value=""/>
            <input name="submit" type="submit" value="Go"/>
          </div>
        </form>
        <div id="advancedsearch">
          <span>
            <input type="radio" name="what" id="whatwebsite" checked="checked" value="website"/>
            <label for="whatwebsite">Website</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatwiki" value="wiki"/>
            <label for="whatwiki">Wiki</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatdevs" value="devs"/>
            <label for="whatdevs">Developers list</label>
          </span>
          <span>
            <input type="radio" name="what" id="whatusers" value="users"/>
            <label for="whatusers">Users list</label>
          </span>
        </div>
      </div>
    </div>
    <div id="footer">
      <div id="contact">
        <h3>Contact</h3>
        <ul>
          <li>
            <a href="contact.html#email">email</a>
          </li>
          <li>
            <a href="contact.html#irc">irc</a>
          </li>
        </ul>
      </div>
      <div id="community">
        <h3>Community</h3>
        <ul>
          <li>
            <a href="https://twitter.com/hashtag/libvirt">twitter</a>
          </li>
          <li>
            <a href="http://stackoverflow.com/questions/tagged/libvirt">stackoverflow</a>
          </li>
          <li>
            <a href="http://serverfault.com/questions/tagged/libvirt">serverfault</a>
          </li>
        </ul>
      </div>
      <div id="conduct">
            Participants in the libvirt project agree to abide by <a href="governance.html#codeofconduct">the project code of conduct</a></div>
      <br class="clear"/>
    </div>
  </body>
</html>