Storage optimize

How to add USB devices to vSphere VMs

Since vSphere 4, VMs can leverage USB devices. Rick Vanover shows how to connect a USB device to a vSphere VM.

When vSphere first directly and easily supported USB connectivity for VMs, I was initially not that interested in the idea. For a long time, I had used Ethernet-attached USB devices for license dongles on VMs (takes care of the vMotion “problem”) and had preferred to avoid complicating the situation. Further, the proliferation of USB storage devices wasn’t what it is today.

So, I’ve taken the plunge and accepted the use of USB storage in VMs -- only in certain situations, such as one-time offloads and additional out of band protection (like backups). The process is fairly straightforward in that it is easy, though a few steps are required. VMware KB 1022290 is a good starting point for how to configure USB devices for vSphere VMs.

I’ve walked through the process here in my lab recently, and I’ll share it with you. The best part also is that this can be added through virtual device hot add, which allows this to be done while the VM is powered on. The first step is to add the USB controller to the VM, as shown in Figure A below:

Figure A

Click to enlarge
After that is completed, ensure that the guest OS enumerates a USB controller in the device hardware. If it is Windows Server 2003 R2, some intervention will be required (unless it was a P2V and it knows what USB controllers are). Windows Server 2008 natively discovers it and carries on fine. After the guest OS clearly shows the USB controller, the specific USB device from the active host enumeration can be added to the individual VM inventory as shown in Figure B below:

Figure B

At that point, the USB device is ready to go in the guest VM. In my example, it is a USB storage drive that is a nice extra boost of storage and will be transported to a different site. Should this VM undergo a vMotion event, the USB device mapping would be lost. For the use case, this is the best option and works pretty well.

Do you use USB pass-through on your vSphere VMs? What tricks do you leverage? Share your comments below.

About

Rick Vanover is a software strategy specialist for Veeam Software, based in Columbus, Ohio. Rick has years of IT experience and focuses on virtualization, Windows-based server administration, and system hardware.

6 comments
obeiro
obeiro

I've been using a software solution for quite a while. USB over Network from Fabulatech. http://www.fabulatech.com/usb-over-network.html You need to install a server on a physical machine to plug the USB dongle (an Aladding Hasp Key in my case), then just install clients wherever you need them, and connect. Support is quite fast, and I could try it for a few days to check it fitted ou enviroment, as I wasn't really sure (how could I!) and the software I planned to virtualized was critical and offered no license management alternative.

data101
data101

I've recently been asked how to connect a USB D-link network adapter to an ESXi server. As I don't have one my self I gave them the same solution posted above. If anybody has a better answer I'd appreciate it. :-)

BSHcow
BSHcow

For USB hardware keys we have used a network attached virtual USB appliance. This is very simple to use and manage. An agent is just installed on the machine which then senses the device on the network. It was very inexpensive and we have it located in our local data center while our ESX's and hosts are located in a remote data center.

neicken
neicken

Can you please provide more info on this appliance? Name, website, etc... I need to install drivers from a USB check scanner into a master-image VM. This could solve my problem. Thanks!

BSHcow
BSHcow

The link below posted by robo_dev is excactly it. Sorry I was drawing a blank on the name yesterday. Its the Digi Anywhere USB. Its been really good for us.