Main Menu

VirtualBox PDF Print E-mail

I have been using Sun VirtualBox to build virtual machines for the past couple years.  To this point, I rarely had any interest in using USB devices through my host machine.  I picked up a Lexmark X4580 multi-function printer for free, plugged it in, and found that it was not immediately supported by my Ubuntu 9.10 box.  I searched around for about 30 minutes without success and moved on to some other projects.  I tried one of my Windows XP VMs with the expectation that I could simply download the drivers and plug-n-play my way to a simple solution.  Unfortunately, VirtualBox didn't recognize my USB device.  I updated my repositories and upgraded all applications, rebooted, and still had the same issue.  Upon visiting VirtualBox.org, I noticed that the current version advertised on the site was newer than the one installed through the Ubuntu repositories.

 

I followed the following instructions from the website:

 

Debian-based Linux distributions

Add one of the following lines according to your distribution to your /etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian karmic non-free
deb http://download.virtualbox.org/virtualbox/debian jaunty non-free
deb http://download.virtualbox.org/virtualbox/debian intrepid non-free
deb http://download.virtualbox.org/virtualbox/debian hardy non-free
deb http://download.virtualbox.org/virtualbox/debian gutsy non-free
deb http://download.virtualbox.org/virtualbox/debian dapper non-free
deb http://download.virtualbox.org/virtualbox/debian lenny non-free
deb http://download.virtualbox.org/virtualbox/debian etch non-free
deb http://download.virtualbox.org/virtualbox/debian sarge non-free
deb http://download.virtualbox.org/virtualbox/debian xandros4.0-xn non-free

The Sun public key for apt-secure can be downloaded here. You can add this key with

sudo apt-key add sun_vbox.asc

or combine downloading and registering:

wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -

The key fingerprint is

AF45 1228 01DA D613 29EF  9570 DCF9 F87B 6DFB CBAE
Sun Microsystems, Inc. (xVM VirtualBox archive signing key) < This e-mail address is being protected from spambots. You need JavaScript enabled to view it >

To install VirtualBox, do

sudo apt-get install virtualbox-3.1

Replace virtualbox-3.1 by

  • virtualbox-3.0 to install VirtualBox 3.0.12

  • virtualbox-2.2 to install VirtualBox 2.2.4

  • virtualbox-2.1 to install VirtualBox 2.1.4

  • virtualbox-2.0 to install VirtualBox 2.0.12

  • virtualbox to install VirtualBox 1.6.6

Note: Ubuntu users might want to install the dkms package (not available on Debian) to ensure that the VirtualBox host kernel modules (vboxdrv, vboxnetflt and vboxnetadp) are properly updated if the linux kernel version changes during the next apt-get upgrade. The dkms package can be installed through the Synaptic Package manager or through the following command:

sudo apt-get install dkms



I started adding my VMs to the new management console and tried to start one.  It failed.  I later found out that since I had been using a saved state rather than shutting down the VM, all my VMs were broken.  I should have shut each one down before upgrading.



It's usually a good idea to bridge your network adapter if you're using a VM for browsing or extensive downloading.  If you take the default NAT, your performance will take a hit.



I have a GigaFast USB 802.11b/g wireless adapter that seems to fail under certain kernels, causing it to constantly attempt to load. It gives me the following messages:

usb 1-5: new high speed USB device using ehci_hcd and address 2

usb 1-5: new high speed USB device using ehci_hcd and address 3

usb 1-5: new high speed USB device using ehci_hcd and address 4

usb 1-5: new high speed USB device using ehci_hcd and address 5

usb 1-5: new high speed USB device using ehci_hcd and address 6

usb 1-5: new high speed USB device using ehci_hcd and address 7

usb 1-5: new high speed USB device using ehci_hcd and address 8

usb 1-5: new high speed USB device using ehci_hcd and address 9



I found a bug in VirtualBox that won't let my VM load if the bridged adapter is not found. You can't change the bridged adapter and fix the problem if your VM is in a saved state. Normally my adapter is labeled wlan0, but if this device fails to work, I have a Ralink network adapter that is labeled ra0.



Lessons learned:

Don't attempt to upgrade VirtualBox with VMs in a saved state.

Log out of all VMs before upgrading your kernel.