How to forward USB device to a virtual machine

Written by - 0 comments

Published on - Listed in Windows VMware Network Virtualization Hardware


In the past weeks I came across several applications which needed a USB dongle as hardware license. The problem with virtualization is that such dongles can't be simply plugged to the physical host - what happens when the machines moves (vmotion)?

One of the possible solutions is to forward the USB device via IP. That successfully works with a Digi AnywhereUSB 5, a 5-port USB hub which forwards attached USB devices to one remote host. Yes, only one remote host. And that causes a problem of course. The goal should be to have a USB forwarding machine which can handle different USB devices and forward them to different hosts.

Luckily Digi has also a bigger horse in the race: Digi AnywhereUSB/14, a 14-port USB hub:

Digi AnywhereUSB/14

This horse eats more (= pricey) but it is much more powerful as well. It has the possibility to define so-called groups to which one or several of the 14 ports can be assigned:

AnywhereUSB Port Group Configuration
AnywhereUSB Software Group Number

The software on the remote host (the virtual machine) can then be configured to connect to a defined Group Number.

As soon as the software then connects to the IP-USB-Hub, it takes ownership of all USB devices attached to the defined group.
So far I've tested it with two virtual machines, both accessing each one USB device: VM1->Group1->Port1, VM2->Group2->Port2. Works like a charm!

There was one minor issue though. Once the software on the VM successfully connected to the AnywhereUSB device, Windows couldn't find the correct driver for the USB Hub:

AnywhereUSB Windows can't find RealUSB driver

This can be solved easily though, as it is marked in this KB entry on the Digi website.
A missing file (usbd.sys) in the C:\Windows\system32\drivers folder (on W2k3 32bit) causes this problem. A virtual machine doesn't have (by default) a USB controller, therefore the installation of Windows doesn't contain all USB drivers, compared to "normal" installations on physical machines. Just copy the missing file (usbd.sys) from a similar machine (same OS, same architecture) to the VM and restart the machine. The drivers will be working at the next boot.


Add a comment

Show form to leave a comment

Comments (newest first)

No comments yet.

RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   OpenSearch   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder