<

HOW TO: Add and Connect a USB Device to a Virtual Machine, hosted on VMware vSphere Hypervisor ESX 4.1 ESXi 4.1, ESXi 5.0

Published on
184,646 Points
119,246 Views
39 Endorsements
Last Modified:
Approved
Andrew Hancock (VMware vExpert / EE Fellow)
MVE^2, Expert of the Year 2017-2011, Scribe 2016-2012, Author of the Year 2017-6,2013-2012 VMware vExpert 2018-2011 27 years of experience.
One of the new features of a version 7.0 or later virtual machine, supported in VMware vSphere 4.1, 5.0 or the VMware vSphere Hypervisor ESXi 4.1, ESXi 5.0 often overlooked by VMware Administrators is the ability to add and connect USB devices connected to the VMware host ESXi server to Virtual Machines. VMware refers to this as USB Passthrough.

Virtual Machine Versions 7 and above support USB Passthrough. vMotion is also supported on the virtual machine, and the USB device will stay connected to the original host, with the USB device. VMware ESXi and the Virtual Machine use a "USB over IP" mapping to remain connected, in this way virtual machines are not "locked" to hosts, which is important with load balancing in VMware DRS.

It is now possible to use USB Modems, USB Security Keys, USB Serial Devices, USB VOIP devices, USB flash drives and USB external disks to connect to virtual machines.

USB Passthrough is supported on Windows XP, Windows Vista, Windows 7, Windows 2003, and Windows 2008 and Windows 2008 R2 virtual machines. Also various Linux distributions.

The background to writing this aticle, a physical small server in our office, the VOIP Gateway which handles the VOIP international telephone calls from the UK via SIPPS gateway on the Internet - FAILED. (It is chepaer than BT Business Tariffs!). The VOIP Gateway uses a USB wireless dongle to interface with the DECT ISDN exchange. This is a real time voice and data system, that now has been converted and migrated to a virtual machine hosted on our VMware vSphere Enterprise environment, using vSphere HA and DRS, the virtual machine is vMotioned around the farm of 10 ESXi servers with no issues!

In this tutorial, I've selected Windows 2008 R2 Foundation.

1. Connect to the VMware vSphere Hypervisor (ESX/ESXi) Server using the vSphere Client


Using the VMware vSphere Client, login and connect to the ESX/ESXi server, using the IP address or hostname of the ESX/ESXi server, using the root username and password credentials. If you have a VMware vSphere vCenter server, you could also specify IP address or hostname of the vCenter server which manages your ESX/ESXi servers.

Using the VMware vSphere Client, login and connect to the VMware ESX/ESXi server

2. Select and Edit the Virtual Machine settings


Select the virtual machine, that you would like to add an USB device. Right Click and Select Edit Settings.

 Edit Virtual Machine Settings
The Virtual Machine Properties page will be displayed for the selected virtual machine. Check the Virtual Machine Properties Machine Version is 7.

3. Add a USB Controller to the virtual machine


Click Add, the Add Hardware Wizard will appear. Select a USB Controller followed by Next.

A USB Controller can be added to a "hot" powered-on or "cold" powered-off virtual machine.

Add Hardware Wizard
Select the Controller Type and Click Next

Select USB Controller Type
Review the details and Click Finish to Add the USB Controller to the virtual machine.

Review the details and Click Finish
Check the USB Controller has been added to the virtual machine and Click OK. The USB Controller will be added to the virtual machine.

Check the USB Controller has been added to the virtual machine

5. Add USB Device to virtual machine



Select the virtual machine with the USB Controller, that you would like to add an USB device. Right Click and Select Edit Settings.

Select the virtual machine with the USB Controller
Click Add, the Add Hardware Wizard will be displayed.

Add USB Device Hardware
if the USB Device (unavailable) shows in gray and unavailable, either a USB device is not connected to the server, or the USB device is incompatible. Some host servers do not support USB passthrough. Select Cancel to return.

Select the USB Device and Click Next

Select the USB Device
Select the USB Device to add to the Virtual Machine. If you want the device to support vMotion Tick the Box. You can only add one USB Device at a time. So if you need to add more USB devices, repeat this step. vMotion support enables, the virtual machine to use and remain connected to the USB on the host device, if it is migrated to another host it remains connected via "USB over IP.".

Select the USB Device to add to the Virtual Machine.
In the above screenshot the Siemens and Communication DECT Data device is currently connected to virtual machine VOIP Gateway.

Select the USB Device to Add followed by Next

Select the USB Device to Add followed by Next
Review the selected changes and Click Finish to add to virtual machine. Repeat for other USB devices.

Review the selected changes and Click Finish
Confirm the USB Device has been added and Click OK. You may be required to add the correct Vendor USB drivers in the virtual machine OS.

Confirm the USB Device has been added and Click OK.

6. Inside the Virtual Machine


Once the USB device has been connected to the virtual machine. The virtual machine behaves exactly the same as if a USB device had been connected to a physical computer.

If Windows has drivers included in the OS, it will automatically install the device using Plug 'N' Play. The following graphic appears in Windows 2008 R2 in the System Tray.

Windows Drivers install
You can safely eject the USB device, using the Safely Eject Icon in the System Tray. USB Toshiba 2.5" External disk device in Windows 2008 R2

Toshiba External 2.5" USB disk
If you check in Device Manager you will also see the detected devices

Windows Device Manager
I've added all USB devices connected to the host to this VM, drivers are not available for Security Key and Scanner in Windows 2008 R2, hence the error.

Windows Device Manager
You have successfully added a USB device to your virtual machine.

We have tested LaCie, HP, Sandisk, PNY, Super Talent and Kingston flash drives, Rainbow, Aladdin and Desk Lock security keys, US Robotics USB Modems, USB to Serial and Parallel adaptors, USB flatbed scanners, LaCie, Toshiba, HP, Hitachi, Seagate USB external hard drives, VOIP USB devices and USB Webcams.

*******************************************************************************************************************************************
Thank you for reading my article, please leave valuable feedback. If you liked my VMware article and would like to see more VMware Articles from me, please click the Yes button near the: Was this article helpful? at the Top of this article to the right of the Article title. Thank You.
*******************************************************************************************************************************************
39
Ask questions about what you read
If you have a question about something within an article, you can receive help directly from the article author. Experts Exchange article authors are available to answer questions and further the discussion.
Get 7 days free