Description of problem: I have KVM virtual machine running CentOS 7 as guest OS. I'm trying to attach an additional disk to it on the run (without shutting it down) using this command: $ sudo virsh attach-disk centos --source /var/lib/libvirt/images/newdisk.img --target sdb --persistent But receive an error: error: Failed to attach disk error: internal error: cannot update AppArmor profile 'libvirt-d2e7bbb8-c7b3-44ec-b0ea-27539e0df732' If I do the same with Debian guest - everything is ok. I compared two VM's xml and saw that CentOS have QEMU-agent in his configuration: <channel type="unix"> <source mode="bind" path="/var/lib/libvirt/qemu/channel/target/centos_auto.org.qemu.guest_agent.0"></source> <target name="org.qemu.guest_agent.0" type="virtio"></target> <address bus="0" controller="0" port="1" type="virtio-serial"></address> </channel> Then I removed "channel qemu-ga", restarted VM and checked "hot add" feature. It worked. I tested it on other VMs (CentOS, Fedora, Debian) and saw the same. Version-Release number of selected component (if applicable): Host-OS: Ubuntu 15.10 Libvirtd: 1.2.16 QEMU: 2.3 and 2.4.1 VMM:1.3.0 As a result: 1. If enable qemu-agent (Channel qemu-ga) i cannot use hot plug. 2. If use "hot plug" i must forget about agent. Is it my mistake in configuration or these features can't work together?
**UPDATE** Forgot to write: This problem occurs only on the host where AppArmor installed.
I think it was fixed by this: commit 03d7462d87011c3db2ae82ae14d56d2979d92f0c Author: Serge Hallyn <serge.hallyn> Date: Fri Apr 10 20:21:03 2015 +0000 virt-aa-helper: add unix channels (esp for qemu-guest-agent)