I'm working with libvirtd/virt-manager/qemu at work. I have a bunch of F11 systems installed and working just fine. Today I tried one of the extra lab boxes, same OS config, but when I tried to use the virt-* commands I'd get an error:
mjhammel(tty0)$ sudo virsh –connect qemu:///system
error: failed to connect to the hypervisor
It took quite a while to figure this out. libvirt has qemu's location hard coded in it. Since the same command worked on other F11 systems I checked for qemu:
mjhammel(tty0)$ type qemu
qemu is /usr/bin/qemu
mjhammel(tty1)$ rpm -qf /usr/bin/qemu
qemu-system-x86-0.10.6-1.fc11.x86_64
Checking the other system I find that qemu wasn't installed:
mjhammel(tty0)$ rpm -qi qemu-system-x86
package qemu-system-x86 is not installed
Installed qemu-system-x86 and tried again:
mjhammel(tty0)$ sudo virsh –connect qemu:///system
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh #
It works. The problems here are that
- libvirt hard codes the locations for qemu
- libvirt doesn't tell you why the connection fails
fixing the first might make this problem go away. Fixing the second would make it easier to debug.