USB passthrough - virt-aa-helper must grant /run/udev/data/ r
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt (Ubuntu) |
Confirmed
|
Medium
|
Unassigned |
Bug Description
When trying to use an USB printer from a QEMU guest (created with virt-manager) I get many apparmor errors in /var/log/kern.log, like:
Nov 8 18:08:00 ombu kernel: [ 8603.301618] audit: type=1400 audit(144701688
Nov 12 20:01:35 ombu kernel: [360670.214358] audit: type=1400 audit(144736929
The guest can't see the USB device at all. I solved the problem by editing /etc/apparmor.
/dev/bus/usb/ r,
to this:
/dev/bus/usb/ rw,
and adding these two lines:
/dev/
/run/udev/** rw,
And then restarting apparmor and libvirtd. I think a similar configuration must come included in /etc/apparmor.
ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: libvirt-bin 1.2.16-2ubuntu11
Uname: Linux 4.3.0-040300-
ApportVersion: 2.19.1-0ubuntu4
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Nov 12 20:10:16 2015
InstallationDate: Installed on 2015-10-30 (13 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
SourcePackage: libvirt
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
modified.
modified.
modified.
mtime.conffile.
mtime.conffile.
summary: |
- apparmor for qemu is too restrictive for USB passthrough + USB passthrough - virt-aa-helper must grant /run/udev/data/ r |
Changed in libvirt (Ubuntu): | |
status: | Incomplete → Confirmed |
Thanks for reporting this bug.
Can you tell use exactly how you told virt-manager about the printer? For other types of usb devices (like an ereader) this has definately created the needed rules for me.
Adding a blanket '/run/udev/** rw' rule would not be safe, but we should be able to find a way to add the needed rules through virt-aa-helper.
status: incomplete
priority: medium