Fellow Penguins, Mr. VirtualBox here (that's meant to be a joke to certain board members here who have witnessed my trials and tribulations)
First off, if you haven't done so already download and install the non-free version of VirtualBox 1.6.2 (no dinero, requires accepting license agreement) from HERE.]
Now,
Get the public Key here: http://www.virtualbox.org/debian/innotek.asc
Save this as innotek.asc to your desktop, then run:
sudo apt-key add innotek.asc
to install the key. Then run sudo apt-get update and VB should update with the system in the future.
I did this in Kubuntu 8.04 RC, but below is for Ubuntu 8.04. This is written to apply to Gutsy also.
Go through the new VM set up routine in VirtualBox and install, let's say XP in VirtualBox.
Here's how I got usb devices working in an XP Virtual Machine in Hardy (8.04).
Add yourself to the group VirtualBox created during install called "vboxusers" The VB install creates this group, find it, don't add another one.
Create a group named "usbusers" and put yourself in it.
sudo groupadd usbusers
sudo gpasswd -a <yourusername> usbusers
Or do the above in Control Center under 'users and groups'.
Now uncomment the 4 lines below 'Magic to make /proc/bus/usb work' in mountdevsubfs.sh , they will be commented out by default) so it looks like the following:
sudo gedit /etc/init.d/mountdevsubfs.sh
#
# 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
Now then,
EDIT: Modify the rules in file /etc/udev/rules.d/40-permissions.rules for Gutsy, and /etc/udev/rules.d/40-basic-permissions.rules for Hardy:]
Change the lines :
From:
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"
To :
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usbusers", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"
Now on to......
The Grande Finale,
add this line:
none /proc/bus/usb usbfs devgid=120,devmode=664 0 0
to your /etc/fstab file (at the bottom). Just make sure that 120 is your vboxusers group (use your own number).
Reboot the computer.
Open VirtualBox and click on "Settings".
Click on the "USB" item in the left pane to edit the USB prefs.
Click on the "Add device" button to add a filter and select your printer from the list and click on the "Ok" button.
Start your VM and Windows should detect your printer.
The above was taken mostly from various scattered posts in the Ubuntu forums, some from me, and put together here, all mods in one place, in order, for future reference.
If you have a problem getting the usb devices recognized in VB, please post here. Potential edit recommendations are welcomed.
-
Nice Guide! +rep
-
Thank you amigos...it just plain needed to be done
-
absolutely brilliant. cheers
-
Updated: Add VirtualBox non free repo to your sources.list to update with system.
-
Update: New VirtualBox 1.6.0. Trying to get repo info now.....anyone? https://cds.sun.com/is-bin/INTERSHO...-Start?ProductRef=innotek-1.6-G-F@CDS-CDS_SMI
EDIT: Also install Guest Additions 1.6.0 from within VB. It will uninstall the old 1.5.6. I uninstalled VB 1.5.6 non free first, then installed 1.6.0 and all is fine with regard to usb, etc. (of course do not delete any vm files, just uninstall as 'remove' via synaptic.
EDIT: I've heard someone on Ubuntu forums say no hacks are required for this version 1.6.0.....if usb doesn't work, I can tell you the above will make it work. I haven't checked this part yet..... -
EDITED the 40 permissions rules lines above and tested to be correct. This was pointed out by Ian on my blog. It worked the other way, but this way is 'more' correct.
-
If I download 1.6.0 straight, do I follow the guide per normal?
How does VB compare to VMware in terms of gaming and stuff? -
Yes, you follow this guide downloading 1.6.0 directly from Sun. I should update on that. I don't think VB or VMware support 3d acceleration for gaming. I was hoping Parallels did, but it's 49 bux U.S. and I'm waiting on a Hardy version (hopefully, they won't respond back about it)
-
Darn. That's a bummer. So I guess it's still back to WINE and dual booting, then. I assume 1.6.0 works in Hardy the same, right?
-
-
Firstly used this . I have VBox PURL running in gutsy, WinXP guest. In VBox manager I can set up USB devices , they are recognised, but upon opening VBox the USB icon at the bottom right of the screen tells me that they are not, then I tried your
guide, 2 differences, 1 =
#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
Yours =
#
# 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
You leave the # on the 2 empty lines.
I changed to your method, put back in the #
2 = your guide
Now then,
EDIT: Modify the rules in file /etc/udev/rules.d/40-permissions.rules for Gutsy, and /etc/udev/rules.d/40-basic-permissions.rules for Hardy:]
Change the lines :
From:
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"
To :
# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usbusers", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"
I see in Gutsy...
# USB devices (usbfs replacement)
SUBSYSTEM=="usb_device", MODE="0664"
Only two lines.
Any suggestions would be gratefully accepted, MaltyLast edited by a moderator: Feb 2, 2015 -
Wait, you didn't install the OSE version did you? If so, usb won't work.
-
Thanks for responding, no I didn't use OSE. and...I didn't do nuffink and the USB has started working, VirtualBox is very good, but quirky
-
-
Update for VB 1.6.2....no repos!
-
Heads up for new version 2.0.0 and hardy repos:
http://www.virtualbox.org/wiki/Linux_Downloads
Hardy Heron, using USB devices in VB how-to
Discussion in 'Linux Compatibility and Software' started by theZoid, Apr 23, 2008.