Page 1 of 3

USB Problems

Posted: 7. May 2009, 23:14
by markcynt
Using openSUSE 11.1 (Host), VirtualBox 2.2.2, Windows XP Professional as Guest

If someone can help me figure out how to enable USB in VirtualBox as a limited user that would be great. I easily enabled USB running VirtualBox as su but when I go to shutdown XP it hangs and I can't quit by restarting openSUSE either. When I try to restart openSUSE I get a message that says "Logout canceled by /usr/lib/virtualbox/VirtualBox".

So a solution to either of these two problems is fine with me since I only need to use the USB function occasionally.

Thanks

Re: USB Problems

Posted: 7. May 2009, 23:36
by fixedwheel
figure out how to enable USB in VirtualBox as a limited user
the old "howto" is found in the manual 11.5.7. USB not working, there are instructions for Suse10.0 and maybe they could help you (i dont know: the debian etch part there is for me and still works for me with lenny).

but caution: OTOH some release ago they have introduced two new lines in /etc/udev/rules.d/10-vboxdrv.rules dealing with USB but disable USB on the host side for me so that i have to comment them out every new release ...

Re: USB Problems

Posted: 7. May 2009, 23:44
by markcynt
I don't really understand what you said. I'm kind of new to Linux but the problem with XP freezing on shutdown was either because I didn't physically remove the device or because I shutdown too soon for Windows to unload all of the startup items. Either way it shuts down normally now.

But I would like to get USB working as a limited user. I'll look into that manual.

Re: USB Problems

Posted: 7. May 2009, 23:45
by Sasquatch
Did you check the VirtualBox FAQ? That fstab line should be all you need. Just make sure you use the correct devgid, that of vboxusers group. You have to be a member of that group too. It's all in that link.

Re: USB Problems

Posted: 7. May 2009, 23:58
by markcynt
I looked at the manual and it doesn't look too hard but I don't know how to open the editor for that. Like I said, I'm fairly new but do know how to follow instructions.

Re: USB Problems

Posted: 8. May 2009, 00:02
by fixedwheel
problem with XP freezing on shutdown was either because
i think that has to do with running it from root account, and thats not the way it should be run

Re: USB Problems

Posted: 8. May 2009, 04:03
by markcynt
I tried all the tips, links, manuals, and FAQ's but nothing seems to work.

Re: USB Problems

Posted: 8. May 2009, 08:32
by fixedwheel
what exactly did you try?

Re: USB Problems

Posted: 8. May 2009, 12:32
by markcynt
what exactly did you try?
Everything that was linked or posted in this thread, mainly edit /etc/fstab.

This - http://forums.virtualbox.org/viewtopic.php?t=8669

Everything listed for openSUSE 11.0 here. - http://en.opensuse.org/Virtualbox_USB_Support

I didn't do the step in the manual that says to edit /etc/udev/rules.d/50-udev.rules for two reasons:

1) The step is for openSUSE 10.0

2) Because the editor came up with a blank screen and I wasn't sure if I was supposed to be editing something that was already there or creating something.

Re: USB Problems

Posted: 8. May 2009, 12:47
by Sasquatch
On the link you provided for OpenSuSE, there are two things for fstab. Add only one of them. I suggest the one found in the FAQ here, that is noted at the bottom of the page you provided. And you must be sure that you are a member of the vboxusers group, else it won't work. The installer doesn't do that for you, you have to do that manually yourself. Also noted in the FAQ.

Re: USB Problems

Posted: 8. May 2009, 13:55
by hank_se
An alternative in openSuSE 11.1 is this:

Have whatever you whish in fstab, but don't mount it, neither in /etc/init.d/boot.local or at the command line.
Create the following file /etc/udev/rules.d/11-vboxdrv.rules
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"

Re: USB Problems

Posted: 8. May 2009, 14:46
by markcynt
Sasquatch wrote:On the link you provided for OpenSuSE, there are two things for fstab. Add only one of them. I suggest the one found in the FAQ here, that is noted at the bottom of the page you provided. And you must be sure that you are a member of the vboxusers group, else it won't work. The installer doesn't do that for you, you have to do that manually yourself. Also noted in the FAQ.
I am a member of vboxusers. I only added one thing for fstab at a time, replacing each edit when chenging it. None of the edits worked.

Re: USB Problems

Posted: 8. May 2009, 14:47
by Sasquatch
hank_se wrote:An alternative in openSuSE 11.1 is this:

Have whatever you whish in fstab, but don't mount it, neither in /etc/init.d/boot.local or at the command line.
Create the following file /etc/udev/rules.d/11-vboxdrv.rules
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"
That file should already exist in 2.2.2, found in /etc/udev/rules.d/10-vboxdrv.rules.

Re: USB Problems

Posted: 8. May 2009, 15:00
by hank_se
Sasquatch wrote:
That file should already exist in 2.2.2, found in /etc/udev/rules.d/10-vboxdrv.rules.
No, notice the different content:
My suggestion /etc/udev/rules.d/11-vboxdrv.rules:
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"
/etc/udev/rules.d/10-vboxdrv.rules contains this:
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"
My suggested 11-vboxdrv.rules will override 10-vboxdrv.rules.

Re: USB Problems

Posted: 8. May 2009, 15:01
by markcynt
hank_se wrote:An alternative in openSuSE 11.1 is this:

Have whatever you whish in fstab, but don't mount it, neither in /etc/init.d/boot.local or at the command line.
Create the following file /etc/udev/rules.d/11-vboxdrv.rules
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"
Thanks hank_se, that worked beautifully.

Thanks to everyone for your replies.