Contents
|
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
- Libvirt FAQ
- Introductory guides to a variety of libvirt topics
- General hints and tips
- Troubleshooting Guide
- Libvirt Docs Team To Do list
- Outstanding feature To Do list
- Switching over from running standalone QEMU to libvirt managed QEMU
- Anatomy of the libvirt library (IBM developerworks)
- Areas to focus on testing
Books
- Book "qemu-kvm & libvirt", ISBN 978-3-8370-0876-0, qemu-buch.de
Configuration Management
- Puppet-virt - Puppet Module for Virtualization Management
convert
- Converting VMware guests to libvirt/KVM guests - Blog entry showing how to convert a VMware guest domain to a libvirt/KVM guest domain
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
- CGroups usage with QEMU, KVM and LXC guests
CPU
- Guest CPU model configuration with QEMU/KVM
- Guest CPU affinity and NUMA placement on host with QEMU/KVM
KVM / QEMU
- What benefits does libvirt offer to developers targetting QEMU+KVM?
- Many introductory guides to libvirt with KVM
- Introduction to qemu guest agent
Guest device Configuration
- Stable guest machine ABI, PCI addressing and drive controller/disk addressing
Virtio
- Setting up virtio
Host SCSI device
- SCSI generic device passthrough
NPIV
- NPIV in libvirt
libguestfs / guestfish
- Guestfish: generating inline commands from shell scripts - Blog entry showing how to generate inline guestfish commands from shell scripts
- libguestfs: Live CD inspection - Blog entry showing use of virt-inspector to tell what operating system is on a Live CD image
Networking
Concepts
- Virtual Networking : Read This First - Introduces the concepts and ideas used in libvirts' networking for guests
Detailed networking pieces
- Host sFlow - Open source add-on for exporting sFlow data from guests
- IPtables / firewall usage in libvirt
- Libvirtd_and_dnsmasq - Additional configuration settings needed for running a global dnsmasq in addition to a libvirt controlled one
- Networking hints and tips
- Routed subnets with virtual networking
- Tip: Find the IP address of a virtual machine - Blog entry showing how to get the IP address of a guest domain
- OVS_and_PVLANS - Setup OpenvSwitch Flows to emulate PVLANs
Perl
- Sys-Virt - Daniel Berrange's perl module for managing guests
Provisioning
Cobbler
- cucumber-vhost - Automatic provisioning with Cobbler and Cucumber
Foreman
- Foreman - Automatic provisioning with Foreman and libvirt
Remote Management
CIM
- cimtest
QPID
- libvirt-qpid
Security
Host Security
- Securing KVM guests and the host system in RHEL5.5 or as PDF
SSH
- How to set up access to libvirt via SSH
- How to configure PolicyKit access to libvirt through SSH
Transport Layer Security (TLS)
- In depth guide to configuring TLS in libvirt (with many pictures)
- How to set up your VNC client software to use TLS
Storage
iSCSI
- Accessing iSCSI storage pools using virsh
- Accessing iSCSI storage pools using virt-manager
QCow2 disk encryption
- Using qcow2 with encrypted disks with QEMU/KVM
Disk and Memory Snapshots
- Snapshot API Development
Examples of live block opertaions
- Live disk backup with active blockcommit
- Live merge an entire disk image chain including current active disk
Third Party Libvirt Applications
- Enomaly Elastic Computing Platform (ECP) - Cloud Computing / Infrastructure as a Service Platform based on Libvirt API
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:
- SVGImages
Debug logs
In case you want to turn on debuging in libvirt follow:
- DebugLogs
Getting started with virt-test
Prerequisites
- Install libvirt, virt-install, qemu-kvm, p7zip, genisoimage.
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.
- Start libvirtd service.
On systems with systemd, run
systemctl start libvirtd.service
Steps to setup the virt-test
- Clone the autotest repository:
git clone https://github.com/autotest/autotest.git
- Clone the virt-test repository:
git clone https://github.com/autotest/virt-test.git
- Switch to next branch in both repositories:
for repo in autotest virt-test; do (cd $repo && git checkout next); done
- Export path to the autotest repository.
Please note, /some/dir is the directory where you ran the above commands. Thus, AUTOTEST_PATH variable has to point to autotest directory created by git when cloning the autotest repository.
export AUTOTEST_PATH=/some/dir/autotest
Running tests
Now you are ready to test libvirt with virt-test. Just go to virt-test directory created in step 2 above and run
./run -t libvirt --tests=virsh --install --remove
This command will automatically download JeOS disk image used as a guest OS for the test domain required for virt-test. You can remove the --remove option to keep the test domain installed and then you can just run
./run -t libvirt --tests='virsh.help virsh.console'
to reuse the existing test domain. To get a list of all test available in virt-test, run
./run -t libvirt --list-tests
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.
- Configure libvirt to use the same paths as the system one.
./autogen.sh --system
- Compile libvirt.
make
- 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.
- Run tests using the self-built libvirt:
/path/to/libvirt/run ./run -t libvirt --tests='virsh.help virsh.console'
Tips
Log files from all test runs can be found in logs sub directory of virt-test. The latest log file is easily accessible via the latest symlink:
less logs/latest/debug.log
The config files for each test are located in libvirt/tests/cfg and the source files of all tests are located in libvirt/tests/src within the virt-test repository.
Getting started with the Wiki
This wiki is using the MediaWiki software. The following links will provide help on wiki syntax and other matters
- Editing Help
- MediaWiki FAQ
Views
- Article
- Discussion
- Edit
- History
Personal tools
- Log in / create account
Toolbox
- What links here
- Related changes
- Upload file
- Special pages
- Printable version
- Permanent link