Enable VirtualBox virtual machines(Guests) USB support

This post was written by admin on September 30, 2009
Posted Under: General

I installed Virtualbox and XP guest in Ubuntu 9.04,and enabled file sharing between them.But I encountered USB problem when I inserted a USB disk.Finally,I worked it out by following steps.
1.Open up VirtualBox,select the virtual machine and click on Settings.Then select USB in left and check the two checkboxes.
virtualbox_usb1
2.Open up terminal(Applications->Accessories->Terminal).Create usb group and add current user to the group:

sudo groupadd usbfs
sudo adduser your_username_here usbfs

3.Use this command,and you will get group id:

cat /etc/group | grep usbfs

Example of output:

usbfs:x:1001:wraith

Here,1001 is the group id.
4.Edit /etc/fstab by this command:

sudo gedit /etc/fstab

Add this line in the bottom.

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

Here 1001 is the group id in step 3.
5.Run following command:

sudo chmod 777 /proc/bus/usb

Restart your computer.
virtualbox_usb

Tips:
I don’t konw whether it matters,but you’d better install guest additions (from Devices->Install guest additions in VM window)

Related posts:

  1. How to share folder between VirtualBox Host and Virutal Machines(Guests)
  2. Enable remote desktop in Virtual machine(Virtualbox guest)
  3. Enable VirtualBox ubuntu guest 3D Acceleration
  4. Fix Ubuntu 11.04 cannot Create new Virtual Machine via Virtualbox
  5. Manage your VirtualBox Guest OS with VBoxManage

    Reader Comments

    Hey man!!

    Great work!!! I had tried pretty much every other solution I could find, but yours was the only one that worked!!! You ROCK!!! Thanks a million dude!!!

    [Reply]

    guy van der velden Reply:

    hello,
    fine that it works with u, but the line
    none /proc/bus/usb usbfs .. cannot work because bij me ubuntu 10.10 there is no usb in the dir bus.
    Can u help me

    guy

    [Reply]

    ozy Reply:

    try this
    sudo usermod -aG vboxusers your_username_here

    reboot your machine than

    [Reply]

    #1 
    Written By Spyros on November 10th, 2009 @ 11:54 pm

    Yea , I did like this ,just followed your steps , the last one was maybe to much, or maybe not. I do not know. I found an better way , but for the time now my OS is fucked up . I rebooted and did have surprise my system never booting up !!!!

    sudo groupadd usbfs
    sudo adduser your_username_here usbfs
    cat /etc/group | grep usbfs
    sudo gedit /etc/fstab
    none /proc/bus/usb usbfs devgid=1001,devmode=664 0 0
    sudo chmod 777 /proc/bus/usb

    (on sudo chmod it did not find the file. I do not know so I did one step more :

    sudo usermod -aG vboxusers your_username_here

    reboot your machine than
    Yea I did reboot. Great mess after that.

    Anyone can help please?????

    Such a mess !

    [Reply]

    #2 
    Written By Chris on December 26th, 2011 @ 12:30 am

    Add a Comment

    required, use real name
    required, will not be published
    optional, your blog address