# Libvirtd apparmor

**URL:** <https://forum.opennebula.io/t/libvirtd-apparmor/11091>\
**Category:** Product Support\
**Created:** [February 22, 2023, 1:16pm UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091 "2023-02-22T13:16:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaimeibar](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jaimeibar](https://forum.opennebula.io/u/jaimeibar)\
**Post date:** [February 22, 2023, 1:16pm UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/1 "2023-02-22T13:16:46Z")

</div>

Hi,  
I’m getting this error while powering off VM’s

```auto
apparmor="DENIED" operation="signal" profile="libvirt-e7930264-e170-4aa5-8625-8d558fa97c5d" pid=2434 comm="libvirtd" requested_mask="receive" denied_mask="receive" signal=term peer="libvirtd"

```

It started happening after upgrading Ubuntu 18 to Ubuntu 20.

Anyone else is having this issue?

Thanks  
Jaime

---

<div class="post-metadata">

**Author:** ![Walhanharja](https://avatars.discourse-cdn.com/v4/letter/w/a183cd/32.png) [@Walhanharja](https://forum.opennebula.io/u/Walhanharja)\
**Post date:** [December 19, 2023, 9:31am UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/2 "2023-12-19T09:31:26Z")

</div>

Yes, we have the same problem. As running on 20.04, we recently discovered this problem. We emptied the machine, fully updated the machine, included AppArmor, and we tried to replicate the problem. The problem still is there. If anyone knows an answer to this problem, it would be much appreciated.

---

<div class="post-metadata">

**Author:** ![mkutouski](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mkutouski/32/7923_2.png) [@mkutouski](https://forum.opennebula.io/u/mkutouski)\
**Post date:** [December 19, 2023, 9:41am UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/3 "2023-12-19T09:41:05Z")

</div>

@Walhanharja ,  
have you tried as written in the OpenNebula [docs](https://docs.opennebula.io/6.8/open_cluster_deployment/kvm_node/kvm_node_installation.html#disable-apparmor-on-ubuntu-debian)?

> Depending on your OpenNebula deployment type, the following lines might be required at `/etc/apparmor.d/abstractions/libvirt-qemu` profile:

> ` /var/lib/one/datastores/** rwk,`

---

<div class="post-metadata">

**Author:** ![Walhanharja](https://avatars.discourse-cdn.com/v4/letter/w/a183cd/32.png) [@Walhanharja](https://forum.opennebula.io/u/Walhanharja)\
**Post date:** [December 19, 2023, 10:00am UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/4 "2023-12-19T10:00:45Z")

</div>

Goodday mkutouski,  
and thank you for your reply. I added the line to the libvirt-qemu file, reloaded the service and i will test it right away. I keep you posted if the solution was a ‘pointing out’ to my bad reading 😃 (again)

> [@mkutouski](#):
>
> /var/lib/one/datastores/\*\* rwk,

---

<div class="post-metadata">

**Author:** ![Walhanharja](https://avatars.discourse-cdn.com/v4/letter/w/a183cd/32.png) [@Walhanharja](https://forum.opennebula.io/u/Walhanharja)\
**Post date:** [December 19, 2023, 10:42am UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/5 "2023-12-19T10:42:46Z")

</div>

Hello again,

it was not the solution. When trying to poweroff the VM, we get this message:

```auto
[90707.723486] audit: type=1400 audit(1702981277.201:152): apparmor="DENIED" operation="signal" profile="libvirt-f1089794-57ad-4ef5-aa82-c7a4f9cf8208" pid=1235 comm="libvirtd" requested_mask="receive" denied_mask="receive" signal=term peer="libvirtd"

```

In VNC we see the machine: reached target power-off, but we think the VM cannot send its signal of power-off state back to the host.

When i ask for a virsh list, i got “one-160 in shutdown”, and this state stays.

We have a few nodes, but the problem only exists on this node. Do you have any idea’s left ?  
Mayby my reading back in the days wasn’t that bad 😃

---

<div class="post-metadata">

**Author:** ![mkutouski](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mkutouski/32/7923_2.png) [@mkutouski](https://forum.opennebula.io/u/mkutouski)\
**Post date:** [December 20, 2023, 9:11am UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/6 "2023-12-20T09:11:07Z")

</div>

Could you, please, provide the following information:  
OpenNebula version (`oned --version` executed on your OpenNebula front-end node)  
Libvirt version (`libvirtd --version` executed on your hypervisor node)  
Ubuntu version (`lsb_release -a` executed on your hypervisor node)  
Apparmor version (`dpkg -s apparmor | grep '^Version:'` executed on your hypervisor node)

---

<div class="post-metadata">

**Author:** ![Walhanharja](https://avatars.discourse-cdn.com/v4/letter/w/a183cd/32.png) [@Walhanharja](https://forum.opennebula.io/u/Walhanharja)\
**Post date:** [December 20, 2023, 10:53am UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/7 "2023-12-20T10:53:58Z")

</div>

Could you, please, provide the following information:

```auto
Sure, with pleasure :) and thank you for looking in to this

```

OpenNebula version (oned --version executed on your OpenNebula front-end node)

```auto
oned --version
OpenNebula 6.0.0.3 (9284d740)
--> yes, we are going to upgrade asap, but were working on the errors first

```

Libvirt version (libvirtd --version executed on your hypervisor node)

```auto
libvirtd --version
libvirtd (libvirt) 6.0.0

```

Ubuntu version (lsb\_release -a executed on your hypervisor node)

```auto
lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04
Codename:	focal

```

Apparmor version (dpkg -s apparmor | grep ‘^Version:’ executed on your hypervisor node)

```auto
dpkg -s apparmor | grep '^Version:'
Version: 2.13.3-7ubuntu5.3

```

I am very grateful to you for your help.

---

<div class="post-metadata">

**Author:** ![jaimeibar](https://avatars.discourse-cdn.com/v4/letter/j/96bed5/32.png) [@jaimeibar](https://forum.opennebula.io/u/jaimeibar)\
**Post date:** [January 8, 2024, 10:10am UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/8 "2024-01-08T10:10:41Z")

</div>

Hi,  
I’m still having this issue, these are the versions we are running

```auto
> oned --version
OpenNebula 6.8.0 (bf030d2b)

> libvirtd --version
libvirtd (libvirt) 6.0.0

> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

> dpkg -s apparmor | grep '^Version:'
Version: 2.13.3-7ubuntu5.2

```

Hope that helps.

Thanks  
Jaime

---

<div class="post-metadata">

**Author:** ![mkutouski](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/mkutouski/32/7923_2.png) [@mkutouski](https://forum.opennebula.io/u/mkutouski)\
**Post date:** [April 23, 2024, 3:04pm UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/9 "2024-04-23T15:04:32Z")

</div>

Sorry for the late reply.

It seems the problem is in absence of these two lines

```auto
signal (receive) peer=libvirtd,
signal (receive) peer=/usr/sbin/libvirtd,

```

in the `/etc/apparmor.d/abstractions/libvirt-qemu` file on the hypervisor node.

So the solution seems like to add these two lines and restart apparmor.service:

```auto
systemctl restart apparmor.service

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/1/14d66f1130b9cd292905f575da9b68a9f574dd03.png) [@system](https://forum.opennebula.io/u/system)\
**Post date:** [June 25, 2025, 3:47pm UTC](https://forum.opennebula.io/t/libvirtd-apparmor/11091/10 "2025-06-25T15:47:01Z")

</div>

Closed on June 25, 2025, 3:47pm UTC

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
