chris - Fotolia
The main difference between Type 1 and Type 2 hypervisors is that Type 1 runs on bare metal and Type 2 runs on top of an OS. Each hypervisor type also has its own pros and cons and specific use cases.
Virtualization works by abstracting physical hardware and devices from the applications running on that hardware. The process of virtualization manages and provisions the system's resources, including processor, memory, storage and network resources. This enables the system to host more than one workload simultaneously, making more cost- and energy-efficient use of the available servers and systems across the organization.
Virtualization requires the use of a hypervisor, which was traditionally called a virtual machine monitor or VMM. The hypervisor is a software program that provides the layer of abstraction, handles the translations between physical and virtual resources -- such as physical vs. virtual CPUs or memory -- and manages the creation and support of virtual machines (VMs).
The physical hardware that a hypervisor runs on is typically referred to as a host machine, whereas the VMs the hypervisor creates and supports are collectively called guest machines.
There are two types of hypervisors: Type 1 and Type 2 hypervisors.
Type 1 hypervisors
A Type 1 hypervisor runs directly on the host machine's physical hardware, and it's referred to as a bare-metal hypervisor; it doesn't have to load an underlying OS first. With direct access to the underlying hardware and no other software -- such as OSes and device drivers -- to contend with, Type 1 hypervisors are regarded as the most efficient and best-performing hypervisors available for enterprise computing. Hypervisors such as VMware ESXi, Microsoft Hyper-V server and open source KVM are examples of Type 1 hypervisors.
Hypervisors that run directly on physical hardware are also highly secure. The security flaws and vulnerabilities that are often endemic to OSes are absent from bare-metal hypervisors because the attack surface of the underlying OS is eliminated. This ensures the logical isolation of every guest VM against malicious software and activity.
In many cases, the virtualized system hosts at least one VM with an OS and management software, which enables admins to manage the physical system using system management tools such as Microsoft System Center.
Type 2 hypervisors
A Type 2 hypervisor is typically installed on top of an existing OS, and it's called a hosted hypervisor because it relies on the host machine's pre-existing OS to manage calls to CPU, memory, storage and network resources. Type 2 hypervisors include VMware Fusion, Oracle VM VirtualBox, Oracle VM Server for x86, Oracle Solaris Zones, Parallels and VMware Workstation.
Type 2 hypervisors trace their roots back to the early days of x86 virtualization when existing systems already used OSes and the hypervisor was deployed as a higher software layer. Although the purpose and goals of Type 1 and Type 2 hypervisors are identical, the presence of an underlying OS with Type 2 hypervisors introduced unavoidable latency; all of the hypervisor's activities and the work of every VM had to pass through the host OS. Also, any security flaws or vulnerabilities in the host OS could potentially compromise all of the VMs running above it.
Consequently, Type 2 hypervisors are generally not used for data center computing and are reserved for client or end-user systems -- sometimes called client hypervisors -- where performance and security are lesser concerns. For example, software developers might use a Type 2 hypervisor to create VMs to test a software product prior to release.
Hardware support for Type 1 and Type 2 hypervisors
Hardware acceleration technologies are almost universally available to accelerate the tasks involved with virtualization. Such technologies include Intel Virtualization Technology extensions for Intel processors and AMD Virtualization extensions for AMD processors. There are numerous other virtualization-based extensions and features, including second-level address translation and support for nested virtualization.
Hardware acceleration technologies perform many of the process-intensive tasks needed to create and manage virtual resources on a computer. Without hardware acceleration, the hypervisor would be solely responsible for handling all of the intensive tasks needed for virtualization, which would reduce virtualization performance and limit the practical number of VMs a computer could host.
Both Type 1 and Type 2 hypervisors use hardware acceleration support, but to varying degrees. Type 1 hypervisors rely on hardware acceleration technologies and typically don't function without those technologies available and enabled through the system's BIOS. Type 2 hypervisors are generally capable of using hardware acceleration technologies if those hardware features are available, but they can typically fall back on software emulation if native hardware support isn't available on the computer.