Contents |
Tips
This is a general place to put hints and tips for libvirt.
Debian/Ubuntu guests under KVM don't shut down properly
KVM just sends an ACPI signal to the guest to tell it to shut down. Of course, this means the guest needs to do something useful when it receives the signal! By default Debian/Ubuntu guests don't.
Solution: install acpid in the guest.
(Thanks to Soren Hansen)
Libvirt wont connect to qemu hypervisor (KVM)
Clean install on Ubuntu 8.10 desktop. Built KVM from scratch, and installed in default location. Built LibVirtD from scratch, and also installed in the default location. Entering virsh -c qemu:///system gave an error about not being able to connect to the hypervisor.
The problem is the hard-coded list of places it looks for qemu/kvm:
if ((virFileExists("/usr/bin/qemu")) ||
(virFileExists("/usr/bin/qemu-kvm")) ||
(virFileExists("/usr/bin/kvm")) ||
(virFileExists("/usr/bin/xenner")))
return 1;
The solution was to symlink the real qemu launcher program to one of the above locations.
UPDATE: As of the 0.7.6 release, libvirt will now search in $PATH for all the binaries
The connection fails using md5 digest auth
virsh will just say: failed to connect to the hypervisor
and virt-manager: Failed to start SASL negotiation: -4 (SASL(-4): no mechanism available: No worthy mechs found)
Make sure all the necessary SASL libraries are installed. On Debian/Ubuntu the package libsasl2-modules is necessary to get it to work.
Enabling debug output for libvirtd and virsh
export LIBVIRT_DEBUG=yes
Will enable debug messages. Provided ENABLE_DEBUG is specified at the ./configure stage (i think). This is very helpful in diagnosing problems.
