Failed to get udev device for syspath '/sys/devices/virtual/dmi/id'

Hi, I'm facing an issue with libvirt and the LIBXL driver, failing when searching for DMI data in /sys. info : libvirt version: 5.0.0, package: 4+deb10u1 (Guido Günther <agx@sigxcpu.org> Thu, 05 Dec 2019 00:22:14 +0100) error : udevGetDMIData:1719 : internal error: Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id' error : libxlDriverConfigNew:1803 : Unable to configure libxl's memory management parameters error : virStateInitialize:662 : Initialization of LIBXL state driver failed: internal error: Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id' error : daemonRunStateInit:799 : Driver state initialization failed The relevant function udevGetDMIData in libvirt: https://github.com/libvirt/libvirt/blob/cb09344a2cccc0cc9bcefa3cb53d7af45ba9... I don't understand what's happening, as this initialization failure only happens when I boot on the Xen kernel. Also, the /sys/class/dmi* paths are not exposed on Xen. Note: Running on Xen 4.12.1 Any ideas ? Thanks !

On a Monday in 2020, Mathieu Tarral wrote:
Hi,
I'm facing an issue with libvirt and the LIBXL driver, failing when searching for DMI data in /sys.
info : libvirt version: 5.0.0, package: 4+deb10u1 (Guido Günther <agx@sigxcpu.org> Thu, 05 Dec 2019 00:22:14 +0100) error : udevGetDMIData:1719 : internal error: Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id'
This error is set and logged in a void fuction - it is not the one blocking the driver initialization.
error : libxlDriverConfigNew:1803 : Unable to configure libxl's memory management parameters
This is the important error, calling libxl_get_free_memory failed for some reason: https://gitlab.com/libvirt/libvirt/-/blob/v5.0.0/src/libxl/libxl_conf.c#L180... Unfortunately, I'm not actually familiar enough with Xen to offer further suggestions.
error : virStateInitialize:662 : Initialization of LIBXL state driver failed: internal error: Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id'
Here the caller is picking up the first error instead of the second because the second one was logged via a different API. Jano
error : daemonRunStateInit:799 : Driver state initialization failed
The relevant function udevGetDMIData in libvirt: https://github.com/libvirt/libvirt/blob/cb09344a2cccc0cc9bcefa3cb53d7af45ba9...
I don't understand what's happening, as this initialization failure only happens when I boot on the Xen kernel. Also, the /sys/class/dmi* paths are not exposed on Xen.
Note: Running on Xen 4.12.1
Any ideas ?
Thanks !

On 9/28/20 5:21 AM, Mathieu Tarral wrote:
Hi,
I'm facing an issue with libvirt and the LIBXL driver, failing when searching for DMI data in /sys.
info : libvirt version: 5.0.0, package: 4+deb10u1 (Guido Günther <agx@sigxcpu.org> Thu, 05 Dec 2019 00:22:14 +0100) error : udevGetDMIData:1719 : internal error: Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id' error : libxlDriverConfigNew:1803 : Unable to configure libxl's memory management parameters
Ján already pointed out this is the important error, which usually means the xencommons service is not running and the xen tooling has not been initialized. Do you see a "Domain-0" using xen's xl tool? E.g. 'xl list'? Regards, Jim

I have had ksm[2] causing a high load (on recent centos7), such things have been reported before[1]. I suspect that this could be related to windows vm's. I am having not that many vm's in the current setup, and this load increased on the hosts with a few windows vm's that are already generating more load that others. Is there a way to disable ksm for specific vm's in the libvirt config xml? [1] https://bugzilla.redhat.com/show_bug.cgi?id=541230 [2] https://www.kernel.org/doc/Documentation/vm/ksm.txt

Le lundi 28 septembre 2020 19:04, Jim Fehlig <jfehlig@suse.com> a écrit :
On 9/28/20 5:21 AM, Mathieu Tarral wrote:
Hi, I'm facing an issue with libvirt and the LIBXL driver, failing when searching for DMI data in /sys. info : libvirt version: 5.0.0, package: 4+deb10u1 (Guido Günther agx@sigxcpu.org Thu, 05 Dec 2019 00:22:14 +0100) error : udevGetDMIData:1719 : internal error: Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id' error : libxlDriverConfigNew:1803 : Unable to configure libxl's memory management parameters
Ján already pointed out this is the important error, which usually means the xencommons service is not running and the xen tooling has not been initialized. Do you see a "Domain-0" using xen's xl tool? E.g. 'xl list'?
I can run sudo xl list, and see the Domain-0 I have a custom Xen compiled from source installed, via the xen-upstream debian package generated by the makefile. I think there might be a conflict with a Xen version that I installed before from Debian packages. Also, I can see that the xencommons service could not start because of a PID issue. I removed the xen-upstream package, and reinstalled xen-system-amd64 Debian package, rebooted, and now the libvirt connection works. The thing, I would like to run the latest Xen, and at the same time, have libvirt to manage my VMs with virt-manager. The main issue is that libvirt's xen driver depends on xen libs which are conflicting with my xen upstream installation. I don't know how to solve this. At least libvirt can start now, but not with Xen upsteam. Thanks for your help !

On 10/9/20 6:32 AM, Mathieu Tarral wrote:
Le lundi 28 septembre 2020 19:04, Jim Fehlig <jfehlig@suse.com> a écrit :
On 9/28/20 5:21 AM, Mathieu Tarral wrote:
Hi, I'm facing an issue with libvirt and the LIBXL driver, failing when searching for DMI data in /sys. info : libvirt version: 5.0.0, package: 4+deb10u1 (Guido Günther agx@sigxcpu.org Thu, 05 Dec 2019 00:22:14 +0100) error : udevGetDMIData:1719 : internal error: Failed to get udev device for syspath '/sys/devices/virtual/dmi/id' or '/sys/class/dmi/id' error : libxlDriverConfigNew:1803 : Unable to configure libxl's memory management parameters
Ján already pointed out this is the important error, which usually means the xencommons service is not running and the xen tooling has not been initialized. Do you see a "Domain-0" using xen's xl tool? E.g. 'xl list'?
I can run sudo xl list, and see the Domain-0
I have a custom Xen compiled from source installed, via the xen-upstream debian package generated by the makefile. I think there might be a conflict with a Xen version that I installed before from Debian packages.
Also, I can see that the xencommons service could not start because of a PID issue.
I removed the xen-upstream package, and reinstalled xen-system-amd64 Debian package, rebooted, and now the libvirt connection works.
The thing, I would like to run the latest Xen, and at the same time, have libvirt to manage my VMs with virt-manager. The main issue is that libvirt's xen driver depends on xen libs which are conflicting with my xen upstream installation.
I don't know how to solve this.
You need to rebuild libvirt against your rebuilt Xen. Regards, Jim
participants (4)
-
Jim Fehlig
-
Ján Tomko
-
Marc Roos
-
Mathieu Tarral