Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the differences between Xen, QEMU and KVM?

I know QEMU is used by Xen, and KVM is a fork of QEMU.

So, KVM includes that Xen adds to QEMU ? What is the name ?

Thanks

like image 337
Xorax Avatar asked Apr 24 '12 23:04

Xorax


2 Answers

QEMU is a powerful emulator, which means that it can emulate a variety of processor types.

Xen uses QEMU for HVM guests, more specifically for the HVM guest's device model. The Xen-specific QEMU is called qemu-dm (short for QEMU device model)

QEMU uses emulation; KVM uses processor extensions (HVM) for virtualization.

Both Xen and KVM merge their various functionality to upstream QEMU, that way upstream QEMU can be used directly to accomplish Xen device model emulation, etc.

Xen is unique in that it has paravirtualized guests that don't require hardware virtualization.

Both Xen and KVM have paravirtualized device drivers that can run on top of the HVM guests.

like image 152
Todd Deshane Avatar answered Oct 01 '22 09:10

Todd Deshane


The above answers are in depth, technical. I try to put it in simple layman's terms.

Qemu is an emulator which can work with or without KVM which is an accelerator(linux kernel module which enables the guest instruction to run directly on the host CPU) which makes Qemu+KVM a faster solution, unlike the slower alternative of Qemu+TCG.

Xen is a bare metal hypervisor which has different modes(virtualization types ).By the way, bare metal is a misleading term. All hypervisors Type-II/hosted or Type-I/bare-metal needs an underlying OS. So bare metal also has a very thin layer of bare minimum operating system like layer which the hypervisor use.

Xen PV or Paravirtualized- No hardware emulation required, guest kernel is modified so that guest can detect/run on underlying Xen hypervisor.

Xen HVM or Fully Virtualized- Hardware emulation is required,acheived only on CPUs which supports virtualisation Intel-VT etc., modified Qemu is used for hardware emulation (disk,network,USB controllers etc), guest kernel is not modified.

Generally, emulated virtualization(full) is slower than modified kernel virtualization(para). By installing specialised drivers (PV drivers) in guest kernel, performance of fully virtualized guests can be improved.

like image 42
pumpkin_cat Avatar answered Oct 01 '22 11:10

pumpkin_cat