Using KVM in Production – Insights and Best Practices

kvm-virtualizationUbuntuvirtualization

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 🙂

Best Answer

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.

Related Topic