Submitted by David Grant on
[img_assist|nid=366|title=|desc=|link=none|align=right|width=145|height=150]
First of all, USB will not work in VirtualBox if you are using the Open Source Edition (OSE) of VirtualBox. Get the full closed-source edition of VirtualBox from their website. There are many differences between the open-source edition and the closed-source version and one of them is USB.
I finally got USB working with Windows XP running as a guest inside VirtualBox running on a Ubuntu Hardy host. First find out what the group id of the vboxusers group is:
$ grep vbox /etc/group vboxusers:x:<gid>:david
Then, enable the deprecated /proc/bus/usb inteface:
$ sudo gedit /etc/init.d/mountkernfs.sh
Add the following line after /proc is mounted, at the end of the do_start() function.
#for hardy: domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=<gid>,devmode=664 #for intrepid: domount usbfs "" /proc/bus/usb usbdevfs -onoexec,nosuid,nodev,devgid=<gid>,devmode=664
replacing <gid> with the <gid> you found in the first step. Make sure to reboot. This didn't work for me until I rebooted. There you have it. You shouldn't have to edit /etc/init.d/mountdevsubfs.sh or /etc/fstab as some other internet sources have suggested.
- David Grant's blog
- Add new comment
- 311104 reads
Comments
Jan Glascher replied on Permalink
USB + Virtualbox problems persist
Hi David,
I hope you don't mind me contacting you about some persisting problems
that I have with getting a USB device mounted under virtualbox (running XP
as the guest OS). The host system is Ubuntu Hardy running on a Thinkpad
T61.
I followed the instructions on your blog and edited
/etc/init.dmountkernfs.sh and created a USB filter for the device under the
Settings/USB in Virtualbox (pressing the USB button with the "+" and then
simply "OK"). However, when I boot XP in Virtualbox the entry for the
device in Devices/USB is still grayed out and I cannot connect to the
device
It also does not make a differences whether the device is mount under
Linux or not (which is does just fine). Furthermore, there is also no
difference whether or not the UBS device is plugged in at the time of the
XP boot in Virtualbox.
I also tried editing /etc/init.d/mountdevusbfs.sh and /etc/fstab as other
posts have suggested, but the problem remains. I cannot mount any USB
devices in Virtualbox.
Do you have any further suggestions of what I could try to get the device
mounted?
Thanks a lot for taking the time.
Best wishes,
Jan
David Grant replied on Permalink
Suggestions
Try to put only the additional line in mountkernfs.sh and re-comment the line in mountdevusbfs.sh and comment out usbfs stuff in fstab. Run 'mount' without command-line arguments and see what is mounted. You should only have have usbfs mounted once. I had some problems because I had usbfs mounted twice.
BTW, this is what I get when I run "mount | grep usb"
I have nothing in fstab that is usb related, I have not changed mountdevusbfs.sh. I added the following to to mountkernfs.sh
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=1002,devmode=664When I run "groups" as my regular user (david) that I use to run Virtualbox, I get "vboxusers" showing up in the list
When I run "
cat /etc/group|grep vboxusers" I get:vboxusers:x:1002:davidMake sure to do a reboot. Let me know if this still doesn't work. Once we find the solution I'd like to add it to my post to make the information more complete. What version of Virtualbox and Ubuntu are you using?
Scott replied on Permalink
Check your installed version of VirtualBox
I installed VirtualBox through the Synaptic Package Manager. I was having problems with getting the USB support enabled for my Windows XP guest OS. Come to find out the version installed by Ubuntu was the OSE version, so it doesn't have USB support. I backed up my guest files and uninstalled the OSE version and downloaded and installed the .deb file from VirtualBox's site. Didn't need the backup since the newly installed version updated the files to work with the new version. Now I have USB support. Just something to check before pulling your hair out about USB not working.
Jeffre replied on Permalink
VirtualBox USB Challenge
I have made all the edits you recommended above. All my settings appear to be OK, but I still cannot access my USB devices in my XP Virtual Machine. They appear on the device list but are "grayed out". I did notice that when I ran "cat /etc/group|grep vboxusers" I get:
vboxusers:x:1001: (my username (jeffrey) does not appear after the second colon.
I am using VirtualBox 2.1.0
Ubuntu 8.10
Thanks for any help you may be able to offer.
Jeffrey
David Grant replied on Permalink
You're not in the group then
If your username is not after the vboxusers group name, then you are not in the group. Use the Ubuntu user admin (System->Administration->Users and Groups) to add yourself to the group.
Anonymous replied on Permalink
This worked for me - ubuntu
This worked for me - ubuntu 9.04 with windows 7 guest, was greyed out until i checked the vboxusers group and added myself to it. Thanks for the help guys.
sampyboy replied on Permalink
Webcam works!
I have a Dell Vostro 1700 notebook with Ubuntu 10.10 and Windows XP Professional (Service Pack 3) as guest OS in Oracle Virtualbox 3.2.10. Initially webcam option under USB Devices was greyed out. On typing "grep vboxusers /etc/group" in a terminal did not reveal my username. Just by adding my username to vboxusers group, webcam became usable inside virtual box. Thanks guys for the trick!
To add my username, I just followed:
(System->Administration->Users and Groups->Manage Groups->vboxusers->Properties and checking my username). After adding, you must restart the computer and restart the guest OS. If you see LED of webcam glowing for a second while booting of guest OS, you are through! By the way, before doing all the above, please make sure you have installed latest version of guest additions for your Virtualbox!!
Anonymous replied on Permalink
It Works!!
I cleaned out all of the garbage that the other links said to do and had only the mountkernfs command and it works fine. Crank up XP and it recognizes the flashdrive. Works for me ...
solitaire free cell replied on Permalink
Online Freecell Solitaire has
Online Freecell Solitaire has been a gamer favorite. Freecell is best card game you can play this awesome game on your pc just click on homepage
Play free Solitaire Freecell online for
solitaire Freecell is a cards games you can play using 52 cards to play this. This is best solitaire games, you want to play this epic and interesting game click on homepage
pioneerseo replied on Permalink
eye exam costs
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it. eye exam costs
seo group replied on Permalink
I am upbeat to discover this
I am upbeat to discover this post exceptionally helpful for me, as it contains part of data. I generally want to peruse the quality substance and this thing I found in you post. A debt of gratitude is in order for sharing. accountant brampton
Jan Glascher replied on Permalink
USB + Virtualbox problems persist (follow-up)
Dave,
thanks a lot for your quick response.
I tried all your suggestions, but I still cannot mount my USB flash drive
I am using Ubuntu Hardy Heron (8.04) and Virtualbox 1.6.6
I commented the lines in /etc/init.d/mountdevusbfs.sh and /etc/fstab that
was sugested by the other posts.
I did reboot before trying all of the below.
output of:
output of:
(glaescher is my username)
I did already add the next line to /etc/init.d/mountkernfs.sh
just before the comment starting with:
Here is the output of "VBoxManage list usbhost"
So it does recognize the Flash Drive (Patriot Memory, no comments on the name, please. It's embarrassing, but a huge and fast drive).
I also tried to set a global USB filter using the command:
but the command produces and syntax error:
However, I did include all the mandatory options that are listed under VBoxManage --help
As for the local usbfilters, I ran "VBoxManage showvminfo "Windows XP SP3" and got:
So the 2 USB filters specific to the VM are recognized.
Do you have any other ideas?
Thanks a lot,
Jan
David Grant replied on Permalink
More info
I attached a couple screnshots. I have no filters. (see 2.png)
I see VBoxManage sees the shares. So are the devices greyed out in the VM, as opposed to mine? (see 1.png)
Other other thing I can suggest is to try to run it as root, or start going crazy with chmod 777 on the /proc/bus/usb folder or something.
I am using Version 1.6.2 of Virtualbox. That might be the problem, I had heard of some features breaking in newer versions of VirtualBox. It looks like it's still available: http://www.virtualbox.org/wiki/Download_Old_Builds
Or, maybe you can try Version 2.0?
Caraibes replied on Permalink
I also have the same
I also have the same problem, as my usb scanner is grayed out, my usb webcam too... My settings are exactly like what you recommend in your guide, I am running Hardy, with a virtualbox 2.0, and winxp inside... I can't seem to find a solution...
seo group replied on Permalink
Hi I am so pleased I found
Hi I am so pleased I found your web journal, I truly found you by slip-up, while I was watching on google for something else, Anyways I am here now and could simply get a kick out of the chance to say thank for a huge post and an inside and out amusing site. Kindly do keep up the immense work. bookkeeping brampton
Andrzej replied on Permalink
40-basic-permissions.rules
Hi Jan,
I had the same problem and found the solution in this document
I think, one thing that is missing in your configuration is an additional entry in the file /etc/udev/rules.d/40-basic-permissions.rules.
Don't forget to restart udev service after that and your virtual machine, in this order.
I hope this helps,
regards,
Andrzej
David Grant replied on Permalink
Interesting
I didn't need to add the group="vboxusers" to the 40-basic-permissions.rules file or the stuff in mountdevsubfs.sh. I just put:
as explained in the post. Thanks Andrzej, hpoefully if Jan tries your suggestion it will work.
casey a replied on Permalink
still no good
i've tried all of this and still the device appears unavailable.
i'm trying to make a winblows xp guest see my pda so i can use activesync.
MS CRAP!!!
this is really frustrating... i'm a linux n00b and i have searched google and the ubuntu forums for hours.
and still not working.
any help would be awesome
Anonymous replied on Permalink
I used the info on this blog
I used the info on this blog and am able to mount usb flash drive on the XP guest on a Ubuntu 8.04 host. Thanks David Grant.
dex replied on Permalink
:-(
I follow the instruction also in the https://help.ubuntu.com/community/VirtualBox#USB but I continue to have the USB devices grayed.
I'm tryng to solve this task to sync my IPOD with Itunes.
Still not working
For others,
in the help.ubuntu they said you need the PUEL version and not the OSE (that has not USB support).
dex
BachJohann replied on Permalink
BachJohann
I am extremely delighted in for this web journal. pretty litter
Final Fantasy Info replied on Permalink
Maintaining a strategic
Maintaining a strategic distance from on certain he will have a delightful secluded. An accreditation of thankfulness is all together to post ! NBA Live Guide
princess castle bed replied on Permalink
princess castle bed
Amazing learning you have on this present, it's inside and out dumbfounding discover a site that unnoticeable parts such a cerebrum boggling measure of data about managed stars. princess castle bed
denwood replied on Permalink
T61 / Ubuntu / VirtualBox Fixed?
I, too, have a T61 and have tried all of the solutions offered here to no avail. Did you ever get it working?
michel replied on Permalink
desguacesasturias
Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place. desguacesasturias
michel replied on Permalink
landscaping
Really i am awed from this post....the individual who make this post it was an incredible human..thanks for imparted this to us. landscaping
nox replied on Permalink
Worked when...
I changed this line
domount usbfs "" usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=,devmode=664
to
domount usbfs "" /proc/bus/usb usbdevfs -onoexec,nosuid,nodev,devgid=,devmode=664
David Grant replied on Permalink
Me too
That's right! I had to do that too, but I forgot to update this blog post. Thanks!
Tom B. replied on Permalink
Thanks! this worked flowless
Maybe you'll be able to help with enabling Wacom Tablets on Intrepid + Vbox, (http://forums.virtualbox.org/viewtopic.php?t=11423&start=0&postdays=0&po...)
I can't find any useful resource about this problem on Intrepid.
Tom B. replied on Permalink
I solved my Wacom problems 10 munutes after posting here...
All I had to do was chown the tablet module in /proc/bus/usb/
(see the link in the previous post)
peter replied on Permalink
Fabulous site you have here,
Fabulous site you have here, so much cool data!.. software outsourcing
Børre Gaup replied on Permalink
Solved for Ubuntu Intrepid
I went through all the suggestions and advices above, but VirtualBox didn't recognise my USB drive.
Finally I opened the xml file belonging to my windows xp installation, $HOME/.VirtualBox/Machines/windows\ xp/windows\ xp.xml (I quit VirtualBox before I did this)
I changed the line that read:
<USBController enabled="false" enabledEhci="false"/>to:
<USBController enabled="true" enabledEhci="true"/>and after that I was able to access my USB drive
Ryan replied on Permalink
Great little hack, thanks David
I followed author's original instruction for 8.10, they worked great after reboot.
Thanks a bunch!
Ryan
Falk replied on Permalink
Thanks
Hi,
Thanks for the hints!
One additional comment:
I'm on Intrepid. I had to install Virtual Box version 2.0.6
Regards,
Falk
Jonathan Konrad replied on Permalink
I'm afraid I only get greyed out devices too
I am running Ubuntu 8.04
I have edited the mountkernfs.sh file as you suggested. Both
domout usbfs usbdevfs /proc/
and when that did not work
usbfs "" /proc/ ...
Before coming across you post, I had tried editing the mountdevsubfs.sh or /etc/fstab as some other internet sources have suggested. Each helpful hint brings be to greyed out USB devices. Better than no devices, yet I can not use my USB devices in my guest OS of WinXP SP3.
I have also created a group called usbuers, and every trick I can find on the web. Any more help would be great. Thank you.
Anonymous replied on Permalink
try this hack
chmod -R 777 /proc/bus/usb
it made it work for me, after trying many of the above fixes . Obviously it's a permissions issue at work. I am currently tracking own the root issue and will report with a cleaner fix later. This fix won't survive reboots, obviously.
Stuart replied on Permalink
Thanks
Excellent. After much stuffing about with the advice at http://www.virtualbox.org/wiki/User_FAQ , Linux permissions, etc, your simple one line change works for me...
Jairo Almanza replied on Permalink
Thks
thank you this has been very useful tip
Greetings from Costa Rica
Pura Vida!!
Kylea replied on Permalink
USB Virtualbox 2.1
Thanks David - Intrepid suggestions worked a treat!
Gerard replied on Permalink
Thanks, David. For me, it
Thanks, David.
For me, it works on Ubuntu 8.10 (64b) even after I commented the lines I put before in /etc/init.d/mountdevsubfs.sh and /etc/fstab as I was told by an other internet source.
Gerard.
Chris replied on Permalink
Must undo what Ubuntu Community's website suggested.
First of all: Thanks so much for your guide! It worked!
I wanted to say that I had first tried the guide here for Ubuntu Intrepid: https://help.ubuntu.com/community/VirtualBox#USB. that DID NOT WORK for me. I then followed your guide, and that didn't work either. What I had to do is go back and UNDO what the Ubuntu Community's guide suggested before your guide would work.
Again, many thanks.
Anonymous replied on Permalink
Thanks
THANKS
Anonymous replied on Permalink
use only one method, this
use only one method, this one because it works better than the ubuntu guide's method. this is the method that got my iPod Touch working in my XP host. use only one method! :)
Kaiser replied on Permalink
Thanks for the tutorial, I'm
Thanks for the tutorial,
I'm also on Ubuntu 8.10, followed the instructions and it didn't work until I found out that I wasn't part of the vboxusers group. After I joined I had to reboot and worked smoothly.
By the way, the USB device I wanted to get working is a Garmin ANT stick, for a GPS, which is a "very-proprietary" device using specially designed communication protocols, so if it works for this, everything can.
Chris replied on Permalink
Thanks
Thanks a bunch for this. Worked for me on Ubuntu Intrepid (on the apparently-notorious Thinkpad T61, no less) by doing just as you said. (I am in the vboxusers groups, and I didn't previous try anything else specific to making USB work.)
I'm a little worried about enabling something "deprecated", but it works so I'll take it.
Chris replied on Permalink
I still cannot make it work
I still cannot make this work. I'm running Ubuntu 8.10 host with XP guest on Virtualbox 2.1.4
the results of my '$ mount |grep usb' is
procbususb on /proc/bus/usb type usbfs (rw)
can anyone give me any suggestions?
gravybowl replied on Permalink
Worked on Thinkpad T61
Worked flawlessly! Followed short and concise guide as-is, reboot and USB works in XP.
Again, like the other T61 owner, I didn't not try any other guides/techniques prior to this one. Running Ubuntu Intrepid 64bit and VirtualBox 2.1.4 (closed-source edition).
Zardoz replied on Permalink
Works also under Ubuntu 9.04
Works also under Ubuntu 9.04 (Jaunty) + Virtualbox 2.2.
But "somewhere after /proc" is not enough. The mentioned line should be placed at the end of the do_start () function. Otherwise it didn't work for me.
Juan replied on Permalink
Worked like a champ on
Worked like a champ on Ubuntu 9.04 32bit. Just have to make sure that you add yourself or whatever user that you need to the vboxuser group. Thanks a lot for the guide!!!!!!
sholyer replied on Permalink
Thanks David! This worked
Thanks David! This worked for me. (Hardy Host/Jaunty Guest)
I was pulling my hair out, because it didn't work at first. Although I did exactly what you wrote.
"mount | grep usb" showed one line exactly like yours, I couldn't find any problems.
I finally checked /etc/fstab and I found a line in there referring to usbfs. I didn't check it sooner, cause how could something be there I never added?
The thing is I DID add this line a year ago when I needed it to make USB work with my guests running under VMWare Server.
Took that old line out. Rebooted. Everything worked like a charm in VirtualBox.
So that's just a hint for anyone who's struggling with this config. Make sure the /etc/fstab isn't mounting something else for usbfs that you don't want!
Pages
Add new comment