Trying to connect USB passhtrough to VM in ESXi shell

itnifl used Ask the Experts™
Through some trial and error I found that I can connect my USB drive via passhtrough on the ESXi host to my VM with id 1 this way:
Bus 02 Device 04: ID 059f:106b Silicon, Ltd
vim-cmd vmsvc/device.connusbdev 1 "path:2/0/5 version:2"

Open in new window

The first 2 here is the bus ID, the 0 I have no idea where is coming from and 5 was just a lucky guess.
How is the path built and how can I generate the correct path by script? I was thinking of reading the lsusb output and parse with grep, but I am not sure of all the numbers. I was hoping there was someone in here with experience on this already? At first glance the 5 might look like Device ID +1, but I would have to do some trial and error to be sure.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
You could get the correct path by passing it to a virtual machine.

Have you looked in the VMware Logs, dmesg output, as to how the USB device is mapped and registered.

Please also note, that *ANY* USB device which is not on this list, is NOT SUPPORTED, and may not function.

If you have a USB device working in passthrough this is by chance and luck, and not supported.

This USB passthrough with VMware vSphere (ESXi), is a croc of shit!

see here for why.....


I bet the information you are giving is the right way to go. Anyway, I decided that mapping up a USB key for USB passthrough was the wrong way to go in my dilemma for several reasons. Especially the information you are giving regarding VMWare only supporting a handfull of USB sticks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial