Ubuntu 16.04 Virtualbox 5.1 Win 7 VM USB not working

11,150

Solution 1

In case you did not find the solution yet. I had the same problem with Ubuntu 16.04 as host and XP as guest. None of the known solutions for the problem worked. I found the right trail at the very end of this page : https://bugs.launchpad.net/ubuntu/+source/virtualbox/+bug/1576768 which led me to this article : https://phobosk.wordpress.com/2012/11/11/howto-fix-a-virtualbox-failed-to-access-the-usb-subsystem-error/

In summary, the reason is that the limit for inotify on max_user_watches is to low .

Solved by : First, adding the following lines to /etc/sysctl.conf

fs.inotify.max_user_instances = 256<br />
fs.inotify.max_user_watches = 16384<br />
fs.inotify.max_queued_events = 32768<br />

Then restarting procps for the change to take effect with command :

sudo service procps restart

That did it !

Solution 2

Two places you can enable USB devices.

  1. In your guest OS, go to the Devices menu, then USB. In the list of USB devices present, select the one(s) you want to connect to, and this will place a checkmark in front of that device name. Windows will then install drivers for that device, if it needs to.

  2. In the main Settings for your guest OS (if the guest OS is shutdown) you can select USB, and in the USB device list presented there, any box you checkmark will automatically be connected when the guest OS is started.

Keep in mind, that any USB devices connected to a guest OS, will not be available to the host OS, as long as the VM is running.

If you have more questions, please ask. Cheers, Al

Share:
11,150

Related videos on Youtube

Winski Tech
Author by

Winski Tech

Updated on September 18, 2022

Comments

  • Winski Tech
    Winski Tech over 1 year

    I have an Ubuntu 16.04 system and a Win 7 vdi from my previous computer. The first time I installed virtual box it installed 5.0.4.24. I installed extensions and guest additions for the same version. I got everything working in the VM but USB. I tried 2.0 and 3.0, neither change helped. I googled around a bit and found that I need to add my user to vboxusers group. I did that. Now I can see the usb devices in the device list but they aren't installing on my VM. What else might I need to do?

    Update 1: I will add that it's not all USB devices as my mouse and keyboard still work but any storage device (4 differently branded thumb drives and 1 external HD) all do not get recognized. Weirder still, at least 2 of these thumb drives and the external drive worked when the VM was on my old machine.

    Update 2: I failed to mention that after I tried the vboxusers group addition I updated everything to 5.1 Virtualbox and it still wasn't working.

    Update 3: I tried claude's solution and that didn't work.

    I suspect my VM is corrupted somehow so I spun up another VM (Windows 10 this time) and everything USB works on that. I've been slowly migrating all of my files and reinstalling apps over on the new VM.

  • Winski Tech
    Winski Tech over 7 years
    Al, thanks for your reply. Unfortunately, neither of these processes helps me. I have the devices checked that I want to be accessible on my Windows machine and they don't get installed. I have the devices set in my USB section while the OS is off. When I turn it on, they aren't installed.
  • Boris Hamanov
    Boris Hamanov over 7 years
    Are you saying that some USB devices ARE visible to the guest OS, and some aren't? I think that you said that you tried both USB 2.0 and USB 3.0 ports, yes? You might trying installing Virtualbox 5.1 and see if that fixes the problem. Cheers, Al
  • Boris Hamanov
    Boris Hamanov over 7 years
    In the Settings for the guest OS, under System, is I/O APIC checked? Cheers, Al ps: please also answer the other two questions that I asked.
  • Winski Tech
    Winski Tech over 7 years
    I/O APIC is checked. My keyboard and Mouse are visible under devices and working, although they are not checked. I have tried both 2.0 and 3.0.
  • Boris Hamanov
    Boris Hamanov over 7 years
    I believe that the default is to capture the keyboard and mouse, so that doesn't tell us much. Are you plugging your USB devices directly into a port on the computer, or through a USB hub? Also, in Setting, USB, do you have USB2 or USB3 controller enabled? You might try the other. Cheers, Al
  • Boris Hamanov
    Boris Hamanov over 7 years
    ps: You might try building a new test Windows vdi and see if the USB works then. Maybe your original vdi has a problem. Cheers, Al
  • Winski Tech
    Winski Tech over 7 years
    I have tried the USB 3.0 ports on the front and back of my computer, I've also tried the 2.0 ports on my machine, none of them worked. I've tried enabling the 2.0 and 3.0 separately and both of those didn't work. I might try removing and purge VB then reinstalling. If that doesn't work I can try a new VDI.
  • Boris Hamanov
    Boris Hamanov over 7 years
    Keep us posted. Cheers, Al
  • Michal Polovka
    Michal Polovka over 7 years
    Two important things which need to be checked - are you in vm group? Are your Quest addition iso and VM the same version?