apparmour keeps blocking PCI passthrough on KVM

Asked by James Neave

Hi,

I believe this is in relation to [url]https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/545795[/url]

It's going to get fixed (hopefully) but in the mean time i can't pass through PCI cards to my guests.

I'm running 10.04 server x64 on both host and guest.

In /etc/libvirt/qemu/abstractions/libvirt-qemu I've added:

 [CODE] /sys/bus/usb/devices/ r,
  /sys/bus/usb/devices/** r,
  /sys/devices/**/usb[0-9]*/** r,
  /sys/bus/pci/devices/ r,
  /sys/bus/pci/devices/** r,
  /sys/devices/pci/** r,

  /dev/shm/ r,
  /dev/shm/pulse-shm* r,
  /dev/shm/pulse-shm* rwk,
  /dev/snd/* rw,
  /dev/bus/usb/** rw,
  /dev/** rwk,[/CODE]

In virt-aa-helper I added

[CODE]/sys/devices/** r,[/CODE]

I'm still getting this in the start up log and syslog:

[CODE]device: 03:06.0: driver="pci-assign" host="03:06.0"
device: 03:06.1: driver="pci-assign" host="03:06.1"
device: 03:06.2: driver="pci-assign" host="03:06.2"
get_real_device: /sys/bus/pci/devices/0000:03:06.0/config: Permission denied
pci-assign: Error: Couldn't get real device (03:06.0)!
Error initializing device pci-assign
[/CODE]
[CODE]May 10 23:14:25 hal kernel: [ 179.037233] type=1503 audit(1273529665.107:22): operation="open" pid=1601 parent=1 profile="libvirt-28b82cfd-52c0-b743-475e-77dde3933f44" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/sys/devices/pci0000:00/0000:00:14.4/0000:03:06.0/vendor"[/CODE]

I don't know what template file is used to create [I]libvirt-28b82cfd-52c0-b743-475e-77dde3933f44[/I]

Can anybody help me please?

Thanks,

James.

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu 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 James Neave for more information if necessary.

To post a message you must log in.