ESXi 5 Add USB to VM (USB passthrough)

Posted on Friday, April 13, 2012



I need to set up my ESXi 5.0 server to allow USB passthrough to the virtual machines.  In short I want to attach a USB hard drive to the physical ESXi server and have it show up in the Virtual machine as a mounted usb hard drive.

To do this first make sure your CPU and hardware support intel VT-d technology.  I have a CPU that has VT-x which does help with Virtual machines but you need VT-d to get I/O support to your virtual machines.   The particular machine I am working on has a xeon E5530 processor which if you go to its product page http://ark.intel.com/products/40200?wapkw=E5520 [1] and look around you will find this.




Which shoes it does have this technology

Also just to help out here is intel’s page that show all the CPUs they have that have this technology http://ark.intel.com/search/advanced?VTD=true [2]

This feature must be turned on in the bios.  In my particular case that is how the machine was already set up.  If your’s is not you need to boot up into the bios and enable this.  Intel has a how to page on this http://software.intel.com/en-us/blogs/2009/02/24/step-by-step-guide-on-how-to-enable-vt-d-and-perform-direct-device-assignment/ [3]


Configure your ESXi server


Now that you have vt-d enabled open up VSphere Client.




Click on the Configuration tab then select Advanced Settings on the left hand side and finally click on the Configure Passthrough.   If for some reason the “Configure Passthrough” link is not working and grayed out this may mean that you do not have vt-d enabled.



Check box all the USB controllers and click OK.


Now you should see all the USB controllers show up.


Adding USB drive to VM


After that is done, you may need to do  reboot, I did not.  At any rate after that is done I want to attach this USB drive to a Win-7 Virtual machine I have running on the ESXi 5 server.


Select the server then click on “Getting started” tab and select Edit the virtual machine.


In the hardware section click “add”



Select USB Controller and click next.



Select EHCI+UHCO and click next.



Click Finish.




Now click Add again.


Select USB Device and click Next.



Any available usb device will show up.   Here I attached a small hard drive.  Select the usb device you want and click next.



Click Finish.



Click OK.



And since it was a USB hard drive it quickly show up as a mounted hard drive and is usable!


References
[1]        Intel’s Xeon E5520 page
                Accessed 03/2012
[2]        Intel’s VTD page
                Accessed 04/2012
[3]        Step by Step Guide on How to Enable VT-d and Perform Direct Device Assignment
                Accessed 04/2012
[4]        USB passthrough in vSphere 4.1
                Accessed 04/2012

No comments:

Post a Comment