Introduction to Virtualization Techniques
In this article, we will see what are the widely used virtualization techniques are in practice today and how all those techniques are implemented for which use cases. Implementing any of the techniques completely depends on the use case or the problem statement the business wants to address. Here we will discuss only generally how those techniques work and what are the level of abstraction achieved by implementing those techniques.
Different Virtualization Techniques
Different virtualization techniques currently used in the market are:
- 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 one host operating system is present and in that, virtualization software is installed in that host operating system.
- The host OS can be anything such as Windows, Mac, or Linux and the virtualization software will run as just like any other application runs on the OS.
- That virtualization software will take care of all the virtualization task 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,
- In the technique, there is no extra configuration is required for the host OS and also the host hardware.
- In the above figure, we can see that the virtualization application is using the same hardware as that of the host operating system and it’s running inside the host OS.
- So, the advantage in this case, if there will is no extra cost for the hardware configuration and software configuration, is required
- But since it’s the cheapest way of virtualization so there will be issues with performance as there is high levels of abstraction.
- VMware, VirtualBox are the software used for this virtualization.
2. Shared Kernel Virtualization
- This kind of virtualization are also known as the system level or operating system virtualization.
- To understand this technique first we need to understand a few basic terms about the Linux operating system.
- There are two main components of the Linux operating system
1) Kernel 2) root
- Kernel is the one which handles all the important between operating system and system hardware
- Root file contains all the important libraries and files and utilities which are necessary to run the operating system.
- So, under this virtualization technique, each guest Operating system has their own root file and they share the same kernel.
- This root sharing feature is an inbuilt feature which is provided in the Linux operating system and this virtualization techniques is only using this feature.
- So basically, the host and the guest operating system share the same kernel to communicate with the system hardware, but different root files for their own functioning.
- The only drawback in this technique is with 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 host OS is 2.4 then again it will not work.
- Example of this kind of techniques are Linux Vserver, Solaris Zones, and containers, etc.
3. Kernel level virtualization
- Is this virtualization technique the guest operating system runs its individual kernel unlike the shared kernel virtualization
- There can be multiple guest operating system and each one will have their own kernel.
- But the guest operating system kernel should have a similar configuration like the host operating system kernel otherwise there will be compatibility issues
- The kernel-level virtualization includes user-mode Linux and kernel-based virtual machine
- The above diagram shows the implementation of the kernel level visualization
4. Hypervisor Virtualization
- In this virtualization, a program called hypervisor runs directly in the hardware of the CPU which is generally called the ring 0 which is the highest level of privileges provided by the CPU hardware to any software.
- Generally, Operating system only has the privileges to run in ring 0, so in this case, hypervisor runs in ring 0 which is also called type 1 VMM (Virtual machine monitor). As the name suggest it monitors all the guest operating system which are installed in the virtual machine and also provides interfaces for higher-level administration and monitoring.
- So, if the hypervisor runs in ring 0 then the kernel of the guest operating system will not get proper privileges to run so to address this issue hypervisor as a number of different solutions described below
- In this technique, the system calls are made by the kernel of the guest operating system, and those calls are directly handled by the hypervisor and hypervisor, in turn, completes all the tasks.
- The calls between the hypervisor and the guest operating system kernel are called the hypercalls.
- Full virtualization
- In this case, complete control of the guest operating system is given to the guest operating system.
- The calls are generally controlled and monitored by the hypervisor it provides a CPU emulation to handle and modify the privileges.
- But this scenario is not every efficient and results in the degrading of the system performance compared to paravirtualization.
- Hardware Virtualization
- With the latest CPU coming into the market INTEL and AMD has devised new CPUs that help in providing an extra layer on top of ring 0 which helps 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 that are running in the CPU and it also 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 what are the different virtualization techniques and understand the working of each one of them. It’s now depending on the business use case and the budget for the virtualization to implement any of the above-mentioned techniques.
This is a guide to Virtualization Techniques. Here we discuss the introduction, Different virtualization techniques currently used in the market. You may also have a look at the following articles to learn more –