Hi Jeroen,
thanks for reporting back.

On Fri, Oct 01, 2010 at 02:22:40AM +0200, Jeroen Dekkers wrote:
> It's strange that you can't reproduce the bug, because I just
> installed 2 virtual machines in virtualbox, one lenny with libvirtd
> and one squeeze with virt-manager and I see the problem there.
It still can't reproduce this as is but I have an idea. That's the
function on Lenny's libvirtd that seems to be failing since you upgraded
virt-manager on Squeeze:

int qemudExtractVersion(virConnectPtr conn,
                        struct qemud_driver *driver) {
    const char *binary;
    struct stat sb;

    if (driver->qemuVersion > 0)
        return 0;

    if ((binary = virCapabilitiesDefaultGuestEmulator(driver->caps,
                                                      "hvm",
                                                      "i686",
                                                      "qemu")) == NULL)
        return -1;

    if (stat(binary, &sb) < 0) {
        qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
                         _("Cannot find QEMU binary %s: %s"), binary,
                         strerror(errno));
        return -1;
    }

    if (qemudExtractVersionInfo(binary, &driver->qemuVersion, NULL) < 0) {
        return -1;
    }

    return 0;
}

It checks three error conditions but only sets an error message for one
of them. Can I ask you to try the attached patch against 0.4.6 and see
if it changes the error message? This should get us closer to the cause.

What version of kvm are you running on the Lenny system? I assume the
one from Lenny? Could you also check if deinstalling it and running qemu
instead does any difference?

Cheers,
 -- Guido
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 23ef050..63ed108 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -511,8 +511,11 @@ int qemudExtractVersion(virConnectPtr conn,
     if ((binary = virCapabilitiesDefaultGuestEmulator(driver->caps,
                                                       "hvm",
                                                       "i686",
-                                                      "qemu")) == NULL)
+                                                      "qemu")) == NULL) {
+        qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+                         "%s", _("Cannot find suitable hypervisor"));
         return -1;
+    }
 
     if (stat(binary, &sb) < 0) {
         qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
@@ -522,6 +525,8 @@ int qemudExtractVersion(virConnectPtr conn,
     }
 
     if (qemudExtractVersionInfo(binary, &driver->qemuVersion, NULL) < 0) {
+        qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
+                         "%s", _("Error extracting version information"));
         return -1;
     }
 

Reply via email to