Updated July 3, 2023
Introduction to Virtualization Techniques
In this article, we will see the widely used virtualization techniques in practice today and how all those techniques are implemented for which use cases. Implementing techniques depends on the use case or the problem statement the business wants to address. Here we will discuss how those techniques work and the level of abstraction achieved by implementing those techniques.
Different Virtualization Techniques
These are the different virtualization techniques currently used in the market:
- Guest Operating system virtualization
- Shared Kernel Virtualization
- Kernel Level Virtualization
- Hypervisor Virtualization
1. Guest Operating System Virtualization
- This is the most simple and easiest way to do virtualization.
- In this virtualization, the host operating system contains the virtualization software.
- The host OS can be anything, such as Windows, Mac, or Linux, and the virtualization software will run just like any other application runs on the OS.
- That virtualization software will take care of all the virtualization tasks, and it helps in running the guest operating system.
- One can run multiple OS using that virtualization software; it will take care of all the things like memory management, resource management, hard disk partitioning, etc.,
2. Shared Kernel Virtualization
- The technique does not require additional configuration for the host OS and hardware.
- The above figure shows that the virtualization application uses the same hardware as the host operating system and runs inside the host OS.
- So, the advantage, in this case, is that there is no extra cost for the hardware configuration and software configuration is required.
- But since it’s the cheapest way of virtualization, there will be performance issues due to high levels of abstraction.
- People use VMware and VirtualBox for virtualization.
- The only drawback of this technique is the compatibility of the operating system; like one wants to run a Windows OS with this method, then it will not work, or if someone wants to run a Linux version 2.6 and the host OS is 2.4, then again it will not work.
- These techniques include Linux Vserver, Solaris Zones, containers, etc.
3. Kernel Level Virtualization
- In this virtualization technique, the guest operating system runs its kernel, unlike the shared kernel virtualization.
- There can be multiple guest operating systems, each with its kernel.
- But the guest operating system kernel should have a similar configuration to the host kernel. Otherwise, there will be compatibility issues.
- The kernel-level virtualization includes user-mode Linux and kernel-based virtual machines.
These techniques include Linux Vserver, Solaris Zones, containers, etc.
- The above diagram shows the implementation of the kernel-level visualization.
4. Hypervisor Virtualization
- In this virtualization, the hypervisor program runs directly in the hardware of the CPU, known as ring 0, which is the highest level of privileges granted by the CPU hardware to any software.
- Generally, the Operating system only has the privileges to run in ring 0, so in this case, a hypervisor runs in ring 0, also called type 1 VMM (Virtual machine monitor). As the name suggests, it monitors all the guest operating systems installed in the virtual machine and provides interfaces for higher-level administration and monitoring.
- So, suppose the hypervisor runs in ring 0. In that case, the kernel of the guest operating system will not get proper privileges to run, so to address this issue, the hypervisor has several solutions described below.
- In this technique, the system calls are made by the kernel of the guest operating system, and the hypervisor directly handles those calls, and the hypervisor, in turn, completes all the tasks.
- The hypervisor calls the guest operating system kernel the hypercalls.
b. Full virtualization
- In this case, the guest operating system is given complete control over the guest operating system.
- The hypervisor generally controls and monitors the calls; it provides a CPU emulation to handle and modify the privileges.
- But this scenario is never efficient and degrades the system performance compared to paravirtualization.
c. Hardware Virtualization
- With the latest CPU coming into the market, INTEL and AMD have devised new CPUs that help provide an extra layer on top of ring 0, which allows the hypervisor to run and take control of the guest operating system.
- This eliminates the overhead of the CPU emulation.
The above figure shows the working of the hypervisor.
- The hypervisor also runs a management console which helps monitor the guest operating systems running on the CPU and allows the system administrator to manage the virtual machines.
- The different hypervisor available in the market is Microsoft hyper V Xen, VMware ESX Server, etc.
In this article, we have seen the different virtualization techniques and understand their working. It depends on the business use case and the budget for the virtualization to implement any of the methods mentioned above.
We hope that this EDUCBA information on “Virtualization Techniques” was beneficial to you. You can view EDUCBA’s recommended articles for more information.