USB Pass through changed?

wheaties82

New Member
Dec 27, 2010
10
0
1
I am seeing some inconsistent behavior in PVE 1.9 vs PVE 2.0. I have been able to successfully pass through a USB connection from the host machine to a guest KVM, but the functionality of the device has changed and I am struggling to find any errors or indications of something not working correctly. Any insight would be greatly appreciated.

I am trying to pass through a MFC Brother printer/scanner from host machine to guest machine. The printer AND scanner were functioning perfectly in PVE 1.9. After upgrading to PVE 2.0 I got the printer to function normally, however the scanner is not working. The guest machine sees it as a scanner, but when I actually attempt to scan something (using simple scan) the program can never actually communicate with the scanner. It eventually times out and fails. I am not seeing errors in the guest or host machine indicating that there is an issue with USB pass through, however the functionality no longer exists.

I even started from scratch with a fresh install on a new KVM guest (same OS, same scanner driver[brscan2-0.2.5-1.i386.deb]) and have seen the same results -- the printer works as expected, however the scanner does not respond.

-----------------------------------------------------------------------------
Guest Machine - Ubuntu 11.10 KVM


print@print:~$ lsusb; sane-find-scanner; scanimage -L
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 04f9:0183 Brother Industries, Ltd DCP-7020
Bus 004 Device 002: ID 0627:0001 Adomax Technology Co., Ltd


# sane-find-scanner will now attempt to detect your scanner. If the
# result is different from what you expected, first make sure your
# scanner is powered up and properly connected to your computer.


# No SCSI scanners found. If you expected something different, make sure that
# you have loaded a kernel SCSI driver for your SCSI adapter.


found USB scanner (vendor=0x04f9, product=0x0183) at libusb:002:002
# Your USB scanner was (probably) detected. It may or may not be supported by
# SANE. Try scanimage -L and read the backend's manpage.


# Not checking for parallel port scanners.


# Most Scanners connected to the parallel port or other proprietary ports
# can't be detected by this program.


# You may want to run this program as root to find all devices. Once you
# found the scanner devices, be sure to adjust access permissions as
# necessary.
device `brother2:bus3;dev1' is a Brother DCP-7020 USB scanner


I tried to also use xsane and that gives me an error message that says failed to start scanner.



-----------------------------------------------------------------------------

If this was the first time installing the scanner in Ubuntu 11.10 I might attribute it to a Ubuntu bug issue, however as it was functioning with PVE 1.9 and Ubuntu 11.10 as the guest OS (using same VM As 1.9 and attempting new install on 2.0) but no longer functions after switching to PVE 2.0 logic seems to point at perhaps USB pass through isn't actually allowing the guest KVM to communicate/start the host-attached scanner device.

I am seeing this message in the host machine syslogs, not sure if it is relevant

Feb 22 20:00:22 desmo kernel: usb 3-1: usbfs: interface 0 claimed by usblp while 'kvm' sets config #1

Anyone else experiencing similar odd behavior with USB pass through? I plan on attempting to create Windows VM and see if I can reproduce the scanner behavior, but haven't got to that point yet. Will update thread with results.
 
Installed KVM guest with Win 7 x64 SP1, did the USB pass through for the multi-function device and it registered in Device Manager. Performed driver upgrade with the latest drivers from Brother's website, rebooted machine and everything came up fine. The printer works just fine -- just like it did in Ubuntu, but once again I am unable to communicate with the scanner.

After a lengthy wait time Windows finally displays an error message that says "The device is busy. After the current scanning operation is completed, please try again [TW011]"

And another error message that states:

"Scanning failed.

Please try to scan the image again, if the error happens again please restart your computer, and then try to scan again.
(CC3-205-03031f04)


I looked in the event viewer logs and saw this error:

"TWN BrtTWN: [2012/02/23 18:32:03.325]: [00001844]: RawWriteCommand failed."
Source: Brother BrLog

as well as this one:

"CTLCN BrtCTLCN: [2012/02/23 20:47:22.396]: [00001844]: brccMCtl.exe: ErrorMessage.cpp (0241):-------- error code is [0x03031f04]."
Source Brother BrLog

I don't pretend to be a developer -- I am just an average user, but it appears to me as though the USB pass through is not allowing the guest machine to communicate to a TWAIN device, independent of what the KVM guest OS is using.

Anyone else seeing this behavior in KVM? Anyone have any ideas?
 
Last edited:
Sure, but um.... :confused: newb here... how do I do that?

KVM like openvz have their own mail lists and possibly forums

google / search : kvm mailing lists

this was at the top: http://www.linux-kvm.org/page/Lists,_IRC

there are archives to search on the 'general and x86' row. I saw 3 archives, 2 had search boxes at the top of page.

it is good to search those for a solution before posting a question.

if the answer is not in the archives, or even if it is and you could not find it [ which happens to me ]. then subscribe to 'general and x86' and post the question there.

and please report the solution back here.

 
I have fought with virtualization and USB devices myself and given up.
It is too much of a hassle and what worked today might not work tomorrow.
My suggestion is to stop wasting time, spend a tiny amount of money and solve your problem.

For about $50, likely cheaper than the labour you have put into solving this so far, you can purchase a device that should solve your problems forever.
Get a device that allows you to access a USB device over the network like this one:
http://www.amazon.com/SIIG-ID-DS0512-S1-USB-Over-1PORT/dp/B002C6J9ZW
NOTE: The above device is simply the first one I found for under $50 searching google, it may not work for your particular needs.
I suspect that this SIIG one does not work with Linux but there likely is a Linux compatible one available from somewhere.

With such a device you no longer need to deal with USB pass through headaches and it will work if you are using Proxmox, vmware, xen,Hyper-V or whatever.
As an added bonus you can even do live migration since your USB device is no longer tied to the physical machine your VM is running on.
 
So that allows USB over I/P ? that is cool. Have you used any particular models?

We have a Belkin device we purchased 4 or 5 years ago, I think this is the same model:
http://www.belkin.com/networkusbhub/

The PC sees any USB device that is plugged into it just like if it had been plugged into the PC directly.
We used it in our conference room because the PC was in an inaccessible location.
People can simply plug in their USB flash drives/card readers etc into the Belkin device that sits on a table in the corner.

Feels like I've been hit on the head a million times with a clue stick after finally deducing that one of these devices is a perfectly good solution to these USB pass through problems.
 
So that allows USB over I/P ? that is cool. Have you used any particular models?

I've done a little research, there are some references to people using that Belkin device with Ubuntu using usbip in linux.
man page for usbip: http://manpages.ubuntu.com/manpages/oneiric/man8/usbip.8.html

My workstation at work is running 11.10, unless I forget, I will try to access a USB device through our belkin USB network hub and report back my findings next week.
 
Well looks like the latest kernel in Ubuntu is busted so I was unable to test my Belkin device with Ubuntu.
https://bugs.launchpad.net/ubuntu/+source/usbip/+bug/900384

The usbip modules exist in the proxmox kernel, so it would be possible to run usbip daemon in the proxmox host.
Plug your USB device into Proxmox server
Then share the USB device on the network.

Next you can get usbip setup on your guest (works on linux and windows too) and connect to your USB device.

So you can do this for free too rather than getting a device.

Found a nice how-to here:
http://www.howtoforge.com/how-to-modify-your-gnu-linux-box-to-serve-as-a-usb-over-ip-server
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!