USB support F11

Discussions related to using VirtualBox on Linux hosts.
Post Reply
wvinyard
Posts: 1
Joined: 15. Jun 2009, 17:31
Primary OS: Fedora 10
VBox Version: PUEL
Guest OSses: XP

USB support F11

Post by wvinyard »

My host is F11_64 and I have installed VB 2.2.4 with usb support. The guest is XP which loaded OK. F11 sees all that is connected to the USB ports but XP does not. Right clicking on the USB icon at the bottom of VB manager everything is gray. In the guest under USB both Controllers are checked. What am I missing?
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 support F11

Post by Perryg »

Did you install the guest additions?
mlm
Posts: 3
Joined: 16. Jun 2009, 19:11
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Vista, XP

Re: USB support F11

Post by mlm »

On a Gateway S-7320M I have FC11 which is my primary OS and I have installed VB version 2.2.4r47978. I believe it is PUEL. (How do you confirm this ?) I am also not able to access the USB drives.Guest addition is installed on both guests. It is accessible in the host. Shows up in Vista as well as in XP guest after the device is plugged in but it is greyed out, cannot check the check-box. The userid in FC11 is a member of the group vboxusers. Any suggestions ?
hank_se
Posts: 101
Joined: 16. Apr 2009, 11:36
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: windows xp

Re: USB support F11

Post by hank_se »

You're definitly running the PUEL version, now I'm not at F11 but on openSUSE 11.1 where we've had our share of usb problems. One thing to note is that you have two choices to enable usb support in VBox today, either the old way by mounting usbfs under /proc/bus/usb or the new, preferred, way reling on udev. I've found this to work under openSUSE11.1, disable any mount command you might have for usbfs and add the following file /etc/udev/rules.d/11-vboxdrv.rules with the following content:
KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0664"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", NAME="VirtualBox/$env{BUSNUM}/$env{DEVNUM}", GROUP="vboxusers", MODE="0664"
reboot and see if it works.
mlm
Posts: 3
Joined: 16. Jun 2009, 19:11
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Vista, XP

Re: USB support F11

Post by mlm »

Thank you for your respone.

I had earlier tried adding usbfs mounting line in /etc/fstab and it did not help.

In FC11 I already have a file called /etc/udev/rules.d/10-vboxdrv.rules. The only difference was that I did not have the setting for NAME i.e. NAME="VirtualBox/$env{BUSNUM}/$env{DEVNUM}" so copied the original file to another location made the change rebooted the host and still the guset is not able to access the flash drive. Both Vista and XP When I hover over the usb icon in VB the popup message will say "No USB devices attached", a left mouse click will show the name of the flash drive with a checkbox but it is greyed out. So it does not work for me. Below is some more info, if it helps someone to point me in the right direction.

After I plug in the usb drive the following is the lines in dmesg output

warning: `VirtualBox' uses 32-bit capabilities (legacy support in use) <-- not sure if this line was there before I plugged in the drive
usb 2-4: new high speed USB device using ehci_hcd and address 2
usb 2-4: New USB device found, idVendor=090c, idProduct=1000
usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-4: Product: USB DISK
usb 2-4: Manufacturer: SMI Corporation
usb 2-4: SerialNumber: AA04012700016096
usb 2-4: configuration #1 chosen from 1 choice
Initializing USB Mass Storage driver...
scsi5 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 5:0:0:0: Direct-Access Flash Drive SM_USB20 1100 PQ: 0 ANSI: 0 CCS
sd 5:0:0:0: [sdb] 252928 512-byte hardware sectors: (129 MB/123 MiB)
sd 5:0:0:0: [sdb] Write Protect is off
sd 5:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 5:0:0:0: [sdb] Assuming drive cache: write through
sd 5:0:0:0: [sdb] 252928 512-byte hardware sectors: (129 MB/123 MiB)
sd 5:0:0:0: [sdb] Write Protect is off
sd 5:0:0:0: [sdb] Mode Sense: 43 00 00 00
sd 5:0:0:0: [sdb] Assuming drive cache: write through
sdb: sdb1
sd 5:0:0:0: [sdb] Attached SCSI removable disk
sd 5:0:0:0: Attached scsi generic sg2 type 0

as you can see it mounts it as /dev/sdb1

Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
70G 23G 44G 35% /
/dev/sda1 194M 14M 171M 8% /boot
tmpfs 1003M 1.8M 1002M 1% /dev/shm
/dev/sdb1 124M 120M 3.8M 97% /media/C2F8-E4F2
hank_se
Posts: 101
Joined: 16. Apr 2009, 11:36
Primary OS: openSUSE
VBox Version: PUEL
Guest OSses: windows xp

Re: USB support F11

Post by hank_se »

Disks adds an extra level of complexity, MS systems will choke on anything but fat and ntfs partitions, if possible please try with some other usb device. Booting with my suggested xx-vboxdrv.rules file do you get a /dev/virtualBox folder and whats the content of it?
mlm
Posts: 3
Joined: 16. Jun 2009, 19:11
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Vista, XP

Re: USB support F11

Post by mlm »

Got it to work !!

When you mentioned about /dev/virtualbox permissions I started to look in /dev and tried changing the permissions to 664 on all usb* devices, but that did not help.

next, in /etc/rc.sysinit changed the following (mount line in the if statement)

from
------------------------------------------------
if [ ! -d /proc/bus/usb ]; then
modprobe usbcore >/dev/null 2>&1 && mount -n -t usbfs /proc/bus/usb /proc/bus/usb
else
mount -n -t usbfs /proc/bus/usb /proc/bus/usb
fi
---------------------------------------------------------------
to
--------------------------------------------------
if [ ! -d /proc/bus/usb ]; then
modprobe usbcore >/dev/null 2>&1 && mount -n -t usbfs /proc/bus/usb /proc/bus/usb
else
# mount -n -t usbfs /proc/bus/usb /proc/bus/usb # commented
mount -t usbfs -o remount,devgid=$(awk -F: '/^vboxusers:/{print $3}' /etc/group),devmode=664 /proc/bus/usb /proc/bus/usb
fi
----------------------------------

changed (permission from 600 to 660 in line 1) following in /etc/udev/rules.d/10-vboxdrv.rules

from

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"

to

KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0660"
SUBSYSTEM=="usb_device", GROUP="vboxusers", MODE="0664"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="vboxusers", MODE="0664"

maybe this helps someone.

thanks for your help.
brunojcm
Posts: 5
Joined: 18. Jun 2009, 15:23
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: Windows XP

Re: USB support F11

Post by brunojcm »

Thanks, mim!

I got it working too!
I'm using Fedora 11 x86_64 on a HP Pavillon dv5 notebook.
Only the first modification was sufficient to get things working for me. My file /etc/rc.sysinit is like yours now:
--------------------------------------------------
if [ ! -d /proc/bus/usb ]; then
modprobe usbcore >/dev/null 2>&1 && mount -n -t usbfs /proc/bus/usb /proc/bus/usb
else
# mount -n -t usbfs /proc/bus/usb /proc/bus/usb # commented
mount -t usbfs -o remount,devgid=$(awk -F: '/^vboxusers:/{print $3}' /etc/group),devmode=664 /proc/bus/usb /proc/bus/usb
fi
--------------------------------------------------

My file /etc/udev/rules.d/10-vboxdrv.rules is unmodified.

I got my pen drive working on Windows XP guest now. The only pending feature is the hardware extension (VT-x) now, but it's off topic.. :)
Thanks!
DArmoza
Posts: 1
Joined: 24. Jun 2009, 15:41
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: WinXP sp3

Re: USB support F11

Post by DArmoza »

I'm having a different, but related kind of problem that I can't find help to solve. I'm using FC11 as a host, WinXP sp3 as a guest. I have a IOGEAR micro hub with 4 ports that I'm using to connect a couple of USB devices. The first is an ActiveCard and the second is a SecureGuard pendrive. I'm using Virtualbox 2.2.4 PUEL, and I have the Guest Additions installed.

My host recognizes the pendrive OK. I enable pass-thru via the Devices pull down menu for both USB devices and they come up nicely in the guest. My problem occurs when I want to pass files via the pendrive to non-networked machines. I release the pendrive via the XP "Safely Release Hardware" icon in the Notification area of my taskbar. I get the pop-up notice that it is OK to remove the device, so I use Virtualbox Devices pull down to release it from the guest OS. I then unmount (I also tried ejecting it) the pendrive from Fedora I can't get the device to auto-mount when I return it to the micro hub. If I plug it into the back of my computer, in one of the motherboard usb ports it is auto-mounted.

I tried both of the fixes (i.e., /etc/rc.sysinit and /etc/udev/rules.d/10-vboxdrv.rules). No change. Any ideas or suggestions?

thanks,
David
Post Reply