[libvirt-users] USB passthrough not working

I just updated an Ubuntu Oneiric to Raring and the VM that works fine on one fails to start a VM with this passthrough: <hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x055f'/> <product id='0x040b'/> <address bus='3' device='8'/> </source> </hostdev> It just dies at boot time.

On 05/20/2013 08:20 PM, Dale Amon wrote:
I just updated an Ubuntu Oneiric to Raring and the VM that works fine on one fails to start a VM with this passthrough:
<hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x055f'/> <product id='0x040b'/> <address bus='3' device='8'/> </source> </hostdev>
It just dies at boot time.
Can you post actual versions of libvirt and qemu in use before and after the distro upgrade? Also, can you investigate if there were any useful messages in either /var/log/libvirt/libvirtd.log or /var/log/libvirt/qemu/$guest.log? Otherwise, you haven't given us quite enough to go on. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On Mon, May 20, 2013 at 08:43:45PM -0600, Eric Blake wrote:
On 05/20/2013 08:20 PM, Dale Amon wrote:
I just updated an Ubuntu Oneiric to Raring and the VM that works fine on one fails to start a VM with this passthrough:
<hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x055f'/> <product id='0x040b'/> <address bus='3' device='8'/> </source> </hostdev>
It just dies at boot time.
Can you post actual versions of libvirt and qemu in use before and after the distro upgrade? Also, can you investigate if there were any useful messages in either /var/log/libvirt/libvirtd.log or /var/log/libvirt/qemu/$guest.log? Otherwise, you haven't given us quite enough to go on.
Understood. I figured you'd tell me exactly what you needed :-) Will dig it all out and get it to you ASAP.

On Mon, May 20, 2013 at 08:43:45PM -0600, Eric Blake wrote:
On 05/20/2013 08:20 PM, Dale Amon wrote:
I just updated an Ubuntu Oneiric to Raring and the VM that works fine on one fails to start a VM with this passthrough:
<hostdev mode='subsystem' type='usb' managed='no'> <source> <vendor id='0x055f'/> <product id='0x040b'/> <address bus='3' device='8'/> </source> </hostdev>
It just dies at boot time.
Can you post actual versions of libvirt and qemu in use before and after the distro upgrade? Also, can you investigate if there were any useful messages in either /var/log/libvirt/libvirtd.log or /var/log/libvirt/qemu/$guest.log? Otherwise, you haven't given us quite enough to go on.
I hope these are the items for which you wanted the versions. Old Version: libvirt-bin 0.9.2-4ubuntu15.3 qemu-kvm 0.14.1+noroms-0ubuntu6.6 Cur Version: libvirt-bin 1.0.2-0ubuntu11.13.04.1 qemu-kvm 1.4.0+dfsg-1expubuntu4 /var/log/libvirt/libvirtd.log 2013-05-21 01:47:31.588+0000: 1823: info : libvirt version: 1.0.2 2013-05-21 01:47:31.588+0000: 1823: error : virNetSocketReadWire:1323 : End of file while reading data: Input/output error 2013-05-21 01:47:52.807+0000: 1829: error : usbFindDevice:297 : internal error Did not find USB device 55f:40b bus:3 device:8 2013-05-21 01:47:52.830+0000: 1829: warning : qemuDomainReAttachHostUsbDevices:964 : Unable to find device 003.008 in list of active USB devices 2013-05-21 01:47:52.830+0000: 1829: error : qemuRemoveCgroup:760 : internal error Unable to find cgroup for scan.islandone.org 2013-05-21 01:47:52.830+0000: 1829: warning : qemuProcessStop:4302 : Failed to remove cgroup for scan.islandone.org 2013-05-21 01:47:52.830+0000: 1829: error : virPortAllocatorRelease:174 : port 0 must be in range (5900, 65535) 2013-05-21 01:47:52.831+0000: 1829: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=disk reason=start vm="scan.islandone.org" uuid=a84f82d4-5912-6f1a-065f-71a6f554af22 old-disk="?" new-disk="/TravelCache/vm_pool/scan.islandone.org.img": Operation not permitted 2013-05-21 01:47:52.831+0000: 1829: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=net reason=start vm="scan.islandone.org" uuid=a84f82d4-5912-6f1a-065f-71a6f554af22 old-net=? new-net=52:54:00:43:D0:41: Operation not permitted 2013-05-21 01:47:52.831+0000: 1829: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=dev reason=start vm="scan.islandone.org" uuid=a84f82d4-5912-6f1a-065f-71a6f554af22 bus=usb device="003.008": Operation not permitted 2013-05-21 01:47:52.831+0000: 1829: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=mem reason=start vm="scan.islandone.org" uuid=a84f82d4-5912-6f1a-065f-71a6f554af22 old-mem=0 new-mem=1048576: Operation not permitted 2013-05-21 01:47:52.831+0000: 1829: warning : virAuditSend:135 : Failed to send audit message virt=kvm resrc=vcpu reason=start vm="scan.islandone.org" uuid=a84f82d4-5912-6f1a-065f-71a6f554af22 old-vcpu=0 new-vcpu=2: Operation not permitted 2013-05-21 01:47:52.831+0000: 1829: warning : virAuditSend:135 : Failed to send audit message virt=kvm op=start reason=booted vm="scan.islandone.org" uuid=a84f82d4-5912-6f1a-065f-71a6f554af22 vm-pid=-1: Operation not permitted /var/log/libvirt/qemu/scan.islandone.org.log 2013-05-18 19:27:01.554+0000: shutting down 2013-05-18 20:42:23.440+0000: shutting down 2013-05-18 20:43:50.411+0000: shutting down 2013-05-21 01:47:52.807+0000: shutting down

Oh, and I have confirmed that at least on other VM, a Windows-7 one, does indeed start up and come up to a login panel.

Just so you know, I have confirmed the USB device is there using lsusb on the hosting computer: Bus 002 Device 004: ID 055f:040b Mustek Systems, Inc. ScanExpress A3 USB 1200 PRO

On 05/21/2013 06:28 AM, Dale Amon wrote:
Just so you know, I have confirmed the USB device is there using lsusb on the hosting computer:
Bus 002 Device 004: ID 055f:040b Mustek Systems, Inc. ScanExpress A3 USB 1200 PRO
This doesn't match the XML: <address bus='3' device='8'/> If you only have one device with that vendor:product ID, you can just leave the address out of the XML. Jan

On Tue, May 21, 2013 at 09:25:53AM +0200, Ján Tomko wrote:
On 05/21/2013 06:28 AM, Dale Amon wrote:
Just so you know, I have confirmed the USB device is there using lsusb on the hosting computer:
Bus 002 Device 004: ID 055f:040b Mustek Systems, Inc. ScanExpress A3 USB 1200 PRO
This doesn't match the XML: <address bus='3' device='8'/>
If you only have one device with that vendor:product ID, you can just leave the address out of the XML.
I will give that a try and get back to you.

On Tue, May 21, 2013 at 09:25:53AM +0200, Ján Tomko wrote:
This doesn't match the XML: <address bus='3' device='8'/>
If you only have one device with that vendor:product ID, you can just leave the address out of the XML.
Yep. You got it. The older system must have either been ignoring this information or else the scanner was just always found at that address.
participants (3)
-
Dale Amon
-
Eric Blake
-
Ján Tomko