Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Set up USB for Virtualbox

I have Ubuntu 12.04 as host and Win7 as guest. I installed VirtualBox 4.1 and Extension Pack 4.1 from Oracle website. I also enabled USB 2.0 from Settings of my VM. My Win7 VM doesn't regconize USB (Flash Drive and Kindle Fire). How to fix it?

Update: I added my current user to vbusers group but it doesn't work as well.

share|improve this question

marked as duplicate by Chris Wilson, hhlp, Scaine, Anwar Shah, Eric Carvalho Jan 12 '13 at 15:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
After you install the extension pack, have you restarted the virtualbox service itself? –  Barz May 21 '12 at 5:11

4 Answers 4

up vote 18 down vote accepted

(assuming you've already installed guest additions)

You also need to set USB filters so that the USB devices get sent to the guest OS.

From the main Virtualbox window open the Settings dialog, then the USB section, then click the little "add filter" button on the right side of the screen. You should be able to create a filter from any currently connected USB devices.

After you've done this (maybe restart to be sure the host OS isn't capturing any of the USB devices for itself--Ubuntu will try to automount the flash drive so you might also want to check and make sure that it is unmounted too) then boot into the guest OS and you should see your USB devices.

Good luck.

Edit: note on USB filters

It's my understanding that a device being used by a guest OS with a USB filter will not be accessible by the host OS while the guest OS is running. Therefore, one should choose carefully what usb devices to create filters for.

You should create USB filters for things that you plan on only using with the guest OS (often peripherals that don't work with the host OS and will only work with the guest OS) and when you won't require being able to access the device from the host OS while the guest OS is running. For example I have a USB banking dongle from my bank, ICBC, that is not compatible with Linux so I use a virtualized installation of Windows XP for banking and use a USB filter to grab the USB dongle.

Examples of good devices to create filters for:

  • USB banking dongles that only work with guest OS
  • e-readers (Kindle,Nook,etc.) that you plan on using only (or primarily) with the guest OS.
  • external soundcards that only work with the guest OS or require the guest OS for full functionality

Examples of bad devices to create filters for:

  • USB input devices (mouses or keyboards) that you would like to use with the host and guest OSes. Virtualbox will allow the guest OS access to these devices by default so there is no need for the guest OS to directly control them (well, I could think of some specialized reasons but I will digress...).
  • USB storage devices that you want the guest and the host OSes to both be able to access at the same time. Instead, mount the drive on the host OS and use shared folders to share the drive to the guest OS.
share|improve this answer
    
I added my something to USB tab as you said but the keyboard of my PC doesn't work. The mouse can't move out of the guest machine. –  Emerald214 May 21 '12 at 6:15
    
@Emerald214: this indicates that Guest Additions are not yet installed in the guest Windows7. –  Takkat May 21 '12 at 6:30
    
No, I've installed and used it before I installed Extension Pack. I think this is a bug. Really don't want to reinstall this VM. –  Emerald214 May 21 '12 at 6:31
    
@Emerald214: I'm not quite clear what problem it is you are having, is it your keyboard that isn't working, your mouse, or both? Are they only working in the host OS or only working in the guest OS? If you use a USB mouse/keyboard and added a filter for either one, then that could make the USB mouse/keyboard no longer work on the host OS. So I would recommend not adding filters for a USB mouse or keyboard... –  adempewolff May 21 '12 at 8:45
1  
@Emerald214: also, I'm not sure if this is your problem, but make sure to use the host key (usually the right ctrl key) to uncapture the keyboard and mouse so the host OS can use it again. Once guest additions have been installed you can also enable mouse integration (host + I, or from the machine menu) so you don't have to capture and uncapture the mouse anymore. –  adempewolff May 21 '12 at 8:51

Dont forget to add you as a vboxusers user. You have to be in the vboxusers group.

sudo adduser yourUserName vboxusers

To verify it:

$ groups yourUserName
yourUserName : yourUserName adm cdrom sudo dip plugdev lpadmin scanner sambashare vboxusers

If this still doesn't work, Log out and log back in.

share|improve this answer

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!

share|improve this answer
1  
After installing gnome-system-tools reboot required for me and it works perfectly. –  Fredrick Gauss May 27 at 14:19
    
This solution worked flawlessly and your tip to reboot was very helpful too –  Gaurav Jain Oct 16 at 11:35
    
Thanks for the feedback Gaurav Jain :) –  Ramon Suarez Oct 16 at 14:55

You need install VirtualBox Guest Addition into guest machine.

May be also you need restart vboxdrv service.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.