How can I restrict a VirtualBox guest from accessing certain USB ports/devices on my host machine? I have some theories on how I might do this, but I really can only guess.

For further clarification, let's say a USB device was causing issues on my guest machine in VirtualBox, but that USB device is critical to my host machine. I need to blacklist VirtualBox from using certain USB devices.

The host being Ubuntu and the guest being Windows.

Update: I disabled the USB controller, uninstalled the extension pack, and even set mouse and keyboard to PS/2. Guest is still able to access my USB ports even though I have done no configuration to allow it to do so.

  • You have to explicitly allow access to host USB ports. – Daniel Feb 27 '16 at 16:44
  • I wish that was so, unfortunately Windows has access to some USB ports that I did not even realize. Such as webcam, microphone, gamepad, etc. It's really quite strange. – ctrev Feb 27 '16 at 16:45
  • Do you need any USB ports at all with the guest? – Daniel Feb 27 '16 at 16:45
  • If not then you can just disable the USB controller. – Daniel Feb 27 '16 at 16:45
  • 2
    Mouse and Keyboard don't require USB access. It's all handled implicitly. – Daniel Feb 27 '16 at 16:48

From what you've told me in comments, you don't need USB support at all. Just disable the USB controller:


Set these checkboxes to disabled.

  • USB controller has been off =(. – ctrev Feb 27 '16 at 16:51
  • So the controller is off, and you're still getting USB devices showing up? This shouldn't be possible. – Daniel Feb 27 '16 at 16:52
  • In the guest window, go to the Devices menu tab and make sure that no USB devices are enabled. – Daniel Feb 27 '16 at 16:52
  • Actually I have figured out the problem is with the microphone, after disabling USB controller it did indeed fix the problem in my post but the microphone threw me off as I thought it was part of my "USB devices" but it turns out it isn't. I suppose a virtualbox will always have access to a microphone, unless there is a way to prevent it from doing that. – ctrev Feb 27 '16 at 17:01
  • 2
    @ctrev you can disable audio in the vm settings which should disable the microphone if you don't require sound in the vm. – Elder Geek Feb 27 '16 at 17:20

You can use usbfilter (global/local) to explicitly forbid acces to all VMs/single VM to specific USB device. See man page for details: http://www.virtualbox.org/manual/ch08.html#idp46730496651168

  • I heard about someone using usbfilter before in the past but I do not know how to use it myself. – ctrev Feb 27 '16 at 16:52
  • Looking more into it, this might be a fix. It says "Global filters are applied before machine-specific filters, and may be used to prevent devices from being captured by any virtual machine" In my case that is precisely what I need. But I do not see any examples of how to use the command. – ctrev Feb 27 '16 at 16:57
  • 2
    It needs to be done from command line using VBoxManage usbfilter with option --action ignore. – Takkat Feb 27 '16 at 17:00
  • 1
    and to list all devices run this command: VBoxManage list usbhost – Ivan Temchenko Feb 27 '16 at 17:02
  • 1
    It would be cool if you could edit your answer to include all this, preferably with an example syntax line ;) – Takkat Feb 27 '16 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.