Everyone now days knows how important it is to test software, or even just have a simple sandbox to install, tweak or manipulate your software and operating systems. For those that don’t know, I just told you. Now you know its important!
Why? Ok, maybe not for everyone. But if you work in any sort of business as an IT professional, it is extremely important to know how the applications you deploy react and behave in your environment. This is where Virtual Machines come in, VirtualBox to be specific. Sun Microsystems unleashed this fancy little gem on the public June 30th of 2009. And up to this point, it is a hit!
For a couple years now I’ve become quite familiar with VMWare and Parallels. Both I’ve always felt were somewhat lacking in performance. But I was OK with that, I knew it was a virtual machine and that it would never be as fast as a real PC. Until I came across Sun’s VirtualBox 3.0. Now before I brag about how much faster it is than the other two I am speaking in regards to desktop performance. There is no server speak here. I have to say that performance wise I am much happier with VirtualBox 3.0 over VMWare. I’m not going to go into the details of the performance. There’s tons of resources for that available via a quick google search. The purpose here is simply to install it and use it under Ubuntu or Kubuntu.
- Add the VirtualBox Repository.
- Add the Sun public key for the VirtualBox Repository.
- The key fingerprint should be the following.
- Update the package database to include our new repository.
- Install VirtualBox 3.0 and dkms.
- As the install progresses you will be prompted by the installer that it will create the vboxusers group. The host network interfaces will also be assigned to this group.
- Next you will be prompted that a “precompiled module for the current kernel” could not be found. Steps 7 and 8 did not come up on my machine but I’ve heard that it can on some systems.
- The installer will then ask if it should compile the vboxdrv kernel module now. Depending on your computer’s configuration it may also ask for vboxnetflt and vboxnetadp to be compiled as well.
- After everything is all said and done, you must add any user’s that will need to run VirtualBox to the “vboxusers” group.
- Reboot!
$ sudo sh -c "echo 'deb http://download.virtualbox.org/virtualbox/debian jaunty non-free' >> /etc/apt/sources.list"
$ wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key add -
AF45 1228 01DA D613 29EF 9570 DCF9 F87B 6DFB CBAE Sun Microsystems, Inc. (xVM VirtualBox archive signing key) <info@virtualbox.org>
$ sudo apt-get update
$ sudo apt-get install virtualbox-3.0 dkms
Press OK to continue.
Press OK to continue.
Press YES to continue.
$ sudo usermod -G vboxusers YOURUSERNAME
And that is all! VirtualBox 3.0.2 should now be installed assuming there were no problems along the way. If you are running Ubuntu you should be able to see “Sun VirtualBox” listed in your Applications > System Tools menu.
As a footnote, I would also like to let you know if you want to install an older version of VirtualBox for your own reasons. This can be achieved by using the following instead of step 5 listed above.
1 2 3 4 | apt-get install virtualbox // This will install version 1.6.6 apt-get install virtualbox-2.0 // This will install version 2.0.8 apt-get install virtualbox-2.1 // This will install version 2.1.4 apt-get install virtualbox-2.2 // This will install version 2.2.4 |
And For those of you who are using something other than Jaunty, here are the other repositories available
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






















13 Comments
The key fingerprint I believe is just a confirmation response to the public key that was just added. Kinda like how you can verify a file against the MD5 checksum.
However the GPG error you are receiving I think might be a bug in Ubuntu. I had a similar problem recently when I was creating the CS4 tutorial. Somehow apt gets confused about the keys and needs to be cleared. Even though you added it correctly, it doesn’t tell you that exactly.
If you go to that thread you linked in the virtualbox forums, Look for the post from “ZenGuy” on July 8th 2009 at 2:56 am http://forums.virtualbox.org/viewtopic.php?f=7&t=12384#p85329 I believe that is the right fix. I can’t test it of course as I don’t get that error. But I recall doing the exact same thing with a different key for a totally different repository that was giving me a similar issue.
After running that guys fix, run the update again and it should be corrected.
Hi I know how to add the repositories and public keys, but what exactly does the fingerprint in #3 mean? If you get the info:
AF45 1228 01DA D613 29EF 9570 DCF9 F87B 6DFB CBAE
Sun Microsystems, Inc. (xVM VirtualBox archive signing key)
What exactly do you do with it? Do you need to compare it against a file? Edit a file with it? Do you run a command line?
I’ve looked in the web so far, but I still can’t explain it. I’m sorry I’m a new Linux user.
Thanks for your blog.
PS: Have you also experienced that apt-get update fails when you add the virtualbox repository, sun public key in Ubuntu as of Aug. 7, 2009? It fails to install:
Reading package lists… Done
W: GPG error: http://download.virtualbox.org jaunty Release: The following signatures were invalid: BADSIG DCF9F87B6DFBCBAE Sun Microsystems, Inc. (xVM VirtualBox archive signing key)
W: You may want to run apt-get update to correct these problems
Other users are experiencing same problem: http://forums.virtualbox.org/viewtopic.php?f=7&t=12384
So, I just downloaded the Virtualbox 3.04 deb file and installed from there.
Nice guide.
FYI: You do not need to reboot to use virtualbox.
Simply Log off an back on (you need to do this for the new groups to take effect). If needed restart the service
sudo /etc/init.d/vboxdrv restart(I have not seen the need for this).Correct, after you complete the install follow http://www.sucka.net/2009/07/vboxheadless-and-how-to-swing-it/ to setup and run your vm on the server. Once you get to step 12 you simply use any RDP client to connect to your vm from your laptop. In that guide I’ve demonstrated it with the linux “rdesktop” client. But you can use a RDP client for Windows, OS X, or Linux. That part is completely up to you.
Ohhh, ok! :-) … I see, thanks for reply Scott. So, on my Ubuntu headless server, i just follow this instructions to install VirtualBox. Once Installed, I can connect and work remotely from my Ubuntu desktop laptop (with GUI) am I right?
Thanks,