Libvirtd starts in cycles of 10 minutes

Hello Opennebula Team,
My system operates very normally, but every 10 minutes, my syslog reports:

Dec  7 13:58:10 kvmnode libvirtd[474187]: libvirt version: 8.0.0, package: 1ubuntu7.7 (Michal Maloszewski <michal.maloszewski@canonical.com> Fri, 04 Aug 2023 10:42:25 +0200)
Dec  7 13:58:10 kvmnode libvirtd[474187]: hostname: kvmnode
Dec  7 13:58:10 kvmnode libvirtd[474187]: Failed to open file '/sys/kernel/security/apparmor/profiles': Permission denied
Dec  7 13:58:10 kvmnode libvirtd[474187]: Failed to read AppArmor profiles list '/sys/kernel/security/apparmor/profiles': Permission denied
Dec  7 13:58:10 kvmnode libvirtd[474187]: Failed to open file '/sys/kernel/security/apparmor/profiles': Permission denied
Dec  7 13:58:10 kvmnode libvirtd[474187]: Failed to read AppArmor profiles list '/sys/kernel/security/apparmor/profiles': Permission denied
Dec  7 13:58:10 kvmnode dbus-daemon[40734]: apparmor="ALLOWED" operation="dbus_method_call"  bus="session" path="/org/freedesktop/DBus" interface="org.freedesktop.DBus" member="Hello" mask="send" name="org.freedesktop.DBus" pid=474187 label="libvirtd" peer_label="unconfined"
Dec  7 13:58:11 kvmnode libvirtd[474187]: Failed to open a VPD file '/sys/bus/pci/devices/0000:01:00.0/vpd': Operation not permitted
Dec  7 13:58:11 kvmnode libvirtd[474187]: Failed to open a VPD file '/sys/bus/pci/devices/0000:01:00.1/vpd': Operation not permitted
Dec  7 13:58:11 kvmnode libvirtd[474187]: Failed to open a VPD file '/sys/bus/pci/devices/0000:01:00.2/vpd': Operation not permitted
Dec  7 13:58:11 kvmnode libvirtd[474187]: Failed to open a VPD file '/sys/bus/pci/devices/0000:01:00.3/vpd': Operation not permitted

Here is ps command:

root       39725  0.4  0.0 1925180 36956 ?       Ssl  Nov22  88:13 /usr/sbin/libvirtd
oneadmin  474187  1.3  0.0 1547428 31896 ?       Sl   13:58   0:00 /usr/sbin/libvirtd --timeout=120
root      474713  0.0  0.0   4024  2084 pts/0    S+   13:58   0:00 grep --color=auto libvirtd

And I notice that every 10 minutes, a libvirt process is started under the oneadmin user. Is this normal behavior, and do I need to configure it to allow access to resources?

Versions of the related components and OS (frontend, hypervisors, VMs): Opennebula 6.8, Ubuntu server 22.04
Thanks,

You shouldn’t have two libvirt processes. Make sure you restart the libvirtd process after installing the kvm node packages. Also check the rhel specific platform notes regarding libvirtd.

Thank you,

Hi!

I got the same behavior. Every 10 minutes a libvirt process is started under the oneadmin user and in the syslog you will see the “Failed to open a VPD” messages. I already restart the libvirtd process, but this didn’t fix the issue for me.

Setup:
OpenNebula 6.8
Ubuntu Server 22.04

Dec 11 17:05:33 node-dr1 libvirtd[2751096]: libvirt version: 8.0.0, package: 1ubuntu7.7 (Michal Maloszewski <michal.maloszewski@canonical.com> Fri, 04 Aug 2023 10:42:25 +0200)
Dec 11 17:05:33 node-dr1 libvirtd[2751096]: hostname: node-dr1
Dec 11 17:05:33 node-dr1 libvirtd[2751096]: Failed to open file '/sys/kernel/security/apparmor/profiles': Permission denied
Dec 11 17:05:33 node-dr1 libvirtd[2751096]: Failed to read AppArmor profiles list '/sys/kernel/security/apparmor/profiles': Permission denied
Dec 11 17:05:33 node-dr1 libvirtd[2751096]: Failed to open file '/sys/kernel/security/apparmor/profiles': Permission denied
Dec 11 17:05:33 node-dr1 libvirtd[2751096]: Failed to read AppArmor profiles list '/sys/kernel/security/apparmor/profiles': Permission denied
Dec 11 17:05:33 node-dr1 libvirtd[2751096]: Failed to open a VPD file '/sys/bus/pci/devices/0000:45:00.0/vpd': Operation not permitted
Dec 11 17:05:33 node-dr1 libvirtd[2751096]: Failed to open a VPD file '/sys/bus/pci/devices/0000:45:00.1/vpd': Operation not permitted
Dec 11 17:05:33 node-dr1 libvirtd[2751096]: Failed to open a VPD file '/sys/bus/pci/devices/0000:45:00.2/vpd': Operation not permitted
Dec 11 17:05:33 node-dr1 libvirtd[2751096]: Failed to open a VPD file '/sys/bus/pci/devices/0000:45:00.3/vpd': Operation not permitted

Could you, please, check if there is only one libvirtd process is running on hypervisor host?
If there are more than one then, please, stop libvirtd.service:

[root@CN]$ systemctl stop libvirtd.service

Kill the rest libvirtd processes and start libvirtd.service again:

[root@CN]$ systemctl start libvirtd.service

Make sure there is one libvirtd process is running now. Check syslog for error you had before.

We have created Github issue. Feel free to track a progress on that issue there.

1 Like