What is a Hypervisor? Types of Hypervisors 1 & 2

September 29, 2022

Introduction

Server virtualization is a popular topic in the IT world, especially at the enterprise level. It enables different operating systems to run separate applications on a single server while using the same physical resources.

These virtual machines allow system and network administrators to have a dedicated machine for every service they need to run. Not only does this reduce the number of physical servers required, but it also saves time when trying to troubleshoot issues.

This article will discuss hypervisors, essential components of the server virtualization process. It will cover what hypervisors are, how they work, and their different types.

What is a Hypervisor? Types of Hypervisors 1 and 2.

What are Hypervisors?

A hypervisor is a crucial piece of software that makes virtualization possible. It creates a virtualization layer that separates the actual hardware components - processors, RAM, and other physical resources - from the virtual machines and the operating systems they run.

The machine hosting a hypervisor is called the host machine, while the virtual instances running on top of the hypervisor are known as the guest virtual machines.

Hypervisors emulate available resources so that guest machines can use them. No matter what operating system boots up on a virtual machine, it will think that actual physical hardware is at its disposal.

Why Use a Hypervisor?

From a VM's standpoint, there is no difference between the physical and virtualized environment. Guest machines do not know that the hypervisor created them in a virtual environment or that they share available computing power.

The fact that the hypervisor allows VMs to function as typical computing instances makes the hypervisor useful for companies planning to:

  • Maximize utilization of their computing resources. Multiple virtual environments on a single server fully utilize the available CPU and memory.
  • Provide better IT mobility. The VMs do not depend on their host hardware and can easily be transferred to another system.

Types of Hypervisors

There are two types of hypervisors, according to their place in the server virtualization structure:

  • Type 1 Hypervisors, also known as bare-metal or native.
  • Type 2 Hypervisors, also known as hosted hypervisors.

The sections below explain both types in greater detail.

Type 1 Hypervisor

A Type 1 hypervisor is a layer of software installed directly on top of a physical server and its underlying hardware. Since no other software runs between the hardware and the hypervisor, it is also called the bare-metal hypervisor.

This hypervisor type provides excellent performance and stability since it does not run inside Windows or any other operating system. Instead, it is a simple operating system designed to run virtual machines. The physical machine the hypervisor runs on serves virtualization purposes only.

Type 1 hypervisors are mainly found in enterprise environments.

type 1 Hypervisor example with virtual machines and physical server

Once you boot up a physical server with a bare-metal hypervisor installed, it displays a command prompt-like screen with some of the hardware and network details. They include the CPU type, the amount of memory, the IP address, and the MAC address.

Below is an example of a VMware ESXi type 1 hypervisor screen after the server boots up.

example of VMware hypervisor

Pros & Cons of Type 1 Hypervisor

Type 1 hypervisors offer important benefits in terms of performance and security, while they lack advanced management features. Following are the pros and cons of using this type of hypervisor.

Pros

  • VM Mobility - Type 1 hypervisors enable moving virtual machines between physical servers, manually or automatically. This move is based on the resource needs of a VM at a given moment and happens without any impact on the end-users. In case of a hardware failure, management software moves virtual machines to a working server as soon as an issue arises. The detection and restoration procedure takes place automatically and seamlessly.
  • Security - The type 1 hypervisor has direct access to hardware without an additional OS layer. This direct connection significantly decreases the attack surface for potential malicious actors.
  • Resource Over-Allocation - With type 1 hypervisors, you can assign more resources to your virtual machines than you have. For example, if you have 128GB of RAM on your server and eight virtual machines, you can assign 24GB of RAM to each. This totals 192GB of RAM, but VMs themselves will not consume all 24GB from the physical server. The VMs detect they have 24GB when they only use the amount of RAM they need to perform particular tasks.

Note: The hypervisor allocates only the amount of necessary resources for the instance to be fully functional. This is one of the reasons all modern enterprise data centers, such as phoenixNAP, use type 1 hypervisors.

Cons

  • Limited functionality - Type 1 hypervisors are relatively simple and do not offer many features. The functionalities include basic operations such as changing the date and time, IP address, password, etc.
  • Complicated management - To create virtual instances, you need a management console set up on another machine. Using the console, you can connect to the hypervisor on the server and manage your virtual environment.
  • Price - Depending on what functionalities you need, the license cost for management consoles varies substantially.

Type 1 Examples

There are many different hypervisor vendors available. Most provide trial periods to test out their services before you buy them. These are the most common type 1 hypervisors:

VMware vSphere with ESX/ESXi

VMware is an industry-leading virtualization technology vendor, and many large data centers run on their products. It may not be the most cost-effective solution for smaller IT environments. If you do not need all the advanced features VMware vSphere offers, there is a free version of this hypervisor and multiple commercial editions.

Note: Learn how to enable SSH on VMware ESXi.

KVM (Kernel-Based Virtual Machine)

KVM is built into Linux as an added functionality that makes it possible to convert the Linux kernel into a hypervisor. It is sometimes confused with a type 2 hypervisor. However, it has direct access to hardware along with virtual machines it hosts.

As an open-source solution, KVM contains all the features of Linux with the addition of many other functionalities. This property makes it one of the top choices for enterprise environments. Some highlights include live migration, scheduling and resource control, and higher prioritization.

To learn more about working with KVM, visit our tutorials on How To Install KVM On Ubuntu and How To Install KVM On CentOS.

Microsoft Hyper-V

Despite VMware’s hypervisor being higher on the ladder with its numerous advanced features, Microsoft’s Hyper-V has become a worthy opponent. Microsoft also offers a free edition of their hypervisor, but if you want a GUI and additional functionalities, you will have to go for one of the commercial versions. Hyper-V may not offer as many features as VMware vSphere package, but you still get live migration, replication of virtual machines, dynamic memory, and many other features.

Oracle VM

This hypervisor has open-source Xen at its core and is free. Advanced features are only available in paid versions. Even though Oracle VM is a stable product, it is not as robust as vSphere, KVM, or Hyper-V.

Citrix Hypervisor (formerly known as Xen Server)

This Server virtualization platform by Citrix is best suited for enterprise environments, and it can handle all types of workloads and provides features for the most demanding tasks. Citrix is proud of its proprietary features, such as Intel and NVIDIA enhanced virtualized graphics and workload security with Direct Inspect APIs.

Type 2 Hypervisor

Type 2 hypervisors run inside the physical host machine's operating system, which is why they are called hosted hypervisors. Unlike bare-metal hypervisors that run directly on the hardware, hosted hypervisors have one software layer in between. The system with a hosted hypervisor contains:

  • A physical machine.
  • An operating system installed on the hardware (Windows, Linux, macOS).
  • A type 2 hypervisor software within that operating system.
  • Guest virtual machine instances.
diagram of virtual machines, OS, and Hypervisors

Type 2 hypervisors are typically found in environments with a small number of servers.

What makes them convenient is that they do not need a management console on another system to set up and manage virtual machines. Everything is performed on the server with the hypervisor installed, and virtual machines launch in a standard OS window.

Hosted hypervisors also act as management consoles for virtual machines. Any task can be performed using the built-in functionalities. Below is one example of a type 2 hypervisor interface (VirtualBox by Oracle):

A screenshot of the VM VirtualBox interface.

Pros & Cons of Type 2 Hypervisor

Type 2 hypervisors are simple to use and offer significant productivity-related benefits but are less secure and performant. The sections below list major benefits and drawbacks.

Pros

  • Easy to manage - There is no need to install separate software on another machine to create and maintain your virtual environment. Install and run a type 2 hypervisor as any other application within your OS. Create snapshots or clone your virtual machines, import or export appliances, etc.
  • Convenient for testing - Type 2 hypervisors are convenient for testing new software and research projects. It is possible to use one physical machine to run multiple instances with different operating systems to test how an application behaves in each environment or to create a specific network environment. You only need to ensure that there are enough physical resources to keep the host and virtual machines running.
  • Allows access to additional productivity tools - The users of type 2 hypervisors can use the tools available on other operating systems alongside their primary OS. For example, Windows users can access Linux applications by creating a Linux virtual machine.

Cons

  • Less flexible resource management - Allocating resources with this type of hypervisor is more difficult than with type 1. Bare-metal hypervisors can dynamically allocate available resources depending on the current needs of a particular VM. A type 2 hypervisor occupies whatever the user allocates to a virtual machine. When a user assigns 8GB of RAM to a VM, that amount will be taken up even if the VM is using only a fraction of it. If the host machine has 32GB of RAM and the user creates three VMs with 8GB each, they are left with 8GB of RAM to keep the physical machine running. Creating another VM with 8GB of ram would bring down the system.
  • Performance - The host OS creates additional pressure on physical hardware, which may result in VMs having latency issues.
  • Security - Type 2 hypervisors run on top of an operating system. This fact introduces a potential vulnerability since attackers may use potential vulnerabilities of the OS to gain access to virtual machines.

Type 2 Examples

As with bare-metal hypervisors, numerous vendors and products are available on the market. Conveniently, many type 2 hypervisors are free in their basic versions and provide sufficient functionalities.

Some even provide advanced features and performance boosts when you install add-on packages, free of charge. We will mention a few of the most used hosted hypervisors:

Oracle VM VirtualBox

VirtualBox is a free but stable product with enough features for personal use and most use cases for smaller businesses. It is not resource-demanding and has proven to be a good solution for desktop and server virtualization. It supports guest multiprocessing with up to 32 vCPUs per virtual machine, PXE Network boot, snapshot trees, and much more.

Note: If you want to try VirtualBox out, follow the instructions in How to Install VirtualBox on Ubuntu or How to Install VirtualBox on CentOS.

VMware Workstation Pro/VMware Fusion

VMware Workstation Pro is a type 2 hypervisor for Windows and Linux. It is full of advanced features and has seamless integration with vSphere, allowing you to move your apps between desktop and cloud environments.

It does come with a price tag, as there is no free version. If you want test VMware-hosted hypervisors free of charge, try VMware Workstation Player. It is the basic version of the hypervisor suitable for small sandbox environments.

For macOS users, VMware has developed Fusion, which is similar to their Workstation product. It comes with fewer features but also carries a smaller price tag.

Note: For a head-to-head comparison, read our article VirtualBox vs. VMWare.

Windows Virtual PC

Microsoft's Windows Virtual PC only supports Windows 7 as a host machine and Windows OS on guest machines. This includes multiple versions of Windows 7 and Vista, as well as XP SP3. Virtual PC is completely free.

Parallels Desktop

A competitor to VMware Fusion. It is primarily intended for macOS users and offers plenty of features depending on the version you purchase. Some features are network conditioning, integration with Chef/Ohai/Docker/Vagrant, support for up to 128GB per VM, etc.

Type 1 vs. Type 2 Hypervisor: Choosing the Right One

Choosing the right type of hypervisor strictly depends on your individual needs.

The first thing you need to keep in mind is the size of the virtual environment you intend to run.

  • For personal use and smaller deployments, you can go for one of the type 2 hypervisors. If budget is not an issue, VMware will provide every feature you need. Otherwise, Oracle VM VirtualBox is a hypervisor that will provide most of the required functionalities.
  • For enterprise environments, even though type 1 hypervisors are the way to go, you need to consider many factors before making a decision.

The critical factor in enterprise is usually the licensing cost. You need to pay extra attention since licensing may be per server, per CPU or sometimes even per core. The current market is a battle between VMware vSphere and Microsoft Hyper-V. While Hyper-V was falling behind a few years ago, it has now become a valid choice, even for larger deployments. Same applies to KVM.

Many vendors offer multiple products and layers of licenses to accommodate any organization. You may want to create a list of the requirements, such as how many VMs you need, maximum allowed resources per VM, nodes per cluster, specific functionalities, etc. Then check which of these products best fits your needs.

Note: Trial periods can be beneficial when testing which hypervisor to choose.

Conclusion

This article has explained what a hypervisor is and the types of hypervisors (type 1 and type 2) you can use. Hypervisor vendors offer packages that contain multiple products with different licensing agreements. You will need to research the options thoroughly before making a final decision.

Next, learn about the differences between VMs and VDI.

Was this article helpful?
YesNo
Sofija Simic
Sofija Simic is an experienced Technical Writer. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Next you should read
How to Set Up Apache Virtual Hosts on Ubuntu 18.04
September 26, 2019

Name-based virtual hosts allow you to have a number of domains with the same IP address. This article...
Read more
How to Install VMware Workstation on Ubuntu
April 10, 2019

This simple tutorial shows you how to install VMware Workstation on Ubuntu.
Read more
How to Manage Docker Containers? Best Practices
January 29, 2019

With Docker Container Management you can manage complex tasks with few resources. Learn the best practices of...
Read more
How to Update Linux Kernel In Ubuntu
December 7, 2023

The Linux kernel is like the central core of the operating system. It works as sort of a mediator, providing...
Read more