Identical USB devices - the "rare and convoluted technique"

This is for discussing general topics about how to use VirtualBox.
Post Reply
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Identical USB devices - the "rare and convoluted technique"

Post by scottgus1 »

So I'm now in the same boat as some others: I have two USB security dongles showing completely identical information in the USB filter. One key needs to stay in the host PC (Windows 10) and the other has to go into the guest (Windows 7). It needs to be automatic, since I'm using the VBoxVMservice add-on. As expected, Virtualbox can't tell them apart and both go into the guest. (I'm running version 5.2.20 with matching Extension Pack)

I followed Socratis' USB basics and troubleshooting tutorial and get the USB keys both appearing in the guest. At least that works, but not quite what I want.

I used 'vboxmanage list usbhosts' and found that the port numbers are different for the two keys, also as expected. Along with just the vendor ID and product ID, I put the port number for the key that is supposed to go into the guest in the USB filter. After a guest reboot just one USB key goes into the guest. But TWO Virtualbox USB filter drivers appear on the host Device Manager, and the other key is not available in the host. It seems to just fizzle off into nowhere.

Socratis' tutorial, section 5 "Common Problems" says for identical USB devices, "There is a technique that might work, but it's so rare and convoluted that it's not part of the FAQ. Start a new topic describing your problem."

Here's the new topic. :) What's the rare and convoluted technique?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Identical USB devices - the "rare and convoluted technique"

Post by socratis »

Hey, Scott! Nice to see you again!!! :)
scottgus1 wrote:There is a technique that might work, but it's so rare and convoluted that it's not part of the FAQ.
Did I mention that I've banged my head and I kinda forgot the technique, amnesia and everything? :o

Nah, just joking... I need to see some more info from you. But mind you, the "technique" in question involved getting one of two identical USBs in the guest and one in the host, by plugging one of them while the filter is active, deactivating the filter, and plugging in the second one.

Or plugging two identical USB devices in two different VMs, again using the same enable filter on VM1, plug first USB device, disable filter on VM1, enable filter on VM2, plug in second USB device.

No guarantees however, mainly because of the differences in the port issues (they're dynamic), which is the only unique identifier...
  • Rare: not that many people will have completely identical USB devices.
  • Convoluted: involves enabling/disabling USB filters with a specific sequence.
scottgus1 wrote:As expected, Virtualbox can't tell them apart and both go into the guest ...
After a guest reboot just one USB key goes into the guest.
Aren't these two statements contradicting each other? Or you mean the 2nd one is after you've applied the filter?
scottgus1 wrote:I used 'vboxmanage list usbhosts' and found that the port numbers are different for the two keys, also as expected.
I need to see that. And the filter list, i.e. with both devices plugged in, the output of:
  • 
    VBoxManage list usbhost
    VBoxManage showvminfo "<YourVM>"
scottgus1 wrote:It needs to be automatic
That's not gonna work then. The procedure requires manual interaction. Unless...
scottgus1 wrote:I have two USB security dongles
...unless the host doesn't have a "hold" on them, i.e. they fall in the "Inactive" category, then maybe we can come up with a script of sorts that does this from the command line. And you're reputable with scripting... ;)


PS. That must have been my longest reply on the making. I started replying to you over 12 hours ago, but then due to the snowstorm we lost power overnight, and then it took some time to sort out things. 1/2 day in the "Preview" message ;)
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Identical USB devices - the "rare and convoluted technique"

Post by scottgus1 »

Sorry about the really long delay in responding, Socratis! Life has been wwwaaayyy too busy...

Thanks for weighing in, I was hoping you'd be interested. I did not know that USB filters could be changed while the guest is running! Thanks for that info. However, I wouldn't have been able to troubleshoot the USB filter glitch, the host PC is a client's work PC and isn't available for after-hours diagnosing.

But I did try again and got very interesting and positive results. I was able to get the correct one of the identical twins into the guest reliably, though only while running via normal start, not under VboxVMservice. Only one Virtualbox USB filter device appeared in the host, as well as the other of the twin USB devices. The key is using the Port number, which can only be found with 'vboxmanage list usbhost'.

So the above question has cleared itself up as an unexpected one-time error. Possibly of the 'pebcak' variety, can't tell. I will report the success in a different post.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Identical USB devices - the "rare and convoluted technique"

Post by socratis »

scottgus1 wrote:Possibly of the 'pebcak' variety, can't tell
Hey, wait a minute... I invented that! :D
Glad I could help you find your way. Let me know if you need more clarifications...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply