Score:1

AppArmor issues with Libvirt

ph flag

I have a fresh Ubuntu Server 22.04.3 and Debian 12.1.0 installed and updated. Along with Cockpit and Cockpit virtual machines on both tests machines.

I am getting the following errors and warning when looking at the log section in Cockpit:

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

The virtual machines start up and has no issues. However, the errors pop up after every reboot once I click the virtual machines section on Cockpit. These errors only show then, and not when I do NOT go to virtual machines section in Cockpit. So it seems to only start once you go to that section in Cockpit.

The /etc/apparmor.d/usr.sbin.libvirtd does have the line:

/sys/kernel/security/apparmor/profiles r,

My user has also been added to groups libvirt, kvm and sudo.

Also, when running the following command without sudo and not as root on the terminal, then I also get a permission denied. I checked the folder permissions and it does have read permissions and belong to the group root:

cat /sys/kernel/security/apparmor/profiles

Has anyone else experience this issue? Any solution to get it fixed with or without disabling AppArmor for KVM? or can the errors be safely ignored?

Thank you to the person who has a solution to this.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.