136

I'm using Ubuntu Maverick and Virtual Box 3+. I have Windows 7 Ultimate. The problem is that it doesn't detect USB drives in Windows 7, but USB peripherals (mouse + keybord) are working.

I followed these instructions, but I can't find the user group vboxusers. How can I continue? I would also like to upgrade to the latest version without any risk (without losing my virtual hard disk drive).

4
  • Is the Virtualbox you have installed the one from the software center?
    – belacqua
    Feb 10, 2011 at 8:47
  • 3
    For your second question, the one about upgrading, you should probably have a look at this: askubuntu.com/questions/19268/…
    – Yi Jiang
    Feb 10, 2011 at 8:47
  • @jgbelacqua Yes, I installed via software center.
    – kst
    Feb 10, 2011 at 9:05
  • follow this link, [follow this link - akwal][1] [1]: askubuntu.com/questions/209950/…
    – akwal
    Jan 6, 2014 at 13:30

10 Answers 10

205

1. Install Extension Pack

also see: How do I install the VirtualBox version from Oracle to install an Extension Pack?

USB 1.0 is supported in the version installed from the Ubuntu repositories (from VirtualBox > 4.x).

For USB 2.0 and USB 3.0 we need to install the free (but closed source) VirtualBox Extension Pack (NOT the "platform packages") from the VirtualBox download page. If you had installed VirtualBox from the repositories you have to make sure to choose the extension pack for the right version of VirtualBox. You can see the version of your installed VirtualBox in the help > About VirtualBox menu. For regular updates and bug fixes, it is recommended to install the most recent VirtualBox version from the Oracle repository.

All virtual machines need to be powered off before installing the extension.

2. Become a "vboxuser" in Host machine (local machine)

To be able to get access to an attached USB device, the Ubuntu host user needs to be in the vboxusers group. Add your user to this group by running the following command

sudo usermod -aG vboxusers <username> 

and reboot or logout/login.

3. Activate USB support in VirtualBox Manager

Shut down your virtual machine and open USB settings in the VirtualBox Manager. Tick Enable USB Controllerand USB 2.0 (EHCI) Controller or USB 3.0 (xHCI) Controller.

If these settings are greyed out, you need to shut down the virtual machine.

enter image description here

4. Select host USB device for access from the guest

To grant access to USB devices we need to select a device to disable in the host and to enable in the guest (this is a precaution to avoid simultaneous access from host and guest). This can be done from the panel Devices menu or by right mouse click in the bottom panel of the VirtualBox Manager on the USB icon:

enter image description here

Tick the device you need in the guest, untick it if you need it in the host. If you can't see your USB device in that list, it means that VirtualBox cannot access your host USB devices. Make sure your user is added to the vboxusers group and that you restarted your host.

The selected device will immediately be accessible from the guest. A Windows guest may need additional drivers.

  • Windows 7 needs an additional driver for USB 3.0 support.
  • Windows 10 does not accept an NTFS formatted USB pen drive.

enter image description here

[optional] Use USB filters for permanent access in the guest

By defining USB filters we can define USB devices that will automatically be presented to the guest when booting the guest OS.

enter image description here

Click on the green + symbol on the right to add a known device.

Note, that some devices may lead to a boot failure of the guest. We can not use these devices for filters.

Read more on USB support in the VirtualBox User Manual.

Also see: what are the proper values for usb device in virtual box

10
  • May be its late to comment but I'm using VirtualBox 4.3.14 in Ubuntu 14.04 and the command you have provided to add users to vboxusers (sudo usermod -aG vboxusers <username>) was not working. instead a small change was required while providing options. I did give -a -G instead of giving -aG to make it work.
    – learner
    Nov 3, 2014 at 3:02
  • 5
    @learner That's very strange, since -aG and -a -G should have the same effect when passed as options to usermod. Is it possible that instead you had not logged out and back in the first time, but had done so the second time? Apr 25, 2015 at 19:48
  • @EliahKagan its been so many months so I have forgotten. But your explanation is the logical one so may be I have logged out and back the second time.
    – learner
    Apr 26, 2015 at 3:34
  • 3
    This might need updating, vb 5.x is out now. Mar 1, 2016 at 2:11
  • 1
    @UserX that would be step 2 of my answer.
    – Takkat
    Oct 12, 2020 at 5:12
21
  • Install gnome-system-tools b/c The old Users and Groups GUI is not available by default on 11.10

    sudo apt-get install gnome-system-tools
    
  • After the installation finished Open user and groups from launcher

  • Select your username click on Manage Groups and select vboxusers and click add.

enter image description here

  • logout/login to be able to use USB in VirtualBox.
1
  • 4
    I had a host ubuntu and a guest ubuntu. Most importantly do this on host not guest and one also needs Virtualbox extension pack apart from the guest additions (and save yourself an hour and a frustration). Apr 11, 2014 at 21:11
12

The vboxusers will be in the /etc/group file. You edit it with something like nano .

sudo nano /etc/group

Add your user to the vboxusers line, or create one if necessary.

As Takkat has pointed out, to get full USB device support, you'll need to install the full version of Virtualbox (not the OSE).

The ppa I have for the "official" virtualbox is here:

/etc/apt/sources.list.d/virtualbox-offical-source.list:  
deb http://download.virtualbox.org/virtualbox/debian maverick contrib #VirtualBox Offical Source
2
  • 1
    +1 for ppa. I prefer linking to the download page as the deb link changed quite often recently ;)
    – Takkat
    Feb 10, 2011 at 9:56
  • a command is simpler/safer, no? sudo usermod -aG vboxusers # <username> Dec 21, 2018 at 10:53
9

In Ubuntu 16.04 LTS, after the initial install with

sudo apt install virtualbox virtualbox-guest-additions-iso

I also had to:

sudo usermod -a -G vboxusers $USER
sudo apt install virtualbox-ext-pack

Then I could enable USB 2/3 support in the machine settings.

What the virtualbox-ext-pack actually does, is download the required files from http://download.virtualbox.org/virtualbox and prompt you to accept the license before installing.

2
  • Nothing worked for me except this answer. This pack is useful $ sudo apt install virtualbox-ext-pack Oct 9, 2020 at 5:59
  • The sudo apt install virtualbox-ext-pack worked like a charm! Jun 30, 2022 at 19:33
7

I had the same problem. After trying all the other solutions I realised my problem.

I had downloaded virtualbox from the Ubuntu Software Center, which didn't have the latest version of virtualbox, so I had accidently downloaded the wrong version of "Oracle VM VirtualBox Extension Pack".

Solution:

  1. open virtualbox, click help, click about, find your virtualbox version number.
  2. Goto https://www.virtualbox.org/wiki/Download_Old_Builds_4_3 (replace "4_3" with your version).
  3. Download the "Extension Pack" that matches your virtualbox version.
  4. Install that, and it might ask you if you would like to downgrade, click yes.

Worked for me anyway.

6

I had the same problem and fixed it by clicking in the VirtualBox group of my user. You can access it installing gnome-system-tools (it does not come with Ubuntu 12.04 Precise Pangolin), either via the Ubuntu Software Center, Synaptic or by typing in the terminal:

sudo apt-get install gnome-system-tools

Remember that to paste in the terminal you have to use Ctrl+Shift+V, as opposed to Ctrl+V.

You will probably have to enter your password to allow the installation and add a Y (as in yes) to finish installing the packages.

Then you head to your Dash home and type users. You will see two applications. The good one is Users and Groups.

You then have to click on Advanced settings for your user and enter your password.

Now you will be shown a window with three tabs. Click on User Privileges. Find the line that says Use Virtualbox virtualization solution and then OK.

Change user group privileges

You may be asked to enter your password again. Then click on Close and log-out and log-in again.

When you start VirtualBox, you should see a whole bunch of new USB devices.

Good luck!

3

If you can list your USB devices being root, but not as a regular user (despite being in the group vboxusers), it may be related to a reached limit of monitored files.

You need to increase the maximum number of files your programs are allowed to monitor (inotify). If you have a client that synchronizes your files (dropbox, seafile, etc.), the limit can be reached and the USB devices cannot be listed. It is reported as a bug issue here.

Edit /etc/sysctl.conf and increase the limit to 524288. it can be done as mentioned here, like this:

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

The USB devices should appear doing (as a user or root):

VBoxManage list usbhost
1

My solution was the following:

  1. Power off virtual machine
  2. Download the right extension pack
  3. Install extension pack
  4. Start virtual machine, put in Virtualbox guest additions and install them. If already installed, repeat the installation
  5. Shut down virtual machine
  6. Go to Settings>USB as shown in the images above and enable USB
  7. Boot virtual machine

If not working, restart your whole host system and try again. Worked fine for me. Watch out: At the first boot of the guest system after installing the guest additions, you will see all usb devices to choose, but it can take up to 10 minutes until the Windows guest activates them after you checked them. Just wait patiently.

0
1

For me on Kubuntu 16.04 (with virtualbox 5.0.24-dfsg-0ubuntu1.16.04.1 installed via apt) I had used VirtualBox before with USB passthrough working. However, I was no longer part of the virtualbox group (checked with cat /etc/group | grep vboxusers) and so used kdesudo kuser to add myself (can be done with sudo usermod -a -G virtualbox $USER too).

I then needed to logout and back in again to use the new group listings and authorise my access.

Now when doing VboxManage list usbhost it returns the usb devices instead of just "none"; also in the settings on VirtualBox I can choose connected USB devices to passthrough to the virtual OS. Yay!

0

Not an answer, but an ESSENTIAL detail.

The very last line of /etc/group is troublesome.

I recommend having it like this, EXAMPLE:

$ cat /etc/group 
...
vboxusers:x:140:hannu
DUMMY:x:65535:

$

That is: Anything you wish to have "working" should be present BEFORE the LAST LINE.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .