You are not logged in.

#1 2011-06-22 04:20:47

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

[SOLVED]USB support in virtualbox guest OS

I have a Windows 7 64 bit guest in virtualbox

[inxs ~ ]$ paclocs virtualbox
local/virtualbox 4.0.8-4
    Powerful x86 virtualization for enterprise as well as home use
local/virtualbox-ext-oracle 4.0.8-1
    Oracle VM VirtualBox Extension Pack
[inxs ~ ]$ 

I also have the latest guest additions installed. I have been trying to get access to my iPod, so I can transfer some songs without having to boot into my Windows (the dual boot one). gtkpod does not recognize my iPod for some reason - but that's for another thread.

In any case, I found that not only the iPod, but I cannot access any usb flash drives either. I tried the filters, but that didn't work. So here's what I have tried so far :
I tried this post  and this thread : https://bbs.archlinux.org/viewtopic.php?id=50239 but neither option work for me.

This thread on virtualbox forums is the same problem I have but alas they don't have any solution.
And finally this doesnt help either sad

They are all basically minor variations of the same solution.

Here are my details:

[inxs ~ ]$ cat /proc/bus/usb/devices
T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1005 ProdID=b113 Rev= 1.00
S:  Manufacturer=        
S:  Product=USB FLASH DRIVE 
S:  SerialNumber=19570E14032E
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usbfs
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=1ms
[inxs ~ ]$ ls -l /proc/bus/usb/001/003
-rw-rw-r-- 1 root vboxusers 57 Jun 21 19:55 /proc/bus/usb/001/003
[inxs ~ ]$ groups
lp wheel video audio optical storage power users vboxusers
[inxs ~ ]$ 

So as you can see the usb drive is on bus 01, device 03, and ls of that device shows that it belongs to vboxusers group and my user belongs to that group

[inxs ~ ]$ grep vboxusers /etc/group
vboxusers:x:108:inxs
[inxs ~ ]$ 

So the devgid is 108, but none of the lines suggested in the linked threads in fstab work for me sad

I do not have a group called usb, but I have one called usbmux -- Is that the devgid that I have to use?My user does not belong to that group.

[inxs ~ ]$ grep usb /etc/group
usbmux:x:140:
[inxs ~ ]$ 

Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#2 2011-06-22 04:46:44

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

One thing that I have noticed is that

[inxs ~ ]$ ls -l /proc/bus/usb/001/003
-rw-rw-r-- 1 root vboxusers 57 Jun 21 19:55 /proc/bus/usb/001/003

is owned by root. Maybe I should try starting virtualbox as root and see if it works.


EDIT : Nope. Doesn't help

Last edited by Inxsible (2011-06-22 04:51:09)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2011-06-22 04:55:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,117

Re: [SOLVED]USB support in virtualbox guest OS

I doubt I can second guess you, but I've the following questions:

You said USB drives.  Have you tried any other classes of USB devices?
Do the devices show up in the VB USB device menu ?
Are they enabled or grayed?
Some of the links indicated the devices are allocated to VM, but show up as unknown devices -- Is that what you are seeing?
What are the vendor / product codes of your USB Controller(s)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#4 2011-06-22 05:06:13

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

ewaller wrote:

You said USB drives.  Have you tried any other classes of USB devices?

I am not sure what exactly you mean by classes, but I tried 2 different usb keys, an iPod and a portable usb HDD and a Logitech webcam

ewaller wrote:

Do the devices show up in the VB USB device menu ?
Are they enabled or grayed?

Yes they do show up in the VB USB device menu and they are all enabled. When I select them to allow the guest to access them, Windows 7 tried to install the driver, but then invariably fails no matter how many times I try.

ewaller wrote:

Some of the links indicated the devices are allocated to VM, but show up as unknown devices -- Is that what you are seeing?

Nope. See above.

ewaller wrote:

What are the vendor / product codes of your USB Controller(s)

[inxs ~ ]$ lspci | grep USB
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 02)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 02)
[inxs ~ ]$ 
[inxs ~ ]$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 1058:0900 Western Digital Technologies, Inc. MyBook Essential External HDD
Bus 001 Device 003: ID 1005:b113 Apacer Technology, Inc. Handy Steno 2.0/HT203
Bus 002 Device 003: ID 041e:4055 Creative Technology, Ltd Live! Cam Video IM Pro
Bus 002 Device 005: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 002: ID 413c:1004 Dell Computer Corp. 
Bus 007 Device 002: ID 413c:3016 Dell Computer Corp. Optical 5-Button Wheel Mouse
Bus 003 Device 003: ID 413c:2006 Dell Computer Corp.

Thanks Eric.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2011-06-22 05:10:50

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

Just found this: http://www.virtualbox.org/manual/ch03.html#idp11173664

Virtualbox Manual wrote:

On newer Linux hosts, VirtualBox accesses USB devices through special files in the file system. When VirtualBox is installed, these are made available to all users in the vboxusers system group. In order to be able to access USB from guest systems, make sure that you are a member of this group.

On older Linux hosts, USB devices are accessed using the usbfs file system. Therefore, the user executing VirtualBox needs read and write permission to the USB file system. Most distributions provide a group (e.g. usbusers) which the VirtualBox user needs to be added to. Also, VirtualBox can only proxy to virtual machines USB devices which are not claimed by a Linux host USB driver. The Driver= entry in /proc/bus/usb/devices will show you which devices are currently claimed. Please refer to the section called “USB not working” also for details about usbfs.


And also this: http://www.virtualbox.org/manual/ch12.html#usb_linux

This means that I should not have to do all the usbfs business since my Linux host is new as new can be. And since I am in vboxusers, I should be able to access USB without all this hassle.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#6 2011-06-22 05:28:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,117

Re: [SOLVED]USB support in virtualbox guest OS

I am not sure what exactly you mean by classes, but I tried 2 different usb keys, an iPod and a portable usb HDD and a Logitech webcam

That would do it.  The usb keys and iPod are all storage class. 
The webcam is a multimedia class device.
Other classes are Human Interface Devices (HID) which includes keyboards, mice and joysticks. 
Some camera's show up as camera class devices instead of storage devices. 
Then there is audio class stuff,
Serial device class stuff,
modem class Stuff,
etc...

Do you have the following:

ewaller@odin:~ 1020 %\ls -lR /dev/vboxusb 
/dev/vboxusb:
total 0
drwxr-x--- 2 root vboxusers 60 Jun 15 21:54 002

/dev/vboxusb/002:
total 0
crw-rw---- 1 root vboxusers 189, 129 Jun 15 21:54 002
ewaller@odin:~ 1021 %

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#7 2011-06-22 05:36:08

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

[inxs ~ ]$ ls -lR /dev/vboxusb
/dev/vboxusb:
total 0
drwxr-x--- 2 root vboxusers 60 Jun 21 19:55 001/
drwxr-x--- 2 root vboxusers 80 Jun 21 19:55 002/
drwxr-x--- 2 root vboxusers 60 Jun 21 19:55 003/
drwxr-x--- 2 root vboxusers 60 Jun 21 19:55 007/

/dev/vboxusb/001:
total 0
crw-rw---- 1 root vboxusers 189, 2 Jun 22 00:46 003

/dev/vboxusb/002:
total 0
crw-rw---- 1 root vboxusers 189, 129 Jun 21 19:55 002
crw-rw---- 1 root vboxusers 189, 130 Jun 21 19:55 003

/dev/vboxusb/003:
total 0
crw-rw---- 1 root vboxusers 189, 258 Jun 21 19:55 003

/dev/vboxusb/007:
total 0
crw-rw---- 1 root vboxusers 189, 769 Jun 21 19:55 002

Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#8 2011-06-22 05:51:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,117

Re: [SOLVED]USB support in virtualbox guest OS

hmm

Dunno.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#9 2011-06-23 19:06:02

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

Any other pointers to this. I still am unable to access usb subsystems in a Windows guest.

Currently my work around is to move everything to the shared folder -- and then use my Arch host to transfer between the usb and the shared folder.

not a huge deal, but still something I know should work and would like to fix.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#10 2011-06-24 08:06:51

R00KIE
Forum Moderator
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 3,280

Re: [SOLVED]USB support in virtualbox guest OS

I remember that before the enabled usb devices needed to be plugged in _before_ starting the virtual machine, lately I think it was ok to plug the devices with the virtual machine running, but it's worth a try to debug the problem.
Also try adding to fstab the line that comes up in vbox's post-install, if you have that line there then comment it. I remember that makes a difference but can't remember if having that line in fstab breaks usb for vbox or if it helps to make it work. These days I don't use vbox so can't be of much more help.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#11 2011-06-24 12:05:10

Pjoter
Member
Registered: 2010-10-05
Posts: 12

Re: [SOLVED]USB support in virtualbox guest OS

Try to run CUPS on host (Linux) within the printer and try to get it working via network from Windows as guest (check google how to enable CUPS on Windows). Perhaps the best and most universal solution?

Pjoter.

Offline

#12 2011-06-24 14:02:12

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

Thanks Rookie, I'll try that out.

Pjoter wrote:

Try to run CUPS on host (Linux) within the printer and try to get it working via network from Windows as guest (check google how to enable CUPS on Windows). Perhaps the best and most universal solution?

Pjoter.

Wait, what? Who said anything about a printer?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#13 2011-06-24 19:01:36

Pjoter
Member
Registered: 2010-10-05
Posts: 12

Re: [SOLVED]USB support in virtualbox guest OS

Hahaha, sorry- I had busy day today smile

Offline

#14 2011-06-24 20:17:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,838

Re: [SOLVED]USB support in virtualbox guest OS

This won't help you at all smile but I have an almost identical setup to support my iPad - the difference is that my guest is WinXP. It works as expected. If there are any details I can share with you, please let me know.

Offline

#15 2011-06-24 21:02:58

R00KIE
Forum Moderator
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 3,280

Re: [SOLVED]USB support in virtualbox guest OS

I don't know which package you use for vbox but this one [1] does not have the message about what to put in fstab anymore, I still have it in my fstab as it is required for usbview to work. What sometimes needed to be added was:

none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0

A workaround to get direct ... ish access to storage devices on the host is to use rdesktop to connect to windows and forward a folder. I use this when I connect to WinXP running on kvm headless and it works quite well:

#!/bin/bash

shareddir="/path/to/shared/folder"

rdesktop -u your_user internal_bridge_ip -p your_password -x lan -k your_keyboard_map -g 1270x720 -r disk:share="$shareddir" -r sound:remote

[1] http://aur.archlinux.org/packages.php?ID=9753


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#16 2011-06-25 00:46:14

premier
Member
Registered: 2006-12-07
Posts: 15

Re: [SOLVED]USB support in virtualbox guest OS

I was having issues with iphone working on Windows 7 64-bit under virtualbox. 

I changed from the virtualbox packages in the community repo to virtualbox_bin and virtualbox-ext-oracle that are in AUR and it work first time. Both packages are 4.0.8 but one works and the other doesn't so something is different between them.

http://forums.virtualbox.org/viewtopic.php?f=7&t=37493

Offline

#17 2011-06-25 17:35:26

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

R00kie, that's the exact line I have in my fstab. It doesn't work with it or without it.

premier, thanks for the heads up, I will try the virtualbox_bin package and see if that helps. If this doesn't work, Tom I am coming after the details in your setup wink

Btw, Tom are you using the repo version or the virtualbox_bin from AUR as premier mentioned?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#18 2011-06-25 18:50:27

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

Ding Ding Ding !!!

Success!

Used the virtualbox_bin folder and got these additional options in my VM settings. The Enable USB2.0 option was not available in the repo version of virtualbox
tOTg4bg

And then I got this result tOTg4NA

I still have to have this line in fstab without which I get an error for "Unable to access the USB subsystem - which i never got with the repo version.

none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0

Thanks a bunch premier. I'll update the wiki article so its documented and others facing it will have a solution.

Tom, now I am even more curious as to which package you are using.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#19 2011-06-25 23:06:32

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,838

Re: [SOLVED]USB support in virtualbox guest OS

hehe... you'll still be curious too, because I'm using the community package with vbox-ext-oracle, just as you were when you started this thread. smile

You mentioned that your hardware is "new as new can be", whereas mine is... well, not (compaq laptop, approx 6 years old). Could be relevant. Re the fstab line, I used it when I had vbox-bin, but vbox-ose (in community) doesn't need it, so I deleted it.

Offline

#20 2011-06-26 02:12:24

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

tomk wrote:

hehe... you'll still be curious too,

In that case I'll chalk this one to "oh well!...."

tomk wrote:

You mentioned that your hardware is "new as new can be"

Actually I was saying that with respect to the software -- Arch being as updated as can be. My hardware is not old but not brand new either.
Intel Core 2 duo E8400 ATI 2400 graphics and 4 mb ram


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#21 2011-06-28 06:21:30

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

updated to 4.0.10 -- but still the version in the repo does not work. I need to have the virtualbox_bin from aur along with the line inn fstab to enable USB subsystem.

Should I open a bug to have a dev check the differences between the version in the repo and the one in aur? Their version number is the same, yet they seem to have different functionalities at least when it comes to USB.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#22 2011-06-28 13:50:12

mcover
Member
From: Germany
Registered: 2007-01-25
Posts: 133

Re: [SOLVED]USB support in virtualbox guest OS

Inxsible wrote:

updated to 4.0.10 -- but still the version in the repo does not work. I need to have the virtualbox_bin from aur along with the line inn fstab to enable USB subsystem.

Should I open a bug to have a dev check the differences between the version in the repo and the one in aur? Their version number is the same, yet they seem to have different functionalities at least when it comes to USB.

USB is one of the things that has always only been available in the proprietary version of VirtualBox.

Offline

#23 2011-06-28 13:58:52

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

Since at least 4.0.8 there is no proprietary version of virtualbox itself. only the extension pack has a PUEL license. virtualbox is GPL2. and yes in all of the above, I did have the PUEL extension package installed.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#24 2011-06-28 14:43:11

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: [SOLVED]USB support in virtualbox guest OS

Inxsible wrote:

Should I open a bug to have a dev check the differences between the version in the repo and the one in aur? Their version number is the same, yet they seem to have different functionalities at least when it comes to USB.

Yes. If there is a problem with the community package, it would be nice if it was fixed.

Offline

#25 2011-06-28 14:57:57

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,073

Re: [SOLVED]USB support in virtualbox guest OS

The only problem is : https://bbs.archlinux.org/viewtopic.php … 54#p953554

where Tom suggests that the community package works for him. Does that mean that this is dependent on the guest OS that we use? He is using XP whereas I am breaking my head with Win7.


I have an old XP cd lying around. I might just try installing XP Professional in virtualbox and see if the community package works OOTB with respect to USB. If not, then I might open a bug report.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB