Monday, July 20, 2009

Another Ubuntu tip: upgrade virtualbox OSE to PUEL

If, like me, you try to keep up with Ubuntu releases, meaning you upgrade not just when the long-term support releases come out but when the revisions do as well, you may have run into a similar problem I recently did: namely, that Virtualbox (the nifty virtual machine manager) can get messed up during an upgrade.

The reason as to it gets messed up is, from what I understand, simply that it does not get installed by default. Thus you usually have to reincarnate it on your upgraded operating system.

That is of course easy enough to do, but recently when I moved to Ubuntu Jaunty (9.04), and reinstalled vbox, I could not bring up USB devices again in the my virtual machines.

I looked all over and could sort of kinda find some information pertaining to this, but as is sometimes usual in the Linux world, some things are so darn simple that no one bothers to write them down properly. After all, what kind of stupid would a user have to be to not figure this simple thing out?

So as another public service, here is my contribution to the world of stupid users, me included. If your virtualbox is no longer working with USB devices (note: this implies that it used to work with USB!), and you recently upgraded, I hope this helps you solve the problem.

First of all, the problem: Virtualbox has two different versions. One is the open-source version (called Virtualbox-OSE) and one is the closed-source SUN version (Virtualbox-PUEL). Unfortunately, the OSE version does not support USB. The closed-source one does. Even more unfortunately, the open-source one is the one that gets installed by default when you do try to install virtualbox.

Hence the solution is pretty simple: you need to "upgrade" or "update" your system from the OSE version to the PUEL version.

This can be done in several ways. The way I found that seems to work consistently is:

1) Go to the PUEL website and download the right version.
2) Open a terminal window (Alt-T will usually do the trick) (yes, you can do this with Synaptic too)
3) Remove virtualbox-ose by typing the command: "sudo apt-get remove virtualbox-ose" (note: this will not hurt your existing virtual machines; they will be preserved and reappear when you finish the update)
4) Remove all source packages by typing the command: "sudo apt-get autoremove"
5) This is the critical step that goes missing in many guides: purge both OSE and any other version on your system. You do this by typing "sudo apt-get purge virtual" and then pressing TAB once or twice until the system prompts you with the list of existing virtualbox packages below the command line. You will usually see only two: "virtualbox virtualbox-ose". You may see three if you've tried installing something else, like PUEL, before, and it would then show something like: "virtualbox virtualbox-ose virtualbox-3.0". Now you need to purge all of these except "virtualbox". You do this by simply completing the command and running it on all packages. For example, in the case where you find both OSE and 3.0, you would run the following two commands in succession: "sudo apt-get purge virtualbox-ose" and "sudo apt-get purge virtualbox-3.0".
6) Now, and only now, go back to the package you downloaded and install it (double-click should work fine, like in Windows).
7) Once the installation is done, go back to the terminal window, and type "sudo /etc/init.d/vboxdrv setup". This will recompile the kernel module.

That should do it. Drop a comment here if it works.

One more note: if your system complains that "vboxdrv" doesn't exist as part of that last command, rerun steps 5-7 (ONLY).

5 Comments:

Blogger reeder said...

Worked great! Thanks! Moved from OSE to VBox 3.2.12 R68302 to pick up USB support that I didn't know was missing in the OSE version until after I installed it and built and fully patched an XP VM.

On Ubuntu 10.10.

Sunday, December 19, 2010 4:37:00 PM  
Blogger Blinkered said...

Glad to hear it, and thank you for the note!

Sunday, December 19, 2010 4:54:00 PM  
Anonymous Anonymous said...

Thanks!! It worked great!! Thanks again for posting the solution.

Monday, February 28, 2011 6:54:00 AM  
Anonymous Anonymous said...

You saved me alot of time. It worked great. Thanks.

Wednesday, April 06, 2011 12:31:00 AM  
Blogger Vedant said...

Amazing man.............. it worked.............. thanks a lot............

------------------

Friday, June 10, 2011 2:51:00 AM  

Post a Comment

<< Home