Main Page

From Libvirt Wiki
Jump to: navigation, search

libvirt Wiki

This is the libvirt Wiki for user contributed content.

Due to frequent attacks from spammers who are able to defeat the various anti-spam measures, it has become necessary to disable new account creation.

We still welcome contributions from anyone interested in updating content. Simply send an email to the main libvirt development list asking for an account and one will be created for you with as little delay as practical. Please tell us your preferred wiki user name in the email - if you have no preferences we will create one with "ForenameSurname" style.

General project documentation

Books

Configuration Management

  • Puppet-virt - Puppet Module for Virtualization Management

convert

Guest Management

Concepts

  • Guest (VM) Lifecycle : Read This First - Introduces the concepts used with guests / virtual machines. Includes things like persistent vs transient domains, creating, starting, stopping domains, saving, restoring, snapshots, and secure wiping of disk images.

CGroups

CPU

KVM / QEMU

Guest device Configuration

Virtio

Host SCSI device

NPIV

libguestfs / guestfish

Networking

Concepts

  • Virtual Networking : Read This First - Introduces the concepts and ideas used in libvirts' networking for guests

Detailed networking pieces

Perl

  • Sys-Virt - Daniel Berrange's perl module for managing guests

Provisioning

Cobbler

Foreman

  • Foreman - Automatic provisioning with Foreman and libvirt

Remote Management

CIM

QPID

Security

Host Security

SSH

Transport Layer Security (TLS)

Storage

iSCSI

QCow2 disk encryption

Disk and Memory Snapshots

Examples of live block operations

Third Party Libvirt Applications

Other

Images

The images in this wiki, along with their Inkscape SVG source, are on this page in one place in case you'd like to use or modify them for your own project:

Debug logs

In case you want to turn on debuging in libvirt follow:

Getting started with Avocado-VT

Avocado-VT (and Avocado) installation

Avocado is the base framework for Avocado-VT. To install it, follow the simple steps documented here. Then install Avocado-VT, as documented on its own Getting Started page.

libvirt Prerequisites

  1. To use Avocado-VT with its libvirt backend, the following packages are required: libvirt, virt-install, qemu-kvm, p7zip, genisoimage. Other packages are also recommended: fakeroot, policycoreutils-python-utils.

    When installing libvirt on Fedora, make sure you have the following packages installed: libvirt-client, libvirt-python, libvirt-daemon-kvm, and libvirt-daemon-config-network.

    To help you with copy and paste, here is a command with the complete list of packages needed on a Fedora system:

    dnf install libvirt virt-install qemu-kvm p7zip genisoimage libvirt-client libvirt-python libvirt-daemon-kvm libvirt-daemon-config-network fakeroot policycoreutils-python-utils
  2. Start libvirtd service.

    On systems with systemd, run

    systemctl start libvirtd.service

Avocado-VT bootstrap

Now that all packages are installed and services have been started, it's time to bootstrap Avocado-VT test providers, configuration and default image files, by running:

 avocado vt-bootstrap --vt-type=libvirt

For more information on the bootstrap process, please refer to the the Avocado-VT docs.

Running tests

To get an idea of the available tests, run

 avocado list --vt-type=libvirt

And look for the "VT" tests. To actually run some tests (all virsh.help tests), run

 avocado run virsh.help --vt-type=libvirt

Testing self-built libvirt

To test self-built libvirt rather then the one installed in the system, either built a proper package and install it or follow the steps below.

  1. Configure libvirt to use the same paths as the system one.
    ./autogen.sh --system
  2. Compile libvirt.
    make
  3. Change libvirtd service to start your local libvirtd using /path/to/libvirt/run /path/to/libvirt/daemon/.libs/libvirtd. On systems with systemd change ExecStart in /etc/systemd/system/multi-user.target.wants/libvirtd.service. This hack is required for some tests that restart libvirtd service.
  4. Run tests using the self-built libvirt:
    /path/to/libvirt/run avocado run virsh.help virsh.console --vt-type libvirt

Getting started with the Wiki

This wiki is using the MediaWiki software. The following links will provide help on wiki syntax and other matters

Getting started with libvirt development

Here is the list of small tasks that should enable you to start digging into libvirt source code base

Google Summer of Code

There is a separate page dedicated to Google Summer of Code 2016.