I had the same issue when AppArmor is active (default)
and when I try to enable qemu guest agent inside your
guest :

virsh start test
error: Failed to start domain test
error: internal error: process exited while connecting to monitor: 
qemu-system-x86_64: -chardev 
socket,id=charchannel0,path=/var/lib/libvirt/qemu/test-virtio.sock,server,nowait:
 Failed to bind socket: Permission denied
qemu-system-x86_64: -chardev 
socket,id=charchannel0,path=/var/lib/libvirt/qemu/test-virtio.sock,server,nowait:
 chardev: opening backend "socket" failed

audit: type=1400 audit(...): apparmor="DENIED" operation="mknod" profile
="libvirt-74c30212-4631-4498-a684-c62db8b2dc21"
name="/var/lib/libvirt/qemu/test-virtio.sock" pid=10291 comm="qemu-
system-x86" requested_mask="c" denied_mask="c" fsuid=106 ouid=106

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <source dev='/var/lib/libvirt/images/test.raw'/>
      <target dev='sda' bus='scsi'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <controller type='scsi' index='0' model='virtio-scsi'>
    </controller>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/test-virtio.sock'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>

I am using qemu guest agent to be able to call guest-fstrim
virsh qemu-agent-command <domain> '{"execute":"guest-fstrim"}'
guest-fstrim is doing fstrim on all partitions if discard has been
enabled with virtio-scsi (free up deleted blocks)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227912

Title:
  instance fails to boot with qemu guest agent set in image metadata

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1227912/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to