I've been trying to set up a pair of servers utilising KVM on Ubuntu 9.10 to host 8 virtual machines between them and ended up with various issues from the VMs freezing, to not powering on.

I had one virtual server set up and running and was setting up a second, when any operation involving OpenSSL would cause the VM to lock up in a weird way - all network traffic would cease, it wouldn't process logins on the console, but it wasn't taking any CPU time off the host. The first virtual server was identical and worked perfectly.

Another VM I tried to setup had installed Ubuntu fine then refused to reboot, throwing kernel exceptions to do with XFS.

I've now installed Citrix XenServer 5.5 on both hosts, and am now setting up my third VM with absolutely no issues. I also had the same experience when I tried VMware, but I preferred Xen as it appears to give more features on the free license.

My question is am I just unlucky with KVM, or is KVM as unstable as it appears? Are you using, or planning on using, KVM in production, and how successful have you been?

EDIT:

Thanks for all the answers. I have recently upgraded our two physical servers to Ubuntu 10.04 LTS which uses KVM 0.12.3. I'm now installing my sixth virtual machine on KVM and haven't had even a hint of the issues I experienced previously, so I'm now sticking with KVM :)

link|improve this question
feedback

8 Answers

up vote 3 down vote accepted

We've had several KVM hosts up and running on Ubuntu 9.04 and 9.10 for the last 6+ months with some minor issues while initially setting up guests, but none since. Our hosts average 3 guests each and the guests do lots of different things, from multi-homed VPN servers to NAS systems with direct access to hard disks. The performance and ease of setup (once the learning curve was out of the way) has been transformative for our network.

Migration has been very easy through VNC connections over ssh via a virt-manager client; cloning has not been as smooth, as new instances have had a tendency towards flaky network errors.

The only other ongoing complaint I have is that it would be nice to have support for QEMU VLANs as an option in virt-install so we could avoid having to use the more tedious KVM commands directly. Other than that, we've been extremely happy, and most of the manangement tools are shared with Xen so I'd say use whichever one works best for you.

link|improve this answer
Talking of giving KVM commands directly, how did you do that? I wrote a shell script wrapper but libvirt just complained saying it couldn't parse the version number from the output. One command I wanted to pass along was to --enable-hvm - the CPUs in my guests were showing up as Pentium IIs which apparently is a sign that hardware acceleration wasn't being used (but was if I started KVM directly as opposed to going through libvirt.) – Andy Shellam Mar 17 '10 at 22:12
Why not just use the --hvm option in virt-install? (linux.die.net/man/1/virt-install) The best suggestion I've seen for passing unsupported switches to libvirt is at serverfault.com/questions/111794/…, but damned if I can get it to work without problems either. Using kvm directly (qemu-kvm in rhel) is what I was describing, like: kvm -M pc -m 2048 -name newguest -smp 1 -monitor stdio -boot n -drive file=~/vms/newguest,if=ide,index=0 -net nic,vlan=0 -net tap,script=no,vlan=0,ifname=tap0 -nographic -incoming tcp:0:1234 – nedm Mar 17 '10 at 23:34
Can't remember offhand if that last example requires a MAC address to be specified as well, like '-net nic,macaddr=54:52:00:53:xx:xx,vlan=0' Thank god for libvirt. – nedm Mar 17 '10 at 23:39
feedback

We've been using KVM on Debian Lenny for almost a year now.

Stable, except for live migration. Apparently that would work without paravirtualized network. But we can live with short breaks until a patched version becomes available.

We use DRBD to provide shared blockstorage.

Nothing at the time provided a nice way to administer our specific combination so I reinvented the wheel: http://github.com/ptman/kvmmgr

link|improve this answer
feedback

I've experienced some pretty nasty bugs -- for example, loss of network connectivity with virtio-net [1], kvm-clock going haywire and taking VM with it [2]. There were others (guest filesystem corruption due to bad arithmetic [3]). Plus, for a long time libvirtd did not offer a way to do clean shutdown of all running VMs [4]. YMMV :-)

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=576838

[2] no definite bug report, but there's a reason for this to exist: http://people.debian.org/~paravoid/kvm-noclock-3.tar.gz

[3] http://marc.info/?l=qemu-devel&m=127436114712437

[4] https://bugzilla.redhat.com/show_bug.cgi?id=444273

link|improve this answer
feedback

i've setup various linux on kvm without any problems. all running smooth.

make sure you do not have xen/virtualbox or other virtualizer on your kvm host. because kvm need access to hardware virtualization and can/might conflict with other virtualizer.

i've seen some webhosting provider selling kvm packages. so i guess it stable enough already.

are you compiling yourself? if you want to test this, i'd recommend fedora. because kvm is now a redhat project. and some other related projects also redhat/fedora hosted projects.

you can even get the latest 'testing' release with their rawhide virt repo.

link|improve this answer
Thanks for the answer. No I'm not compiling myself, using stock Ubuntu 9.10 + KVM and libvirt from the repository. No other virtualisation software installed. – Andy Shellam Mar 17 '10 at 22:11
Which hosting provider? – Andy Shellam Mar 17 '10 at 22:15
not much (yet). but if you google you will found some. blueroom hosting, perfohost,etc – DennyHalim.com Mar 21 '10 at 9:32
feedback

I've been testing KVM for a few months on three different machines (Ubuntu 9.10 and Debian 5 hosts) and haven't really come up against any issues except for dealing with Windows 64-bit drivers.

So far no problems with any Linux guests (CentOS and Debian) and I've been really happy with the performance compared to VMware.

I haven't tried anything advanced such as migration and I'm using LVM volumes for my images, which may skew my perspective.

link|improve this answer
feedback

I don't currently run KVM in production but I do use it on my laptop under Ubuntu 9.10 as my test lab. I haven't run into any stability issues in my dealings with it. IBM also just announced their cloud services which is based on KVM.

But having said that in production at work we currently run Xen on multiple CentOS boxes and haven't had any stability issues with it. And I do believe that at some point we will migrate over to KVM for our virtualization needs but at the moment that would just be moving for the sake of moving and we are happy with Xen. But I believe that KVM is the future for Linux based virtualization.

link|improve this answer
Yeah that's what I thought when Redhat adopted KVM in 5.4, and the fact that KVM is in the kernel whereas Xen has been unsuccessful in this regard, but most hosting providers seem to run Xen or something horrible like OpenVZ, I've not seen any advertising KVM. – Andy Shellam Mar 17 '10 at 22:14
1  
What's so horrible about OpenVZ? It isn't a true virtual machine in the sense that KVM and Xen are, but it's plenty good when all you really want is isolation. – Ophidian Mar 18 '10 at 15:46
feedback

http://www-03.ibm.com/press/us/en/pressrelease/29685.wss

If IBM find KVM good enough...

link|improve this answer
feedback

We've been using KVM for 6+ months and haven't had any problems. I've used other virtualization technologies such as OpenVZ, VMware, and Virtualbox.

  • VMware is a mixed bag, especially if you aren't willing to pay for the Enterprise variety.

  • Virtualbox is pretty good, not sure how well it fits as a solution for running server type installations. It works great on a laptop as far as making other OSes available w/o all the fuss of setting up additional hardware.

  • OpenVZ, I've used for 2+ years and works pretty flawlessly. The only exception with OpenVZ is that you can only run guests that are the same OS as the host OS. I've used it with CentOS 5.x and it just works.

  • KVM, using it directly from the command line can be a bit of a learning curve, I'd recommend using virt-manager to start.

Here are some resources that I found useful to get you started with KVM.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.