<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
        "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<chapter id="feature-virtualmachines">
    <title>Virtual Machines</title>

    <para>Cockpit can manage virtual machines running on the host.
        These can be accessed from menu via <emphasis>Virtual Machines</emphasis></para>

    <para>Primary datasource is <ulink url="https://www.qemu.org/">QEMU</ulink> / <ulink url="https://libvirt.org/">Libvirt</ulink>,
        access to Libvirtd is wrapped either by the <ulink url="https://libvirt.org/virshcmdref.html">virsh</ulink> tool or
        <ulink url="https://libvirt.org/dbus.html">libvirt D-Bus API bindings</ulink>, depending if the latter is installed on
        the system. If libvirt-dbus package is not available in your distribution's software repositories you can follow the instructions
        <ulink url="https://github.com/libvirt/libvirt-dbus/blob/master/README.md">here</ulink> to install from sources.
    </para>

    <section id="feature-virtualmachines-nestedvirtualization">
    <title>Nested Virtualization</title>
    <para>
        In order to run <emphasis>cockpit-machines</emphasis> plugin inside a virtual machine
        or run the tests for this component, you'll need nested KVM virtualization enabled
        (refer <code>test/verify/nested-kvm</code> or
        <ulink url="https://fedoraproject.org/wiki/How_to_enable_nested_virtualization_in_KVM">
            How to enable nested virtualization in KVM</ulink> to get more information).
    </para>
    </section>

    <section id="feature-virtualmachines-systemaccess">
    <title>Managing VMs on system connection</title>
    <para>
        In order to manipulate as unprivileged user VMs on system connection through
        <emphasis>cockpit-machines</emphasis> plugin using libvirt D-Bus provider you need to follow
        the intructions specified <ulink url="https://libvirt.org/dbus.html#usage">here</ulink>.
    </para>
    </section>

    <section id="feature-virtualmachines-extending">
        <title>Extensions</title>
        <para>
            Base package <emphasis>cockpit-machines</emphasis> for management of virtual machines is based on Libvirt.
        </para>
        <para>
            New features for <emphasis>cockpit-machines</emphasis> should be only implemented for the componenent
            using libvirt D-Bus.
        </para>

    </section>
</chapter>
