Running Karmic In a Virtual Machine

47
Article Source jonobacon@home
July 29, 2009, 12:13 am

Tonight I spent some time fiddling with the rather awesome VirtualBox to get a Karmic instance up and a Kubuntu machine up and running. I managed to get a rather nice set up going and I just wanted to quickly share my experience. This is a little rough and ready and I would appreciate if those of you who know of more complete guides could share them in the comments.

So, here we have Bacon’s guide to getting Karmic running in a virtual machine so you good people can help test, offer input and contribute to bug reports. Ready to roll? Fire up your engines.

First you need a few key ingredients:

  • You should install VirtualBox. If you are running Jaunty you can simply click here to install the package right away from the Jaunty archive. A few people online seemed to recommend using a newer version of VirtualBox and I therefore used this PPA with the latest version. Instructions for using the PPA are available on that page.
  • You will also need a daily Karmic CD which you can download from here.

When you have these all set, fire up VirtualBox and click New to create a new virtual machine. Ensure you select it as a Linux / Ubuntu machine and then on the Base Memory Size page give it a healthy chunk of memory, but ensure it is less than 1/2 of your total memory. Next Create a new hard disk and select ‘Dynamically expanding storage’ Рmost of the defaults should be fine.

With the virtual machine created we now need to ensure it boots from the Karmic ISO image that you so lovingly downloaded. To do this ensure the virtual machine is selected in the left pane in VirtualBox and then click the CD/DVD-ROM section heading on the right. Now check the Mount CD/DVD Drive box and click the ISO Image File option. Click the little icon to the right of the combo box and then click the Add button to add a new ISO image. Now select the Karmic .iso file from your Desktop directory and click Select.

We are now ready to boot the machine. Click the big Start icon at the top of the VirtualBox window. You should now see the machine boot and the Karmic Live CD will show in a window. To access the window you can click it and you should be able to control the cursor or mouse. To get control out of the window press the right Ctrl key.

Getting your Karmic machine in shape

You should now go through the normal Ubuntu installation process in the virtual machine window. When you have completed this you can restart the machine. When it gets to the point where it asks you to remove the CD and press enter, close the virtual machine window (click the ‘x’ in the window) and select to power off the machine. Now go back to the CD/DVD-ROM section and deselect the ISO image. You can now restart the machine again.

When you start the machine you should install any Karmic updates by running Update Manager.

Running at a better resolution

You will have probably noticed that your virtual machine is in a small window. Normally to fix this you click Devices->Install Guest Additions in the virtual machine window and it mounts a drive inside the virtual machine that you can use to install some additional software to enable better access to your graphics card. Well, that didn’t work for me. I grumbled. Instead, lets just install it from the Karmic archive.

To do this just type this inside a terminal window (inside the virtual machine):

sudo apt-get install virtualbox-ose-guest-x11

This will then install the support to run your virtual machine at a decent resolution.

At this point you should be pretty much set. Take a look at the VirtualBox documentation to learn about some of its nifty features. If you want to blow your mind, run it in Seamless mode (click Machine->Seamless Mode in the virtual machine window menu) and you will see your virtual machine windows and panel just appear on top of your normal host system. Funkylicious.

Now go and take a look at the Ubuntu testing wiki to see how you can help. Rock and roll!

Have fun!