cockpit-machines icon indicating copy to clipboard operation
cockpit-machines copied to clipboard

Libvirt throws Apparmor permission denied errors when openning cockpit machines

Open RamonAbudAlcala opened this issue 1 year ago • 0 comments
trafficstars

Just as the title says.

I am running a Debian Bookworm. Cockpit installed via apt -t bookworm-backports. Not sure if anyone can reproduce but, I can use my virtual machines purely with virsh and no errors show up in the log. But as soon as I open the "cockpit-machines" tab on my host's cockpit web page, the four errors show up in the journalctl. Also visible in the Logs tab.

Failed to read AppArmor profiles list '/sys/kernel/security/apparmor/profiles': Permission denied              libvirtd
Failed to open file '/sys/kernel/security/apparmor/profiles': Permission denied                                               libvirtd
Failed to read AppArmor profiles list '/sys/kernel/security/apparmor/profiles': Permission denied              libvirtd
Failed to open file '/sys/kernel/security/apparmor/profiles': Permission denied                                               libvirtd

I cannot find much about this problem, but it seems that I am not the only person that has it. See this post https://ubuntuforums.org/showthread.php?t=2489926

I made sure I had installed apparmor and apparmor-utils, and that /etc/libvirt/qemu.conf has apparmor as the selected security. Note that /sys/kernel/security/apparmor/profiles belongs to root:root.

Then I set /etc/libvirt/qemu.conf to have none as the security driver and uninstalled apparmor and apparmor-utils.

Tried uninstalling and reinstalling cockpit-machines (just in case).

In all cases. The four errors show up.


Other people have said in the forums that everything works and one can safely ignore. But if there is nothing wrong then why are there errors being logged?

Anyway, hopefully this is the right place where this can be fixed. :)

RamonAbudAlcala avatar Mar 05 '24 10:03 RamonAbudAlcala