VirtualBox USB config test script; testers wanted
Hello :)
Being as we've had so many questions here about getting USB to work with VirtualBox I've knocked up this script to check the configuration. It tests OK on my system. Any volunteers to test it? It can be run without any special privileges. EDIT: only the PUEL versions of VirtualBox have USB support; the OSE versions do not; the script attempts to identify the version in use and reports an error if the OSE version is found. EDIT2: latest version of the script is in this post. Code:
#! /bin/bash Charles |
Just ran, but have to run. Wife dragging me out -
Code:
[radar@msi-k8t ~]$ ./vbox_usbtest.sh |
Quote:
Did you install VirtualBox from a Fedora package? If so, how does you system compare with madmadmod's post? |
I decided to install puel to provide feed back. I got exactly the same error message as TBC Cosmo.
Quote:
rpm -qi VirtualBox outputs: Code:
Name : VirtualBox Relocations: (not relocatable) Quote:
Quote:
|
Quote:
Code:
[radar@msi-k8t ~]$ rpm -qi VirtualBox |
Thanks both :)
Here's a new version of the script now written to work with RPM thanks to your input. Not having an RPM based system I have not been able to test it much. Code:
#! /bin/bash |
I think your script is a good idea. Here's the new output:
Code:
[radar@msi-k8t ~]$ ./vbox_usbtestv2.sh |
I presume my test failed because I have no usb entries in my /etc/fstab.
Quote:
|
Quote:
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. Clearly, then, not having a usbfs line in fstab is not a showstopper on "newer Linux hosts". I'd like to add that into the script but what are "newer Linux hosts"? |
Sorry, but I'm getting the "could not find installation path" error, also.
Ubuntu 9.0.4 with 2.6.28-15-generic kernel /etc/vbox/ does exist, but is an empty directory (presumably left over from the OSE version even after it was purged to install the PUEL version.) Therefore, /etc/vbox/vbox.cfg isn't there. I have searched the entire filesystem for vbox.cfg and cannot find it on my system. Most of the virtualbox executables reside in /usr/lib/virtualbox/ the main vbox executable is in /usr/bin/. The user manual and license files are in /usr/share/doc/virtualbox-3.0/. I am unable to find a .cfg file in relation to virtualbox. The first line of my License file is: Quote:
[EDIT]Update: From the manual: Quote:
|
Quote:
|
Hi,
Ran it, got Code:
testvb But... there's all those suggested entries (which I have commented-out), so let's uncomment them and see what happens: Code:
<in /etc/fstab> Code:
testvb All righty, then, let's do only one Code:
none /proc/bus/usb usbfs devgid=102,devmode=664 0 0 Code:
testvb Oh, well, you gets what you gets. |
Quote:
|
Thanks tronayne :)
Do I rightly understand that USB was not working with VirtualBox until you had the devgid=102,devmode=664 usbfs line in fstab nd not the other usbfs line? I do not know the implications of more than one usbfs line in fstab so have re-written the script to report "WARNING: More than one usbfs line in /etc/fstab. Effect on VirtualBox unknown" and to continue running. If VirtualBox is now taking the USB devices for the VM(s) making them unavailable to Slackware, you may be able to return them to Slackware by using the VM's window's Devices->"USB Devices" menu and de-selecting them. The /proc/bus/usb/devices file's "Driver=" entries show which driver has claimed each device. Experimenting with a USB memory stick, this showed driver usb-storage when it was being used by Slackware (mounted under /media) and usbfs when it was attached to a VM (when it was unmounted from /media). If you have some USB devices that you never want to use with a VM, I think you can configure this, per-VM, in VirtualBox's GUI. They have to be plugged in then the VM's USB config section allows you to add them to the filter list after which you can configure each one to be automatically attached or not. |
Quote:
Code:
dave@dave-laptop:~$ sudo dpkg -I virtualbox-3.0 |
All times are GMT -5. The time now is 07:46 AM. |