Introduction:
In the realm of virtualization, hypervisors play a crucial role in managing and orchestrating
virtualized environments. They act as the foundation for running multiple operating systems
and applications on a single physical machine. In this blog post, we’ll delve into the concept
of hypervisors, explore the differences between Type-1 and Type-2 hypervisors, and discuss
full vs para virtualization techniques.
What is a Hypervisor?
A hypervisor, also known as a virtual machine monitor (VMM), is a software or firmware
layer that enables, multiple operating systems, known as guest operating systems to run
concurrently on a single physical host. The hypervisor abstracts and partitions the underlying
hardware resources, such as CPU, memory, storage, and networking, to create isolated
virtual environments for each guest operating system.
Hypervisor
Type-1 Hypervisor vs Type-2 Hypervisor:
Type — 1 vs Type 2 Virtualization
Type-1 Hypervisor (Bare Metal Hypervisor):
   •   Type-1 hypervisors run directly on the physical hardware without the need for a host
       operating system.
   •   They have direct access to the underlying hardware resources, offering better
       performance and efficiency compared to Type-2 hypervisors.
   •   Type-1 hypervisors are commonly used in enterprise data centers and cloud
       environments.
   •   Examples include VMware vSphere/ESXi, Microsoft Hyper-V, and KVM (Kernel-based
       Virtual Machine).
Type-2 Hypervisor (Hosted Hypervisor):
   •   Type-2 hypervisors run on top of a host operating system, which in turn runs on the
       physical hardware.
   •   They rely on the host operating system for managing hardware resources and
       providing device drivers.
   •   Type-2 hypervisors are typically used for desktop or development environments.
   •   Examples include Oracle VirtualBox, VMware Workstation, and Parallels Desktop.
Type 1 hypervisors offer much better performance than Type 2 ones because there’s no
middle layer, making them the logical choice for mission-critical applications and workloads.
But that’s not to say that hosted hypervisors don’t have their place – they’re much simpler
to set up, so they’re a good bet if, say, you need to deploy a test environment quickly. One of
the best ways to determine which hypervisor meets your needs is to compare their
performance metrics. These include CPU overhead, the amount of maximum host and guest
memory, and support for virtual processors. The following factors should be examined
before choosing a suitable hypervisor:
1. Understand your needs: The company and its applications are the reason for the data
center (and your job). Besides your company's needs, you (and your co-workers in IT) also
have your own needs. Needs for a virtualization hypervisor are:
a. Flexibility
b. Scalability
c. Usability
d. Availability
e. Reliability
f. Efficiency
g. Reliable support
2. The cost of a hypervisor: For many buyers, the toughest part of choosing a hypervisor is
striking the right balance between cost and functionality. While a number of entry-level
solutions are free, or practically free, the prices at the opposite end of the market can be
staggering. Licensing frameworks also vary, so it’s important to be aware of exactly what
you’re getting for your money.
3. Virtual machine performance: Virtual systems should meet or exceed the performance of
their physical counterparts, at least in relation to the applications within each server.
Everything beyond meeting this benchmark is profit.
4. Ecosystem: It’s tempting to overlook the role of a hypervisor’s ecosystem – that is, the
availability of documentation, support, training, third-party developers and consultancies,
and so on – in determining whether or not a solution is cost-effective in the long term.
5. Test for yourself: You can gain basic experience from your existing desktop or laptop. You
can run both VMware vSphere and Microsoft Hyper-V in either VMware Workstation or
VMware Fusion to create a nice virtual learning and testing environment.
HYPERVISOR REFERENCE MODEL :
There are 3 main modules coordinates in order to emulate the underlying hardware:
    1. DISPATCHER:
       The dispatcher behaves like the entry point of the monitor and reroutes the
       instructions of the virtual machine instance to one of the other two modules.
    2. ALLOCATOR:
       The allocator is responsible for deciding the system resources to be provided to the
       virtual machine instance. It means whenever a virtual machine tries to execute an
       instruction that results in changing the machine resources associated with the virtual
       machine, the allocator is invoked by the dispatcher.
    3. INTERPRETER:
       The interpreter module consists of interpreter routines. These are executed,
       whenever a virtual machine executes a privileged instruction.
Types of hardware virtualization Full partial , para virtualization
Hardware Virtualization
    •    Hardware virtualization is a technology that enables the creation of virtual
        instances of a physical computer system,
    •   allowing multiple operating systems to run on a single physical machine.
There are several types of hardware virtualization as follows :
    •   Full Virtualization
    •   Partial Virtualization
    •   Para Virtualization
Full Virtualization
    •   Full virtualization, also known as hardware-assisted virtualization, involves the
        complete simulation of a physical machine.
    •   Including the virtualization of the CPU, memory, and other hardware components.
    •   This approach allows unmodified operating systems to run within the virtual
        environment.
Example
    •   One notable example of full virtualization is VMware's ESXi hypervisor.
    •   It creates virtual machines (VMs) that can run various operating systems,
    •   such as Windows, Linux, or others, without requiring any modifications to the guest
        OS.
Partial Virtualization
    •   Partial virtualization, or software-based virtualization, involves virtualizing specific
        components of the hardware
    •   while leaving others to be managed by the host operating system.
    •   It doesn't completely simulate the underlying hardware.
Example of Partial Virtualization
    •   VirtualBox is an example of partial virtualization.
    •   It allows users to create VMs on their host system,
    •   but it relies on the host OS to manage certain hardware aspects.
    •   VirtualBox is suitable for running guest operating systems with minimal performance
        impact.
Para virtualization
    •   Para virtualization is a technique where the guest operating system is aware of the
        virtualization layer and cooperates with it.
    •   Unlike full virtualization, para virtualization requires modifications to the guest OS to
        optimize its performance within the virtual environment.
Example of Paravirtualization
    •   Xen is a hypervisor that supports paravirtualization.
    •   Guest operating systems running on Xen are modified to interact with the hypervisor
        directly,
    •   improving performance by avoiding certain virtualization overhead.