Friday, June 15, 2007

QEMU and KQEMU Installation

Here's a step-by-step howto on how I virtualized my Xubuntu and Windows 2000

First, I downloaded the packages that I need to build KQEMU, a kernel module that will help speed up QEMU. Remember that you need to have at least 1GHz/512MB for performance reason. Anything less isn't recommended.

sudo aptitude install kqemu-common kqemu-source module-assistant

The Module-Assistant package would help you build KQEMU.

Prepare Module-Assistant by issuing sudo m-a prepare
m-a is short for module-assistant. You can issue sudo module-assistant prepare if you want. And don't worry, Module-Assistant would also download all the packages needed to "build" the kernel module. If you want, you can also install build-essential.

Next, issue the sudo m-a build kqemu to build the module.

This is the progress report window.

Now, go ahead and install the KQEMU module
sudo m-a install kqemu
You can now forget KQEMU since it's now part of your kernel. Future kernel upgrades won't affect it.

It's now time to install QEMU
sudo aptitude install qemu

Of course, don't forget QEMU-Launcher. This package is highly recommended so you wouldn't have to create and boot images manually.
sudo aptitude install qemu-launcher

Once that's done, go ahead and launch QEMU Launcher.

Here's the QEMU Launcher window. As I've said, with this utility, you can graphically create, manage, and boot images.

Creating Images

It's now time to create an image. In my case, I used Microsoft Windows 2000.

First, place the installer on the CD Tray and click on the first New button.
Select Create empty QCOW image (the default and supported QEMU image), give it a name, and adjust the image size in Megabytes (I assume this is the maximum size, gotta read the docs). Don't worry about the image size that much though because after installing Windows, it'll most probably be around 1.9GB and will just expand when needed. The initial size of the image would be around 5-10MB. Click on the OK button once you're done.

To install Windows 2000, you have to first configure QEMU Launcher to boot from the CD. Tick Use CD-ROM, set the Boot disk to CD-ROM, and click on the Launch button.

The Windows CD would now start installing Windows 2000 on the image. You can now Quit QEMU Launcher since we won't be needing it anymore, at least for this session.

And there it is, it's all done. Just take note though that the installer would ask you to reboot, you don't actually have to do anything but to confirm it.

You can also do this on any Operating System you could get your hands on, including Linux distributio. This is actually how developers test and debug their programs.

Last word? Goodluck!

Blogged with Flock