USB Devices

Discussions related to using VirtualBox on Linux hosts.
Post Reply
ESPOiG
Posts: 5
Joined: 12. Jul 2009, 05:39
Primary OS: Debian Lenny
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP
Location: Perth, Western Australia

USB Devices

Post by ESPOiG »

Hey all

Im having problems with add USB devices in my VBox 3.0.2 OS (WinXPProSP3) which is running on my host computer (Lenny). Basically what ive done is installed all guest additions etc got XP running smoothly no problems, and now I decided to add my USB thumb drive to XP so before I started it up went into settings, like normal enabled USB and USB 2.0 added my USB device which was detected straight away as a device, and then booted XP up.

Now this is where I get problems, when XP boots up I look in the bottom corner over the USB icon, it is running when I hover the mouse over it says No USB Devices attached, so I gave it a click and it shows me a list of all the USB devices that I guess could be mounted, but they are all blanked out or whatever you want to call it, I can click them and a little tick comes up next to it but as soon as the mouse moves it dissapears.

So to some up VBox can see my USB device and even though I have added the filter it cant see it when the OS is booted only VBox can and its unselectable.

Any help would be greatly appreciated, Thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB Devices

Post by Perryg »

Your profile states that you are using the OSE Debian version of VirtualBox.
USB is not supported in the OSE version, but is supported in the PUEL version.
ESPOiG
Posts: 5
Joined: 12. Jul 2009, 05:39
Primary OS: Debian Lenny
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP
Location: Perth, Western Australia

Re: USB Devices

Post by ESPOiG »

Hmm im not sure then I just chose OSE version because it said Debian, didn't really think. I just added the repo from the VBox website and downloaded from there.

So I dont know which version I really have.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB Devices

Post by Perryg »

Try running this in a terminal of the host. If it brings back lines with OSE in it then it is the OSE version.
If not then it is the PUEL version and we can continue to see what the problem may be.

Code: Select all

dpkg -l virtualbox*
I use this in Ubuntu but it might work in debian, not sure.
RobHK
Posts: 14
Joined: 21. Oct 2007, 12:50
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: XP Home, W7RC
Location: UK

Re: USB Devices

Post by RobHK »

ESPOiG wrote:Hmm im not sure then I just chose OSE version because it said Debian, didn't really think. I just added the repo from the VBox website and downloaded from there.

So I dont know which version I really have.
I may be able to help on this one. If you download from the repository you get the Open Source version, which has a number of limitations. If you want the full version you go to the Virtual Box site and download the DEB version. I can't remember the differences because I haven't used the OSE version for a long time, but there are quite a few limitaions on it.

As for USB, I found this a nightmare when I first started with VB, but I've found an easy way to do it. I'm assuming you know how to share one of your Linux folders? (If you don't, ask.) Simply share the USB connection of your Linux setup (should be in /media). Then open (My) Computer in your Windows guest, click on "Map a a network drive" and map a drive letter to your USB share.

Hope that helps. My experience is with Ubuntu/Mint and Windows XP/Vista.
ESPOiG
Posts: 5
Joined: 12. Jul 2009, 05:39
Primary OS: Debian Lenny
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP
Location: Perth, Western Australia

Re: USB Devices

Post by ESPOiG »

Sorry for slow reply, I believe I have a OSE version, woops. Anyway Im downloading the .deb straight from the website, like I did all my other versions. So I will soon know if it works.
RobHK wrote:
ESPOiG wrote:Hmm im not sure then I just chose OSE version because it said Debian, didn't really think. I just added the repo from the VBox website and downloaded from there.

So I dont know which version I really have.
I may be able to help on this one. If you download from the repository you get the Open Source version, which has a number of limitations. If you want the full version you go to the Virtual Box site and download the DEB version. I can't remember the differences because I haven't used the OSE version for a long time, but there are quite a few limitaions on it.

As for USB, I found this a nightmare when I first started with VB, but I've found an easy way to do it. I'm assuming you know how to share one of your Linux folders? (If you don't, ask.) Simply share the USB connection of your Linux setup (should be in /media). Then open (My) Computer in your Windows guest, click on "Map a a network drive" and map a drive letter to your USB share.

Hope that helps. My experience is with Ubuntu/Mint and Windows XP/Vista.
Sorry Im not trying to get the USB to work for sharing files, I already know how to do that, its no problems. I attempting to get USB working, a USB Thumbdrive was just what Im using to try and get the USB support to work. But thanks anyway.
ESPOiG
Posts: 5
Joined: 12. Jul 2009, 05:39
Primary OS: Debian Lenny
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP
Location: Perth, Western Australia

Re: USB Devices

Post by ESPOiG »

Ok Ok

I downloaded the .deb off VBox website, installed and did all my stuff (Inserted USB Thumb Drive, add USB Filter then started Windows), unfortunately same thing happened apprently no USB devices detected and both options when right clicked on lower USB icon and via menu both grayed out (The other one being my Logitech Mouse, just so you know). So no joy then I unplugged and plugged it back in still nothing, mounts in Lenny no problems straight up but nothing in VBox or windows.

How can we go from here, should I uninstall VBox and make sure there is no conflicting OSE files hanging around or something? Or well I dunno just pulling at strings.

Any Ideas? Thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB Devices

Post by Perryg »

Yes to remove the OSE before installing the PUEL.

Here, you should have read this but in case you missed it read the USB section.
http://forums.virtualbox.org/viewtopic. ... 669#p33944
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: USB Devices

Post by fixedwheel »

Perryg wrote:Yes to remove the OSE before installing the PUEL.
virtualbox-ose should be removed by the dependencies of the packages - i'm not shure whats up w/ the virtualbox-ose-modules packages

as for USB on Debian Lenny, i had it working on Etch with suggestions from the user manual, chapter 11
11.5.7. USB not working wrote:Debian Etch has the mount command in /etc/init.d/mountkernfs.sh. Since that distribution has no group usb, it is also the easiest solution to allow all members of the group vboxusers to access the USB subsystem. Modify the line
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev
so that it contains
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=85,devmode=664
As usual, replace the 85 with the actual group number which should get access to USB devices.
...and like this still working on my Lenny system. But starting with Version 2.? (dont remember exactly) VBox ships a generic /etc/udev/rules.d/10-vboxdrv.rules where i (every VBox update) comment out the last two lines so that they dont interfere with the modified /etc/init.d/mountkernfs.sh

Code: Select all

KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
#SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0664"
#SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="vboxusers", MODE="0664"
some days ago in Debian testing/Squeeze the /etc/init.d/mountkernfs.sh was changed to no more contain the domount usbfs usbdevfs and i did not investigate the follow up yet ...
rsfdpn
Posts: 1
Joined: 21. Jul 2009, 07:16
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows

Re: USB Devices

Post by rsfdpn »

Hello fixedwheel,

>> some days ago in Debian testing/Squeeze the /etc/init.d/mountkernfs.sh was changed to no more contain the domount usbfs usbdevfs and i did not investigate the follow up yet ...

Did you figure out how to get usb ports working on Debian testing/squeeze? Please let me know.

Thanks in advance.
fixedwheel
Volunteer
Posts: 1699
Joined: 13. Sep 2008, 02:18

Re: USB Devices

Post by fixedwheel »

Did you figure out how to get usb ports working on Debian testing/squeeze?
not yet all

the unchanged vbox /etc/udev/rules.d/10-vboxdrv.rules seem to work with a bluetooth stick, but the USB flash disk /dev/sda1 was not mounted with rights coming from 10-vboxdrv.rules and mounting in the guest failed. I have not yet figured out where the mount is done now, and /etc/udev/rules.d/ is pretty empty: only some CD and network rules ...



the closed bug describing /etc/init.d/mountkernfs.sh change: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=360165
ESPOiG
Posts: 5
Joined: 12. Jul 2009, 05:39
Primary OS: Debian Lenny
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: WinXP
Location: Perth, Western Australia

Re: USB Devices

Post by ESPOiG »

Ok well if anyone wants to know, I have USB support now, and how I did it is below.

1. Wiped all OSE VBox items off completely
2. Installed .deb PUEL version from website
3. Then I had to do this
Debian Etch has the mount command in /etc/init.d/mountkernfs.sh. Since that distribution has no group usb, it is also the easiest solution to allow all members of the group vboxusers to access the USB subsystem. Modify the line
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev
so that it contains
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=85,devmode=664
As usual, replace the 85 with the actual group number which should get access to USB devices.
And guess what it works :D, very happy, I dont have all the time in the world and it has been awhile since I started this thread. But just to show, I was paying attention to it, I can tell you that it worked. Anyway thanks all for the help.

PS. I still have 1 minor prob, when I was messing around with USB filters, I added my mouse, now when I booted XP in VBox, it detected it, apprently installed it and worked, but mouser was frozen, and when I shut it all down, it was frozen in Lenny to, so dunno no worries to me, I was just trying something. I just wonder why it did this, anythoughts?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: USB Devices

Post by Perryg »

Setting USB filters for your mouse and keyboard = BAD. If the guest captures it you will not be able to use them.
These are being used by the VBox program and passed back and forth to the host and guest as needed.
Post Reply