The udev node device driver tries to glean a few tidbits of information
from /sys/devices/virtual/dmi/id. If either the BIOS or the kernel does
not support DMI, libvirtd logs the error
Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or
'/sys/class/dmi/id'
and refuses to start.
This seems a bit extreme; information obtained from DMI, like the system
board vendor and BIOS version, is useful but not critical to libvirt's
operation.
This patch eliminates the hard dependency on DMI. On systems without
DMI, libvirtd logs a warning, and leaves the "computer" node device's
properties empty.
Signed-off-by: Ed Swierk <eswierk(a)aristanetworks.com>
---
Index: libvirt-0.7.6/src/node_device/node_device_udev.c
===================================================================
--- libvirt-0.7.6.orig/src/node_device/node_device_udev.c
+++ libvirt-0.7.6/src/node_device/node_device_udev.c
@@ -1471,9 +1471,9 @@ static int udevSetupSystemDev(void)
if (device == NULL) {
device = udev_device_new_from_syspath(udev, DMI_DEVPATH_FALLBACK);
if (device == NULL) {
- VIR_ERROR("Failed to get udev device for syspath '%s' or
'%s'",
- DMI_DEVPATH, DMI_DEVPATH_FALLBACK);
- goto out;
+ VIR_WARN("Failed to get udev device for syspath '%s' or
'%s'",
+ DMI_DEVPATH, DMI_DEVPATH_FALLBACK);
+ goto out2;
}
}
@@ -1532,6 +1532,7 @@ static int udevSetupSystemDev(void)
udev_device_unref(device);
+out2:
dev = virNodeDeviceAssignDef(&driverState->devs, def);
if (dev == NULL) {
VIR_ERROR("Failed to create device for '%s'", def->name);