Description of problem: kvm guest installation guests fail with the error: "ERROR Could not find usable default libvirt connection." Because of the recent change of location of qemu-kvm program in kvm package. Version-Release number of selected component (if applicable): # rpm -qa | egrep "kvm|python-virtinst|libvirt" etherboot-zroms-kvm-5.4.4-10.el5 kvm-83-74.el5 libvirt-0.6.3-8.el5 kmod-kvm-83-74.el5 libvirt-0.6.3-8.el5 kvm-qemu-img-83-74.el5 libvirt-python-0.6.3-8.el5 python-virtinst-0.400.3-2.el5 How reproducible: Very Steps to Reproduce: 1. Try to install a kvm guest in RHEL5.4-Server-20090611.nightly tree with selinux-policy-2.4.6-245.el5 and selinux-policy-targeted-2.4.6-245.el5 packages. 2. 3. Actual results: Expected results: Additional info:
Hmm, this is the result of two flaws in virtinst code First in cli.getConnect() if connect is None: fail(_("Could not find usable default libvirt connection.")) logging.debug("Using libvirt URI '%s'" % connect) return libvirt.open(connect) This 'connect is None' check is bogus. It is fine to pass 'None' straight through to libvirt.open(), allowing libvirt's automatic probe logic to choose the connection. Before this point though, in util.default_connect() def default_connection(): if os.path.exists('/var/lib/xend'): if os.path.exists('/dev/xen/evtchn'): return 'xen' if os.path.exists("/proc/xen"): return 'xen' if os.path.exists("/usr/bin/qemu") or \ os.path.exists("/usr/bin/qemu-kvm") or \ os.path.exists("/usr/bin/kvm") or \ os.path.exists("/usr/bin/xenner"): if User.current().has_priv(User.PRIV_QEMU_SYSTEM): return "qemu:///system" else: return "qemu:///session" return None All this code should now be removed IMHO, as it is poorly replicating the automatic probe logic libvirt will now do. This code is a left-over from the old days when libvirt would not automatically detect a KVM/QEMU connection.
Ahh! Right, I forgot that auto probing was added to libvirt. I'll draw up a patch for that.
Forgot to mention the workaround when opening the bug. Workaround for this issue is to add "--connect qemu:///system" to virt-install arguments.
Created attachment 347646 [details] Defer to libvirt's default connection
Built into python-virtinst-0.400.3-3.el5. Since this issue hasn't hit a released package, I'm closing this as NEXTRELEASE.