VirtualBox

Opened 8 years ago

Last modified 8 years ago

#16618 new enhancement

USB Device Filter ASK ME WHAT TO DO

Reported by: jshrek Owned by:
Component: USB Version: VirtualBox 5.1.18
Keywords: usb, device, connect, plugged, plugin, connected Cc:
Guest type: all Host type: all

Description

Currently you need to set up a device filter for each USB device that you want to connect to VM instead of Host device.

It would be great if you could have a filter called ASK ME WHAT TO DO WHEN USB DEVICE IS CONNECTED

When this filter is enabled, and any USB device is plugged in, then a popup window would say "Would you like to connect to Host computer or to VM #1 (or VM #2 or VM #3)"

Basically its a popup that asks where you to connect the newly plugged in USB device. This would eliminate the need of having to create seperate filters for new USB device you want to connect to a VM. It would also make it easier to move the device between VM and Host.

Change History (3)

comment:1 by Michael Thayer, 8 years ago

Doesn't right clicking (or left clicking on a Mac host) on the USB icon at the bottom right of the machine window do what you want?

comment:2 by Socratis, 8 years ago

@michael: Not always, it depends on the USB device. First of all, there are two ways to capture a USB device:

  1. On-the-fly: a "transient" solution, either by the icon on the bottom of the window, or the menu Devices » USB » ...
  2. USB filter: a more "permanent" solution and it should work as soon as the USB device is inserted.

There are several categories of USB devices, as far as I can tell, and that's based on personal experience, there maybe more. I'll use my main system (OSX) as an example:

  1. Captured by the system with a daemon or service (e.g. Bluetooth controller). Not only you can't make the on-the-fly option work, but you can't even get it to work with a filter, unless you disable the system daemon.
  2. Captured by the system and used (e.g. USB sticks, external HDs). You have to eject them first to be able to use them with the on-the-fly option. If you have a filter and you plug the device afterwards, it gets captured by the VM.
    NB: I haven't tried what happens if you have multiple VMs with the same filter active.
  3. Captured by the system, but cannot be ejected (e.g. gamepads, joysticks, mice, keyboards). You have to unplug it and use a USB filter. The on-the-fly option doesn't work.
  4. Sitting there waiting to be used (e.g. IR receiver). You can capture it with either the on-the-fly or the filter option.

@jshrek: I hope that the above analysis shows the difficulty of implementing what you're proposing and shows the over-simplification of the problem that you're thinking of. Plus, if an option like that was to be implemented (pop-up dialog with options), I would definitely like an opt-out option, i.e. the current behavior.

I want to have full and detailed control of what I do with my computer and my VMs, compared to the "simplicity" (and annoyance IMHO) of a pop-up dialog for each and every running VM, even for the ones that can't use USB devices, like a FreeDOS VM. Of course the last part could be "smartly" circumvented if you were to check if the VM has USB support enabled or not, but it still would make it difficult, cumbersome, error-prone and less flexible.

comment:3 by Michael Thayer, 8 years ago

Clearly my mistake. I don't use a Mac, and it seems to me that on Linux hosts one can capture any device on the fly, without worrying about whether the host operating system had other ideas. That said, I might be wrong there too - I worked on that code once, but haven't had occasion to use it for a while.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette