KVM and Windows XP Under Ubuntu 8.04 64 Bit

Setting up KVM for virtual machines in Ubuntu 8.04 is easy!

A few simple steps will get you up and running. First, install the packages with your favorite package manager, or at a console type:

sudo apt-get install kvm libvirt-bin virt-manager virt-viewer qemu

I also found I needed to add myself to the kvm group:

sudo adduser `id -un` kvm
sudo adduser `id -un` libvirtd


You must add yourself to libvirtd for networking to function :-)

Here's one of the few situations where rebooting linux is probably easier for most people than trying to manually start everything, so give her a boot and log back in.

Under your Applications menu in "System Tools" you'll find "Virtual Machine Manager". Connect to the qemu "localhost" setup that is already there by right clicking on it. After it says you are connected, click New at the bottom of the window to create a new virtual machine instance. Follow the wizard to configure your install.

I found that after installing XP, when it rebooted to complete the install that kvm didn't remount the cd-rom image I was installing from, so I had to manually edit the virtual machine setup and add a storage device pointed at the Windows XP cd-rom. Then installation finished normally.

The first thing I noticed was that install took about 45 minutes total, which seemed a bit long to me. It could be the setup I chose. I'm running a dual-core AMD 64 on a 64 bit Ubuntu install, and chose to run a 2 processor 32 bit virtual machine for the install.

After Windows was installed, I found that KVM was using 100% of both cores of my processor, despite the fact the virtual machine shows very little CPU activity within it.

Here's a screenshot covering the Windows XP task manager showing 12% CPU usage and the host machine's system monitor showing 100% usage on both CPU's. The virtual machine is the only thing running:

I then started a new image and only gave XP one CPU to work with, and it stopped hogging the host processor when sitting idle. From now on at least for Windows installs, I'll only give the guest one CPU. Sitting idle, it would only use 1 to 2% of the host CPU when configured that way.

For a more complete tutorial, check out this site.

Adding CD-Rom

I'm having difficulty installing XP. After setup starts, I get a message from the installer that it can't find the CD-Rom. I assume this is the problem you mention above. How did you solve this problem?

Thanks!

Virtualbox

Have you tried virtualbox? XP inside virtualbox seems to work pretty darn well for me, and it's all free.

Free for personal use... corporations aren't supposed to

Trying to stick to the letter of the law, and they don't provide pre-compiled for corporate use. I have used it before though and it worked like a charm. But since KVM was in 8.04 and my CPU supports virtualization, I thought I'd give kvm a whirl!

The interface is a bit more clunky than VirtualBox, but not much so. And it will support installing 64 bit guests inside a 64 bit host which VirtualBox won't do.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
Are you a BOT? What's this say?
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.