4 ms·
Xen and KVM are fundamentally different. Xen is a microkernel, loosely based on the Nemesis OS from the University of Cambridge. Instead of running traditiona
by aliguori 15y ago
Xen and KVM are fundamentally different.
Xen is a microkernel, loosely based on the Nemesis OS from the University of Cambridge. Instead of running traditional POSIX software, this microkernel runs software in ring 1 using a very special system call API. DomU and Dom0 support for Linux means that Linux has been ported to run on top of this special system call API.
But this doesn't mean Xen is now in Linux. Xen is still a separate OS with it's own memory manager, scheduler, device drivers, etc.
OTOH, KVM is a device driver for Linux that let's you run virtual machines under Linux. You're still using the Linux scheduler, memory manager, device drivers, etc. KVM is fundamentally a part of Linux.
For another point of reference (with less confusing terminology), L4 is pretty much the same thing as Xen and L4Linux is equivalent to Linux dom0/domU support.
- mixmastamyk 15y agoWhere does VirtualBox fit in?
- sayhello 15y agoVirtualBox is a user-level virtualization tool. It is not as efficient as a system-level one like Xen or KVM. i.e. Vbox is an application that runs at the same level as say... apache or nginx as opposed to KVM and Xen which work at a lower level by integrating closely with the Linux kernel. That means that the resources allocated to Vbox are decided upon by the OS, with all the overhead that comes along. Xen and KVM can run a guest OS with less overhead than Vbox and can decide that a guest OS has 25% of CPU cycles while another has only 10%, which vbox cannot do. VirtualBox works fine for development environments, but you want something like Xen or KVM for running your servers if not going bare metal.
- mixmastamyk 15y agoThanks. I believe Vb uses kernel modules also, and mentions in the manual having ring 1 support for OS/2.
- sayhello 15y agoSure, Vbox has kernel support for guest OSes. As far as being a hypervisor however, Vbox is strictly a type 2, i.e. it needs a host OS to run and resources are allocated to it. In contrast, Xen and KVM are type 1 hypervisors, meaning they themselves allocate resources for guest OSes from bare metal. There are debates about the semantics of whether KVM is type 1 or type 2 due to its implementation on top of the Linux kernel, but it is definitely in a different league than Vbox.
- aliguori 15y agoThe folks that through around type 1 and type 2 usually don't actually know what it means. It refers to a relatively obscure set of formal proofs and doesn't have anything to do with what most people explain it as.
- MPSimmons 15y agoYou mean Wikipedia would lie to me??? http://en.wikipedia.org/wiki/Hypervisor http://en.wikipedia.org/wiki/Hypervisor
- aliguori 15y agoThe problem is that the phrase used in Popek's paper is "Conventional OS". This was the 1970s. What's now considered a "Conventional OS" was not conventional back then. For instance, everyone would agree Linux is a conventional OS but Linux provides a kernel module (KVM) that allows for virtualization driven by userspace.
- aliguori 15y agoThat's not really true. VirtualBox is basically the same as KVM with the exceptions of 1) their kernel modules are not upstream 2) they put a lot of effort into doing dynamic translation for non-VT/SVM hardware 3) their performance is really poor 4) they don't integrate very well with Linux mainly because of (1).