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

AID: 9349
  • Status: Published

10380 points

  • Byhanccocka
  • TypeTutorial
  • Posted on2012-01-22 at 08:50:10
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.

VMware-vSphere-Client3.jpg
  • 26 KB
  • Using the VMware vSphere Client, login and connect to the VMware ESX/ESXi server
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.

 
EditSettings1.jpg
  • 64 KB
  • Edit Virtual Machine 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.jpg
  • 54 KB
  • Add Hardware Wizard
Add Hardware Wizard


Select the Controller Type and Click Next

Add-Hardware-USB-Controller.jpg
  • 52 KB
  • Select USB Controller Type
Select USB Controller Type


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

Ready-to-Finish.jpg
  • 43 KB
  • Review the details and Click Finish
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.

Virtual-Machine-Properties1.jpg
  • 53 KB
  • Check the USB Controller has been 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.

Virtual-Machine-Properties2.jpg
  • 57 KB
  • Select the virtual machine with the USB Controller
Select the virtual machine with the USB Controller


Click Add, the Add Hardware Wizard will be displayed.

Add-Hardware1.jpg
  • 31 KB
  • Add USB Device Hardware
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

Add-Hardware2.jpg
  • 33 KB
  • Select the USB Device
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.".

Add-Hardware3.jpg
  • 40 KB
  • Select the USB Device to add to the Virtual Machine.
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-USB-Device.jpg
  • 38 KB
  • 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.

Ready-to-Finish1.jpg
  • 25 KB
  • Review the selected changes and Click Finish
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.

Virtual-Machine-Properties3.jpg
  • 48 KB
  • Confirm the USB Device has been added and Click OK.
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.

Win2k8-Drivers.jpg
  • 3 KB
  • Windows Drivers install
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

Windows-USB-Devices.jpg
  • 18 KB
  • Toshiba External 2.5" USB disk
Toshiba External 2.5" USB disk


If you check in Device Manager you will also see the detected devices

Device-Manager.jpg
  • 41 KB
  • Windows Device Manager
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.

Device-Manager1.jpg
  • 37 KB
  • Windows Device Manager
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.
*******************************************************************************************************************************************
    Asked On
    2012-01-22 at 08:50:10ID9349
    Tags

    VMware vSphere Hypervisor

    ,

    ESXi 4.1

    ,

    ESXi 5.0

    ,

    ESX 4.1

    ,

    ESX 4.0

    ,

    USB

    ,

    USB passthrough

    Topic

    VMware

    Views
    2268

    Comments

    Expert Comment

    by: pjam on 2012-03-13 at 07:01:04ID: 45489

    Great,
    Just what I was looking for.  I am definitely going to check this out.
    Thanks hanccoka

    Author Comment

    by: hanccocka on 2012-03-13 at 07:03:38ID: 45490

    No problems.

    Expert Comment

    by: raja78in on 2012-04-02 at 04:15:43ID: 48580

    Good info

    Author Comment

    by: hanccocka on 2012-04-02 at 04:35:07ID: 48581

    Thanks make sure you Voted! Yes!

    Expert Comment

    by: IT_Group1 on 2012-04-02 at 05:31:20ID: 48593

    Great info

    Author Comment

    by: hanccocka on 2012-04-02 at 05:40:06ID: 48596

    thanks. please Vote Yes!

    Expert Comment

    by: IT_Group1 on 2012-04-02 at 05:54:13ID: 48599

    Done

    Author Comment

    by: hanccocka on 2012-04-02 at 06:29:24ID: 48600

    Thanks, that will prompt me to write some new articles, coming soon...

    Expert Comment

    by: noxcho on 2012-05-08 at 00:51:37ID: 52721

    Good work hanccocka, I had recently the situation where USB connected drive to ESX 4.1 was urgently needed. Had to dig much in google in order to find similar instructions. And now I see all is described here as plain as possible. Thumb up.

    Author Comment

    by: hanccocka on 2012-05-08 at 02:34:02ID: 52722

    @noxcho Many Thanks, please Vote Yes, if the article was helpful!

    Expert Comment

    by: noxcho on 2012-05-08 at 02:34:54ID: 52723

    That was first think I did before writing my comment! =)

    Expert Comment

    by: noxcho on 2012-05-08 at 02:36:15ID: 52724

    rrrr thinG not thinK =)

    Author Comment

    by: hanccocka on 2012-05-08 at 02:41:13ID: 52725

    thanks

    Add your Comment

    Please Sign up or Log in to comment on this article.

    Join Experts Exchange Today

    Gain Access to all our Tech Resources

    Get personalized answers

    Ask unlimited questions

    Access Proven Solutions

    Search 3.2 million solutions

    Read In-Depth How-To Guides

    1000+ articles, demos, & tips

    Watch Step by Step Tutorials

    Learn direct from top tech pros

    And Much More!

    Your complete tech resource

    See Plans and Pricing

    30-day free trial. Register in 60 seconds.

    Loading Advertisement...

    Top VMware Experts

    1. hanccocka

      2,402,899

      Genius

      20,820 points yesterday

      Profile
      Rank: Genius
    2. coolsport00

      259,512

      Guru

      0 points yesterday

      Profile
      Rank: Genius
    3. paulsolov

      48,915

      400 points yesterday

      Profile
      Rank: Genius
    4. BestWay

      41,955

      600 points yesterday

      Profile
      Rank: Sage
    5. danm66

      39,761

      0 points yesterday

      Profile
      Rank: Wizard
    6. IanTh

      32,340

      0 points yesterday

      Profile
      Rank: Genius
    7. andyalder

      32,308

      0 points yesterday

      Profile
      Rank: Genius
    8. thinkpads_user

      24,520

      0 points yesterday

      Profile
      Rank: Genius
    9. kevinhsieh

      23,604

      0 points yesterday

      Profile
      Rank: Genius
    10. millardjk

      18,282

      0 points yesterday

      Profile
      Rank: Master
    11. rindi

      17,077

      0 points yesterday

      Profile
      Rank: Savant
    12. CarlWebster

      16,686

      0 points yesterday

      Profile
      Rank: Genius
    13. RickEpnet

      14,468

      0 points yesterday

      Profile
      Rank: Guru
    14. EvertG

      14,300

      0 points yesterday

      Profile
    15. cwstad2

      13,984

      0 points yesterday

      Profile
      Rank: Guru
    16. cdfs

      13,168

      0 points yesterday

      Profile
      Rank: Master
    17. Neilsr

      12,652

      0 points yesterday

      Profile
      Rank: Genius
    18. npsingh123

      11,452

      0 points yesterday

      Profile
      Rank: Master
    19. dkotte

      11,400

      0 points yesterday

      Profile
      Rank: Guru
    20. dlethe

      11,100

      0 points yesterday

      Profile
      Rank: Genius
    21. arnold

      10,782

      0 points yesterday

      Profile
      Rank: Genius
    22. demazter

      10,656

      0 points yesterday

      Profile
      Rank: Genius
    23. Anuroopsundd

      9,724

      0 points yesterday

      Profile
      Rank: Sage
    24. S00007359

      9,676

      0 points yesterday

      Profile
      Rank: Guru
    25. LesterClayton

      9,100

      0 points yesterday

      Profile
      Rank: Guru

    Hall Of Fame