KVM vs QEMU vs Libvirt

Since the day I started to read about the virtualization concept, I have been troubled by QEMU and KVM. They both look like complementary, but what exactly they do? And then there is libvirt, what role does it play? Let’s try to understand that.



When you dive deep into the virtualization, you find hypervisor. Hypervisor is the agent that helps you create virtual machines. He is the guy who creates and runs the guest machine and provide the host’s resource to the guest. QEMU and KVM both are able to act as hypervisor. Then why are they used together? Well, because QEMU is dumb! Well, not exactly, but it is a little slower when it comes to system which dont have hardware virtualization. So, to achieve that, we have our own very dear KVM. KVM helps QEMU to access hardware virtualization features on different architectures. It also adds the acceleration feature to the QEMU process. So, in short, when they are together, QEMU is the hypervisor/emulator and KVM is the accelerating agent.

Then we come to libvirt. Libvirt is quite innocent in the sense that is doesn’t confuse you! It is simply a virtualization management library. And what does it do? It manages both KVM and QEMU. It consists of three utilities namely – an API library, a daemon (libvirtd) and a command line tool -virsh. Libvirt is quite effective and it can manage a lot of hypervisors altogether.

So, whenever you are using these all together, remember there is a hypervisor, an accelerating agent and a management library.



  1. I’ve just started out trying to understand what KVM is and found your post. Thank you very much for such a nice explanation.

  2. good explanation! Thanks!

  3. I have installed Openstack on a single node server, it is Centos. I mentioned kvm in nova.conf but in the Hypervisor it is showing QEMU.
    Also i am facing an issue that when i start any instance it give a error –
    “No Valid Host Found” and it doesn’t start any instance. Can you please help me on this.

    Thanks and Restart
    Lokesh Jangir

  4. Thanks mate for this easy explanation. Wonder if you could do something on cgroups and namespaces in Linux, have been struggling finding an appropriate resource for it.


  5. Great explanation, thanks

Leave a Reply

Your email address will not be published. Required fields are marked *