45

I want to use my flashdrive in Windows XP, which I am currently running in Virtualbox, but when I open up the settings to enable usb usage, I get an error:

Failed to access the USB subsystem.
VirtualBox is not currently allowed to access USB devices. 
You can change this by adding your user to the 'vboxusers' group. 
Please see the user manual for a more detailed explanation


Result Code: 
NS_ERROR_FAILURE (0x00004005)
Component: 
Host
Interface: 
IHost {30678943-32df-4830-b413-931b25ac86a0}
Callee: 
IMachine {22781af3-1c96-4126-9edf-67a020e0e858}

Does anyone know how to fix this!?

Zanna
  • 69,223
  • 56
  • 216
  • 327
GingerHunter797
  • 451
  • 1
  • 4
  • 3
  • 1
    Does this answer your question? [How to access a shared folder in VirtualBox?](https://askubuntu.com/questions/161759/how-to-access-a-shared-folder-in-virtualbox) – wesinat0r Aug 19 '20 at 22:48
  • 1
    @wesinat0r That's about shared folders, and this is about directly accessing USB devices (which VirtualBox supports). – Eliah Kagan Aug 21 '20 at 18:30

6 Answers6

82

In your host, run this command:

sudo usermod -a -G vboxusers $USER

Now perform a logout (always required after add current user to a group).

After login, check that you are in the vboxusers group with this command, make sure that vboxusers is in the shown list:

groups $USER
Rael Gugelmin Cunha
  • 6,745
  • 2
  • 34
  • 35
kiri
  • 27,676
  • 16
  • 81
  • 117
  • 2
    i am getting error: usermod: group 'vboxusers' does not exist – Alex Jones Dec 29 '14 at 14:42
  • 1
    ```adduser: The group `vboxusers' does not exist.``` Now what? – endolith Oct 07 '16 at 18:16
  • 2
    Oh wait, this is something you run in the host OS, not the guest OS? – endolith Oct 07 '16 at 18:20
  • 4
    Actually, for Linux guests + hosts (not exactly the question but helpful), you need to do BOTH `sudo usermod -a -G vboxusers "$USER"` on the **host** AND `sudo usermod -a -G vboxsf "$USER"` on the **guest** after extension pack install and then **reboot** the guest. – KrisWebDev Jan 05 '20 at 08:11
17

This works for me and my problem with VirtualBox was solved

sudo usermod -a -G vboxsf "$USER"
Zanna
  • 69,223
  • 56
  • 216
  • 327
Serjik
  • 368
  • 4
  • 12
6
  1. In a terminal run:

    sudo adduser $USER vboxusers
    
  2. Reboot all systems.

Zanna
  • 69,223
  • 56
  • 216
  • 327
Cesar Devesa
  • 207
  • 2
  • 5
6
  1. Add the user as suggested by other answer using usermod command.
  2. Run the command id. You should see vboxusers in the list.
  3. If you don't see that, you may restart your computer and try id again.

When you get vboxusers listed as a result of running id, you're good to use USB with virtual box.

Aaron Hill
  • 4,867
  • 4
  • 41
  • 62
Shakus
  • 171
  • 1
  • 3
2
id <username>

That will give you

uid=1000([username]) gid=1000([username]) groups=1000([username]),10(wheel),18(dialout),497(plugdev)

if vboxusers is missing in that then add it

sudo usermod -a -G vboxusers [username]

This should resolve the issue

Zanna
  • 69,223
  • 56
  • 216
  • 327
user306403
  • 21
  • 1
0

Would like to mentionn for those who no solution work like me, ensure you are part of the group vboxusers, if it does not exist, addgroup vboxusers.... after, delete in the host usb settings all the usb filters (devices) you have... reboot the guest In the host, use empty filters to recreate manually your devices, put any name just copy the two following fields from the original filter still available, restart your virtual guest.... voila, your devices are there ... its the only way i found to force them out of at least ten other solutions.. Enjoy