Trying to connect USB passhtrough to VM in ESXi shell

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:
lsusb
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.
LVL 2
itniflAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1021345

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.....

http://www.experts-exchange.com/discussions/209901/VMware-Support-Test-for-USB-Passthrough-issue.html

http://www.experts-exchange.com/articles/9349/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.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
itniflAuthor Commented:
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.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.