What Is a Hypervisor?

A hypervisor is software that allocates a computer’s hardware resources among virtual machines (VMs), allowing multiple VMs to run simultaneously on a single physical machine. These are the details on how they work, their types, benefits and risks.

Written by Eric Kleppen
Hypervisor data storage towers
Image: Shutterstock / Built In
Brand Studio Logo
UPDATED BY
Matthew Urwin | Nov 12, 2024

A hypervisor is software that can be installed on a server and used to separate the computer processing unit (CPU), random access memory (RAM) and network resources into separate virtual machines (VM). This allows multiple, logically isolated instances of applications like operating systems to run independently even though they rely on physically integrated hardware.  

Hypervisor Definition

A hypervisor is software that allows many virtual machines to run on a single physical machine. It accomplishes this by allocating a computer’s hardware components to support multiple VMs, which possess their own operating system and applications.

Affordable cloud computing is all possible through virtualization, thanks to the proliferation of the hypervisor. Cloud computing has transformed into a multi-billion dollar industry over the past decade. Companies like IBM, Google and Amazon have invested millions into building massive data centers that host powerful computing resources, which they make available to consumers through products like Amazon Web Services and Google Cloud. 

 

What Is a Hypervisor?

A hypervisor is a program that takes a computer’s physical resources and allocates them accordingly to form multiple virtual machines. In this setup, each VM has an independent operating system and applications while sharing a computer’s memory, CPU and other hardware components. This makes it possible to run many VMs on a single physical machine. 

 

How Does a Hypervisor Work?

Imagine you have a very powerful server with many CPUs, tons of RAM and plenty of network bandwidth. These components make up your integrated physical hardware. 

Say four different people want to use your physical hardware’s computing resources. Instead of allowing each person to use your hardware one at a time, you install a hypervisor, which allows you to orchestrate and manage the division of the hardware resources into four different VMs. 

At the same time, you maintain control over the infrastructure and server security. Since each VM instance is logically isolated, it’s typically not possible for one user to access data from the other virtual servers or host operating system.

 

What Are the Types of Hypervisors?

There are two main types of hypervisors — type 1 and type 2 hypervisors — that deliver different levels of performance.

Type 1 Hypervisor 

Type 1 hypervisors act as a lightweight operating system running on the server itself. We often refer to type 1 hypervisors as bare-metal hypervisors. Since there isn’t an operating system like Windows taking up resources, type 1 hypervisors are more efficient than type 2 hypervisors.

Type 2 Hypervisor

Type 2 hypervisors are software that runs on an operating system, like many other programs. Since the requests for hosted resources must pass through an extra software layer compared to type 1 hypervisors, type 2 hypervisors tend to be less performant. If you’re looking to experiment with type 2 hypervisors, KVM is a popular hypervisor that runs on the Ubuntu distribution of the Linux operating system and VirtualBox is a popular hypervisor for Windows.

Related Reading From Eric KleppenCreate a Free Linux Virtual Machine on Your Computer

 

What Is the Difference Between Containers and Hypervisors?

A container is a software package that stores all the components needed to run an application on any operating system. Both containers and hypervisors allow computing resources to be used more efficiently, but they support virtualization at different levels:

  • Hypervisors let OSs operate independently from hardware; containers let applications operate independently from OSs. 
  • Hypervisors share a computer’s CPU, memory and other resources; containers rely on a container engine to run. 
  • Hypervisors can support many OSs; containers can only support one OS.

Containers are better suited for tasks that require limited resources while hypervisors can handle more demanding projects.

 

What Are the Benefits of Using a Hypervisor?

Ultimately, hypervisors reduce energy use, overhead costs and overall complexity in the cloud computing industry. Here are a few more reasons why hypervisors have become such a pivotal technology: 

Resource Management

Being able to split a host machine into many VMs can be a cost-effective solution to using powerful hardware. Hypervisors can make it much easier to run simultaneous tasks by splitting them across many VMs instead of processing directly on the host, which potentially leaves resources unused.

Operating System (OS) Flexibility

Some software requires a specific operating system. It would be expensive and inefficient to run both a Windows machine and Linux machine, for example. By creating multiple VMs, the hypervisor allows multiple operating systems to run on the single host machine. This flexibility makes it possible to run applications that depend on a particular OS all within the host machine, thereby improving efficiency.

Scalability

Since the hypervisor creates VMs that are independent of the physical hardware, it’s possible to transfer hypervisors across servers to reallocate resources where needed. Hypervisors can be used to scale vertically by allocating more of the host machine’s resources to a particular VM and horizontally by allowing the VM to access resources from multiple machines.

 

What Are the Risks of Using a Hypervisor?

Hypervisors are software, and software can have bugs and vulnerabilities cybercriminals can exploit. Here are some of the risks to consider when using hypervisors: 

Software Vulnerabilities

Since hypervisors allow a system administrator to create and monitor VMs on their hardware, the entire system could be at risk if an attacker compromises the hypervisor. Threat actors do this by exploiting outdated hypervisor software or by infecting a machine with malware. When an attacker gains control of a hypervisor that manages many VMs, they can use those VMs for malicious activities like denial-of-service (Dos) or distributed denial-of-service (DDoS) attacks in addition to having privileged access to the machines themselves. As a best practice, update hypervisor software regularly to patch found vulnerabilities

Network Vulnerabilities

Without the proper network security in place, the VMs themselves might be vulnerable to DoS or DDoS attacks because the hypervisor shares network bandwidth across the VMs. Additionally, the VMs are typically distributed on a network. Cloud companies often keep their VM networks separate from their management networks to help prevent a compromised VM from impacting day-to-day network usage. 

VM Sprawl

It is imperative that a system administrator manages their VMs appropriately and doesn’t leave them unchecked, thereby taking up system resources after work on them has been completed. Old VMs might be running outdated operating systems or applications that are easier to exploit. Also, there could be sensitive files left on VMs that could damage a company or user if compromised. As a best practice, VMs should be shut down and removed after serving their purpose instead of being left online.

Frequently Asked Questions

Oracle VM VirtualBox is an example of a hypervisor. With this software, teams can run multiple operating systems — including Linux, Mac OS X and Microsoft Windows — on the same computer simultaneously.

A type 1 hypervisor runs directly on a computer’s hardware, controlling the host machine’s CPU, memory and other components. It then acts as a replacement for the host machine’s operating system. On the other hand, a type 2 hypervisor runs as a software layer or application on a host machine’s OS. As a result, type 2 hypervisors are ideal for PC environments while type 1 hypervisors excel in server-based ecosystems like data centers.

Explore Job Matches.