NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Linux > Other Tips, Tricks and Tutorials

Other Tips, Tricks and Tutorials


How to Fix VirtualBox USB Support

Step-by-step tutorial with screenshots

By Marius Nestor, Linux Editor

May 15th, 2009, 10:19 GMT

Adjust text size:


VirtualBox with USB support enabled
Enlarge picture
It is actually a known fact that there
is an issue with VirtualBox and the attached USB devices that many of us are trying to use in the virtual machine. Here is a real-life example:

I am a 100% Linux user and I have a photo printer that Linux can't recognize. Let's say that I want to print some photos quickly, to give them to someone. I have a Windows installation in a virtual machine just for this reason (sad, I know) and I want to access my printer, which is connected via a USB port. To my surprise, I can see the printer in the USB device list of VirtualBox, but I can't access it (very frustrating). Firing up Firefox and searching on Google for a fix takes too long, because there are many old tutorials that teach you how to modify various files or change permissions, etc. What to do? Well, below is the answer to the endless VirtualBox – USB issue (and it's pretty damn simple too!).

This tutorial was created mostly for my needs, but I am sure that many of you will find it very helpful. Ready?

This is how a default installation of VirtualBox in Ubuntu 9.04 shows the USB devices, and we need to fix it.

Review image


Go to System -> Administration -> Users and Groups...

Review image


Click the "Unlock" button...

Review image


Type your password and click the "Authenticate" button....

Review image


Click on the "Manage Groups" button...

Review image


In the "Groups settings" window that will appear, scroll down until you see the vboxusers entry. Select it and then click on the "Properties" button...

Review image


Another window will appear, called "Group 'vboxusers' Properties. Just check the box in front of your username and click the "OK" button when you're done...

Review image


Close the "Group settings" and "Users Settings" windows and log out. Log in and open up VirtualBox, start your virtual machine and you will see that you can now access the USB devices!

Review image


Yes... it was that simple!

TAGS:

VirtualBox USB | USB VirtualBox | Ubuntu | Linux | VirtualBox
Read by 104,744 user(s) | Add comment | Link to this article TWEET THIS


Article rating:
Very Good (4.5/5) 36 vote(s)    

Subscribe to news | Print article | Send to friend

© Copyright 2001-2010 Softpedia
Contact:

 

 

SEARCH THE NEWS ARCHIVE :




Today's News
| Yesterday's News | News Archive


MORE RELATED ARTICLES:


Ubuntu 9.10 Alpha 1 Released

SystemRescueCd 1.2.0 Has Linux Kernel 2.6.29.3

Transmission 1.61 Plugs CSRF Hole

Sabily 9.04 - Ubuntu for Muslims

Ubuntu One: Free Online Storage

Zenwalk 6.0 Live Edition Released

Softpedia Linux Weekly, Issue 44

Parted Magic 4.1 Brings GParted 0.4.5

User opinions:


Comment #1 by: Hussain on 15 May 2009, 14:55 GMT reply to this comment

Thanks Marius for the tutorial i was looking for the solution since a month.


Comment #2 by: Adz on 15 May 2009, 15:30 GMT reply to this comment

It is really useful. I searched a lot in the net to find a solution for this problem and i was empty handed until now. Thanks


Comment #3 by: nocompiz on 15 May 2009, 15:45 GMT reply to this comment

You need to desactivate Compiz too.
I can't have the mouse with that.


Comment #4 by: thagoat on 15 May 2009, 20:27 GMT reply to this comment

Wow. Don't I feel like a fool. I played with this setting for 3 weeks and deleted my vbox install because of this


Comment #5 by: Bob H. on 16 May 2009, 01:29 GMT reply to this comment

Thanks. I have looked for months.


Comment #6 by: Anonymous on 17 May 2009, 17:23 GMT reply to this comment

so does anyone know if this will help with problems in installing XP with virtualbox? certain... permission....problems?

Comment #6.1 by: Marius Nestor on 18 May 2009, 07:51 GMT

What problems? I am not aware of such "permission" problems, please be more explicit.


Comment #7 by: itnet7 on 18 May 2009, 15:40 GMT reply to this comment

Marius,

I want to thank you so much for posting this. I have told a lot of people to add their user account to the vboxusers group, some of them were able to without more assistance, but some couldn't understand how to do this (I try and help out users at work and play that are "trying" linux so it's no wonder they can't add the group themselves without much assistance). I was thinking of similarly documenting it, prior to finding this. I will point them in your articles direction!

Thanks for taking the time out to post this.

Chris Crisafulli
itnet7


Comment #8 by: Andrew on 21 May 2009, 03:07 GMT reply to this comment

Running VirtualBox 2.2.0 on Debian Lenny. Am already in vboxusers group yet usb devices in virtual machines are grayed out.

Comment #8.1 by: rob on 13 Oct 2009, 22:54 GMT

i have the same problem.
here is the proof
rob@robunto:~$ cat /etc/group | grep rob
adm:x:4:rob
dialout:x:20:rob
cdrom:x:24:rob
plugdev:x:46:rob
lpadmin:x:104:rob
admin:x:115:rob
rob:x:1000:rob
sambashare:x:122:rob
vboxusers:x:123:rob
~~~~~
i am in the vboxusers.
bu still greyed out in vertualbox

Comment #8.2 by: rob on 13 Oct 2009, 23:06 GMT

duh.. had to logout and login


Comment #9 by: mohaned_nj on 22 May 2009, 11:25 GMT reply to this comment

coooooooooooool , it works .......................... at last
but let me inform u that that dosent work only on the last version of VB 2.2.2
thanks alot


Comment #10 by: SkeLLLa on 26 May 2009, 15:09 GMT reply to this comment

It doesn't work...


Comment #11 by: Skiesare on 28 May 2009, 16:59 GMT reply to this comment

This will not work with the version in the Ubuntu repositories, you have to down load the version from http://www.virtualbox.org/wiki/Linux_Downloads

This is because the USB code is not entirely free and open.


Comment #12 by: b.h. on 29 May 2009, 06:39 GMT reply to this comment

Brilliant,
I could not use vb for ages, I know that I had to a member of vboxusers but it had not been ticked off.
How stupid am I?

Thanks


Comment #13 by: dyess002 on 16 Jun 2009, 05:56 GMT reply to this comment

My vb tells me at the top under devices that there are no usb devices. How do I fix this?
Hope you can come up with something.
Thanks


Comment #14 by: s.m on 18 Jun 2009, 16:50 GMT reply to this comment

Thanks so much for the solution.


Comment #15 by: Wow! on 06 Jul 2009, 18:22 GMT reply to this comment

It's amazing to me how many users missed the large type, bold faced instructions when installing VirtualBox. That notice was to make sure all users that were going to use VirtualBox should be made members of the vboxusers group. I've used VirtualBox for almost two years now, and I didn't miss it when I installed the first time. (Maybe it's the default Ubuntu packages that fail to show the instructions. I installed it into Debian from a package file downloaded from the VirtualBox download site. Synaptic popped up an instruction box at the end of the install with instructions to add users to the vboxusers group.


Comment #16 by: Wow! on 06 Jul 2009, 18:35 GMT reply to this comment

Make sure the USB device you want activated in VB is plugged in. Open the VB starting window but don't start a machine. Select the machine you want the USB device attached to. Click the "Settings" button. On the left-hand side, choose "USB." Make sure "Enable USB Controller" is selected. Unless you have an older computer, also make sure that "Enable USB 2.0 (EHCI) Controller" is also selected. On the far right side, there are several buttons that have a picture of a USB plug and a symbol. The second button from the top is a USB plug with a plus sign. It is to add a device filter from a plugged device. Click it. If your desired device is in the list, select it. This adds the device to the list of devices that can be accessed by VB. If it is not in the list, then you have problems with your USB set up working well with VB.

BTW, when VB is "attached" to a USB device, the same device becomes unavailable in your host OS. If this is for an external drive, it is best to register the external drive as a shared folder in VB. This way both the host and the guest can access the external drive at the same time.


Comment #17 by: André on 24 Jul 2009, 15:57 GMT reply to this comment

I don't even have "USB" on the menu to the left, all I have is:

General
Hard Disks
CD/DVD-ROM
Floppy
Audio
Network
Serial Ports
Shared Folders

And I've seen screenshots of the menu and they all have a USB tab, but I don't. What the heck? I don't have that USB icon on the bottom of the VB window that you have in your screenshots either.

Comment #17.1 by: Marius Nestor on 31 Jul 2009, 14:09 GMT

Install the DEB package from www.virtualbox.org not from the Ubuntu repository!

Comment #17.2 by: nazmieski on 23 Dec 2009, 03:15 GMT

I think urs is OSE that's why u dont have USB menu.


Comment #18 by: Jim on 03 Aug 2009, 08:32 GMT reply to this comment

Dude. This is a life saver !!!


Comment #19 by: Live on 09 Aug 2009, 06:06 GMT reply to this comment

Will try, do you need to reboot?


Comment #20 by: Live on 09 Aug 2009, 06:10 GMT reply to this comment

In my case, you need to LOGOUT of Ubuntu.

This will reset Users and Groups.

Don't need to reboot, remember this when you change users and groups in the future. Thanks for the info.

PS Can you change the design of the website, it's really hard to read and type using small letters.


Comment #21 by: Rory on 12 Aug 2009, 14:15 GMT reply to this comment

You are an ANGEL!!!


Comment #22 by: Franki on 14 Aug 2009, 14:26 GMT reply to this comment

This just confirms my belief that many problems can be solved simply. Thank you!!


Comment #23 by: Rocco on 24 Aug 2009, 15:27 GMT reply to this comment

This is a good tutorial. However, this does not work for everyone. While I am able to connect my usb devices, I am unable to access them with USB 2.0 enabled. When I disable USB 2.0, everything works.


Comment #24 by: Ashura on 28 Aug 2009, 01:27 GMT reply to this comment

Wow really nice. it work . thanks Marius


Comment #25 by: tsai on 29 Aug 2009, 18:34 GMT reply to this comment

I have followed the instructions above fully. I:
installed VB 3.0
added my user to the vboxusers group
enabled usb 2.0
logged out/in (even restarted)
disabled usb 2.0

The attached usb items show up on the usb button, but do not show up in the WinXp VM. Am I missing something else?

Thanks
twitter: @tsairox


Comment #26 by: walterav on 18 Sep 2009, 08:29 GMT reply to this comment

Thanks it still works!

ubuntu 9.04 kernel verion 2.6.28-15 + virtualbox 3.02


Comment #27 by: mzsade on 21 Oct 2009, 11:17 GMT reply to this comment

Thanks, i had given up on, and about to remove, virtualbox when i found your life-saver.


Comment #28 by: Paul on 25 Oct 2009, 11:28 GMT reply to this comment

Thank you very very much for such a simple work around without playing with the console.


Comment #29 by: Ed on 30 Oct 2009, 01:45 GMT reply to this comment

Thanks Marius, this help me a lot


Comment #30 by: Jon on 17 Nov 2009, 19:10 GMT reply to this comment

Thank you. You're great!


Comment #31 by: whit on 19 Nov 2009, 23:24 GMT reply to this comment

wow that was really helpful! I had been researching this answer for almost 2 days! Thanks so much! :)


Comment #32 by: jone on 01 Dec 2009, 07:50 GMT reply to this comment

it doesn't work on ubuntu 9.10 with virtual box 3.0.10. is there any way to solve like this??


Comment #33 by: Don Birdsall on 04 Dec 2009, 17:52 GMT reply to this comment

Fixed my USB problem running VirtualBox 3.0 with Ubuntu 9.10 host. However, you must insert the correct group ID on your system. To do this open a terminal and issue the command..

grep vboxusers /etc/group

You will see something like

vboxusers:x:122:

In this case 122 is the correct group ID.


Comment #34 by: Vinnie1 on 10 Dec 2009, 21:43 GMT reply to this comment

I have searched Google for about a week to try and solve this problem, like you I was finding a lot of outdated tutorials talking about modifying this file and that, which I tried to no avail.

The fix to the problem is so simple, it's a wonder that when Virtualbox gets installed on the computer that this is not done automatically.

Just for the record -

Ubuntu 9.10 64bit
Virtualbox 3.1


Comment #35 by: Herry on 19 Dec 2009, 05:13 GMT reply to this comment

after i follow eatch step above. it still won't work with usb device. my epson r230 is anuavailabel too.

what can i do, please help ..... thx,

how can send you a screen shot to you ?

hope you can help me .....

Comment #35.1 by: Marius Nestor on 22 Dec 2009, 10:35 GMT

Upload the image here -> http://www.freeimagehosting.net/ .... and post the link of the image, after the upload.

I also have a problem with my Canon CP740 printer, it says unavailable. I managed to make it work by running VirtualBox as root from the command-line, like this:

sudo VirtualBox

or just hit ALT+F2 and type gksu VirtualBox, enter your password and it should work.


Comment #36 by: gordon on 19 Dec 2009, 21:18 GMT reply to this comment

I had good success with this on my samsung N110 netbook and HP NC8000however I used virtualbox version 3.1.12 build 54655.

Thanks very much


Comment #37 by: IT on 24 Dec 2009, 03:23 GMT reply to this comment

Hello,

Thanks for the tut and all, but this does not work for me.
after I did all that, virtualbox (I'm using virtualBox OSE) can not detect and usb's I have in my machine.

help please?
Thanks; IT

Comment #37.1 by: Marius Nestor on 25 Dec 2009, 10:36 GMT

Do NOT user VirtualBox OSE, uninstall it and install a version from the virtualbox.org website.


Comment #38 by: DGremlin on 29 Dec 2009, 07:38 GMT reply to this comment

I had to add the following line to /etc/fstab
none /proc/bus/usb usbfs devgid=125,devmode=664 0 0

only then did my usb work. ah well.


Comment #39 by: m.nour on 02 Jan 2010, 11:40 GMT reply to this comment

thanks a lot Marius, that was very useful,

i was wondering if u got something similar but for windows host & linux guest?

i'm still running linux on virtualbox before taking the decision of changing totally to linux, which will be very soon :D


Comment #40 by: Yoshi on 04 Jan 2010, 19:02 GMT reply to this comment

And how to do this on windows?


Comment #41 by: Stopping By on 06 Jan 2010, 11:53 GMT reply to this comment

I am running Fedora 12 with Sun Virtualbox (not Virtualbox OSE) with XP as a guest. I had to REBOOT after I made all of the changes. A log out and login did not cut it.


Comment #42 by: sovius on 06 Jan 2010, 17:22 GMT reply to this comment

YES YES YES, you just rock!
thanks


Comment #43 by: Paul on 08 Jan 2010, 09:58 GMT reply to this comment

There is a new problem - in 9.10 the Group ID will NOT go to 125, it keeps going back to 0.
Any ideas how to fix this?


Comment #44 by: Paul on 08 Jan 2010, 10:20 GMT reply to this comment

Hi, From my last post - I think I may have a solution (well it worked for me) - Change the settings and the Group ID - - But do not close it, open the VBox and the USB settings are there. Then close the goup management and the Group ID stays and you have your USB active. Hope this works for other people who have had the same problem.


Comment #45 by: zzeroo on 08 Jan 2010, 10:40 GMT reply to this comment

Thank you a lot


Comment #46 by: Guy Fawkes on 11 Jan 2010, 03:08 GMT reply to this comment

Thank you !


Comment #47 by: Jame on 11 Jan 2010, 07:53 GMT reply to this comment

Your a Star !!!


Comment #48 by: YannDMX on 12 Jan 2010, 02:13 GMT reply to this comment

Thousand Thanks
I just add my username to the vboxusers group and VB views my USB Devices !!!
I'm with Kubuntu 9.10 and the last VB from virtualbox.org
Yannick
France


Comment #49 by: ivan on 16 Jan 2010, 20:59 GMT reply to this comment

Thank you!


Comment #50 by: Ngoc Loi on 20 Jan 2010, 10:52 GMT reply to this comment

You are my Man!
it's very useful for me,
thanks

Ngoc Loi
Viet Nam


Comment #51 by: Achu on 22 Jan 2010, 09:16 GMT reply to this comment

Hello,
Im using RHEL5
USB works on root but not on user.
I have added the user to vbox group, edited the fstab and tried with adding and removing the usb filters. VB shows the USB - but greyed out.

Can anybody help?
Is there any other file i need to edit, for the right permissions?

Thanks in advance

Achu


Comment #52 by: Nur D. on 22 Jan 2010, 21:31 GMT reply to this comment

your tutorial is really the best.
i 've tried to follow other tips, but nothing, so i was going crazy.
thank you very much.


Comment #53 by: David on 25 Jan 2010, 18:41 GMT reply to this comment

Using Xubuntu 10.4, VirtualBox 3.1.2 r56127. I followed your instructions, and I still cannot get my printer to work through VirtualBox unless I run it as root. Am I missing something, or is there simply not a workaround at the moment?

Thanks,
David

Comment #53.1 by: Marius Nestor on 26 Jan 2010, 09:21 GMT

The tutorial was created with and for Ubuntu 9.04 (the current stable version at that time). Starting with Ubuntu 9.10, things changed... it appears that printers are unavailable for VirtualBox, even if you do the hack from this guide. The current workaround is to run VirtualBox as root. If I find something else, I will modify the tutorial accordingly!


Comment #54 by: GrahamG on 28 Jan 2010, 23:22 GMT reply to this comment

I can't add any other words to those that have already been said about this tutorial.

It's so simple. Like many people, I'd been looking around for months for a way of enabling USB support in VirtualBox. This method works perfectly.

I'm using Linux Mint 8 - Helena and the instructions in this tutorial apply exactly to this version of Mint.

Excellent work and I'm so glad I stumbled across the tutorial.

Big thanks!

Graham, Cambridge, UK


Comment #55 by: GrahamG on 28 Jan 2010, 23:47 GMT reply to this comment

@Achu: Just follow Marius' instructions exactly. There should be no need to edit fstab - I certainly didn't.

The USB filters need to be activated in VB.

If you've followed Marius' instructions about selecting your username and putting a tick against it etc... then everything should work. It didn't for me to start with - the USB devices were still greyed out. If this is the case, simply close VB and then log out / closedown your Linux OS. Now, boot it up against, start VB, select your virtual environment (mine is Windows XP) and this time you will see the USB devices are not greyed out and when you use Windows Explorer you will see any USB hard / pen drives as new drives.

These instructions do work - but you might need to log out / log in just to get things working properly.

Cheers,
GrahamG


Comment #56 by: Martin on 31 Jan 2010, 13:30 GMT reply to this comment

For Ubuntu 9.10 Karmic, additionally see this link with a great description: https://help.ubuntu.com/community/VirtualBox/USB

Basically, you also need to add this line to your /etc/fstab:

none /proc/bus/usb usbfs devgid=userid,devmode=664 0 0

where "userid" must be replaced with the number in the output of "grep vboxusers /etc/group" (I think this is the group user id of vboxusers, but hit me if I'm wrong).

Then restart and go to your machine settings (machine must be powered off for that). Make sure USB 2.0 is enabled and also APIC IO on the Systems tab must be enabled!

That should do it. Worked great for me on Ubuntu 9.10 Karmic with VB 3.1 PLUE.

Cheers,
Martin


Comment #57 by: Paolo on 07 Feb 2010, 14:44 GMT reply to this comment

hi!
I've a problem, vbox is working perfectly but i wanna have the possibility to use the usb ports...
the guide seems clear and perfect, but i haven't vboxuser in my user e group settings... how can i do

Comment #57.1 by: Marius Nestor on 09 Feb 2010, 09:48 GMT

Use the following command in a terminal:

sudo adduser YOURUSERNAME vboxusers

Do not forget to replace YOURUSERNAME with your own user name! Enter your password and you should now see vboxusers...

Share your opinion:

Your Name:
Your Email Address:
(will not be used for commercial purposes)
Solve this to prove you're not a bot: =
Your review/opinion:

 




Windows tabGames tabDrivers tabMac tabLinux tabScripts tabMobile tabHandheld tabGadgets tabNews tab

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   ENTER NEWS SITE   |   ENGLISH BOARD   |   ROMANIAN FORUM