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:
Click to enlargeAfter 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:
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.