USB hardware not autodetected

Bug #802647 reported by mattismyname
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qemu-kvm (Ubuntu)
Triaged
Low
Unassigned

Bug Description

OS: Ubuntu 11.04 x86_64 server image
qemu-kvm: 0.14.0+noroms-0ubuntu4.1

Steps to reproduce problem:
1. Boot a VM
2. Add a USB auto filter for device: virsh qemu-monitor-command oag01 usb_add\ host:*.*:0951:1642
3. Verify filter was added: virsh qemu-monitor-command oag01 info\ usbhost
4. Plug in USB device with appropriate ID
5. Verify device shows in host listing: virsh qemu-monitor-command oag01 info\ usbhost
6. Check for device passed through to guest: virsh qemu-monitor-command oag01 info\ usb

Expected outcome: Device was passed through to guest after plugging it in.
Actual outcome: Device was not passed through to guest (step 6 above produces no output)

Revision history for this message
mattismyname (mattismyname) wrote :

I just found the qemu logfile for this VM and saw the following:

husb: open device 2.2
/dev/bus/usb/002/002: Permission denied
husb: open device 2.11
/dev/bus/usb/002/011: Permission denied
husb: open device 6.2
/dev/bus/usb/006/002: Permission denied
husb: open device 2.12
/dev/bus/usb/002/012: Permission denied

Looks to be a likely permissions problem.

Revision history for this message
mattismyname (mattismyname) wrote :

Also, this from kern.log:

Jun 27 03:32:51 oah01 kernel: [10894.848750] type=1400 audit(1309170771.373:139): apparmor="DENIED" operation="open" parent=1 profile="libvirt-bb801dd2-829f-0b8a-4702-52cd23f5e090" name="/dev/bus/usb/002/012" pid=3354 comm="kvm" requested_mask="rw" denied_mask="rw" fsuid=102 ouid=102

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for taking the time to report this bug.

To work around this, please follow comments #1 and #12 from bug 545795. (If you prefer I can quote them here). That will tell apparmor to allow the accesses you want.

Please let us know if you continue to have problems.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I'm setting this bug to triaged as I think the solution should be more discoverable. I'm not however sure how to accomplish that, open to suggestions.

Changed in qemu-kvm (Ubuntu):
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.