OA - Ubuntu
A blog about Ubuntu, mobile GIS and archaeology

Troubles with KVM... Anyone got a version working?

Jan 20, 2010 by Yann Hamon

Dear Planet Ubuntu, I've been having issues with KVM for several months now (running Ubuntu Hardy LTS). I was using kvm62, had many issues with it (non fontional SMP, issues with network drivers, ...), then I moved to the kvm84 and libvirt 0.6.1 backports, an still am experiencing many issues - the worst being regular crashes of virtual machines, which isn't exactly fun. I thought I had fixed it (my 32 bits vms were running on 64 bits kvm processors, which should work, though.. but they are now crashing with a 32 bits processor as well).  This is what is produced by munin when the VM crashes.

Dear planet readers and KVM users, what version of Ubuntu are you running with KVM, and with what version of KVM/libvirt? Are you happy with it? I am getting somewhat desperate :(


I don't use libvirt management but instead run multiple QMs directly from the cmdline, putting them to background with both VNC and SSH access enabled. I'm currently using bridged networking giving the VMs direct access to the external DHCP server and using the awesome virtio drivers for both file and net access. I am running the 64-bit edition of Ubuntu in each of the VMs and the hosting machine is also running 64-bit Ubuntu.


kvm -drive file=ubuntu-server1-snapshot.qcow2,if=virtio,boot=on -net nic,model=virtio,macaddr=DE:AD:BE:EF:10:83 -net tap -m 512 -name ubuntu-server-1 -vnc :1

with /etc/network/interfaces containing

auto br0
iface br0 inet static
address x.xx.xx.xx
gateway x.xx.xx.1
bridge_ports eth0
bridge_stp off
bridge_maxwait 5

I've not had a single crash running with this configuration, having migrated from hardy --> intrepid --> jaunty --> karmic --> lucid during that time.

Sorry to hear you're having problems, but thought to share my positive experience and configuration with you in the hope it will help in some way.

Posted by Dom on January 20, 2010 at 12:44 PM GMT+00:00 #

Tried to post a long reply but your blog software marked it as spam for being too long :(

Have posted it on paste.ubuntu instead so you can read it there.


Posted by Dom on January 20, 2010 at 12:46 PM GMT+00:00 #

Hi Dom, have approved it... Am hoping to move to wordpress mu instead of roller, which is far from perfect :(

Posted by Yan on January 20, 2010 at 01:08 PM GMT+00:00 #

kvm-84 is a year old. You'll have much better luck using a more recent release like qemu-kvm-0.12

Posted by Jim on January 20, 2010 at 06:18 PM GMT+00:00 #

For our VM servers, we're using 8.04 + KVM backport from dustin's PPA (kvm84, I believe) + libvirt.

Once we moved to the KVM ppa, all of our issues disappeared. We run mostly 64bit guests, but the 32bit guest or two have always been stable as well.

Posted by Troy Ready on January 20, 2010 at 07:25 PM GMT+00:00 #

Ask Dustin Kirkland. He's the one that integrates virtualization into Ubuntu and plenty other server things. He's highly available by email too.


Posted by Roger on January 20, 2010 at 09:51 PM GMT+00:00 #

Hi Yan,
I am using jaunty with kvm-84 and libvirt-0.6.1 from backports.
I was having quite a few with crashes with both 32 and 64bit VM's when I would hit high diskio, and the errors in the VM would be along the lines of timeout accessing /dev/sda1.
As soon as I changed the disk images from qcow2 to raw though, these crashes went away. I have had VM's up for 4 months now with a problem.
- Karl

Posted by Karl Bowden on January 20, 2010 at 10:42 PM GMT+00:00 #

Hi Yann,

We are running a mix of jaunty and karmic hosts, also testing on several other machines to see if live migration is working.

A colleague of mine has posted a bug report (https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/448674/) and the progress we are making with this.

The problems we encounter are limited to the jaunty hosts and exist solely of the fact that libvirtd keeps crashing but we use monit to start it again. Also this has been fixed and is no longer present in karmic.

Overall extremely pleased by the performance and stability of KVM.

Posted by martijn Kint on January 21, 2010 at 01:01 PM GMT+00:00 #

Post a Comment:
Comments are closed for this entry.