USB Redirector

From Proxmox VE
Jump to: navigation, search

For more recent versions of Proxmox, see USB physical port mapping.

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

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 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:


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`/' 

now you are ready to do the install by:


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: