On 02/24/2009 01:35 AM, Michael Thayer wrote: > Hello Lew and all, > > Lew Wolfgang wrote: >> After a lot of fiddling and non-deterministic behavior I isolated the >> problem to multiple mounting of the usbfs filesystem. > As of VirtualBox 2.1.2 (with a couple of fixes in 2.1.4), USB on Linux > hosts should work without mounting /proc/bus/usb at all. Judging from > the reports (like this thread), this does not work for everyone. It > would be great if some of the people experiencing problems could help to > troubleshoot this. > > First of all, I will briefly explain the technical background. In order > for guests to access USB devices, they have to be able to read and write > the device nodes for those devices. Those device nodes are now found > under /dev/bus/usb. (To find out which node belongs to which device, > look for the device in the output of the "lshal" application.) > > If everything is set up correctly, most of the USB device nodes (that > is, those that are not assigned to someone else by the system) should be > readable and writable to the group "vboxusers". So users who want to > use USB in VirtualBox should of course be members of that group. (BTW, > when a user becomes a member of a group in Linux, they have to log in > and out again before the change really takes effect.) VirtualBox can > detect the devices even if the user can't read or write them - this is > when the devices are shown as "greyed out". > > So, if things are not working, some things to look at for starters are: > > * Does the group "vboxusers" exist, and which users are members? > > $ cat /etc/group | grep vboxusers > vboxusers:x:1001:michael > > * Logging in and out, or rebooting will guarantee that those users > really are members of the groups. > * Is the device node of the device you want to access readable and > writable for that group? e.g. > > $ ls -l /dev/bus/usb/001/001 > crw-rw-r-- 1 root vboxusers 189, 0 2009-02-24 08:46 /dev/bus/usb/001/001 > > Knowing what is going wrong here would help to get this working properly. > > Regards and thanks, > > Michael
Apologies for replying to an older post; but I'd like to report that with 2.1.4 (PUEL) I managed to get usb without issue on Ubuntu Hardy 2.6.24-24-generic (and -386) after commenting out the previous usbfs workarounds for earlier versions. I would have tried them in 2.1.2, but forgot to do so. For those that are unfamiliar with the Ubuntu 'workarounds' they are documented here: https://help.ubuntu.com/community/VirtualBox#USB Specifically, I reversed: > For Gutsy and Hardy you just need to edit /etc/init.d/mountdevsubfs.sh and > uncomment the following lines: > > # > # Magic to make /proc/bus/usb work > # > mkdir -p /dev/bus/usb/.usbfs > domount usbfs "" /dev/bus/usb/.usbfs > -obusmode=0700,devmode=0600,listmode=0644 > ln -s .usbfs/devices /dev/bus/usb/devices > mount --rbind /dev/bus/usb /proc/bus/usb Meaning that I commented them back. I also commented out the /proc/bus/usb line in my fstab (from a much earlier "workaround": # none /proc/bus/usb usbfs devgid=111,devmode=664 0 0 I also reversed: > Under Hardy and Intrepid, edit /etc/udev/rules.d/40-basic-permissions.rules > to say the following: > > # USB devices (usbfs replacement) > SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664", GROUP="vboxusers" > SUBSYSTEM=="usb_device", MODE="0664", GROUP="vboxusers" And of course I have my vboxusers group in place from before. I then recompiled the kernel (sudo /etc/init.d/vboxdrv setup), rebooted to ensure that everything will work after reboot; (surprise, I no longer get the 'usbfs file system not supported error') and then fired up VirtualBox (Win2KPro guest) & *all* USB's worked! How cool is that - virtualbox rocks! Note: I had USB working with the above (fstab, /etc/init.d/mountdevsubfs.sh) but finally found the time to test without the 'workarounds'. I tested on two different (Hardy 8.04.2) systems. So, now it should be as easy as just creating vboxusers group, adding the users to that (all can be done from the Ubuntu System|Administration|Users and Groups GUI) and off you go. Only one error: when I 'Ejected' a usb flash drive from the Win2KPro guest, and then unclicked it from Devices/USB and then reclicked: Failed to create a proxy device for the USB device. (Error: VERR_READ_ERROR). Result Code: NS_ERROR_FAILURE (0x80004005) Component: Console Interface: IConsole {e3c6d4a1-a935-47ca-b16d-f9e9c496e53e} However, if I unplug and replug the device back in, it shows up without any problems. Thanks very much for this fix. Now if you can figure out a way to have the linux host easily regain control of a USB device (specifically a USB printer) after it has been released from guest, I'd be forever in your debt... well at least for a few months :-) The problem is that the USB printer must either be unplugged or turned off/on before the linux host will reckognize it again. _______________________________________________ vbox-users mailing list [email protected] http://vbox.innotek.de/mailman/listinfo/vbox-users
