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.
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.
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.
Select the Controller Type and Click Next
Review the details and Click Finish to Add the USB Controller to the virtual machine.
Check the USB Controller has been added to the virtual machine and Click OK. The USB Controller will be 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.
Click Add, the Add Hardware Wizard will be displayed.
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 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.".
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
Review the selected changes and Click Finish to add to virtual machine. Repeat for other USB devices.
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.
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.
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
If you check in Device Manager you will also see the detected devices
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.
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.
*******************************************************************************************************************************************
Comments (31)
Author
Commented:Thanks for reading..., in almost 4 years since publishing, nobody has ever reported it!
Thanks for paying attention!
Commented:
thanks for your guide
i want to know is there any way to do this via excli ?
i want to attach/deattach a usb disk at schedule.
Author
Commented:Please post a question to the VMware topic area, and myself or other experts will be glad to assist.
Commented:
Under device manager is see
Universal Serial Bus (USB) Controller
"Device Status: The drivers for this device are not installed. (Code 28)
There is no driver selected for the device information set or element."
Any ideas welcome on how to get this working. It's driving me nuts
Author
Commented:I would encourage you to post a question in the VMware Topic area, and we can discuss at length and other experts can also join in, and also you can share you issue, as it's rather hidden here, as no one other than the Author tracks these messages left here!
Andrew
View More