USB Redirector: Difference between revisions
(Created page with "http://forum.proxmox.com/threads/4719-BSOD-with-USB-device-passthrough-on-Windows-XP-virtual-machine http://www.incentivespro.com/forum/viewtopic.php?t=295&highlight=64bit http…") |
No edit summary |
||
Line 1: | Line 1: | ||
When trying to use USB and especially USB2 devices in a KVM VM it's most likely that you will fail because qemu/KVM does not support USB pass thru too well. But there is a solution for this problem: The Incentives Pro USB Redirector http://www.incentivespro.com | |||
The Linux part is free, the Windows part is not. But when you need reliable support for devices connected to the server in a KVM Windows VM it's worth the few bucks. | |||
The Linux part of the software consists of the following components: | |||
* a kernel module(tusbd.ko) | |||
* a daemon (usbsrvd) | |||
* a control application (usbsrv) | |||
Currently (01/2011) there are a few problems with the setup of the kernel module because the official source code of USB Redirector is not up to date and does not work out of the box wicht current kernels - e.g. 2.6.35. You need: | |||
* the official distribution source: http://incentivespro.com/usb-server-x64.tar.gz | |||
* a more recent version of tusdb.ko source: http://incentivespro.com/tusbd2.6.31.zip | |||
* a patch for the 2.6.31 version: http://www.fnarfbargle.com/tusbd-2.6.36.patch.gz | |||
===Setup=== | |||
The following asumes that all files are located in /tmp. First resolve the dependencies. You require a basic development environment: | |||
apt-get install build-essential pve-headers-`uname -r` | |||
then extract the base distribution: | |||
cd /tmp | |||
tar xfz usb-server-x64.tar.gz | |||
unzip the replacement kernel module source: | |||
unzip tusbd2.6.31.zip | |||
and copy it to it's destination: | |||
cd tusbd2.6.3 | |||
cp * /tmp/usb-server/modules/src/tusbd/ | |||
now patch the source: | |||
cd /tmp/usb-server/modules/src/tusbd/ | |||
zcat /tmp/tusbd-2.6.36.patch.gz | patch -p1 | |||
the patch should apply with out any rejects. The last step is to patch the installer. Go to the main folder: | |||
cd /tmp/usb-server | |||
and edit the intaller by: | |||
sed -i 's/KERNELDIR=\/usr\/src\/linux/KERNELDIR=\/usr\/src\/linux-headers-`uname -r`/' installer.sh | |||
now you are ready to do the install by: | |||
./installer.sh | |||
It should show no errors and report success. Now you are ready to share connected USB devices. First list the detected devices: | |||
usbsrv -l | |||
this displays some thing like this: | |||
<pre> | |||
================= USB SERVER OPERATION SUCCESSFUL =============== | |||
List of USB devices: | |||
1: SE USB Device ServerEngines / Composite USB Device | |||
Vid: 0000 Pid: 0000 Port: 6-1 | |||
Status: plugged | |||
2: Wireless Desktop MLK / Composite USB Device | |||
Vid: 046a Pid: 0101 Port: 8-2 | |||
Status: plugged | |||
3: FreeAgent Go Seagate / USB Mass Storage Device | |||
Vid: 0bc2 Pid: 2101 Port: 1-3.3 | |||
Status: plugged | |||
4: FreeAgent Go Seagate / USB Mass Storage Device | |||
Vid: 0bc2 Pid: 2101 Port: 1-3.4 | |||
Status: plugged | |||
5: CANON DR-5010C CANON | |||
Vid: 04a9 Pid: 1606 Port: 2-5 | |||
Status: not plugged, shared | |||
===================== ======================= =================== | |||
</pre> | |||
If you want to share the Canon Scanner do: | |||
usbsrv -share 5 | |||
where 5 is the ID of the device showen in the listing. Completely redundant is: | |||
usbsrv -share -vid 04a9 -pid 1606 -usbport 2-5 | |||
Now you are ready to connect the Windows client. For a how to see: | |||
http://www.incentivespro.com/usb-redirector.html | |||
===Links=== | |||
http://forum.proxmox.com/threads/4719-BSOD-with-USB-device-passthrough-on-Windows-XP-virtual-machine | http://forum.proxmox.com/threads/4719-BSOD-with-USB-device-passthrough-on-Windows-XP-virtual-machine | ||
Revision as of 19:29, 3 January 2011
When trying to use USB and especially USB2 devices in a KVM VM it's most likely that you will fail because qemu/KVM does not support USB pass thru too well. But there is a solution for this problem: The Incentives Pro USB Redirector http://www.incentivespro.com
The Linux part is free, the Windows part is not. But when you need reliable support for devices connected to the server in a KVM Windows VM it's worth the few bucks.
The Linux part of the software consists of the following components:
- a kernel module(tusbd.ko)
- a daemon (usbsrvd)
- a control application (usbsrv)
Currently (01/2011) there are a few problems with the setup of the kernel module because the official source code of USB Redirector is not up to date and does not work out of the box wicht current kernels - e.g. 2.6.35. You need:
- the official distribution source: http://incentivespro.com/usb-server-x64.tar.gz
- a more recent version of tusdb.ko source: http://incentivespro.com/tusbd2.6.31.zip
- a patch for the 2.6.31 version: http://www.fnarfbargle.com/tusbd-2.6.36.patch.gz
Setup
The following asumes that all files are located in /tmp. First resolve the dependencies. You require a basic development environment:
apt-get install build-essential pve-headers-`uname -r`
then extract the base distribution:
cd /tmp tar xfz usb-server-x64.tar.gz
unzip the replacement kernel module source:
unzip tusbd2.6.31.zip
and copy it to it's destination:
cd tusbd2.6.3 cp * /tmp/usb-server/modules/src/tusbd/
now patch the source:
cd /tmp/usb-server/modules/src/tusbd/ zcat /tmp/tusbd-2.6.36.patch.gz | patch -p1
the patch should apply with out any rejects. The last step is to patch the installer. Go to the main folder:
cd /tmp/usb-server
and edit the intaller by:
sed -i 's/KERNELDIR=\/usr\/src\/linux/KERNELDIR=\/usr\/src\/linux-headers-`uname -r`/' installer.sh
now you are ready to do the install by:
./installer.sh
It should show no errors and report success. Now you are ready to share connected USB devices. First list the detected devices:
usbsrv -l
this displays some thing like this:
================= USB SERVER OPERATION SUCCESSFUL =============== List of USB devices: 1: SE USB Device ServerEngines / Composite USB Device Vid: 0000 Pid: 0000 Port: 6-1 Status: plugged 2: Wireless Desktop MLK / Composite USB Device Vid: 046a Pid: 0101 Port: 8-2 Status: plugged 3: FreeAgent Go Seagate / USB Mass Storage Device Vid: 0bc2 Pid: 2101 Port: 1-3.3 Status: plugged 4: FreeAgent Go Seagate / USB Mass Storage Device Vid: 0bc2 Pid: 2101 Port: 1-3.4 Status: plugged 5: CANON DR-5010C CANON Vid: 04a9 Pid: 1606 Port: 2-5 Status: not plugged, shared ===================== ======================= ===================
If you want to share the Canon Scanner do:
usbsrv -share 5
where 5 is the ID of the device showen in the listing. Completely redundant is:
usbsrv -share -vid 04a9 -pid 1606 -usbport 2-5
Now you are ready to connect the Windows client. For a how to see:
http://www.incentivespro.com/usb-redirector.html
Links
http://forum.proxmox.com/threads/4719-BSOD-with-USB-device-passthrough-on-Windows-XP-virtual-machine
http://www.incentivespro.com/forum/viewtopic.php?t=295&highlight=64bit