0% found this document useful (0 votes)
21 views54 pages

Understanding Virtualization in Cloud Computing

Uploaded by

anantakadel01
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views54 pages

Understanding Virtualization in Cloud Computing

Uploaded by

anantakadel01
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Cloud Computing

Unit-3: Virtualizations

Introduction to Virtualization
Virtualization technology is one of the fundamental components of cloud computing, especially
in regard to infrastructure-based services. Virtualization allows the creation of a secure,
customizable, and isolated execution environment for running applications, even if they are
untrusted, without affecting other users’ applications. The basis of this technology is the ability
of a computer program—or a combination of software and hardware—to emulate an executing
environment separate from the one that hosts such programs.

Virtualization is a large umbrella of technologies and concepts that are meant to provide an
abstract environment—whether virtual hardware or an operating system—to run applications.
The term virtualization is often synonymous with hardware virtualization, which plays a
fundamental role in efficiently delivering Infrastructure-as-a-Service (IaaS) solutions for cloud
computing. In fact, virtualization technologies have a long trail in the history of computer science
and have been available in many flavors by providing virtual environments at the operating system
level, the programming language level, and the application level. Moreover, virtualization
technologies provide a virtual environment for not only executing applications but also for
storage, memory, and networking.

Virtualization is technology that you can use to create virtual representations of servers, storage,
networks, and other physical machines. Virtual software mimics the functions of physical
hardware to run multiple virtual machines simultaneously on a single physical machine.
Businesses use virtualization to use their hardware resources efficiently and get greater returns
from their investment. It also powers cloud computing services that help organizations manage
infrastructure more efficiently.

Before virtualization, the single physical infrastructure was used to run a single OS and its
applications, which results in underutilization of resources. The nonshared nature of the
hardware forces the organizations to buy a new hardware to meet their additional computing
needs. For example, if any organization wants to experiment or simulate their new idea, they have
to use separate dedicated systems for different experiments. So, to complete their research work
successfully, they tend to buy a new hardware that will increase the CapEx and OpEx. Sometimes,
if the organization does not have money to invest more on the additional resources, they may not
be able to carry out some valuable experiments because of lack of resources. So, people started
thinking about sharing a single infrastructure for multiple purposes in the form of virtualization.
The computing scenarios before and after virtualization are shown in following figures.

1 Collected by Bipin Timalsina


Cloud Computing

Figure: Before Virtualization

Figure: After Virtualization

2 Collected by Bipin Timalsina


Cloud Computing

After virtualization was introduced, different OSs and applications were able to share a single
physical infrastructure. The virtualization reduces the huge amount invested in buying additional
resources. The virtualization becomes a key driver in the IT industry, especially in cloud
computing. Generally, the terms cloud computing and virtualization are not same.

Advantages of virtualization

Industries adopt virtualization in their organization because of the following benefits:

• Better resource utilization: Virtualization allows multiple virtual machines (VMs) or


containers to run on a single physical server, maximizing CPU, memory, and storage usage.
Example: A company runs 10 VMs on one server instead of 10 separate physical servers,
reducing idle resources and hardware costs.
• Increases ROI (Return on Investment): By consolidating workloads and reducing
hardware, power, and cooling costs, virtualization lowers capital and operational
expenses, improving financial returns.
Example: A data center cuts costs by 30% after virtualizing servers, allowing the company
to invest savings in new projects.
• Dynamic Data Center: Virtualization enables rapid provisioning, scaling, and migration
of resources, making data centers adaptable to changing demands.
Example: An e-commerce platform uses AWS EC2 to spin up VMs during Black Friday
sales, scaling dynamically to handle traffic spikes.
• Supports Green IT: Virtualization reduces the number of physical servers, lowering energy
consumption and carbon footprint.
Example: A tech firm consolidates 50 physical servers into 5 virtualized ones, cutting
power usage by 60% and supporting sustainability goals.
• Eases Administration: Centralized management tools simplify monitoring, patching, and
resource allocation for virtual environments.
Example: An IT team uses VMware vCenter to manage hundreds of VMs from a single
dashboard, reducing administrative overhead.
• Improves Disaster Recovery: Virtualized environments can be backed up, replicated, or
migrated easily, ensuring faster recovery from failures.
Example: A bank uses VMware’s Site Recovery Manager to replicate VMs to a secondary
site, restoring operations within minutes after a server crash.

Drawbacks of Virtualization

While virtualization offers many benefits, it also has some drawbacks:

3 Collected by Bipin Timalsina


Cloud Computing

• Single Point of Failure: If the physical server or hypervisor hosting multiple VMs fails, all
virtualized workloads are affected.
Example: A company’s entire virtualized web server cluster goes offline due to a single
hardware failure, causing website downtime.
• Demands High-End and Powerful Infrastructure: Virtualization requires robust
hardware (e.g., high CPU, RAM, and storage) to support multiple VMs without
performance issues.
Example: A small business struggles to virtualize its workloads because its outdated
servers lack the power to handle multiple VMs efficiently.
• May Lead to Lower Performance: The hypervisor introduces overhead, and
overprovisioning VMs can cause resource contention, reducing performance.
Example: A virtualized database server slows down because too many VMs on the same
host compete for CPU and memory resources.
• Requires Specialized Skill Set: Managing virtualized environments demands expertise in
hypervisors, networking, and security, which may require training or hiring.
Example: A company faces delays in virtualization deployment because its IT staff lacks
experience with VMware ESXi or Kubernetes.

Characteristics of Virtualized Environments


Virtualization is a broad concept that refers to the creation of a virtual version of something,
whether hardware, a software environment, storage, or a network. In a virtualized environment
there are three major components: guest, host, and virtualization layer. The guest represents
the system component that interacts with the virtualization layer rather than with the host, as
would normally happen. The host represents the original environment where the guest is
supposed to be managed. The virtualization layer is responsible for recreating the same or a
different environment where the guest will operate. Following figure illustrates this.

⎯ Such a general abstraction finds different applications and then implementations of the
virtualization technology. The most intuitive and popular is represented by hardware
virtualization, which also constitutes the original realization of the virtualization concept.
⎯ In the case of hardware virtualization, the guest is represented by a system image
comprising an operating system and installed applications. These are installed on top of
virtual hardware that is controlled and managed by the virtualization layer, also called
the virtual machine manager.
⎯ The host is instead represented by the physical hardware, and in some cases the operating
system, that defines the environment where the virtual machine manager is running.
⎯ In the case of virtual storage, the guest might be client applications or users that interact
with the virtual storage management software deployed on top of the real storage system.

4 Collected by Bipin Timalsina


Cloud Computing

⎯ The case of virtual networking is also similar: The guest— applications and users—
interacts with a virtual network, such as a virtual private network (VPN), which is managed
by specific software (VPN client) using the physical network available on the node. VPNs
are useful for creating the illusion of being within a different physical network and thus
accessing the resources in it, which would otherwise not be available

Figure: The virtualization reference model.

The main common characteristic of all these different implementations is the fact that the virtual
environment is created by means of a software program. The ability to use software to emulate
such a wide variety of environments creates a lot of opportunities, previously less attractive
because of excessive overhead introduced by the virtualization layer. The technologies of today
allow profitable use of virtualization and make it possible to fully exploit the advantages that
come with it. Such advantages have always been characteristics of virtualized solutions.

The major characteristics of virtualized environments are listed below:

⎯ Increased security

5 Collected by Bipin Timalsina


Cloud Computing

⎯ Managed execution
⎯ Portability

Increased security: Virtualized environments enhance security by creating an emulated


environment (e.g., a virtual machine or sandbox) where guest systems (applications, operating
systems, or code) run in isolation from the host system and other guests. The software layer,
typically a hypervisor or virtual machine manager (VMM), introduces a level of indirection that
allows it to monitor, control, and filter the guest’s operations. This control ensures that harmful
or unauthorized actions are prevented, sensitive host resources are protected, and security
policies are enforced transparently without complex configurations. Increased security in
virtualized environments stems from the software-driven control provided by hypervisors or
similar programs. By creating isolated, emulated environments, virtual machine managers can
filter guest operations, protect host resources, and enforce security policies transparently. This
makes virtualization ideal for running untrusted code, securing multi-tenant clouds, and isolating
applications, as seen in tools like VMware, VirtualBox, JVM, and .NET. The ability to sandbox, hide
resources, and customize execution environments ensures robust protection without complex
configurations.

Managed execution: Virtualization of the execution environment not only allows increased
security, but a wider range of features also can be implemented. In particular, sharing,
aggregation, emulation, and isolation are the most relevant features as illustrated in following
figure.

Figure: Functions enabled by managed execution

Virtualization, driven by software like hypervisors, enables a wide range of features beyond
security, including sharing, aggregation, emulation, isolation, and performance tuning. These
characteristics allow efficient resource utilization, unified resource pools, support for diverse

6 Collected by Bipin Timalsina


Cloud Computing

environments, secure and stable execution, and optimized performance. They are critical to
applications in cloud computing, data centers, software testing, and legacy system support,
making virtualization a cornerstone of modern IT infrastructure. The main functions enabled by
managed execution are described below:

1. Sharing: Virtualization allows multiple separate computing environments (e.g., VMs or


containers) to run on a single physical host, fully utilizing its resources. This prevents
underutilization of powerful hardware, which is common in non-virtualized setups.
Sharing is especially valuable in virtualized data centers, where it reduces the number of
active servers, lowering power consumption and operational costs.

➢ Enables efficient use of CPU, memory, and storage by distributing them across
multiple guests.

➢ Critical for cost savings and sustainability in large-scale environments.

Example: A data center uses VMware ESXi to run 20 VMs on a single high-performance
server, each hosting different applications, instead of deploying 20 separate physical
servers, thus maximizing resource utilization and reducing energy costs.

❖ Sharing is a cornerstone of cloud computing, enabling providers like AWS to host


multiple customer workloads on shared infrastructure.
2. Aggregation: Virtualization allows the opposite of sharing—combining the resources of
multiple physical hosts into a single virtual host presented to guests. This aggregation is
often implemented in middleware for distributed computing, such as cluster
management software, which pools resources from a group of homogeneous machines
to act as a unified resource.

➢ Enables scalability by treating distributed hardware as a single entity.

➢ Common in high-performance computing and clustered environments.

Example: A Kubernetes cluster aggregates the CPU and memory of 10 physical nodes into
a single virtual resource pool, allowing a containerized application to scale seamlessly
across the cluster as if it were a single machine.

❖ Aggregation supports large-scale applications, such as big data processing or scientific


simulations, by providing a unified resource view.
3. Emulation: Virtualization enables the creation of a controlled environment that can
emulate hardware or software configurations different from the host. This allows guest
programs to run in environments tailored to their needs, even if the physical host lacks
specific hardware or architectures. Emulation is particularly useful for testing, running
legacy software, or supporting diverse platforms.

7 Collected by Bipin Timalsina


Cloud Computing

➢ Emulates virtual hardware (e.g., SCSI devices, specific CPU architectures) or


operating systems.

➢ Supports legacy applications without code changes by mimicking outdated


environments.

Example: VirtualBox emulates a SCSI controller for a VM, allowing a legacy application to
run without requiring the host to have physical SCSI hardware. Alternatively, an arcade-
game emulator like MAME runs old arcade games on a modern PC by emulating the
original hardware.

❖ Emulation is critical for software development, testing across platforms, and


preserving compatibility with legacy systems.

4. Isolation: Virtualization provides each guest (e.g., OS, application) with a separate
execution environment, interacting only with an abstraction layer (e.g., hypervisor) that
controls access to underlying resources. This isolation ensures that guests do not interfere
with each other or the host, enhancing security and stability by filtering harmful
operations.

➢ Prevents cross-guest interference in multi-tenant environments.

➢ Protects the host from guest actions, such as malware or crashes.

Example: In Microsoft Azure, multiple customer VMs run on the same physical server
using Hyper-V, but each VM is fully isolated, ensuring that a crash or security breach in
one VM does not affect others or the host.

❖ Isolation is essential for cloud computing, enterprise environments, and running


untrusted code, as it ensures security and reliability.
5. Performance Tuning: Virtualization allows precise control over the resources exposed to
guests, enabling fine-tuned performance adjustments. This supports Quality of Service
(QoS) requirements and helps meet Service-Level Agreements (SLAs) by allocating
resources like memory, CPU frequency, or storage dynamically. Additionally, virtualization
enables capturing and persisting a guest’s state for tasks like migration.

➢ Resources can be capped or prioritized (e.g., limiting a VM’s memory or CPU


usage).

➢ Supports virtual machine migration, where a VM’s state is saved, moved to


another host, and resumed transparently.

8 Collected by Bipin Timalsina


Cloud Computing

Example: A Xen Hypervisor limits a VM to 4GB of RAM and 2 CPU cores to ensure other
VMs on the same host have sufficient resources. Alternatively, Xen migrates a running VM
from one server to another during maintenance without interrupting the guest OS.

❖ Performance tuning is vital for optimizing resource usage in data centers and ensuring
consistent application performance in cloud environments.

Portability: Portability refers to the ability to move a virtualized environment (e.g., a virtual
machine, container, or application) from one host or platform to another and execute it without
significant modifications. This is achieved by encapsulating the guest system (OS, applications,
configurations) into a self-contained unit, such as a virtual image or binary code, which can be
run on compatible virtualization software. Portability simplifies deployment, enhances flexibility,
and allows users to carry their systems or applications across different environments, provided
the required virtualization software (e.g., hypervisor or runtime) is available.

The concept of portability applies in different ways according to the specific type of virtualization
considered.

Types of Portability in Virtualization:

▪ Virtual Machine Portability:

o VMs are encapsulated in virtual images that can be moved across hypervisors
of the same type or converted to compatible formats (e.g., using tools like
VMware Converter or OVF (Open Virtualization Format)).

o Example: A company migrates a VM from an on-premises VMware ESXi server


to AWS using VMware Cloud, with minimal reconfiguration.

▪ Container Portability:

o Containers (e.g., Docker images) package applications and dependencies,


allowing them to run on any system with a compatible container runtime (e.g.,
Docker, containerd).

o Example: A Docker image for a web application is deployed from a developer’s


laptop to a Kubernetes cluster on Google Cloud, running identically in both
environments.

▪ Application Portability:

o Programming-level virtualization (e.g., JVM, .NET) ensures that applications


are platform-agnostic, running on any system with the required runtime.

9 Collected by Bipin Timalsina


Cloud Computing

o Example: A .NET Core application runs on Windows, Linux, or macOS without


modification, as the .NET runtime abstracts the underlying OS.

Taxonomy of virtualization techniques


Virtualization covers a wide range of emulation techniques that are applied to different areas of
computing. A classification of these techniques helps us better understand their characteristics
and use. The first classification discriminates against the service or entity that is being emulated.
Virtualization is mainly used to emulate execution environments, storage, and networks. Among
these categories, execution virtualization constitutes the oldest, most popular, and most
developed area. Therefore, it deserves major investigation and a further categorization. In
particular we can divide these execution virtualization techniques into two major categories by
considering the type of host they require. Process-level techniques are implemented on top of an
existing operating system, which has full control of the hardware. System-level techniques are
implemented directly on hardware and do not require—or require a minimum of support from—
an existing operating system. Within these two categories we can list various techniques that offer
the guest a different type of virtual computation environment: bare hardware, operating system
resources, low-level programming language, and application libraries

Figure: A taxonomy of virtualization techniques

10 Collected by Bipin Timalsina


Cloud Computing

Different types of virtualizations


A. Processor virtualization

Processor virtualization allows the VMs to share the virtual processors that are abstracted from
the physical processors available at the underlying infrastructure. The virtualization layer
abstracts the physical processor to the pool of virtual processors that is shared by the VMs. The
virtualization layer will be normally any hypervisors. Processor virtualization from a single
hardware is illustrated in following figure. But processor virtualization can also be achieved from
distributed servers.

Figure: Processor virtualization

11 Collected by Bipin Timalsina


Cloud Computing

B. Memory Virtualization

Another important resource virtualization technique is memory virtualization. The process of


providing a virtual main memory to the VMs is known as memory virtualization or main memory
virtualization. In main memory virtualization, the physical main memory is mapped to the virtual
main memory as in the virtual memory concepts in most of the OSs. The main idea of main
memory virtualization is to map the virtual page numbers to the physical page numbers. All the
modern x86 processors are supporting main memory virtualization. Main memory
virtualization can also be achieved by using the hypervisor software. Normally, in the virtualized
data centers, the unused main memory of the different servers will consolidate as a virtual main
memory pool and can be given to the VMs. The concept of main memory virtualization is
illustrated in following figure.

Figure: Main memory virtualization

12 Collected by Bipin Timalsina


Cloud Computing

C. Storage Virtualization

Storage virtualization is a form of resource virtualization where multiple physical storage disks are
abstracted as a pool of virtual storage disks to the VMs. Normally, the virtualized storage will be
called a logical storage. Storage virtualization is mainly used for maintaining a backup or replica
of the data that are stored on the VMs. It can be further extended to support the high availability
of the data. It can also be achieved through the hypervisors. It efficiently utilizes the underlying
physical storage. The other advanced storage virtualization techniques are storage area networks
(SAN) and network-attached storage (NAS). Following figure illustrates the process of storage
virtualization.

Figure: Storage virtualization

13 Collected by Bipin Timalsina


Cloud Computing

D. Network Virtualization

Network virtualization is a type of resource virtualization in which the physical network can be
abstracted to create a virtual network. Normally, the physical network components like router,
switch, and Network Interface Card (NIC) will be controlled by the virtualization software to
provide virtual network components. The virtual network is a single software-based entity that
contains the network hardware and software resources. Network virtualization can be achieved
from internal network or by combining many external networks. The other advantage of network
virtualization is it enables the communication between the VMs that share the physical network.
There are different types of network access given to the VMs such as bridged network, network
address translation (NAT), and host only. The concept of network virtualization is illustrated in
following figure.

Figure: Network virtualization

14 Collected by Bipin Timalsina


Cloud Computing

E. Data Virtualization

Data virtualization is the ability to retrieve the data without knowing its type and the physical
location where it is stored. It aggregates the heterogeneous data from the different sources to a
single logical/virtual volume of data. This logical data can be accessed from any applications such
as web services, E-commerce applications, web portals, Software as a Service (SaaS) application,
and mobile application. Data virtualization hides the type of the data and the location of the data
for the application that access it. It also ensures the single point access to data by aggregating
data from different sources. It is mainly used in data integration, business intelligence, and cloud
computing. The figure below represents data virtualization technology.

Figure: Data virtualization

F. Application Virtualization

Application virtualization is the enabling technology for SaaS of cloud computing. The application
virtualization offers the ability to the user to use the application without the need to install any
software or tools in the machine. Here, the complexity of installing the client tools or other
supported software is reduced. Normally, the applications will be developed and hosted in the

15 Collected by Bipin Timalsina


Cloud Computing

central server. The hosted application will be again virtualized, and the users will be given the
separated/isolated virtual copy to access. The concept of application virtualization is illustrated
in following figure.

Figure: Application virtualization

16 Collected by Bipin Timalsina


Cloud Computing

Approaches to Virtualization
There are different approaches to virtualization. Before discussing them, it is important to know
about protection rings in OSs. Protection rings are used to isolate the OS from untrusted user
applications. The OS can be protected with different privilege levels. In protection
ring architecture, the rings are arranged in hierarchical order from ring 0 to ring 3 as shown in
following figure.

Figure: Protection rings in OSs.

Ring 0 contains the programs that are most privileged, and ring 3 contains the programs that are
least privileged. Normally, the highly trusted OS instructions will run in ring 0, and it has
unrestricted access to physical resources. Ring 3 contains the untrusted user applications, and
it has restricted access to physical resources. The other two rings (ring 1 and ring 2) are allotted
for device drivers. This protection ring architecture restricts the misuse of resources and
malicious behavior of untrusted user-level programs. For example, any user application from
ring 3 cannot directly access any physical resources as it is the least privileged level. But the kernel
of the OS at ring 0 can directly access the physical resources as it is the most privileged level.
Depending on the type of virtualization, the hypervisor and guest OS will run in different privilege
levels. Normally, the hypervisor will run with the most privileged level at ring 0, and the guest OS
will run at the least privileged level than the hypervisor.

17 Collected by Bipin Timalsina


Cloud Computing

Generally, four types of approaches are followed for virtualization:

1. Full virtualization
2. Paravirtualization
3. Hardware-assisted virtualization
4. Partial virtualization

Full Virtualization
Full virtualization refers to the ability to run a program, most likely an operating system, directly
on top of a virtual machine and without any modification, as though it were run on the raw
hardware. To make this possible, virtual machine manager are required to provide a complete
emulation of the entire underlying hardware.

In full virtualization, the guest OS is completely abstracted from the under lying infrastructure.
The virtualization layer or virtual machine manager (VMM) fully decouples the guest OS from the
underlying infrastructure. The guest OS is not aware that it is virtualized and thinks it is running
on the real hardware. In this approach, the hypervisor or VMM resides at ring 0 and provides all
the virtual infrastructures needed for VMs.

Figure: Full virtualization

The guest OS resides at ring 1 and has the least privilege than the hyper visor. Hence, the OS
cannot communicate to the physical infrastructure directly. It requires the help of hypervisors to
communicate with the underlying infrastructure. The user applications reside at ring 3, as shown

18 Collected by Bipin Timalsina


Cloud Computing

in above figure. This approach uses binary translation and direct execution techniques. Binary
translation is used to translate nonvirtualized guest OS instructions with new sequences of
instructions that have the same intended effect on the virtual infrastructure. On the other hand,
direct execution is used for user application requests where the applications can directly access
the physical resources without modifying the instructions.

Key Characteristics of full virtualization:

• Unmodified Guest OS: The guest OS requires no changes, making it compatible with
proprietary or unmodified OSes (e.g., Windows, Linux).

• Complete Hardware Emulation: The hypervisor emulates all hardware components (CPU,
memory, storage, network, I/O devices), creating a virtual environment indistinguishable
from physical hardware.

• Non-Transparent: The guest OS is unaware it is running in a virtualized environment,


believing it operates on real hardware.

• Isolation: The guest OS and applications are fully decoupled from the physical
infrastructure, enhancing security and isolation.

Examples of Full Virtualization

Example1: VMware ESXi:

o Runs multiple unmodified OSes (e.g., Windows, Ubuntu) in VMs, each with fully
emulated hardware, used in enterprise data centers.

o Example: A company hosts a Windows Server VM and a Linux VM on ESXi, both


running as if on dedicated hardware.

Example2: Microsoft Hyper-V:

o Provides full virtualization for Windows and Linux guests, emulating virtual CPUs,
disks, and networks, used in Azure and on-premises servers.

o Example: An Azure VM runs an unmodified CentOS instance, fully isolated from


the host infrastructure.

Example3: Oracle VirtualBox:

o A Type 2 hypervisor that supports full virtualization for testing or development,


running unmodified OSes on a host OS.

o Example: A developer runs an unmodified macOS guest on a Windows laptop using


VirtualBox for app testing.

19 Collected by Bipin Timalsina


Cloud Computing

Example4: KVM (Kernel-based Virtual Machine):

o Uses hardware virtualization extensions to provide full virtualization, running


unmodified guests with emulated hardware.

o Example: A Linux server uses KVM to host an unmodified Windows 10 VM for


remote desktop services.

Advantages of full virtualization

• This approach provides the best isolation and security for the VMs.
• Different OSs can run simultaneously.
• The virtual guest OS can be easily migrated to work in native hardware.
• It is easy to install and use and does not require any change in the guest OS.

Disadvantages of full virtualization

• Binary translation is an additional, overhead, and it reduces the overall system


performance.
• There is a need for correct combination of hardware and software

Paravirtualization
This is a not-transparent virtualization solution that allows implementing thin virtual machine
managers. Paravirtualization techniques expose a software interface to the virtual machine that
is slightly modified from the host and, as a consequence, guests need to be modified. The aim of
paravirtualization is to provide the capability to demand the execution of performance-critical
operations directly on the host, thus preventing performance losses that would otherwise be
experienced in managed execution.

The main difference between the full virtualization and paravirtualization is the guest OS knows
that it is running in virtualized environment in paravirtualization. But in full virtualization, this
information is not known to the guest OS. Another difference is that the paravirtualization
replaces the translation of nonvirtualized OS requests with hypercalls. Hypercalls are similar to
system calls and used for the direct communication between OS and hypervisor. This direct
communication between the guest OS and hypervisor improves performance and efficiency. In
full virtualization, the guest OS will be used without any modification. But in paravirtualization,
the guest OS needs to be modified to replace nonvirtualizable instructions with the hypercalls. As
shown in following figure, the modified guest OS resides at ring 0 and the user applications at ring
3. As the guest OS is at privileged position, it can communicate directly to the virtualization layer
without any translation by means of hypercalls. Like in full virtualization, the user applications are
allowed to access the underlying infrastructure directly.

20 Collected by Bipin Timalsina


Cloud Computing

Figure: Paravirtualization

Key Characteristics of paravirtualization:

• Non-Transparent: The guest OS is aware that it is running in a virtualized environment,


requiring modifications to work with the hypervisor.
• Modified Guest OS: The guest OS replaces non-virtualizable instructions (e.g.,
privileged CPU instructions) with hypercalls for direct hypervisor communication.
• Performance Focus: Aims to reduce performance losses associated with managed
execution by avoiding complex hardware emulation.
• Thin Hypervisor: The hypervisor is lightweight, as it does not need to emulate full
hardware, relying on guest OS cooperation.

Examples of Paravirtualization

Example1: Xen Hypervisor

o Xen’s paravirtualization mode requires modified guest OSes (e.g., Linux, BSD) to
use hypercalls for operations like CPU scheduling or memory management.

o Example: A paravirtualized Ubuntu VM on Xen runs a web server with lower


overhead than a fully virtualized VM, as it directly communicates with the
hypervisor.

Example2: VMware ESXi with Paravirtualized Drivers

21 Collected by Bipin Timalsina


Cloud Computing

• VMware supports paravirtualized drivers (e.g., VMware Tools) in guest OSes,


allowing them to use hypercalls for specific operations like disk I/O, improving
performance.
• Example: A Windows VM with VMware paravirtualized drivers performs faster
network operations by using hypercalls to the ESXi hypervisor.

Example3: KVM with VirtIO:

• KVM uses VirtIO drivers in paravirtualized guests to provide efficient I/O


operations via hypercalls, rather than emulating full hardware.
• Example: A Linux guest with VirtIO drivers on KVM achieves near-native disk
performance by directly interfacing with the host’s storage.

Advantages of paravirtualization

• It eliminates the additional overhead of binary translation and hence improves the
overall system efficiency and performance.
• It is easier to implement than full virtualization as there is no need for special
hardware

Disadvantages of paravirtualization

• There is an overhead of guest OS kernel modification.


• The modified guest OS cannot be migrated to run on physical hardware.
• VMs suffer from lack of backward compatibility and are difficult to migrate to other
hosts

Hardware-Assisted Virtualization
This term refers to a scenario in which the hardware provides architectural support for building
a virtual machine manager able to run a guest operating system in complete isolation.

In the two previous approaches, there is an additional overhead of binary translation or


modification of guest OS to achieve virtualization. But in this approach, hardware vendors itself,
like Intel and AMD, offer the support for virtualization, which eliminates much overhead involved
in the binary translation and guest OS modification. Popular hardware vendors like Intel and AMD
has given the hardware extension to their x86-based processor to support virtualization. For
example, the Intel releases its Intel Virtualization Technology (VT-x) and AMD releases its AMD-v
to simplify the virtualization techniques. In VT-x, the guest state is stored in virtual machine
control structures and in AMD-v in virtual machine control blocks. In hardware-assisted
virtualization, the VMM has the highest privilege (root privilege) level even though it is working
below ring 0. The OS resides at ring 0 and the user application at ring 3, as shown in following

22 Collected by Bipin Timalsina


Cloud Computing

figure. Unlike the other virtualization approaches, the guest OS and the user applications are
having the same privilege level (nonroot privilege level). As discussed earlier, the hardware-
assisted virtualization technique removes binary translation and paravirtualization. Here, the OS
requests directly trap the hypervisor without any translation. As in other virtualization
approaches, the user requests are directly executed without any translation.

Figure: Hardware-assisted virtualization

Key Characteristics of hardware – assisted virtualization

• Hardware Support: CPU vendors like Intel and AMD provide extensions (e.g., Intel VT-x,
AMD-V) to facilitate virtualization directly in hardware.

• No Binary Translation: Guest OS instructions are executed natively, avoiding the


overhead of translating privileged instructions.

• No Guest OS Modification: Unmodified guest OSes run as if on physical hardware,


similar to full virtualization but with better efficiency.

• Isolation: Guests are fully isolated from the host and each other, leveraging hardware-
enforced privilege levels.

• Performance: Hardware support minimizes virtualization overhead, achieving near-


native performance.

23 Collected by Bipin Timalsina


Cloud Computing

Examples of Hardware-Assisted Virtualization

Example1: VMware ESXi:

o Leverages Intel VT-x or AMD-V to run unmodified Windows and Linux VMs with
near-native performance, used in enterprise data centers.

o Example: A VMware VM hosts an unmodified Ubuntu server, using VT-x to trap


privileged instructions efficiently.

Example2: Microsoft Hyper-V:

o Uses VT-x or AMD-V to provide full virtualization for unmodified guests in Azure
or on-premises servers.

o Example: An Azure VM runs an unmodified Windows Server, with VT-x managing


CPU state via VMCS.

Example3: KVM (Kernel-based Virtual Machine):

o Integrates with Linux and uses VT-x/AMD-V to run unmodified OSes, popular in
open-source cloud environments.

o Example: A KVM VM on a Linux server runs an unmodified CentOS guest,


leveraging AMD-V for efficient execution.

Example4: Oracle VirtualBox:

o Supports hardware-assisted virtualization for running unmodified OSes, using VT-


x or AMD-V when available.

o Example: A developer runs an unmodified macOS guest on a Windows host with


VirtualBox, enabled by VT-x.

Advantages of hardware-assisted virtualization

• It reduces the additional overhead of binary translation in full virtualization.


• It eliminates the guest OS modification in paravirtualization.

Disadvantages of hardware-assisted virtualization

• Only new-generation processors have these capabilities. All x86/x86_64 processors


do not support hardware-assisted virtualization features.
• More number of VM traps result in high CPU overhead, limited scalability, and less
efficiency in server consolidation.

24 Collected by Bipin Timalsina


Cloud Computing

Comparison of Full Virtualization, Paravirtualization and Hardware -Assisted Virtualization

Partial virtualization
Partial virtualization provides a partial emulation of the underlying hard ware, thus not allowing
the complete execution of the guest operating system in complete isolation. Partial virtualization
allows many applications to run transparently, but not all the features of the operating system
can be supported, as happens with full virtualization. An example of partial virtualization is
address space virtualization used in time-sharing systems; this allows multiple applications and
users to run concurrently in a separate memory space, but they still share the same hardware
resources (disk, processor, and network). Historically, partial virtualization has been an important
milestone for achieving full virtualization, and it was implemented on the experimental IBM
M44/44X. Address space virtualization is a common feature of contemporary operating systems.

Examples of partial virtualization

Example1: Address Space Virtualization in Operating Systems

• Modern OSes like Linux and Windows use address space virtualization to isolate
processes. Each process operates in its own virtual memory space, mapped to physical
memory by the OS’s memory management unit (MMU).

25 Collected by Bipin Timalsina


Cloud Computing

• Example: A Python script and a database server run on the same Linux machine, each in
its own virtual address space, sharing the CPU and disk but isolated in memory.

Example2: Wine on Linux

• Wine emulates a Windows environment on Linux, providing partial virtualization of the


Windows API and address space. Windows applications run transparently but share
Linux’s hardware resources and lack full OS isolation.

• Example: A Windows game runs on Ubuntu via Wine, using virtualized memory and API
calls but relying on the Linux kernel for hardware access.

Key Characteristics of partial virtualization:

• Partial Emulation: Only specific hardware components (e.g., memory, CPU) are
virtualized, not the entire system (e.g., I/O devices, interrupts).

• Limited Isolation: Guests share some hardware resources, reducing the level of isolation
compared to full virtualization.

• Transparency for Applications: Many applications can run without modification, but not
all OS features (e.g., kernel-level operations) are supported.

• Resource Sharing: Guests typically share resources like disk, processor, and network,
managed by the host OS or virtualization layer.

Advantages of partial virtualization

• Lightweight: Requires less overhead than full virtualization, as it leverages the host OS or
minimal virtualization layers.

• Transparency: Supports many applications without modification, ideal for multitasking


or legacy software.

• Resource Efficiency: Shares hardware resources, reducing the need for dedicated
systems.

• Historical Importance: Enabled early virtualization experiments, informing the


development of full virtualization.

Disadvantages of partial virtualization

• Incomplete Isolation: Guests share hardware resources, increasing the risk of


interference or security breaches compared to full virtualization.

26 Collected by Bipin Timalsina


Cloud Computing

• Limited OS Support: Not all guest OS features (e.g., kernel-level drivers, direct hardware
access) are supported due to partial hardware emulation.

• Dependency on Host OS: Relies on the host OS for resource management, which may
introduce compatibility or performance issues.

• Scalability Constraints: Less suitable for complex, multi-OS environments compared to


full virtualization or paravirtualization.

Introduction to Hypervisors
A hypervisor is a software that enables multiple virtual machines (VMs)—each with its own
operating system (OS)—to run on one physical server. The hypervisor pools and allocates
physical computing resources as needed by the VM, enabling efficiency, flexibility and scalability.

A hypervisor is a software that you can use to run multiple virtual machines on a single physical
machine. Every virtual machine has its own operating system and applications. The hypervisor
allocates the underlying physical computing resources such as CPU and memory to individual
virtual machines as required. Thus, it supports the optimal use of physical IT infrastructure.

The virtual environment can be created with the help of a software tool called hypervisors.
Hypervisors are the software tool that sits in between VMs and physical infrastructure and
provides the required virtual infrastructure for VMs.

Sometimes called a virtual machine monitor (VMM), the hypervisor manages VMs as they run
alongside each other. It separates VMs from each other logically, assigning each its own slice of
the underlying computing power, memory and storage. This prevents the VMs from interfering
with each other. For example, if one OS suffers a crash or a security compromise, the others
survive.

Why are hypervisors important?

Hypervisors provide the foundation for modern virtualization practices and are crucial to
modern data center, cloud computing and desktop environments. Today, virtualization is
standard practice in enterprise IT infrastructure and is the technology that drives cloud
computing economics. Virtualization software, including hypervisors, allows cloud providers to
serve users with their existing physical computer hardware. Cloud users can purchase only the
computing resources they need—when needed—and scale those resources cost-effectively as
their workloads grow. All major cloud service providers—Amazon Web Services (AWS), Google
Cloud, IBM Cloud, Microsoft Azure—rely on virtualization technology to deliver cloud-based
services like infrastructure as a service (IaaS), software as a service (SaaS) and platform as a
service (PaaS).

27 Collected by Bipin Timalsina


Cloud Computing

Virtualization technology is also critical to automation and supports IT service


management workflow creation. For example, virtualization helps automate tasks like
deployment and configuration and can also help with security and resource efficiency. Also,
virtualization technology like hypervisors supports hyperautomation—the concept of automating
everything in an organization that can be automated. Organizations that adopt hyperautomation
seek to streamline processes across their business by using artificial intelligence (AI), robotic
process automation (RPA) and other technologies to run without human intervention.

Logical Components of the Hypervisor

The hypervisor can be defined by six logical components, each responsible for specific aspects of
virtualization. Below is a detailed explanation of each component.

1. Hypercalls Interface

• The hypercalls interface is the entry point for partitions (guest OSes or drivers) to
execute sensitive instructions by directly communicating with the hypervisor. It is a
hallmark of paravirtualization, where the guest OS is modified to use hypercalls
instead of standard hardware instructions.

• Functions:

o Allows guest OS drivers or the parent partition to request privileged operations


(e.g., memory allocation, CPU scheduling) using a standardized calling
convention (e.g., Windows calling convention in Hyper-V).

o The parent partition (a privileged VM that manages other VMs) uses this
interface to create child partitions (regular VMs).

• Key Features:

o Replaces non-virtualizable instructions with hypercalls, as discussed in


paravirtualization.

o Enables efficient, direct communication between the guest and hypervisor,


reducing overhead.

• Example:

o In Microsoft Hyper-V, a paravirtualized Linux guest with Hyper-V drivers uses


hypercalls to request disk I/O, bypassing emulated hardware.

o The parent partition in Hyper-V uses hypercalls to create a new child partition
running Windows Server.

28 Collected by Bipin Timalsina


Cloud Computing

2. Memory Service Routines (MSRs)

• MSRs are a set of functionalities that manage memory allocation and access for
partitions, leveraging hardware-assisted virtualization features like the Input/Output
Memory Management Unit (IOMMU).

• Functions:

o Controls memory allocation to partitions, ensuring each VM has its own


isolated virtual memory space.

o Uses IOMMU to translate virtual memory addresses to physical addresses,


enabling fast-track access to devices (e.g., direct memory access (DMA) for
storage or network devices).

o Supports Direct Memory Access (DMA) remapping, enhancing security by


restricting device access to specific memory regions.

• Key Features:

o Leverages hardware extensions (e.g., Intel VT-d, AMD-Vi) for efficient memory
management, as discussed in hardware-assisted virtualization.

o Ensures isolation by preventing partitions from accessing each other’s


memory.

• Example:

o In VMware ESXi, the hypervisor uses Intel VT-d to map a VM’s virtual memory
to a physical GPU, allowing direct access while maintaining isolation.

o Hyper-V uses IOMMU to enable a Linux VM to access a virtual disk, translating


memory addresses for secure, high-speed I/O.

3. Advanced Programmable Interrupt Controller (APIC)

• The APIC component manages hardware interrupts (e.g., timer expirations, I/O
completions, exceptions) and dispatches them to virtual processors in partitions.

• Function:

o Each virtual processor in a VM is equipped with a Synthetic Interrupt


Controller (SynIC), an extension of the local APIC, which handles interrupts in
the virtual environment.

29 Collected by Bipin Timalsina


Cloud Computing

o The hypervisor intercepts physical interrupts from hardware and routes them
to the appropriate SynIC in a VM, ensuring proper event handling.

• Key Features:

o Enables efficient interrupt handling in virtualized environments, critical for


time-sensitive operations.

o Supports hardware-assisted virtualization by leveraging CPU features for


interrupt virtualization.

• Example:

o In Hyper-V, a Windows VM’s virtual processor receives a timer interrupt via its
SynIC, triggered by the hypervisor when a physical timer expires.

o Xen uses SynIC to route a network I/O interrupt to a paravirtualized Linux VM,
ensuring timely packet processing.

4. Scheduler

• The scheduler component allocates physical processor time to virtual processors


(vCPUs) across partitions, determining which VM runs when.

• Function:

o Schedules vCPUs based on policies set by the parent partition, balancing


performance, fairness, and priority.

o Ensures efficient CPU utilization by multiplexing multiple vCPUs onto fewer


physical CPUs.

• Key Features:

o Supports dynamic resource allocation, adjusting CPU time based on workload


demands.

o Critical for performance tuning, enabling Quality of Service (QoS) and Service-
Level Agreements (SLAs).

• Example:

o In KVM, the scheduler prioritizes a database VM’s vCPUs during peak query
loads, allocating more CPU time than a low-priority monitoring VM.

o Hyper-V’s scheduler, configured by the parent partition, limits a test VM to 20%


CPU usage to reserve resources for production VMs.

30 Collected by Bipin Timalsina


Cloud Computing

5. Address Manager

• The address manager handles the allocation and management of virtual network
addresses for guest OSes, ensuring proper network communication in virtualized
environments.

• Functions:

o Assigns virtual IP addresses, MAC addresses, or other network identifiers to


each partition.

o Manages network traffic routing between VMs, the host, and external
networks, often integrating with virtual switches or software-defined
networking (SDN).

• Key Features:

o Supports network virtualization, creating isolated virtual networks for each


VM.

o Ensures secure and efficient communication in multi-tenant environments.

• Example:

o In Hyper-V, the address manager assigns a unique virtual IP to a Windows VM,


routing its traffic through a virtual switch to an external network.

o VMware NSX, integrated with ESXi, uses the address manager to create
isolated virtual networks for different customer VMs in a data center.

6. Partition Manager

• The partition manager is responsible for creating, configuring, finalizing, destroying,


and enumerating partitions (VMs), managing their lifecycle and settings.

• Function:

o Provides services through the hypercalls interface API, allowing the parent
partition to create or manage child partitions.

o Handles partition enumeration (listing active VMs) and configuration (e.g.,


setting vCPU count, memory size).

• Key Features:

o Enables dynamic VM management, critical for scalability and flexibility.

31 Collected by Bipin Timalsina


Cloud Computing

o Supports portability by allowing partition configurations to be exported or


migrated.

• Example:

o In Hyper-V, the parent partition uses the partition manager to create a new
child partition running Ubuntu, configuring it with 4 vCPUs and 8GB RAM.

o Xen’s partition manager destroys a test VM after completion, freeing resources


for new partitions.

Six Logical Components of Hypervisors

➢ Hypercalls interface. This is the entry point for all the partitions for the execution of
sensitive instructions. This is an implementation of the paravirtualization approach.
This interface is used by drivers in the partitioned operating system to contact the
hypervisor using the standard Windows calling convention. The parent partition also
uses this interface to create child partitions.
➢ Memory service routines (MSRs). These are the set of functionalities that control the
memory and its access from partitions. By leveraging hardware-assisted virtualization,
the hypervisor uses the Input/Output Memory Management Unit (I/O MMU or
IOMMU) to fast-track access to devices from partitions by translating virtual memory
addresses.
➢ Advanced programmable interrupt controller (APIC). This component represents the
interrupt controller, which manages the signals coming from the underlying hardware
when some event occurs (timer expired, I/O ready, exceptions and traps). Each virtual
processor is equipped with a synthetic interrupt controller (SynIC), which constitutes
an extension of the local APIC. The hypervisor is responsible of dispatching, when
appropriate, the physical interrupts to the synthetic interrupt controllers.
➢ Scheduler. This component schedules the virtual processors to run on available
physical processors. The scheduling is controlled by policies that are set by the parent
partition.
➢ Address manager. This component is used to manage the virtual network addresses
that are allocated to each guest operating system.
➢ Partition manager. This component is in charge of performing partition creation,
finalization, destruction, enumeration, and configurations. Its services are available
through the hypercalls interface API.

32 Collected by Bipin Timalsina


Cloud Computing

Benefits of Hypervisors

The following are some of the core benefits that a hypervisor can provide:

• Efficiency: Hypervisors help ensure maximum resource efficiency by allowing multiple


VMs to use the same physical hardware, thus optimizing the usage of hardware
resources.

• Scalability: Hypervisors can create, deploy and decommission VMs almost instantly. This
capability allows organizations to quickly respond to changing workloads and meet
business demands.

• Cost savings: Hypervisors allow multiple VMs to run on one physical machine. This
consolidation saves costs by reducing hardware expenses. It also reduces the amount of
power consumed, which cuts energy costs and helps reduce the overall carbon footprint
associated with data centers.

• Portability: Hypervisors separate virtual machines from physical machines, making it


easy to migrate VMs. This feature creates portability and allows IT teams to shift
workloads and allocate resources between machines or platforms.

• Enhanced security: Hypervisors isolate VMs from each other and from the host
machine, thus reducing the attack surface. Hypervisors can also take snapshots of a VM's
state, which allows users to restore the VM, create a backup or move it to a different
host.

• Disaster recovery: In the event of a disaster, hypervisors help organizations avoid


disruptions by enabling fast replication or cloning of a virtual machine. This disaster
recovery support significantly enhances the resiliency of the environment and improves
business continuity.

Challenges of Hypervisors

• Performance Overhead: Emulation or instruction trapping introduces latency, though


mitigated by hardware-assisted virtualization.

• Complexity: Type 1 hypervisors require dedicated setup and expertise.

• Security Risks: Vulnerabilities in the hypervisor (e.g., privilege escalation) can


compromise all VMs.

• Hardware Dependency: Optimal performance requires CPUs with virtualization


extensions (VT-x/AMD-V).

33 Collected by Bipin Timalsina


Cloud Computing

• Resource Contention: Overprovisioning VMs can degrade performance, requiring careful


management.

Types of Hypervisors

Before hypervisors are introduced, there was a one-to-one relationship between hardware and
OSs. This type of computing results in underutilized resources. After the hypervisors are
introduced, it became a one-to-many relationship. With the help of hypervisors, many OSs can
run and share a single hardware.

As explained, hypervisors provide a layer between a VM and the underlying physical hardware,
helping ensure that each has access to the physical resources it needs to execute. The process
starts with the host machine executing a hypervisor and installing it as an application on the
machine, where it interacts with the host machine's operating system. The hypervisor then loads
the client operating systems of the virtual machines, creating isolated virtual environments on
the host machines. The hypervisor acts as the intermediary between the VMs and the physical
hardware, allocating resources such as memory, bandwidth and storage for each VM. The physical
hardware still handles the execution of resources. For example, the central processing unit
(CPU) is still executing CPU instructions as requested by the VMs while the hypervisor manages
the schedule. Both physical machines and VMs typically communicate with the hypervisor
through application programming interface (API) calls, protocols that enable software
applications to communicate with each other to exchange data.

Hypervisors are generally classified into two categories:

1. Type 1 or bare metal hypervisors


2. Type 2 or hosted hypervisor

The major difference between these two types of hypervisors is that type 1 runs directly on the
hardware and type 2 on host OS.

Type 1 Hypervisors

Type 1 hypervisor is also known as bare metal or native hypervisor. It can run and access physical
resources directly without the help of any host OS. Here, the additional overhead of
communicating with the host OS is reduced and offers better efficiency when compared to type
2 hypervisors. This type of hypervisors is used for servers that handle heavy load and require
more security.

A type 1 hypervisor runs right on the underlying computer's physical hardware, interacting
directly with its central processing unit (CPU), memory and physical storage. For this reason,
people also refer to type 1 hypervisors as bare-metal hypervisors or native hypervisors. A type 1
hypervisor takes the place of the host operating system.

34 Collected by Bipin Timalsina


Cloud Computing

Type 1 hypervisors are highly efficient because they directly access physical hardware. This
capability also increases their security because there is nothing in between them and the CPU
that an attacker might compromise. However, a type 1 hypervisor often requires a separate
management machine to administer different VMs and control the host hardware.

Some examples of type 1 hypervisors include Microsoft Hyper-V, Citrix XenServer, VMWare ESXi,
and Oracle VM Server for SPARC.

Figure: Type 1 Hypervisor

Characteristics of Type 1 Hypervisors

• Direct Hardware Access: Communicates directly with the hardware (e.g., CPU,
memory, storage), eliminating the overhead of a host OS.
• High Efficiency: Minimal latency and resource overhead, as there’s no intermediate
OS layer.
• Strong Isolation and Security: Direct control over hardware enhances VM isolation,
reducing the risk of host-related vulnerabilities.
• Scalability: Supports high-density VM environments, ideal for handling heavy
workloads.

35 Collected by Bipin Timalsina


Cloud Computing

• Virtualization Techniques: Supports full virtualization, paravirtualization, and


hardware-assisted virtualization, leveraging CPU extensions (e.g., Intel VT-x, AMD-
V).

Advantages of Type 1 Hypervisors

• Performance: Near-native performance due to direct hardware access and minimal


overhead.

• Security: Strong isolation, as there’s no host OS to compromise.

• Scalability: Handles large numbers of VMs, ideal for cloud and enterprise environments.

• Reliability: Independent of a host OS, reducing crash risks.

Disadvantages of Type 1 Hypervisors

• Complexity: Requires dedicated setup and management expertise (e.g., configuring ESXi
via vCenter).

• Hardware Dependency: Optimal performance relies on virtualization extensions (e.g.,


VT-x, AMD-V).

• Cost: Often involves licensing fees (e.g., VMware ESXi) or specialized hardware (e.g.,
Oracle SPARC).

Type 2 Hypervisors

Type 2 hypervisors are also known as embedded or hosted hypervisors. This type of hypervisors
requires the host OS and does not have direct access to the physical hardware. These types of
hypervisors are installed on the host OS as a software program. The host OS is also known as
physical host, which has the direct access to the underlying hardware. The major disadvantage of
this approach is if the host OS fails or crashes, it also results in crashing of VMs. So, it is
recommended to use type 2 hypervisors only on client systems where efficiency is less critical.

A type 2 hypervisor—also referred to as an embedded or hosted hypervisor—doesn't run directly


on the underlying hardware. Instead, it runs as an application in an OS. Type 2 hypervisors rarely
show up in server-based environments. Rather, they are suitable for individual PC users needing
to run different operating systems. Examples include engineers, security professionals analyzing
malware and business users who need access to applications only available on other software
platforms.

Type 2 hypervisors often feature additional toolkits for users to install into the guest OS. These
tools provide enhanced connections between the guest and the host OS, usually enabling the

36 Collected by Bipin Timalsina


Cloud Computing

user to cut and paste between the two or access host OS files and folders from within the guest
VM.

A type 2 hypervisor enables quick and easy access to an alternative guest OS alongside the
primary one running on the host system—this capability supports end-user productivity. A
consumer might use it to access their favorite Linux-based development tools while using a
speech dictation system only found in Windows, for example.

However, because a type 2 hypervisor must access computing, memory and network resources
via the host OS, it introduces latency issues that can affect performance. It also introduces
potential security risks if an attacker compromises the host OS because they could manipulate
any guest OS running in the type 2 hypervisor.

Examples of type 2 hypervisors include VMWare Workstation and Oracle Virtualbox.

Figure: Type-2 Hypervisor

Characteristics of Type 2 Hypervisors

• Host OS Dependency: Relies on the host OS for hardware access, adding an extra layer
between the hypervisor and hardware.

• Higher Overhead: The host OS introduces latency and resource usage, reducing
efficiency compared to Type 1.

37 Collected by Bipin Timalsina


Cloud Computing

• Ease of Use: Installs like any software, leveraging the host OS’s drivers and interfaces,
making it user-friendly.

• Virtualization Techniques: Primarily supports full virtualization and hardware-assisted


virtualization, rarely paravirtualization due to its application-like nature.

• Client-Oriented: Best suited for environments where efficiency is less critical than
simplicity (e.g., development, testing, personal use).

Advantages of Type 2 Hypervisors

• Ease of Setup: Installs like a regular application, leveraging the host OS’s interface and
drivers.

• Flexibility: Runs on commodity hardware (e.g., laptops, desktops) without dedicated


setup.

• User-Friendly: Ideal for non-expert users, such as developers or students.

• Cost-Effective: Often free (e.g., VirtualBox) or lower-cost than Type 1 solutions.

Disadvantages of Type 2 Hypervisors

• Performance Overhead: The host OS adds latency, reducing efficiency for heavy
workloads.

• Stability Risks: A host OS crash affects all VMs, as noted in the text (e.g., if Windows
crashes, VMware Workstation VMs fail).

• Weaker Isolation: Security depends on the host OS, increasing vulnerability compared to
Type 1.

• Limited Scalability: Not suited for high-density VM environments due to resource


overhead.

When to use: type 1 vs. type 2 hypervisors

➢ Type 1 hypervisors are typically used in data centers, enterprise computing workload
situations, web servers, and other primarily fixed-use applications. Cloud computing
environments run bare metal hypervisors to offer the most performant virtual machines
(VMs) for the underlying physical hardware. Cloud providers also abstract away type 1
hypervisor management and offer VMs as cloud instances you can access through APIs.
➢ Type 2 hypervisors are most often used in desktop and development environments,
where workloads are not as resource-intensive or critical to operations. They’re also

38 Collected by Bipin Timalsina


Cloud Computing

preferred in cases where users want to simultaneously use two or more operating
systems but only have access to one machine.

Key Differences Between Type 1 and Type 2 Hypervisors

Type 1 runs directly on hardware, while Type 2 runs on a host OS. Below is a detailed
comparison:

Feature Type 1 (Bare-Metal) Type 2 (Hosted)

Runs On Directly on physical hardware On top of a host OS (e.g.,


Windows, Linux)

Performance High (minimal overhead) Moderate (host OS adds


overhead)

Overhead Low (no host OS) Higher (host OS latency)

Security/Isolation Strong (no host OS dependency) Weaker (depends on host OS)

Stability High (independent of host OS) Lower (host OS crash affects


VMs)

Use Case Cloud, data centers, enterprise servers Development, testing, personal
use

Scalability High (supports many VMs) Limited (resource-intensive)

Ease of Setup Complex (dedicated setup) Simple (installs like software)

Examples VMware ESXi, Hyper-V, XenServer, KVM VirtualBox, VMware


Workstation, Parallels

Virtualization Full, paravirtualization, hardware- Primarily full, hardware-


Techniques assisted assisted

39 Collected by Bipin Timalsina


Cloud Computing

What is the difference between hypervisors and containers?

➢ A container is a software package that stores all the necessary files and configurations to
run an application on any operating system. Developers use containers to reduce software
development complexities and improve efficiency when deploying the applications. A
containerized application can run on a public, hybrid, or on-premises cloud with consistent
performance because it is independent of the underlying operating system.
➢ Both hypervisors and containers provide virtualization but at a different software layer. A
hypervisor abstracts the hardware from the software environment. In contrast, a
container runs in an environment where a container engine abstracts the operating
system.

Introduction to Machine Image and Virtual Machine


Machine Image

➢ A machine image is a portable, self-contained file or set of files that encapsulates a virtual
machine’s configuration, operating system (OS), applications, and data. It serves as a
template or snapshot of a virtualized environment, which can be used to instantiate a
virtual machine on a compatible hypervisor.
➢ Machine Image is a critical component in virtualization technology, allowing users to
create consistent and portable computing environments. VMIs enable rapid deployment,
scaling, and migration of virtual machines across various infrastructures, from local data
centers to cloud environments. By encapsulating the entire state of a virtual machine,
VMIs simplify the process of backup, recovery, and distribution of virtualized system.

Key Characteristics of Machine Image:

• Portability: As discussed in the context of portability in virtualization, machine images


can be moved across different hosts or hypervisors (e.g., from VMware to AWS), often
using standardized formats like OVF (Open Virtualization Format) or proprietary formats
(e.g., VMware’s VMDK, Hyper-V’s VHDX).

• Components: Includes the guest OS, installed software, configuration settings, and
sometimes data, enabling consistent deployment across environments.

• Use in Virtualization: Machine images are created, stored, and deployed by hypervisors
to launch VMs, supporting full virtualization, paravirtualization, or hardware-assisted
virtualization depending on the image’s configuration.

• Immutability: Often treated as a read-only template, with instances (VMs) created from
it, though some images can be modified.

40 Collected by Bipin Timalsina


Cloud Computing

Examples:

• Amazon Machine Image (AMI): Used in AWS EC2 to launch VMs with preconfigured
OSes (e.g., Ubuntu, Windows) and applications.

• VMware VMDK Image: A disk image file for a VMware VM, containing a Linux OS and a
web server, portable to VMware ESXi or Workstation.

• Hyper-V VHDX: A virtual hard disk image for a Windows Server VM, used by Microsoft
Hyper-V.

Virtual Machine

➢ In its simplest form, a virtual machine, or VM, is a digitized version of a physical


computer. Virtual machines can run programs and operating systems, store data,
connect to networks, and do other computing functions. However, a VM uses entirely
virtual resources instead of physical components.
➢ A virtual machine (VM) is a virtual representation or emulation of a physical computer
that uses software instead of hardware to run programs and deploy applications.
➢ A virtual machine is a software-based emulation of a physical computer, created and
managed by a hypervisor. It runs a guest OS and applications in an isolated environment,
abstracting the underlying physical hardware.

Key Characteristics of Virtual Machine:

• Isolation: VMs are fully isolated from each other and the host, as discussed in the
isolation characteristic, ensuring security and independence.

• Hardware Abstraction: The hypervisor provides virtual hardware (e.g., vCPU, vRAM,
virtual disk, vNIC), enabling the guest OS to run as if on physical hardware.

• Virtualization Techniques:

o Full Virtualization: VMs run unmodified OSes with complete hardware emulation
(e.g., Windows on VMware ESXi).

o Paravirtualization: VMs run modified OSes using hypercalls (e.g., Linux on Xen).

o Hardware-Assisted Virtualization: VMs leverage CPU extensions (e.g., Intel VT-x)


for native performance (e.g., Hyper-V with VT-x).

• Components: A VM consists of a guest OS, applications, and a virtual hardware


configuration, often stored as a machine image when not running.

41 Collected by Bipin Timalsina


Cloud Computing

• Privilege Levels: As discussed, the guest OS typically runs at Ring 0 (hardware-assisted)


or Ring 1 (full virtualization), with applications at Ring 3, while the hypervisor runs at
root mode or Ring 0.

Examples:

• A VMware ESXi VM running an unmodified Windows Server 2019 for a corporate


database.

• A Hyper-V VM running Ubuntu with paravirtualized drivers for a web server in Azure.

• A VirtualBox VM running macOS on a Windows laptop for development.

Types of virtual machines

Generally speaking, there are two types of virtual machines: process VMs and system VMs.

• Process VM: A process VM, also called an application virtual machine or managed
runtime environment (MRE), creates a virtual environment of an OS while an app or
single process is running and destroys it as soon as you exit. Process VMs enable creating
a platform-independent environment that lets an app or process run the same way on
any platform. Process virtual machines run an application inside an OS and support a
single process. Java virtual machines (JVMs), which run programs compiled in Java, are
examples of process VMs

• System VM: A system VM (sometimes called hardware virtual machines) simulates a


complete operating system, allowing multiple OS environments to live on the same
machine. Typically, this is the type of VM people are referring to when they talk about
“virtual machines.” System VMs can run their own OS and applications, and a hypervisor
monitors and distributes the physical host machine’s resources between system
VMs. System VMs allow for the sharing of underlying physical machine resources
between different virtual machines, each running its own operating system

More recently, you may have also heard people discussing virtual machines in the cloud or
a cloud VM. Cloud virtual machines are simply virtual machines that run on virtual servers in
the cloud. Many cloud service providers let you create and run cloud virtual machines on their
infrastructure, allowing you to use their powerful servers as host machines and leverage other
software-defined services such as memory and network storage.

42 Collected by Bipin Timalsina


Cloud Computing

Advantages of virtual machines

VMs offer numerous advantages over traditional physical hardware, including the following:

▪ Resource usage and improved ROI: Because multiple VMs run on a single physical
computer, customers don’t have to buy a new server whenever they want to run
another OS. Therefore, they can get more return from each piece of hardware they
already own, significantly reducing IT costs related to capital and operating expenses.
▪ Agility and speed: Because VMs are software-based, it’s easy to spin up new ones.
This feature makes it faster to scale up to meet new workload demands and reduce
downtime compared to provisioning new hardware-based environments. Load
balancing helps ensure that workloads are distributed evenly across VMs, optimizing
performance and responsiveness during scaling without overloading any single VM.
▪ Portability: Businesses can relocate VMs as needed among the physical computer
systems in a network. This capability makes it possible to allocate workloads to servers
with spare computing power. VMs can even move between on-premises and cloud
environments, making them useful for hybrid cloud scenarios where you share
computing resources between your data center and a cloud service provider.
▪ Flexibility: Creating a VM is faster and easier than installing an OS on a physical server
because you can clone a VM with the OS already installed. Developers and software
testers can create new environments on demand to handle new tasks as they arise.
▪ Security: VMs improve security in several ways compared to operating systems, which
run directly on hardware. You can scan a VM file for malicious software by using an
external program. You can create a snapshot of the VM at any point and restore it to
that state if it becomes infected with malware, effectively taking the VM back in time.
The fast, easy creation of VMs makes it possible to quickly delete and re-create a
compromised VM, hastening recovery from malware infections.
▪ Sustainability: With fewer physical servers to run workloads and applications, you can
dramatically reduce energy consumption to improve your environmental impact.

Disadvantages of virtual machines

While VMs have many benefits, they do have a few disadvantages to consider:

▪ Performance issues: VMs depend on the hardware resources made available to them
on the physical host computer. Limited resources can lead to reduced performance
and inefficiencies.
▪ Increased complexity: Virtual machines can be complex to configure and manage,
requiring teams with technical knowledge and expertise to set up and maintain them.

43 Collected by Bipin Timalsina


Cloud Computing

▪ Single point of failure (SPOF): VMs pose the risk of a single point of failure by relying
on one physical computer.

Virtual machine use cases

Virtual machines (VMs) serve a wide range of purposes for both enterprise IT administrators
and other users, including the following:

• Enable cloud-based computing: VMs are the fundamental unit of cloud computing
in hyperscale environments run by cloud service providers (e.g., Amazon Web Services
(AWS), IBM Cloud®, Microsoft Azure, Google Cloud), enabling dozens of applications
and workloads to run and scale successfully.

• Speed workload migration: Because of their portability, VMs help speed


the migration of workloads from on-premises to cloud-based settings.

• Accelerate hybrid cloud journeys: VMs provide the infrastructure for creating hybrid
cloud environments that blend on-premises, private cloud and public
cloud environments into a single, flexible IT infrastructure.

• Support DevOps: VMs are a great way to support DevOps teams and other enterprise
developers, allowing them to configure VM templates with the settings for
their software development and testing processes. They can create VMs for tasks such
as static software tests, including these steps in an automated development workflow.
These functions help streamline the DevOps toolchain.

• Test a new operating system: A VM lets you test-drive a new system on your desktop
without affecting your primary OS.

• Investigate malware: VMs are helpful for malware researchers who frequently need
fresh machines to test malicious programs.

• Run incompatible software: Some users need to use one OS while still needing a
program only available in another.

• Browse securely: Using a virtual machine for browsing enables you to visit sites
without worrying about infection. You can take a snapshot of your machine and then
roll back to it after each browsing session. Users can set up this browsing scenario by
using a type 2 desktop hypervisor. Alternatively, an admin can provide a temporary
virtual desktop on the server.

• Support disaster recovery (DR): With a virtualized environment, it’s easy to provision
and deploy resources, allowing you to replicate or clone the virtual machine when
needed. This process happens in minutes, unlike the many hours it takes to provision

44 Collected by Bipin Timalsina


Cloud Computing

and set up a new physical server. This capability is crucial for disaster recovery (DR),
which helps ensure business continuity and reduces downtime.

• Build and use cyber ranges: Cyber ranges are simulated environments for training,
testing and evaluating cybersecurity skills and tactics. VMs are crucial in these
environments, offering the flexibility, scalability and isolation needed.

• Enhancing artificial intelligence (AI): Virtual machines support AI workloads by


offering scalable, isolated environments that adjust resources dynamically for efficient
model training and deployment.

45 Collected by Bipin Timalsina


Cloud Computing

Introduction to VMware and Microsoft Hyper-V


VMware

VMware is a leading company in virtualization and cloud computing, providing a suite of products
and services that enable the creation, management, and execution of virtual machines (VMs) and
virtualized environments. It provides hypervisors and management tools that create and manage
virtual machines (VMs) and machine images, enabling multiple OSes to share a single physical
host’s resources (e.g., CPU, memory, storage, network). VMware’s flagship products include
VMware ESXi (a Type 1 hypervisor), VMware Workstation and VMware Fusion (Type 2
hypervisors), and cloud solutions like VMware Cloud on AWS.

VMware’s Key Virtualization Products

VMware offers a range of hypervisors and tools tailored to different use cases, each playing a
distinct role in virtualization. VMware is a pioneer in virtualization technology and offers a
collection of virtualization solutions covering the entire range of the market, from desktop
computing to enterprise computing and infra structure virtualization. Some of them are listed
below:

1. VMware ESXi:

o Type: Type 1 (bare-metal) hypervisor.

o Description: Runs directly on physical hardware without a host OS, offering high
performance, scalability, and security for enterprise and cloud environments.

o Use Cases: Data centers, private clouds, hybrid clouds (e.g., VMware Cloud on
AWS), server consolidation.

o Example: A data center uses ESXi to host 100 VMs running Windows and Linux for
corporate applications.

2. VMware Workstation:

o Type: Type 2 (hosted) hypervisor.

o Description: Runs on a host OS (Windows, Linux), designed for development,


testing, and personal use, with a user-friendly interface.

o Use Cases: Software development, QA testing, education, running multiple OSes


on a single PC.

46 Collected by Bipin Timalsina


Cloud Computing

o Example: A developer uses Workstation on Windows to run an Ubuntu VM for


testing a web application.

3. VMware Fusion:

o Type: Type 2 (hosted) hypervisor.

o Description: Similar to Workstation but optimized for macOS, enabling users to


run Windows, Linux, or other OSes on Macs.

o Use Cases: macOS-based development, running Windows applications on Macs,


cross-platform testing.

o Example: A macOS user runs a Windows 10 VM on Fusion for Microsoft Office


compatibility.

4. VMware Cloud and Other Tools:

o VMware Cloud on AWS: Extends ESXi-based virtualization to AWS, providing


hybrid cloud capabilities with VM portability.

o vCenter Server: A centralized management platform for ESXi, enabling VM


provisioning, monitoring, and migration.

o NSX: A network virtualization platform for creating virtual networks, aligning with
the address manager component.

o vSphere: A virtualization platform combining ESXi and vCenter for enterprise-


grade virtualization.

o Example: vCenter manages a cluster of ESXi hosts, automating VM deployment


from VMDK images.

VMWare for End-user (desktop) virtualization

VMware supports virtualization of operating system environments and single applications on end
user computers. The first option is the most popular and allows installing a different operating
systems and applications in a completely isolated environment from the hosting operating
system. Specific VMware software—VMware Workstation, for Windows operating systems, and
VMware Fusion, for Mac OS X environments—is installed in the host operating system to create
virtual machines and manage their execution. Besides the creation of an isolated computing
environment, the two products allow a guest operating system to leverage the resources of the
host machine (USB devices, folder sharing, and integration with the graphical user interface (GUI)
of the host operating system). Following figure provides an overview of the architecture of these
systems.

47 Collected by Bipin Timalsina


Cloud Computing

Figure: VMware workstation architecture.

The virtualization environment is created by an application installed in guest operating systems,


which provides those operating systems with full hardware virtualization of the underlying
hardware. This is done by installing a specific driver in the host operating system that provides
two main services:

• It deploys a virtual machine manager that can run in privileged mode.


• It provides hooks for the VMware application to process specific I/O requests eventually
by relaying such requests to the host operating system via system calls.

Using this architecture—also called Hosted Virtual Machine Architecture—it is possible to both
isolate virtual machine instances within the memory space of a single application and provide
reasonable performance, since the intervention of the VMware application is required only for
instructions, such as device I/O, that require binary translation. Instructions that can be directly
executed are managed by the virtual machine manager, which takes control of the CPU and the
MMU and alternates its activity with the host OS. Virtual machine images are saved in a collection
of files on the host file system, and both VMware Workstation and VMware Fusion allow creation
of new images, pause their execution, create snapshots, and undo operations by rolling back to a
previous state of the virtual machine.

48 Collected by Bipin Timalsina


Cloud Computing

VMWare for server virtualization

Over time, VMware evolved its server virtualization solutions, starting with VMware GSX Server
and progressing to the more advanced VMware ESX Server and VMware ESXi Server. Initially,
VMware GSX Server provided server virtualization by extending the approach used for end-user
computers. Its architecture, primarily designed for virtualizing Web servers, included a daemon
process called serverd that managed VMware application processes. These applications
connected to virtual machine instances via a VMware driver installed on the host operating
system. User requests for virtual machine management and provisioning were routed from the
Web server through the VMM by means of serverd.

VMware ESX Server and its enhanced version, VMware ESXi Server, represent a shift to a
hypervisor-based approach. Both can be installed directly on bare-metal servers and offer
services for virtual machine management. While they provide the same services, their internal
architectures differ, specifically in the organization of the hypervisor kernel:

• VMware ESX Server embedded a modified version of the Linux operating system,
providing access to the hypervisor through a service console.

• VMware ESXi Server implements a much thinner OS layer. It replaces the service console
with remote management interfaces and services, significantly reducing the hypervisor's
code size and memory footprint.

The architecture of VMware ESXi is displayed in following figure.

Figure: VMware ESXi server architecture

49 Collected by Bipin Timalsina


Cloud Computing

VMWare for Infrastructure virtualization and cloud computing solutions

VMware offers a comprehensive suite of cloud computing solutions, spanning from infrastructure
management to Software-as-a-Service (SaaS). Following figure gives an overview of the different
solutions offered and how they relate to each other.

Figure: VMware Cloud Solution stack.

The core of VMware's virtual infrastructure management solution is built upon ESX and ESXi.
These form the building blocks for creating a pool of virtualized servers that are then centrally
managed by VMware vSphere. Beyond basic virtual compute services, vSphere provides essential
infrastructure services such as:

• Virtual file system


• Virtual storage
• Virtual network

It also offers crucial application services including virtual machine migration, storage migration,
data recovery, and security zones. The overall management of this infrastructure is handled by
VMware vCenter, which provides centralized administration for vSphere installations within a
data center environment.

50 Collected by Bipin Timalsina


Cloud Computing

VMware vCloud transforms collections of virtualized data centers into an Infrastructure-as-a-


Service (IaaS) cloud. This allows service providers to offer on-demand virtual computing
environments to end-users on a pay-per-use basis. Users can access provisioning services through
a web portal, enabling them to self-provision virtual machines by selecting from available
templates and configuring virtual networks among their instances.

For application development in the cloud, VMware provides VMware vFabric. This is a set of
components designed to facilitate the development of scalable web applications on top of a
virtualized infrastructure. vFabric includes tools for:

• Application monitoring

• Scalable data management

• Scalable execution and provisioning of Java Web applications

At the pinnacle of its cloud computing stack, VMware offers Zimbra. This is a fully hosted SaaS
solution for office automation, messaging, and collaboration. Accessible from anywhere, Zimbra
integrates various features into a single software platform, providing comprehensive email and
collaboration management.

Microsoft Hyper-V
Hyper-V is an infrastructure virtualization solution developed by Microsoft for server
virtualization. As the name recalls, it uses a hypervisor-based approach to hardware virtualization,
which leverages several techniques to support a variety of guest operating systems. Hyper-V is
integrated as a server role in Windows Server, allowing the installation of its hypervisor

Hyper-V facilitates the concurrent execution of multiple guest operating systems by utilizing
partitions. Each partition is a completely isolated environment where an operating system is
installed and runs. Following figure describes the architecture of Hyper-V.

Despite being installed as a component of the host operating system, Hyper-V takes direct control
of the hardware. This means the original host operating system transforms into a specially
privileged virtual machine instance known as the parent partition (or root partition).

The parent partition is unique because it's the only one with direct access to the hardware. It's
responsible for running the virtualization stack and hosts all the necessary drivers to configure
guest operating systems. Crucially, the parent partition works with the hypervisor to create child
partitions.

Child partitions are where the guest operating systems reside. Unlike the parent, they do not
have direct access to the underlying hardware. Instead, their interactions with the hardware are
managed and controlled by either the parent partition or the hypervisor itself.

51 Collected by Bipin Timalsina


Cloud Computing

Figure: Microsoft Hyper-V architecture

Key Features and Capabilities of Hyper-V

Hyper-V’s key features make it a robust virtualization platform, suitable for a wide range of use
cases:

• Virtual Machine Creation and Management: Hyper-V allows users to create, configure,
and manage VMs, each running its own operating system (e.g., Windows, Linux) and
applications. Each VM acts like a complete computer, isolated from others and the host.

• Hardware Virtualization Support: It leverages hardware virtualization technologies like


Intel VT-x and AMD-V to improve performance and efficiency, reducing overhead
compared to software-based virtualization. This aligns with our discussion on hardware-
assisted virtualization, where CPU extensions like VT-x enable direct trapping of guest OS
instructions.

52 Collected by Bipin Timalsina


Cloud Computing

• Live Migration: Hyper-V supports live migration, allowing VMs to be moved between
physical hosts with minimal downtime, a feature crucial for data centers and cloud
environments. This supports the portability characteristic, enabling VM movement
without reconfiguration.

• Networking and Storage: Offers virtual networking capabilities, including virtual switches,
and storage options like virtual hard disks (VHD/VHDX), which are machine images
enabling portability across Hyper-V environments. The address manager component, as
discussed previously, manages virtual network addresses for VMs.

• Integration with Microsoft Ecosystem: Hyper-V is deeply integrated with Windows Server,
Azure, and other Microsoft tools, making it ideal for organizations using Microsoft
products. For instance, it powers Azure’s virtualization infrastructure, enhancing cloud
capabilities.

• Security Features: Includes advanced security options like shielded VMs and Guarded
Fabric, protecting VMs in enterprise settings. This aligns with the increased security
characteristic, ensuring isolation and protection from unauthorized access.

• Scalability: Supports a wide range of workloads, from small-scale development


environments to large-scale data centers and cloud infrastructures, with scalability
improvements noted in Windows Server 2025

Types of Hyper-V

Hyper-V is available in two primary forms, reflecting its flexibility across server and desktop
environments:

• On Windows 10 and Later: Included as an optional feature in Pro, Enterprise, and


Education editions of Windows 10 and later (e.g., Windows 11). It can be enabled through
the "Turn Windows features on or off" settings, requiring a 64-bit processor with SLAT
(Second Level Address Translation) capabilities, such as Intel VT-x with EPT or AMD-V with
RVI. It runs as a Type 1 hypervisor, where the host OS (Windows) acts as a privileged
partition, and VMs run as child partitions, aligning with our discussion on hypervisor types.

• On Windows Server: Installed as a server role in all editions of Windows Server (e.g., 2025,
2022, 2019, 2016), using Server Manager or PowerShell. It is a full-fledged Type 1
hypervisor, running directly on the hardware without a host OS layer, offering high
performance and scalability for enterprise environments.

53 Collected by Bipin Timalsina


Cloud Computing

 NOTE: Microsoft also offers Hyper-V Server, a standalone, free product that delivers
enterprise-class virtualization for datacenters and hybrid clouds, containing only the Windows
hypervisor, a Windows Server driver model, and virtualization components . It is similar to the
Hyper-V role on Windows Server but without additional server roles, focusing on
virtualization.

54 Collected by Bipin Timalsina

Common questions

Powered by AI

Type 2 hypervisors possess security vulnerabilities largely due to their dependency on the host operating system for hardware access, which introduces an additional layer of potential failure or compromise. If the host OS is attacked or crashes, it can directly impact the running virtual machines, weakening their isolation and security . Conversely, Type 1 hypervisors, operating directly on the bare-metal hardware, avoid these vulnerabilities by eliminating reliance on a potentially less secure intermediate OS. This direct hardware interface enhances VM isolation and reduces attack surface .

A developer might opt for a Type 2 hypervisor for application testing and development due to its simplicity in setup and flexibility in running on commodity hardware like personal laptops without requiring dedicated infrastructure . Type 2 hypervisors, being hosted on a regular operating system, allow for quick access to various operating systems on a single machine, which is convenient for testing purposes . Furthermore, they are cost-effective and user-friendly, catering to individual users who do not need the scalability or performance enhancements that a Type 1 hypervisor would offer .

Type 1 hypervisors, also known as bare metal hypervisors, have a complex setup as they require direct installation on physical hardware and often involve the use of a separate management machine . However, they provide high performance and system stability because there is no intermediary operating system potentially affecting performance . Type 2 hypervisors are easier to set up since they install like regular software applications on a host OS, but this dependency can affect system stability as a crash in the host OS will impact all running virtual machines . Performance is also impacted due to the increased overhead from the host OS .

Type 1 hypervisors, which run directly on physical hardware, are highly scalable and capable of supporting high-density VM environments, ideal for cloud and enterprise data center use . The absence of a host OS allows Type 1 hypervisors to efficiently manage a large number of VMs, making them suitable for handling intensive workloads and providing robust scalability . On the other hand, Type 2 hypervisors, operating at a higher overhead due to their dependency on a host OS, are less scalable and best suited for smaller environments or personal use where immediate scalability isn't critical .

Hyper-V's architecture ensures isolation between the host and guest OSs by utilizing partitions. The parent partition, which hosts the root OS, directly interfaces with the hardware and manages the virtualization stack. This partition creates child partitions where the guest operating systems reside, ensuring that the guests do not interact directly with the physical hardware. Instead, their interactions are mediated by the hypervisor or parent partition, maintaining a clear separation between layers and ensuring robust isolation .

Full virtualization boasts advantages including excellent isolation and security for VMs and the ability to run different operating systems simultaneously without modifications . However, it has disadvantages such as performance overhead due to binary translation and the need for correct hardware and software combinations to function optimally . In contrast, paravirtualization provides better performance and efficiency by enabling direct communication between the guest OS and the hypervisor through hypercalls, but it requires the guest OS to be modified .

Hardware virtualization extensions, such as Intel VT-x and AMD-V, are critical for Hyper-V's performance as they reduce the overhead associated with software-based virtualization by allowing the hypervisor to directly manage processor instructions and features at a hardware level . This hardware-based assistance enhances the efficiency of virtual machine execution, minimizing latency and improving overall VM performance due to more direct hardware utilization .

Full virtualization is beneficial in scenarios demanding strong isolation because it allows unmodified guest operating systems to run as if on actual hardware, which fully decouples them from the physical infrastructure. This feature ensures complete isolation of the guest OS from the host, effectively enhancing security and maintaining operational independence . Additionally, since full virtualization does not require the guest OS to be modified, it is easier to implement and migrate across different hardware environments, offering significant flexibility and compatibility .

Hyper-V's use of virtual networks enhances manageability and flexibility by providing features like virtual switches and address management, which facilitate the efficient configuration of network attributes for virtual machines . These capabilities allow administrators to create segmented networks, manage traffic, and ensure the secure communication of VMs without needing physical hardware modifications, thus offering scalable and adaptable network setups within a virtualized environment .

Process virtual machines (VMs), or application VMs, create a virtual environment for a single application or process, offering a platform-independent environment that terminates upon completion of the application . An example includes Java Virtual Machines (JVMs) which enable Java applications to run on any platform . In contrast, system VMs simulate a complete operating system environment, supporting multiple OS instances and allowing them to run concurrently on the same physical machine. System VMs benefit from resource sharing and are often what people refer to as VMs in cloud or enterprise environments .

You might also like