How-to add an ESXi connected USB device to a VM
Last time a colleague came to me and ask me how to pass-through a license dongle to a VM. The first thing that came to my mind was “Hm…. haven’t done that before, but should not be so complicated”. I tried it in my home lab and this post is the result.
First of all make sure that the device you wanted to use is supported for pass-through. To validate it check this VMware KB article.
To use USB pass-through the VM must have Virtual Hardware Version 7 or later.
Open the WebClient, select the VM which will use the USB device and click Edit Settings.
Select under New device Host USB device and click add.
This will also add an new USB controller as you can see in the screenshot. If you have more than one USB device attached to the ESX you can select the appropriate one through the drop down menu.
When you switch back to the VM you can see the installation of the new components.
After everything is installed, you can find the device within the device manager or if it’s an USB stick, like in my example, under Computer.
There is also an alternative method, but I would not recommend this. You can also pass-through a whole USB Controller from the ESX.
The use a physical USB controller select the ESX in the Webclient and go to Manage – Settings – PCI Devices
Select Edit… and add the desired USB controller.
After you added the controller you have to restart the ESX server.
You can now add the PCI device (USB controller) through Edit Settings – Add Device – PCI device to the VM.
You can’t disable the USB controller after that methode when you’re using USB sticks or SD cards to boot your ESX server. This issue occurs when the image is loaded to the memory which includes the esx.conf file. When you enable the USB controller for pass-through, all USB devices are invisible to the kernel. When you deselect the USB controllers from the pass-through list, the change saves to the esx.conf file. The esx.conf file is in the memory during ESXi uptime and when you issue the reboot command, the esx.conf is saved back to the USB device. In this case, the kernel cannot see any USB devices, so the configuration change does not apply.
The only option to disable the pass-through controller is to do a fresh installation of the ESX server according to this KB article.