Allow limiting of identical USB devices

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
LukeSonnox
Posts: 2
Joined: 15. Jul 2020, 15:41

Allow limiting of identical USB devices

Post by LukeSonnox »

Suggestion:
Add a field to the USB filter to allow users to set a maximum number of USB devices to grab when multiple devices are caught by the same filter.

Context:
We have multiple identical USB devices containing software licences needed for compiling our software. Our CI/CD solution uses VirtualBox to manage VMs which contain our build environments.
Ideally, I would be able to create a single master VM which contains a USB filter with a duplicate limit field set to 1, and clone it enough times for one VM per device.
Currently, I'm having to script the generation of the VM clones and create a USB filter for each cloned VM using the specific serial number of each licence device, which is different. This means that whenever I need to make a change to the build environment (which happens at least once a week), I have to shut down and delete all of the clones, make the change, and run my script again to regenerate everything. Our CI/CD solution (GitLab) is capable of doing most of this work for me, but the only thing preventing this is not being able to allocate a single USB device per VM in this way.

Thank you for considering this change; it really would save me a lot of time!
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Allow limiting of identical USB devices

Post by scottgus1 »

This is an interesting idea. Virtualbox has a system to somewhat handle identical devices, if the "port" number that is returned in 'vboxmanage list usbhost' is different for each device. See Distinguish multiple identical USB devices.

It appears your devices are not identical, and you have to adjust the serial number. Is this correct? If you include the serial number in the USB filter, only that device should go to that guest.

If your device's serial numbers are identical, the "port" numbers will help put only the device attached to the port number will go into that device. (You have to move the USB devices around so that each identical device has a different port number.)

Another option, try Kernelpro's USB over Ethernet: https://www.kernelpro.com/usb-over-ethernet.html I have successfully used this for identical USB licensing dongles, and the program enumerates USB hubs in the port numbers, to help handle more identical devices on one PC. (Server OS's for the serving PC are not required, and any number of clients can connect, only the USB server app costs.)

The Suggestions forum is for discussing the suggestion. If you want, the real Enhancement Request goes on the Bugtracker. To be honest, you should not hold your breath. The devs have said they only have time and resources to handle bugs, as well as enhancements required by their paying customers (who start paying at $6100). The only way this suggestion will go through is if a paying customer wants it too, or if someone contributes the code.
LukeSonnox
Posts: 2
Joined: 15. Jul 2020, 15:41

Re: Allow limiting of identical USB devices

Post by LukeSonnox »

Thanks for your response!

Yes, our USB devices have different serial numbers, which is how I can create per-VM USB filters using a script and VBoxManage. The problem is that I still only want to create the filter once and let the clones just grab a device when they are launched, so using the port number still wouldn't solve that.

USB-over-ethernet looks like an interesting solution, I will dig a little more in to that.
Post Reply