What is a ‘BareMetal’ Hypervisor?

A good discussion on Virtualization Review on whether KVM is a Bare-Metal Hypervisor. A Bare-Metal hypervisor is also traditionally referred to as a Type 1 hypervisor, it is a hypervisor that runs directly on the hardware and that hosts guest operating systems. A type 2 hypervisor on the other hand is a hypervisor that runs within a host OS and that hosts guest OSes inside of it. Wikipedia has a decent explanation as well.

The easiest comparison is that a type 2 hypervisor is used by people running a different guest OS inside a host on their desktop. I am typing this on my MacBook Pro while a Wind River Linux kernel compile is  churning away on a Red Hat Enterprise guest inside a VMWare Fusion session. This is clearly a type 2 hypervisor. The hypervisor in a type 2 environment uses the host operating system services to provide the virtual environments.

A type 1 hypervisor is on the other hand developed as a pure hypervisor. It runs on it's own, not inside a host OS and provides services to the virtual environments. VMWare ESX Server is the best known example. The Wind River hypervisor is also clearly a type 1.

However, the boundary becomes a bit less clear when using KVM or Xen. KVM uses the Linux kernel as a hypervisor, you can have a long argument on whether it is a type 1 or a type 2, it has aspects of both (as one of the commenters in the linked discussion argues, it is in a class of it's own). Xen on first glance seems like a type 1, but it requires a domain 0 Linux instance to use services from, which makes it drift towards a type 2.

Now, I am looking at this with from the angle of embedded systems. In the embedded world the question is not whether type 1 or type 2 is the best or in which category your hypervisor fits. The question is whether your hypervisor can satisfy your embedded (and often soft/hard real-time) needs.

If you require deterministic response times, a small memory footprint, fine grained control and configuration (think memory size, scheduler, device access, dedicated memory and core partitioning) as well as fast context switching, then you are looking for a true embedded hypervisor and you will have a hard time making KVM or Xen fit the bill. They are simply not written with this in mind. On the other hand, the Wind River hypervisor has been written from the ground up with these concepts in mind.

If your requirements are less rigorous, then a generic hypervisor (wheteher type 1 or 2) will fit your bill and KVM and Xen are definitely technologies to look for.

Moral of the story: Yes, Type 1 vs Type 2 is a categorization of hypervisors, but one that loosing its significance due to technology advances.