Bob's Notepad

Notes on projects I have done and things I have learned saved for my reference and for the world to share

Thursday, March 12, 2009

Using USB devices on Windows under VMware ESXi (Aladdin Hardlock)

VMware is quickly becoming the best way to run servers of all kinds and now that ESXi is free we're going to continue to see more and more functions moved onto a virtualized platform. Recently I've been working on a project for one of my customers which involves installing software for their Trumpf metal working equipment and ran into a small issue that I was able to overcome.

In short, this hardware requires the use of a USB dongle or "Hardware key" in order to run (this is an anti-piracy feature). The problem with ESXi is that you are not able to pass a USB device through to a virtual machine. Thankfully, a handful of companies have created Networked USB Hubs such as the Belkin F5L009. Everything immediately worked by plugging this in.... well, sort of :)

The issue that occurs inside of a VMware server is when you install Windows there is no USB root devices found so Windows does not install the proper USB support files. In this case, it's only a single file, USBD.SYS, that is missing.

1- Connect your USB hub to your network
2- Install the Belkin client software as the instructions explain
3- Ignore any new hardware wizards that occur.
4- Locate a USBD.SYS file. Often times you can find this on the same machine but, if needed, look on another Windows machine or in the i386 folder on your Windows installation CD. Copy this file to C:\windows\system32\drivers\
5- Reboot the virtual machine
6- Once the machine reboots, complete installation of your software, hardlock drivers, or any other USB device that you connect. Everything should function as intended and you have a little box that holds physical USB ports for your virtual machine.

Some notes on my installation.

* If you are using an Aladdin Hardlock USB key, you can most likely find new drivers on Aladdin's Hardlock Page.

* My Belkin Network USB Hub is running firmware version 1.2.0

* I found it's extremely handy to dedicate the USB hub to a single machine and to tell it to auto connect new devices. This literally makes the box just like real USB ports on the virtual machine. There are lots of options to play with as far as sharing devices to other specific machines but I did not play with any of that.

* Auto-connecting Hardlock keys is essential if you are running some type of server. If you tell your key to only connect manually your software may start before you mount the USB device and a pissed off program would likely ensue :)

* There are a few vendors that make an identical product but, from my research, I found that the Belkin is about 1/3 of the cost of most of them and also has some additional features. Digi makes a product that many people are using with VMware since it's marketed as being compatible with VMware but you will spend lots of money for that sentence -- and that's really all it is because this type of a device really has NO interaction with VMware at all since its a physical device communicating directly with your virtual machine on the network.

Labels: , , , , , ,

Reference Link