Libvirt

From ArchWiki
Revision as of 02:13, 25 December 2009 by Intgr (Talk | contribs) (Created page with 'libvirt is an abstraction layer and a daemon for managing virtual machines -- remote or locally, using multiple virtualization backends (QEMU/KVM, VirtualBox, Xen, etc). ==Insta…')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

libvirt is an abstraction layer and a daemon for managing virtual machines -- remote or locally, using multiple virtualization backends (QEMU/KVM, VirtualBox, Xen, etc).

Installing

Currently libvirt and tools are only available from AUR. If you are unfamiliar with how to install AUR packages, see: Arch User Repository.

For servers you need the libvirt package from AUR and qemu-kvm, dnsmasq and bridge-utils from Arch repositories.

For GUI management tools you also need all of the following from AUR: virtviewer virtinst virt-manager

Configuration

Daemon

To run the libvirt daemon:

sudo /etc/rc.d/libvirtd start

If you want to start it at boot, edit /etc/rc.conf and add libvirtd to the DAEMONS= line.

PolicyKit authentication

??? I never got this to work. To allow yourself to manage VMs as non-root, run:

sudo polkit-auth --user $USERNAME --grant org.libvirt.unix.manage

Enable KVM acceleration

Note: KVM will conflict with VirtualBox. You cannot use KVM and VirtualBox at the same time.

Running virtual machines with the usual QEMU emulation will be painfully slow, so you definitely want to enable KVM support if your CPU supports it.

To enable KVM, you need to load the kvm-amd or kvm-intel kernel module.

If KVM support is not available, you will find the following message in your /var/log/libvirt/qemu/SOMENAME.log:

Could not initialize KVM, will disable KVM support