]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
esx: Ignore malformed host UUID from BIOS
authorMatthias Bolte <matthias.bolte@googlemail.com>
Fri, 18 Feb 2011 09:09:32 +0000 (10:09 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Fri, 18 Feb 2011 16:59:05 +0000 (17:59 +0100)
Etienne Gosset reported that libvirt fails to connect to his ESX
server because it failed to parse its malformed host UUID, that
contains an additional space and lacks one hexdigit in the last
group:

xxxxxxxx-xxxx-xxxx-xxxx- xxxxxxxxxxx

Don't treat this as a fatal error, just ignore it.

src/esx/esx_driver.c

index 97f3dbec8b5340b4b86b126456749d01096a95df..116ad0f51f20978c7cd0dc6bfa20e5346ba4abd5 100644 (file)
@@ -518,10 +518,11 @@ esxLookupHostSystemBiosUuid(esxPrivate *priv, unsigned char *uuid)
 
             if (strlen(dynamicProperty->val->string) > 0) {
                 if (virUUIDParse(dynamicProperty->val->string, uuid) < 0) {
-                    ESX_ERROR(VIR_ERR_INTERNAL_ERROR,
-                              _("Could not parse UUID from string '%s'"),
-                              dynamicProperty->val->string);
-                    goto cleanup;
+                    VIR_WARN("Could not parse host UUID from string '%s'",
+                             dynamicProperty->val->string);
+
+                    /* HostSystem has an invalid UUID, ignore it */
+                    memset(uuid, 0, VIR_UUID_BUFLEN);
                 }
             } else {
                 /* HostSystem has an empty UUID */