What is kqemu?
kqemu is a kernel module that "accelerates" QEMU virtualization by allowing guests to run some operations directly on the host's CPU. In this respect, it's similar to kvm.
Beyond the kernel module, kqemu requires support from the QEMU userspace emulator to take advantage of the kqemu kernel hooks.
How is it different from kvm?
Unlike kvm, kqemu has never been accepted in the upstream Linux kernel.
Also different from kvm is the fact that kqemu works on hardware that does not support CPU Virtualization Technology (VT extensions), see Intel VT and AMD-V.
When would I want to use kqemu?
If your CPU supports VT or you have access to hardware that supports VT, you have no need for kqemu, as kvm is a far more complete, better performing, fully supported, and more modern alternative. Otherwise, kqemu arguably may be useful on some legacy hardware without VT.
How do I know if my hardware supports VT?
Just run kvm-ok from a command line and it should tell you.
Why was support for kqemu dropped from Ubuntu?
Quite simply, the upstream QEMU community deprecated kqemu in favor of kvm.
The upstream qemu-0.11 release series (which was in Ubuntu 9.10) disabled kqemu in the build. And the upstream qemu-0.12 release series (which is in Ubuntu 10.04 LTS) actually removed all remnants of the kqemu hooks from the source.
Why did upstream QEMU drop support for kqemu?
This was thoroughly discussed on the upstream qemu-devel mailing list by the developers of QEMU, as well as many users. An open poll was conducted by QEMU upstream to gauge the usefulness of kqemu. (The Ubuntu Server Team also conducted a poll and held a discussion on the topic at UDS-Lucid in Dallas, Texas in November 2009.)
You can read the hundreds of messages, as well as the handful of bug reports, if you like, but there are two primary reasons:
- kqemu has no active maintainer. Upstream is open to reconsidering kqemu support, if an active maintainer steps up, fixes the open issues, and commits to providing ongoing support.
- kqemu code within QEMU actually conflicts or breaks KVM code paths (specifically some required for 64-bit KVM support).
Ideally, you would have access to VT-capable hardware, and use qemu-kvm, leveraging its outstanding performance, security model, and support from the various communities responsible for delivering it to you in Ubuntu (including the upstream Linux kernel, QEMU development team, Ubuntu Server Community, and the Canonical Server Team).
We cannot stress this enough:
- KVM is absolutely your best option for enterprise-ready, production-critical, supported deployments of Virtualization stacks built upon Ubuntu Servers.