Ubuntu – Ubuntu 16.04 Virtualbox 5.1 Win 7 VM USB not working

16.04usbvirtualbox

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.

Best Answer

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 !

Related Question