I stuck at getting USB passthrough working with Windows 8.1 guest OS on Ubuntu Server 14.04. I started by installing qemu using the Ubuntu Documentation (https://help.ubuntu.com/community/KVM). The USB device (Datev mIdentity) was recognized by the guest but I could not get any access. It's the same bug as reported earlier (https://bugs.launchpad.net/qemu/+bug/1033727)
lsusb output on host:
# lssub
[239775.341958] usb 3-4: hub failed to enable device, error -22
[239775.508845] usb 3-4: reset full-speed USB device number 11 using xhci_hcd
[239775.508893] xhci_hcd 0000:00:14.0: Setup ERROR: setup context command for slot 10.
[239775.509931] usb 3-4: hub failed to enable device, error -22
[239775.676980] usb 3-4: reset full-speed USB device number 11 using xhci_hcd
[239775.695110] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8800cee83100
[239775.695114] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8800cee83148
[239775.695115] xhci_hcd 0000:00:14.0: xHCI xhci_drop_endpoint called with disabled ep ffff8800cee83190
[239775.695517] usb 3-4: usbfs: process 23897 (pcscd) did not claim interface 0 before use
[239786.195869] usb 3-4: usbfs: interface 0 claimed by usbfs while 'qemu-system-x86' sets config #1
In /var/log/libvirt/qemu/VM.log I found following line:
libusb_set_configuration: -6 [BUSY]
After a lot of reading, I set up a udev rule to grant access to the libvirt-group, defined the device in the vm's xml definition and checked if appamor is blocking. Everything looks good, but still the same error.
Then I build qemu from source with --enable-libusb flag set. Still the same error.
QEMU version:
# /usr/bin/qemu-system-x86_64 -version
QEMU emulator version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.13), Copyright (c) 2003-2008 Fabrice Bellard
libsub version:
# dpkg -l | grep libusb
ii libgusb2:amd64 0.1.6-5 amd64 GLib wrapper around libusb1
ii libusb-0.1-4:amd64 2:0.1.12-23.3ubuntu1 amd64 userspace USB programming library
ii libusb-1.0-0:amd64 2:1.0.17-1ubuntu2 amd64 userspace USB programming library
ii libusb-dev 2:0.1.12-23.3ubuntu1 amd64 userspace USB programming library development files
ii libusbredirparser1:amd64 0.6-2ubuntu1 amd64 Parser for the usbredir protocol (runtime)
libvirt version:
# dpkg -l | grep libvirt
ii libvirt-bin 1.2.2-0ubuntu13.1.10 amd64 programs for the libvirt library
ii libvirt0 1.2.2-0ubuntu13.1.10 amd64 library for interfacing with different virtualization systems
ii python-libvirt 1.2.2-0ubuntu2 amd64 libvirt Python bindings
At this point I've got no idea what's going on. I appreciate any help. Thanks a lot!