VirtualBox USB with Windows XP guest in Ubuntu Hardy or Intrepid

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

Then, enable the deprecated /proc/bus/usb inteface:

$ sudo gedit /etc/init.d/

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/ or /etc/fstab as some other internet sources have suggested.


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

I followed the instructions on your blog and edited
/etc/ 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

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/ 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

Thanks a lot for taking the time.

Best wishes,

Try to put only the additional line in and re-comment the line in 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"

$ mount |grep usb
procbususb on /proc/bus/usb type usbfs (rw)

I have nothing in fstab that is usb related, I have not changed I added the following to to

domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=1002,devmode=664

When 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:


Make 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?

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.

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.


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.

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.

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!!

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 ...


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/ and /etc/fstab that
was sugested by the other posts.

I did reboot before trying all of the below.

output of:

$ mount | grep usb
procbususb on /proc/bus/usb type usbfs (rw)

output of:

$ cat /etc/group | grep vbox

(glaescher is my username)

I did already add the next line to /etc/init.d/

domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=122,devmode=644

just before the comment starting with:

# Mount spufs, if Cell Broadband processor is detected

Here is the output of "VBoxManage list usbhost"

VirtualBox Command Line Management Interface Version 1.6.6
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

Host USB Devices:

UUID: 3c7dc59a-6834-428b-8e8f-6d466be2d06a
VendorId: 0x0483 (0483)
ProductId: 0x2016 (2016)
Revision: 0.1 (0001)
Manufacturer: STMicroelectronics
Product: Biometric Coprocessor
Address: /proc/bus/usb/001/003
Current State: Unavailable

UUID: 7249b281-e1e3-4d16-5caa-cb8e4fe1aa36
VendorId: 0x13fe (13FE)
ProductId: 0x1f00 (1F00)
Revision: 1.16 (0116)
Product: Patriot Memory
SerialNumber: 078501AA0001
Address: /proc/bus/usb/007/003
Current State: Unavailable

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:

VBoxManage usbfilter add 0 -target global -name "Patriot Memory [0110]" -action hold -active yes -vendorid 13FE -productid 1F00 -product "Patriot Memory" -remote no -serialnumber 078501AA0001

but the command produces and syntax error:

"Syntax error: Mandatory options not supplied"

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:

VirtualBox Command Line Management Interface Version 1.6.6
(C) 2005-2008 Sun Microsystems, Inc.
All rights reserved.

Name: Windows XP SP3
Guest OS: Windows XP
UUID: ed4b8461-36f3-417f-46bc-bdd156126fe7
Config file: /home/glaescher/.VirtualBox/Machines/Windows XP SP3/Windows XP SP3.xml
Memory size: 512MB
VRAM size: 16MB
Boot menu mode: message and menu
ACPI: on
PAE: off
Time offset: 0 ms
Hardw. virt.ext: off
State: powered off (since 2008-09-12T06:29:44.090000000)
Monitor count: 1
Floppy: empty
SATA: disabled
Primary master: /home/glaescher/.VirtualBox/VDI/Windows XP SP2.vdi (UUID: 34c3e23a-d42c-42d3-518b-b2bb80e4d1e6)
DVD: Host drive /dev/scd0
NIC 1: MAC: 080027A63E0B, Attachment: NAT, Cable connected: on, Trace: off (file: none), Type: Am79C973, Reported speed: 1000 Mbps
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
UART 1: disabled
UART 2: disabled
Audio: disabled (Driver: Unknown, Controller: Unknown)
Clipboard Mode: Bidirectional
VRDP: disabled
USB: enabled

USB Device Filters:

Index: 0
Active: yes
Name: Patriot Memory [0110]
VendorId: 13FE
ProductId: 1F00
Revision: 0110
Product: Patriot Memory
Remote: no
Serial Number: 078501AA0001

Index: 1
Active: yes
Name: COWON SYSTEM, Inc. COWON A3 [0316]
VendorId: 0E21
ProductId: 1020
Revision: 0316
Manufacturer: COWON SYSTEM, Inc.
Product: COWON A3
Remote: no
Serial Number: 3238204E6F76

Shared folders:

Name: 'winshare', Host path: '/home/glaescher/winshare' (machine mapping), writable
Name: 'ppgdata', Host path: '/projects/ppgdata' (machine mapping), writable
Name: 'latlearn', Host path: '/projects/latlearn' (machine mapping), writable
Name: 'home', Host path: '/home/glaescher' (machine mapping), writable


Statistics update: disabled

So the 2 USB filters specific to the VM are recognized.

Do you have any other ideas?

Thanks a lot,

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:
Or, maybe you can try Version 2.0?

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...

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,

I didn't need to add the group="vboxusers" to the 40-basic-permissions.rules file or the stuff in I just put:

domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=<gid>,devmode=664

as explained in the post. Thanks Andrzej, hpoefully if Jan tries your suggestion it will work.

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.


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

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.

I follow the instruction also in the 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).


I, too, have a T61 and have tried all of the solutions offered here to no avail. Did you ever get it working?

I changed this line
domount usbfs "" usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=,devmode=664


domount usbfs "" /proc/bus/usb usbdevfs -onoexec,nosuid,nodev,devgid=,devmode=664

That's right! I had to do that too, but I forgot to update this blog post. Thanks!

Maybe you'll be able to help with enabling Wacom Tablets on Intrepid + Vbox, (
I can't find any useful resource about this problem on Intrepid.

All I had to do was chown the tablet module in /proc/bus/usb/
(see the link in the previous post)

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"/>
<USBController enabled="true" enabledEhci="true"/>

and after that I was able to access my USB drive

I followed author's original instruction for 8.10, they worked great after reboot.

Thanks a bunch!



Thanks for the hints!
One additional comment:
I'm on Intrepid. I had to install Virtual Box version 2.0.6


I am running Ubuntu 8.04

I have edited the 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 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.

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.

Excellent. After much stuffing about with the advice at , Linux permissions, etc, your simple one line change works for me...

thank you this has been very useful tip

Greetings from Costa Rica
Pura Vida!!

Thanks David - Intrepid suggestions worked a treat!

Thanks, David.

For me, it works on Ubuntu 8.10 (64b) even after I commented the lines I put before in /etc/init.d/ and /etc/fstab as I was told by an other internet source.


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: 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.


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! :)

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.

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.

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?

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).

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.

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!!!!!!

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!

I am trying to make what you are saying and I can't
Can you please check if I made it corect?

#! /bin/sh
# Provides:          mountkernfs
# Required-Start:
# Required-Stop:
# Should-Start:      glibc
# Default-Start:     S
# Default-Stop:
# Short-Description: Mount kernel virtual file systems.
# Description:       Mount initial set of virtual filesystems the kernel
#                    provides and that are required by everything.
. /lib/init/
. /lib/lsb/init-functions
. /lib/init/
[ -f /etc/default/tmpfs ] && . /etc/default/tmpfs
do_start () {
	# Get some writable area available before the root is checked
	# and remounted.
	[ "${RW_SIZE:=$TMPFS_SIZE}" ] && RW_OPT=",size=$RW_SIZE"
	domount tmpfs "" /lib/init/rw tmpfs -omode=0755,nosuid$RW_OPT
	touch /lib/init/rw/.ramfs
	# Make pidfile omit directory for sendsigs
	mkdir /lib/init/rw/sendsigs.omit.d/
	# Mount proc filesystem on /proc
        #for hardy:
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=124,devmode=664
        #for intrepid:
domount usbfs "" /proc/bus/usb usbdevfs -onoexec,nosuid,nodev,devgid=124,devmode=664
	domount proc "" /proc proc -onodev,noexec,nosuid
	# Mount sysfs on /sys
	# Only mount sysfs if it is supported (kernel >= 2.6)
	if grep -E -qs "sysfs\$" /proc/filesystems
		domount sysfs "" /sys sysfs -onodev,noexec,nosuid
		domount fusectl "" /sys/fs/fuse/connections fusectl
	# Mount /var/run and /var/lock as tmpfs if enabled
	if [ yes = "$RAMRUN" ] ; then
		[ "${RUN_SIZE:=$TMPFS_SIZE}" ] && RUN_OPT=",size=$RUN_SIZE"
		domount tmpfs "" /var/run varrun -omode=0755,nosuid$RUN_OPT
		touch /var/run/.ramfs
	if [ yes = "$RAMLOCK" ] ; then
		[ "${LOCK_SIZE:=$TMPFS_SIZE}" ] && LOCK_OPT=",size=$LOCK_SIZE"
		domount tmpfs "" /var/lock varlock -omode=1777,nodev,noexec,nosuid$LOCK_OPT
		touch /var/lock/.ramfs
	# Mount spufs, if Cell Broadband processor is detected
	if [ -d /spu ] && grep -qs '^cpu.*Cell' /proc/cpuinfo; then
	        domount spufs "" /spu spufs -ogid=spu
	# Propagate files from the initramfs to our new /var/run.
	for file in /dev/.initramfs/varrun/*; do
		[ -e "$file" ] || continue
		cp -a "$file" "/var/run/${x#/dev/.initramfs/varrun/}"
case "$1" in
	echo "Warning: mountkernfs should be called with the 'start' argument." >&2
	echo "Error: argument '$1' not supported" >&2
	exit 3
	# No-op
	echo "Usage: mountkernfs [start|stop]" >&2
	exit 3

You have to put

"domount usbfs "" /proc/bus/usb usbdevfs -onoexec,nosuid,nodev,devgid=124,devmode=664"


"domount proc "" /proc proc -onodev,noexec,nosuid"

In Jaunty, before you boot the guest, simply do this.

Open Settings>USB
Plug in your device, but ensure it's unmounted in the host
Enable USB controller
Add filter from device (and pick your device)

It worked for me without any mucking around with text files.

Can anyone else confirm that this works on a freshly installed Jaunty system?

For me it is working OK with my old 256 MB pendrive...

... but I am still working on how to install my laserjet printer via USB...

hi david
i have exactly the same problem. i am using suse 11.1 with the closed source version virtualbox 2.2.2. i am allready a member of the vboxusers group.
so i want to implement the next step of your description here. but wehn i am trying:
sudo gedit /etc/init.d/
then i end with: "(gedit:5957): Gtk-WARNING : cannot open display:.

i am a windows crack which want to find his way into linux. but it is so hard, while understand one system and try to do so in a different one! i am quite new here and getting confused sometimes while trying to fix problems in linux.

please: can you send me a step by step manual how to fix this error?



Try editing with a different editor. Try:

nano -w /etc/init.d/


kate /etc/init.d/

or use vim or emacs if you know how

hi david

sorry that i am comming back. but i tryd every tipps an tricks on your side here. it took me about one day. but i still can not use my usb devices, such as a garmin device and my u3 usb stick..

this is what i have checked and tryed:
- i have installed the closed virtualbox version.
- i am a member of the vbox users.
- i installed the version 2.2.2 and after this the new one 2.2.4.
- remember after each smale change i allways rebooted my system!
- in virtualbox configruation of the wxp machine i added the required usb filters.
- when i startup the wxp machine, under device --> usb devices, i can see the filters but they are allways grayedout. in the taskbar of the wxp machine it shows me the information: no usb devices attached!
- when i attach a common usb stick to my workstation then suse will recogize it an i can use it under linux.

- when i start the: "/etc/init.d/" it was empty.
- i added: domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=,devmode=664
- then i added: domount proc /proc proc -onodev,noexec,nosuid
- the file contains now this two lines:
domount proc /proc proc -onodev,noexec,nosuid
domount usbfs /proc/bus/usb usbdevfs -onoexec,nosuid,nodev,devgid=1000,devmode=664 (1000 is my gid)
- i first added the first line and checked it after a reboot.

in a feedback above there is something written about the: do_start () function. what exactly does this mean? since no such function is visable in my: "/etc/init.d/".
if nessesary how is the exact syntax of this?

- i changed the permissions: chmod 777 on the /proc/bus/usb

- interesting is that: mount |grep usb shows simly nothing!

- i removed all lines refering to: usbfs in: /etc/fstab

- the settings in: /home/matthias/.VirtualBox/Machines/wxp_client/wxp_client.xml is: "USBController enabled="true" enabledEhci="true".

any help is welcome.

thanks matthias

"when i start the: "/etc/init.d/" it was empty."

that's your problem. That file should have tons more stuff in it. It comes with the initscripts package, so you might want to try reinstalling that.


First off, thanks everyone for the great suggestions on getting USB working.

I am running Fedora 11 i386 and Sun VirtualBox 2.2.4 (VirtualBox-2.2.4_47978_fedora11-1.i586). I am trying to get USB to work in XP SP3. When look at the USB filters, it has no problem showing me all of my USB devices, but when I "Start" the XP host, and then mouse over the USB icon, it says that there are "no attached devices".

[bryan@fedora ~]$ grep vbox /etc/group

[bryan@fedora ~]$ mount |grep usb
[bryan@fedora ~]$

[bryan@fedora ~]$ cat /etc/group|grep vboxusers

I have performed the changes in, I have also tried adding another group called "USB", I have also tried to CHMOD -R 777 the usb directory.

Any help is appreciated -- I am very frustrated.



Add new comment