What is a hypervisor? The basics of virtualization technology

What is a hypervisor and what is it used for? In this article, we will explain the basics of virtualization, describe the types of this technology and look into the most popular specific solutions.

Virtualization systems & hypervisors

A hypervisor is a program which controls the physical resources of a computing machine and distributes those resources between a number of various operating systems, which allows them to be run at the same time.

In other words, a hypervisor creates copies or clones of one physical computer’s hardware resources. Each clone is presented to the user as a separate device. Users can install guest operating systems on each of the virtual machines with no ties to the host hardware.

A hypervisor isolates the operating systems from each other so that each one gets exclusive use of the resources dedicated to it. If needed, a hypervisor can allow the operating systems of separate virtual machines to interact. This connection can be used for shared access to certain files or exchanging data through the local network.

Virtualization is a technology which creates the appearance of multiple computers or servers based on one physical computer, server or server cluster. This physical machine is referred to as a host; it has its own CPU, RAM and storage configuration. The physical resources are distributed using a hypervisor to create a number of independent virtual machines.

In other words, virtualization is the illusion that multiple separate computers, or virtual machines, are present on the same physical equipment. This illusion is created using hypervisors.

Virtual machine schematics A schematic representation of a virtual machine

This way, one computer appears to be multiple computers at the same time, and each works with its own software independent of the others. However, each of these virtual machines is simply a set of files in the host’s memory. Naturally, if you turn off the physical server, the illusion will disappear – the hypervisor will stop working.

There are two main types of hypervisors; however, there are also hybrid hypervisors, which combine the features of both types.

Security is one of the main requirements towards hypervisors

How do Type 1 hypervisors work?

Type 1 hypervisors are also called microkernels, thin hypervisors or autonomous hypervisors run on bare metal. Type 1 hypervisors are best imagined as a compact operating system with specific functions which is installed directly on a bare-metal server and has the main signs of an OS:

  • presents an abstract set of resources for applications instead of an unordered set of hardware;
  • controls the resource pool by distributing CPU time, memory, I/O devices between programs which request the use of the computer’s resources.

This type of hypervisor gives the guest operating systems launched under its control on the upper level an abstraction of a virtual machine. As a result, each guest OS gets an illusion of full control of all the resources below. It functions the same way an OS would if it were running on real hardware in privileged mode, as a supervisor.

The first type of hypervisor The principle of operation of a Type 1 hypervisor

A supervisor is a central control module, the core of the operating system. It can consist of multiple parts: a program supervisor, a task manager, an I/O supervisor and others.

Most contemporary Intel and AMD CPUs for servers and desktop computers support virtualization on the hardware level. The operating system can be used in two modes: privileged mode and user mode. The access rights of the application that controls the computer’s resources are severely limited.

Type 1 hypervisors have a very important quality: the size of its codes is hundreds of times smaller than most modern operating systems. This also leads to fewer mistakes that can freeze the entire system. An error in one of the operating systems in one of the user virtual machines should not affect the other systems on the same physical equipment.

Security is one of the main requirements towards hypervisors, as they get full control over the hardware resources on which virtualization is run. Consequently, the hypervisor’s task is to run the machine code in a safe way while not allowing a guest OS to:

  • block interruptions;
  • modify the virtual memory page tables to the physical memory of the entire machine;
  • change data in memory cells dedicated to other running processes (except for cases when the task necessitates it). System calls are also intercepted and run within the hypervisor, but each guest OS appears to be running the code in its own privileged mode. In other words, the hypervisor creates the illusion that the code of the guest OS is run on the hardware level, in privileged mode, while it is, in fact, running in guest mode. If one of the guest systems crash, the others will continue functioning.

The hypervisor ends up the only software run in full privilege mode. This quality of the hypervisor is referred to as equivalency – the behavior of user programs does not change when working on the virtual machine or on physical hardware, except for time characteristics.

The time it takes to run code differs significantly – the hypervisor takes some of the CPU time for intercepting an analyzing the instructions of the guest OS, as well as emulating the execution. In addition, the resources of the physical equipment are usually distributed between multiple virtual machines and each of them gets only part of the CPU time on-demand. However, this is enough to run most processes with no issues; not all of them are used with the same intensity. Some processes can be on standby waiting for user input or for the slow periphery equipment to shut down. This time is used effectively, as the system distributes it to other active processes in multitask mode.

Xen, VMware ESXi, Hyper-V and other hypervisors can be considered Type 1.

Xen (Xenserver, Citrix Hypervisor)

The Xen thin hypervisor was developed as part of a research project of the Cambridge University laboratory. The first public release became available in 2003 when XenSource put it on the marked. XenSource was absorbed by Citrix in 2007; as a result, some of the products were renamed. Xen is a crossplatform hypersor which supports hardware virtualization and paravirtualization. Most of the components are located beyond the hypervisor, which is why Xen contains a minimal amount of code. Xen is a fully open-source GNU GPL 2-licensed hypervisor. This means that the product can be modified however the user needs. Some consider Xen a hybrid hypervisor due to its support for paravirtualization and hardware virtualization.

VMware ESXi

The autonomous VMware ESXi hypervisor is an Enteprise-class virtualization solution developed by VMware. Just like other VMware products, ESXi is available for free with limited functionality. The paid full version supports features such as centralized control over all virtual machines on every host of the project using the vCenter platform. However, even the free version handles all the main tasks of the hypervisor. User reviews state that the product is highly stable, easy to manage, uses a minimal amount of code and supports a wide range of guest systems commonly used in the corporate sector.

Hyper-V

Hyper-V is hardware virtualization solution for x64 systems made by Microsoft. It is available in two variants: as a role in the server OS’ of the Windows family (Windows Server 2008, Windows Server 2012 etc.), as well as the x64 Pro and Enterprise versions of Windows 8, Windows 8.1, Windows 10, and as a separate product – Microsoft Hyper-V server. Many users who are used to Microsoft solutions consider Hyper-V to be one of the most convenient hypervisors when it comes to virtualization. As a side note, the Azure cloud is fully built on native Microsoft products.

Type 2 hypervisors function as one of the processes executed by the main OS

What are the main principles of Type 2 hypervisors?

Type 2 hypervisors are also called hosted hypervisors. This type of hypervisor is an additional software layer, which is located above the main OS.

These hypervisors run as one of the processes executed by the main OS, most commonly Linux. In this case the hypervisor’s rights are significantly limited. It controls the guest operating systems, while emulation and physical resource control are handled by the host OS.

The second type of hypervisor: VirtualBox, VMware Workstation, KVM The principle of operation of a Type 2 hypervisor

Oracle VM VirtualBox, VMware Workstation, KVM are the most popular Type 2 hypervisors.

Oracle VM VirtualBox

Oracle VM VirtualBox is a modular crossplatform hypervisor for Linux, macOS, Microsoft Windows, FreeBSD, Solaris/OpenSolaris, ReactOS, DOS and other Oracle systems. The hypervisors was created in 2007 by Sun Microsystem; after Oracle absorbed the company, work on the hypervisor continued. The source code of the basic version was opened through the GNU GPL license; the hypervisor is popular due to the unlimited modification capabilities. VirtualBox can support x64 guest operating systems, even if the host OS is 32-bit.

VMware Workstation

The first version of the VMware Workstation hypervisor, developed by VMware, was released in 1999. This proprietary software works x86 and x64 host operating systems, such as Microsoft Windows, Linux, Ubuntu, CentOS. It supports more than 200 guest operating systems. Workstation Player, a free version can be used to test the software. Its functionality is severely limited compared to the Pro version.

KVM

Kernel-based Virtual Machine, KVM is a hypervisor created in October of 2006. It was quickly integrated with the main branch of the Linux 2.6.20 core released in the beginning of 2007. Later, KVM was adapted as a core module in FreeBSD. KVM includes the downloadable core module, kvm.ko, which is responsible for virtualization, a CPU-specific downloadable module for AMD or Intel – kvm-amd.kp or kvm-intel.ko, as well as QEMU user mode components. KVM is fully open-source through the GNU GPL and GNU LGPL license. KVM QEMU was used to create the public SIM-Cloud by SIM-Networks.

A hybrid hypervisor controls the CPU and the memory while the guest systems control I/O devices

What are hybrid hypervisors?

Hybrid hypervisors combine some of the characteristics of Type 1 and Type 2 hypervisors (a combination of a thin hypervisor and the specialized service OS functioning on the hardware level under its control). The hypervisor controls the CPU and the memory directly while the service OS provides guests access to I/O devices.

This technology is in active development; more flexible and integrated versions are created constantly. Lately, Xen and Hyper-V have been classified as hybrid hypervisors instead of Type 1, which partly correct. The modern versions of these hypervisors combine a significant number of characteristics from both types.

Paravirtualization modifies the guest OS to execute them in the virtualized environemnt

What is paravirtualization?

Paravirtualization is a popular solution which installs a pre-configured guest OS, the core of which is modified for effective work with Type 2 hypervisors. Naturally, this does not concern closed source proprietary systems, such as Windows. However, most Linux versions can be modified freely.

Guest operating systems are modified to run in a virtualized environment; the main condition for paravirtualization is the open source code of all OS components. However, the significant increase in performance, which is comparable to that of a physical system, drives the demand for paravirtualization.

Containers can deploy more applications on one physical server than hypervisors can

What are container solutions?

In the last couple of years, hypervisors have been pushed out by the relatively new container technology. The reason behind this is that containers can deploy a larger number of applications on one physical server compared to a hypervisor. Container virtualization solutions are mostly based on the modified Linux core. If the host machine uses a Linux core, guest operating systems can only come from the Linux family.

OpenVZ is popular container solution, which was used to create the Virtuozzo platform. The main benefit of the OpenVZ solution is increased performance and maximal physical resource usage due to the high density of VM placement. The Jailhouse container solution by Siemens is also of interest. This hypervisor functions on bare metal; however, it is launched on a running Linux system. The solution segments the system into isolated cells, parts of the system necessary for running user applications.

Cloud Server

Cloud server

Learn more about the highly available public SIM-Cloud

Learn more

What hypervisor should I choose?

When choosing a hypervisor, it is advisable to remember the main tasks of a hypervisor regardless of the type:

  • emulating hardware resources;
  • running machine code safely;
  • preventing the host machines from executing guest OS tasks in supervisor mode (without intercepting, analyzing or emulating the execution).

Qualified experts can help pick the optimal virtualization technology for each user case. They will take your requirements towards the project into account, as well as the existing hardware, the price, the availability of technical support and other important factors. For example, when planning to use VMware ESXi and some other hypervisors, be ready to purchase licenses and to buy high-quality physical equipment for the virtualization system.

Before starting to work with a hypervisor, a user should: • dedicate some time to learn all relevant information on the software developer’s website; • check if your hardware platform meets the minimal technical requirements of the hypervisor; • analyze other properties of the chosen software solution so that expectations match reality. If you have any questions regarding the choice of an optimal virtualization technology, contact the Customer Care team. We will gladly consult you and answer your questions.

Was this article helpful?

Tags:

#server

Did you like the article?

Cookie consent

By clicking «I agree», you consent to our website's use of cookies to give you the most relevant experience by remembering your preferences and repeat visits. However, you may visit «Manage сookies» to provide controlled consent. Learn more

Cookies settings

functional

Necessary cookies are crucial for the basic functions of the website and the website will not work in its intended way without them.

Analytics

Analytical cookies are used to understand how visitors interact with the website.

Advertisement

Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns.