Public bug reported:

Forked from bug 1815910 as it is a different kind of problem and also a
different fix.

FYI: this works just fine when defined at the time the guest starts.
libvirt mediates the access and passes an FD that at the time qemu can open and 
Only later on when hot-plugging this occurs.

#1 prepare a scsi device to pass
$ sudo modprobe vhost-scsi
$ sudo targetcli backstores/block create name=disk1 
$ sudo targetcli vhost/ create 50014059de6fba4f
$ sudo targetcli vhost/naa.50014059de6fba4f/tpg1/luns create 

#2 describe the device to attach for libvirt
$ cat vhost-scsi.xml
    <hostdev mode='subsystem' type='scsi_host' managed='no'>
      <source protocol='vhost' wwpn='naa.50014059de6fba4f'/>

#3 do the hotplug
$ virsh attach-device disco-vhost vhost-scsi.xml
error: Failed to attach device from vhost-scsi.xml
error: internal error: cannot update AppArmor profile 

When debugging this we see as expected triggers an error in virt-aa-helper:
/usr/lib/libvirt/virt-aa-helper -r -u 
libvirt-9518e35c-c5ab-4d14-9204-003923544936 -F 
unexpected exit status 1
  virt-aa-helper: error: /sys/kernel/config/target/vhost//naa.50014059de6fba4f
  virt-aa-helper: error: skipped restricted file
  virt-aa-helper: error: invalid VM definition

** Affects: libvirt (Ubuntu)
     Importance: Undecided
         Status: Triaged

** Changed in: libvirt (Ubuntu)
       Status: New => Triaged

You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

  vhost-scsi triggers virt-aa-helper error

To manage notifications about this bug go to:

ubuntu-bugs mailing list

Reply via email to