libvirt error when trying to 'hot' attach-disk on guest with “Channel qemu-ga”
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/
But receive an error:
error: Failed to attach disk
error: internal error: cannot update AppArmor profile 'libvirt-
If I do the same with Debian guest - everything is OK.
What is difference, how to solve that?
I use Virtual Machine Manager 1.3.0 with qemu-kvm 2.3.
CentOS and Debian - clean installation.
=======
UPDATE:
I have a comment!
I compared two VM's xml and saw that CentOS have QEMU-agent in his configuration:
<channel type="unix">
<source mode="bind" path="/
<target name="org.
<address bus="0" controller="0" port="1" type="virtio-
</channel>
Then I removed "channel qemu-ga", restarted VM and checked "hot add" feature. It's worked!!
I tested it on other VMs (CentOS, Fedora, Debian) and saw the same.
As a result:
If enable qemu-agent i cannot use hot plug.
If use "hot plug" i must forget about agent.
Is it my mistake in configuration or these features can't work together?
Host-OS: Ubuntu 15.10
QEMU emulator: now 2.4.92 (tested 2.3 and 2.4.1)
VMM: 1.3.0
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- Ubuntu libvirt Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Maxim for more information if necessary.