Virtualization Concepts
Virtualization Concepts
Dr. Tarandeep Kaur, Lovely Professional University Unit 10: Virtualization Concepts
Objectives
After this lecture, you will be able to,
Introduction
In computing, virtualization or virtualisation is the act of creating a virtual (rather than actual)
version of something, including virtual computer hardware platforms, storage devices, and
computer network resources.Virtualization began in the 1960s, as a method of logically dividing the
system resources provided by mainframe computers between different applications. Since then, the
meaning of the term has broadened.Virtualization technology has transformed hardware into
software. It allows to run multiple Operating Systems (OSs) as virtual machines (Figure 1).Each
copy of an operating system is installed in to a virtual machine.
215
Page 1 of 32
Notes
Cloud Computing
You can see a scenario over here that we have a VMware hypervisor that is also called as a Virtual
Machine Manager (VMM). On a physical device, a VMware layer is installed out and, on that layer,
we have six OSs that are running multiple applications over there, these can be the same kind of
OSs or these can be the different kinds of OSs in it.
Why Virtualize
1. Share same hardware among independent users- Degrees of Hardware parallelism increases.
2. Reduced Hardware footprint through consolidation- Eases management and energy usage.
3. Sandbox/migrate applications- Flexible allocation and utilization.
4. Decouple applications from underlying Hardware- Allows Hardware upgrades without
impacting an OS image.
Virtualization enables sharing of resources much easily, it helps in increasing the degree of
hardware level parallelism, basically, there is sharing of the same hardware unit among different
kinds of independent units, if we say that we have the same physical hardware and on that
physical hardware, we have multiple OSs. There can be different users running on different kind of
OSs. Therefore, we have a much more processing capability with us. This also helps in increasing
the degree of hardware parallelism as well as there is a reduced hardware footprint throughout the
VM consolidation. The hardware footprint that is overall hardware consumption also reduces out
the amount of hardware that is wasted out that can also be reduced out. This consequently helps in
easing out the management process and also to reduce the amount of energy that would have been
otherwise consumed out by a particular hardware if we would have invested in large number of
hardware machines would have been used otherwise. Virtualization helps in sandboxing
capabilities or migrating different kinds of applications that in turn enables flexible allocations and
utilization of the resources. Additionally, the decoupling of the applications from the underlying
hardware is much easier and further aids in allowing more and more hardware upgrades without
actually impacting any particular OS image.
Virtualization raises abstraction. Abstraction pertains to hiding of the inner details from a particular
user. Virtualization helps in enhancing or increasing the capability of abstraction. It is very similar
to how the virtual memory operates. It helps to access the larger address spaces physical memory
mapping is actually hidden by an OS with the help of paging. It can be similar to hardware
emulators where codes are allowed on one architecture to run on a different physical device such as
virtual devices central processing unit, memory or network interface cards etc. No botheration is
actually required out regarding the hardware details of a particular machine. The confinement to
the excess of hardware details helps in raising out the abstraction capability through virtualization.
Basically, we have certain requirements for virtualization, first is the efficiency property. Efficiency
means that all innocuous instructions are executed by the hardware independently. Then, the
resource control property means that it is impossible for the programs to directly affect any kind of
system resources. Furthermore, there is an equivalence property that indicates that we have a
program which has a virtual machine manager or hypervisor that performs in a particular manner,
indistinguishable from another program that is running on it.
216
Page 2 of 32
Notes
After virtualization was introduced, different OSs and applications were able to share a single
physical infrastructure (Figure 3). 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. There are
significant differences between these two technologies.
Virtual Machine (VM):A VM involves anisolated guest OS installation within a normal host
OS.From the user perspective, VM is software platform like physical computer that runs OSs and
apps.VMs possess hardware virtually.
217
Page 3 of 32
Notes
Cloud Computing
Lack of space
Greening initiatives
Sandbox/migrate applications
218
Page 4 of 32
Notes
Features of Virtualization
Virtualization Raises Abstraction
o Similar to Virtual Memory: To access larger address space, physical memory mapping is
hidden by OS using paging.
o Similar to Hardware Emulators: Allows code on one architecture to run on a different physical
device, such as, virtual devices, CPU, memory, NIC etc.
o No botheration about the physical hardware details.
Virtualization Requirements
o Efficiency Property: All innocuous instructions are executed by the hardware.
o Resource Control Property: It must be impossible for programs to directly affect system
resources.
o Equivalence Property: A program with a VMM performs in a manner indistinguishable from
another.Except: Timing & resource availability.
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 (Figure 4):
o Guest: Represents the system component that interacts with the virtualization layer rather
than with the host, as would normally happen.
o Host: Represents the original environment where the guest is supposed to be managed.
o Virtualization Layer: Responsible for recreating the same or a different environment where
the guest will operate.
The components of virtualized environments include: In the case of hardware virtualization, the
guest is represented by a system image comprising an OS and installed applications. These are
installed on top of virtual hardware that is controlled and managed by the virtualization layer, also
called the VMM. The host is instead represented by physical hardware, & in some cases OS, that
219
Page 5 of 32
Notes
Cloud Computing
defines an environment where VMM is running. 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 physical network available on the node. VPNs are useful for creating
an illusion of being within a different physical network & thus accessing the resources in it, which
would otherwise not be available. The virtual environment is created by means of a software
program. The ability to use software to emulate a wide variety of environments creates a lot of
opportunities, previously less attractive because of excessive overhead introduced by the
virtualization layer.
In a bare metal architecture, one hypervisor or VMM is actually installed on the bare metal
hardware. There is no intermediate OS existing over here. The VMM communicates directly with
the system hardware and there is no need for relying on any host OS. VMware ESXi and Microsoft
Hyper-V are different hypervisors that are used for bare-metal virtualization.
Figure 6illustrates the hosted virtualization architecture. At the lower layer, we have the shared
hardware with a host OS running on this shared hardware. Upon the host OS, a VMM is running
that and is creating a virtual layer which is enabling different kinds of OSs to run concurrently. So,
you can see a scenario we have a hardware then we add an operating system then a hypervisor is
added and different kinds of virtual machines can run on that particular virtual layer and each
virtual machine can be running same or different kind of OSs.
220
Page 6 of 32
Notes
221
Page 7 of 32
Notes
Cloud Computing
use.Before discussing virtualization techniques, it is important to know about protection rings in
OSs. The protection rings are used to isolate the OS from untrusted user applications. The OS can
be protected with different privilege levels (Figure 8).
The hardware-assisted full virtualization eliminates the binary translation and directly interrupts
with hardware using the virtualization technology which has been integrated on X86 processors
since 2005 (Intel VT-x and AMD-V). The guest OS’s instructions might allow a virtual context
execute privileged instructions directly on the processor, even though it is virtualized. There is
222
Page 8 of 32
Notes
Para Virtualization:The para-virtualization works differently from the full virtualization. It doesn’t
need to simulate the hardware for the VMs. The hypervisor is installed on a physical server (host)
and a guest OS is installed into the environment. The virtual guests are aware that it has been
virtualized, unlike the full virtualization (where the guest doesn’t know that it has been virtualized)
to take advantage of the functions. Also, the guest source codes can be modified with sensitive
information to communicate with the host. The guest OSs require extensions to make API calls to
the hypervisor.
Comparatively, in the full virtualization, guests issue hardware calls but in para virtualization,
guests directly communicate with the host (hypervisor) using the drivers. The list of products
which supports para virtualization are:
• Xen (Figure 9)
• IBM LPAR
• Oracle VM for SPARC (LDOM)
• Oracle VM for X86 (OVM)
However, due to the architectural difference between windows-based and Linux-based Xen
hypervisor, Windows OS can’t be para-virtualized. It does for Linux guest by modifying the
kernel. VMware ESXi doesn’t modify the kernel for both Linux and Windows guests.
223
Page 9 of 32
Notes
Cloud Computing
• Xen
• VMware ESXi
OS Level Virtualization: It is widely used and is also known as “containerization”. The host OS
kernel allows multiple user spaces aka instance. Unlike other virtualization technologies, there is
very little or no overhead since it uses the host OS kernel for execution. Oracle Solaris zone is one of
the famous containers in the enterprise market. The list of other containers:
• Linux LCX
• Docker
• AIX WPAR
Processor Virtualization: It allows the VMs to share the virtual processors that are abstracted from
the physical processors available at the underlying infrastructure (Figure 10). 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. But processor virtualization can also be
achieved from distributed servers.
224
Page 10 of 32
Notes
Storage Virtualization: A form of resource virtualization where multiple physical storage disks are
abstracted as a pool of virtual storage disks to the VMs (Figure 12). 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 efficiently
utilizes the underlying physical storage. Other advanced storage virtualization techniques are
storage area networks (SAN) and network-attached storage (NAS).
Network Virtualization:It is a type of resource virtualization in which the physical network can be
abstracted to create a virtual network (Figure 13).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. 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. 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.
225
Page 11 of 32
Notes
Cloud Computing
Data Virtualization: Data virtualization offers the ability to retrieve the data without knowing its
type and the physical location where it is stored (Figure 14). It aaggregates 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) applications, and mobile application.It hides the type of the data and
the location of the data for the application that access it and 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.
226
Page 12 of 32
Notes
227
Page 13 of 32
Notes
Cloud Computing
228
Page 14 of 32
Notes
Summary
Virtualization opens the door to a new and unexpected form of phishing. The capability of
emulating a host in a completely transparent manner led the way to malicious programs that
are designed to extract sensitive information from the guest.
Virtualization raises abstraction. Abstraction pertains to hiding of the inner details from a
particular user. Virtualization helps in enhancing or increasing the capability of abstraction.
Virtualization enables sharing of resources much easily, it helps in increasing the degree of
hardware level parallelism, basically, there is sharing of the same hardware unit among
different kinds of independent units.
In protection ring architecture, the rings are arranged in hierarchical order from ring 0 to ring 3.
The Ring 0 contains the programs that are most privileged, and ring 3 contains the programs
that are least privileged.
In a bare metal architecture, one hypervisor or VMM is actually installed on the bare metal
hardware. There is no intermediate OS existing over here. The VMM communicates directly
with the system hardware and there is no need for relying on any host OS.
The para-virtualization works differently from the full virtualization. It doesn’t need to simulate
the hardware for the VMs. The hypervisor is installed on a physical server (host) and a guest OS
is installed into the environment.
The software-assisted full virtualization is also called as Binary Translation (BT) and it
completely relies on binary translation to trap and virtualize the execution of sensitive, non-
virtualizable instructions sets.
Memory virtualization is an important resource virtualization technique. In the 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.
Keywords
Virtualization: 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.
Hardware-assisted full virtualization: Hardware-assisted full virtualization eliminates the
binary translation and directly interrupts with hardware using the virtualization technology
which has been integrated on X86 processors since 2005.
Data Virtualization: Data virtualization offers the ability to retrieve the data without
knowing its type and the physical location where it is stored.
Application Virtualization: Application virtualization is the enabling technology for SaaS of
cloud computing that offers the ability to the user to use the application without the need to
install any software or tools in the machine.
Memory Virtualization: It involves the process of providing a virtual main memory to the
VMs is known as memory virtualization or main memory virtualization.
229
Page 15 of 32
Notes
Dr. Tarandeep Kaur, Lovely Professional University Unit 11: Virtual Machine
Objectives
After this lecture, you will be able to,
Introduction
A software that creates a virtualized environment between the computer platform and the end-user in
which the end user can operate software. It provides an interface identical to the underlying bare
hardware. The Operating System (OS) creates the illusion of multiple processes, each executing on its
own processor with its own (virtual) memory.Virtual machines are “an efficient, isolated duplicate of a
real machine”- Popek and Goldberg. Popek and Goldberg introduced conditions for computer
architecture to efficiently support system virtualization.
Virtual machine is a software that creates a virtualized environment between the computer platform
and the end user in which the end user can operate software. The concept of virtualization applied to
the entire machine involves:
233
Page 16 of 32
Notes
Cloud Computing
11.1 Virtualization
In computing, virtualization or virtualisation is the act of creating a virtual (rather than actual) version
of something, including virtual computer hardware platforms, storage devices, and computer network
resources.Virtualization began in the 1960s, as a method of logically dividing the system resources
provided by mainframe computers between different applications. Since then, the meaning of the term
has broadened.Virtualization technology has transformed hardware into software. It allows to run
multiple Operating Systems (OSs) as virtual machines.Each copy of an operating system is installed in
to a virtual machine.
You can see a scenario (Figure 2), we have a VMware hypervisor that is also called as a Virtual Machine
Manager. On a physical device, a VMware layer is installed out and, on that layer, we have six OSs that
are running multiple applications over there, these can be the same kind of OSs or these can be the
different kinds of OSs in it.
Why Virtualize
1. Share same hardware among independent users- Degrees of Hardware parallelism increases.
234
Page 17 of 32
Notes
2. Reduced Hardware footprint through consolidation- Eases management and energy usage.
3. Sandbox/migrate applications- Flexible allocation and utilization.
4. Decouple applications from underlying Hardware- Allows Hardware upgrades without impacting
an OS image.
Virtualization enables sharing of resources much easily, it helps in increasing the degree of hardware
level parallelism, basically, there is sharing of the same hardware unit among different kinds of
independent units, if we say that we have the same physical hardware and on that physical hardware,
we have multiple OSs. There can be different users running on different kind of OSs. Therefore, we
have a much more processing capability with us. This also helps in increasing the degree of hardware
parallelism as well as there is a reduced hardware footprint throughout the VM consolidation. The
hardware footprint that is overall hardware consumption also reduces out the amount of hardware that
is wasted out that can also be reduced out. This consequently helps in easing out the management
process and also to reduce the amount of energy that would have been otherwise consumed out by a
particular hardware if we would have invested in large number of hardware machines would have
been used otherwise. Virtualization helps in sandboxing capabilities or migrating different kinds of
applications that in turn enables flexible allocations and utilization of the resources. Additionally, the
decoupling of the applications from the underlying hardware is much easier and further aids in
allowing more and more hardware upgrades without actually impacting any particular OS image.
Virtualization raises abstraction. Abstraction pertains to hiding of the inner details from a particular
user. Virtualization helps in enhancing or increasing the capability of abstraction. It is very similar to
how the virtual memory operates. It helps to access the larger address spaces physical memory
mapping is actually hidden by an OS with the help of paging. It can be similar to hardware emulators
where codes are allowed on one architecture to run on a different physical device such as virtual
devices central processing unit, memory or network interface cards etc. No botheration is actually
required out regarding the hardware details of a particular machine. The confinement to the excess of
hardware details helps in raising out the abstraction capability through virtualization.
Basically, we have certain requirements for virtualization, first is the efficiency property. Efficiency
means that all innocuous instructions are executed by the hardware independently. Then, the resource
control property means that it is impossible for the programs to directly affect any kind of system
resources. Furthermore, there is an equivalence property that indicates that we have a program which
has a virtual machine manager or hypervisor that performs in a particular manner, indistinguishable
from another program that is running on it.
o Each VM has its own set of virtual hardware (e.g., RAM, CPU, NIC, etc.) upon which an operating
system and applications are loaded.
235
Page 18 of 32
Notes
Cloud Computing
o OS sees a consistent, normalized set of hardware regardless of the actual physical hardware
components.
Partitioning
o Multiple applications and OSs can be supported within a single physical system.
o There is no overlap amongst memory as each Virtual Memory has its own memory space.
Isolation
o VMs are completely isolated from host machine and other VMs. If a VM crashes, all others are
unaffected.
o Data does not leak across VMs.
Identical Environment
o VMs can have a number of discrete identical execution environments on a single computer, each of
which runs an OS.
Other VM Features
o Each VM has its own set of virtual hardware (e.g., RAM, CPU, NIC, etc.) upon which an operating
system and applications are loaded.
o OS sees a consistent, normalized set of hardware regardless of the actual physical hardware
components.
o Host system resources are shared among the various VMs. For example, if a host system has 8GB
memory where VMs are running, this amount will be shared by all the VMs, depending upon the
size of the allocation.
o One of the best features of using Virtual machines is we can run multiple OSs/VMs in parallel on
one host system.
o VMs are isolated from one another, thus secure from malware or threat from any other
compromised VM running on the same host.
o Direct exchange of data and mutual influencing are prevented.
o Transfer of VMs to another system can be implemented by simply copying the VM data since the
complete status of the system is saved in a few files.
o VMs can be operated on all physical host systems that support the virtualization environment
used.
236
Page 19 of 32
Notes
Process Virtual Machines: These are also known as Application VM (Figure 4). The virtualization
below the API or ABI, providing virtual resources to a single process executed on a machine is called as
the process virtualization. It is created for the process alone, destroyed when process finishes.
Figure 4: Process VM
Multiprogrammed Systems: Each application is given effectively separate access to resources, managed
by the OS.
Emulators and Translators:
o Cross-platform compatibility.
o Programs written for an abstract machine, which is mapped to real hardware through a VM.
Sun Micro systems Java VM
Microsoft Common Language Infrastructure, .NET framework.
System Virtual Machines: These correspond to the virtualized hardware below the ISA. The single host
can run multiple isolated OSs (Figure 5). The servers running different OSs but in isolation between
concurrent systems. The hardware managed by the Virtual Machine Manager (VMM).Classically, the
237
Page 20 of 32
Notes
Cloud Computing
VMM runs on bare hardware, directly interacting with resources. It intercepts and interprets guest OS
actions.
238
Page 21 of 32
Notes
Isolated environment provided by VMs- If you are a tester or security analyst then VMs will be a
good idea to run multiple applications and services in an isolation using VMs because they do not affect
each other.
Easy to Backup and Clone- All the VMs are stored on the physical hard drive of our host or physical
machine in the file format. Thus, they can be easily back up, moved, or cloned in real-time is one of the
popular benefits we get from running a virtual machine.
Faster Server Provisioning- VMs are easy to install, eliminating the cumbersome and time-
consuming installation of applications on servers. For example, if you want a new server to run some
application then it is very easy and fasts to deploy pre-configured VM templates instead of installing a
new server OS on a physical machine. The same goes for cloning existing applications to try something
new.
Beneficial in Disaster Recovery- As VM doesn’t depend upon the underlying hardware, thus they
are independent of the hardware or CPU model on which it is running. Hence, we can easily replicate
VMs to cloud or offsite, so in some disaster situations, it would be easy to recover and get online in less
span of time as we don’t need to care for some particular server manufacturer or server model.
Use Older Applications for a Longer Time- Well, still many companies are using old applications
but crucial to them and couldn’t support modern hardware or operating system. In such situations,
even the company wants, the IT would never prefer to touch them. However, we can pack such
applications in a VM with the compatible old operating system and old virtual hardware. In this way, it
will be possible to switch to modern hardware while keeping the old software stack intact.
Virtual Machine is Easily Portable- A single server running with some particular operating system
software is not easy to move from one place to another, whereas if we have virtualized the same, then it
becomes very easy to move data and OS from one physical server to another, situated somewhere else
with the minimal workforce and without heavy transportation requirements.
Better Usage of Hardware Resources- Our modern computer or server hardware is quite powerful,
using a single operating system and a couple of applications can’t churn out the maximum juice of it.
Thus, using VMs not only efficiently use the power of the CPU but allows the companies to save
hundreds of bucks from spending on hardware.
Made Cloud Computing Possible- Yes, without VMs there will be no cloud computing because the
whole idea behind it to provide an instant provision of machines running either Windows or Linux OS;
it is only possible with the help of pre-build templates ready to deploy as VMs on some remote data
center hardware. For example, Digital Ocean, AWS, and Google Cloud. So, next time whenever you
heard “Cloud hosting” or “Virtual Private Server” hosting, remember it is a VM running on data center
hardware.
239
Page 22 of 32
Notes
Cloud Computing
11.4 Hypervisors
VMs are widely used instead of physical machines in the IT industry today. The VMs support green IT
solutions, and its usage increases resource utilization, making the management tasks easier. Since the
VMs are mostly used, the technology that enables the virtual environment also gets attention in
industries and academia. 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.Hypervisors are also called as Virtual Machine Manager (VMM)
(Figure 6). These are the key drivers in enabling virtualization in cloud data centers. Different
hypervisors are being used in the IT industry. Some of the examples are VMware, Xen, Hyper-V, KVM,
and OpenVZ.
The virtual infrastructure means virtual CPUs (vCPUs), virtual memory, virtual NICs (vNICs), virtual
storage, and virtual I/O devices. The fundamental element of hardware virtualization is the hypervisor,
or VMM that helps to recreate a hardware environment in which Guest Operating Systems (OSs) are
installed.
There are three main modules, dispatcher, allocator, and interpreter, coordinate their activity in order to
emulate the underlying hardware. The dispatcher constitutes the entry point of the monitor and
reroutes the instructions issued by the virtual machine instance to one of the two other modules. The
allocator is responsible for deciding the system resources to be provided to the VM: whenever a virtual
machine tries to execute an instruction that results in changing the machine resources associated with
that VM, the allocator is invoked by the dispatcher. The interpreter module consists of interpreter
routines. These are executed when ever a VM executes a privileged instruction: a trap is triggered and
the corresponding routine is executed.
The design and architecture of a VMM, together with the underlying hardware design of the host
machine, determine the full realization of hardware virtualization, where a guest OS can be
transparently executed on top of a VMM as though it were run on the underlying hardware.
The criteria that need to be met by a VMM to efficiently support virtualization were established by
Goldberg and Popekin 1974. The three properties have to be satisfied:
240
Page 23 of 32
Notes
o Equivalence: A guest running under the control of a virtual machine manager should exhibit the
same behavior as when it is executed directly on the physical host.
o Resource control: VMM should be incomplete control of virtualized resources.
o Efficiency: A statistically dominant fraction of the machine instructions should be executed
without intervention from the VMM.
Before the 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.
Types of Hypervisors
Hypervisors are generally classified into two categories :
Type I Hypervisors run directly on top of the hardware. Therefore, they take the place of the OSs and
interact directly with the ISA interface exposed by the underlying hardware, and they emulate this
interface in order to allow the management of guest OSs. These are also called a native VM since it runs
natively on the hardware. The other characteristics of Type I hypervisors include:
o Can run and access physical resources directly without the help of any host OS.
o Additional overhead of communicating with the host OS is reduced and offers better efficiency
when compared to type 2 hypervisors.
o Used for servers that handle heavy load and require more security.
o Examples- Microsoft Hyper-V, Citrix XenServer, VMWare ESXi, and Oracle VM Server for
SPARC.
241
Page 24 of 32
Notes
Cloud Computing
Type II Hypervisors require the support of an operating system to provide virtualization services
(Figure 9). This means that they are programs managed by the OS, which interact with it through the
ABI and emulate the ISA of virtual hardware for guest OSs.This type of hypervisor is also called a
hosted or embedded VM since it is hosted within an OS (Figure 10). Hosted virtualization requires the
host OS and does not have direct access to the physical hardware. The host OS is also known as
physical host, which has the direct access to the underlying hardware. However, 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.Examples- VMWare Workstation and Oracle Virtualbox.
242
Page 25 of 32
Notes
o Type 0 Hypervisors- Hardware-based solutions that provide support for virtual machine creation
and management via firmware. Example: IBM LPARs and Oracle LDOMs are examples.
o Type 1 Hypervisors- Operating-system-like software built to provide virtualization. Example:
Including VMware ESX, JoyentSmartOS, and Citrix XenServer.
o Type 1 Hypervisors– Also includes general-purpose operating systems that provide standard
functions as well as VMM functions. Example: Microsoft Windows Server with HyperV and
RedHat Linux with KVM.
o Type 2 Hypervisors- Applications that run on standard OSs but provide VMM features to guest
OSs. Example: VMware Workstation and Fusion, Parallels Desktop, and Oracle VirtualBox.
Other Variations Include:Much variation exists due to breadth, depth and importance of virtualization in
modern computing.
Para Virtualization- Technique in which the guest operating system is modified to work in
cooperation with the VMM to optimize performance.
Programming-environment Virtualization- VMMs do not virtualize real hardware but instead create an
optimized virtual system. It is used by Oracle Java and Microsoft.Net.
Emulators– Allow applications written for one hardware environment to run on a very different
hardware environment, such as a different type of CPU.
Application Containment- Not virtualization at all but rather provides virtualization-like features by
segregating applications from the operating system, making them more secure, manageable. It is
included in Oracle Solaris Zones, BSD Jails, and IBM AIX WPARs.
Xen
An open-source initiative implementing a virtualization platform based on paravirtualization. Xen is a
VMM for IA-32 (x86, x86-64), IA-64 and PowerPC 970 architectures. It allows several guest OSs to be
executed on the same computer hardware concurrently. It was initially created by University of
Cambridge, Computer Laboratory and is now developed and maintained by Xen community as free
software, as well as Citrix XenServer Commercial version variant. It is the central part of Amazon.com's
cloud computing platform, EC2 (Elastic Compute Cloud) that allows the users to rent virtual computers
on which to run their own computer applications.
Xen-based technology is used for either desktop virtualization or server virtualization, and recently it
has also been used to provide cloud computing solutions by means of Xen Cloud Platform
(XCP).Recently Xen has been advanced to support full virtualization using hardware-assisted
virtualization. The most popular implementation of paravirtualization, which, in contrast with full
virtualization, allows high performance execution of guest OSs. This is made possible by eliminating
the performance loss while executing instructions that require special management.This is done by
243
Page 26 of 32
Notes
Cloud Computing
modifying portions of the guest OSs run by Xen with reference to the execution of such
instructions.Therefore, it is not a transparent solution for implementing virtualization. This is
particularly true for x86, which is the most popular architecture on commodity machines and servers.
Xen Architecture
Figure 11 depicts the Xen architecture consisting of three different layers as discussed below:
o Hardware or Physical Layer: Physical hardware components including memory, CPU, network
cards, and disk drives.
o Hypervisor Layer: Thin layer of software that runs on top of the hardware. The Xen hypervisor
gives each virtual machine a dedicated view of the hardware.
o Virtual Machine Layer: OS hosted on the hypervisor and appearing to the user as a separate
physical computer. However, the machine shares physical resources with other virtual machines,
and it is portable because the virtual machine is abstracted from the physical hardware.
A Xen-based system is managed by the Xen hypervisor, which runs in the highest privileged mode and
controls the access of guest OS to the underlying hardware. Guest OSs are executed within domains,
which represent VM instances. Moreover, specific control software, which has privileged access to the
host and controls all the other guest OSs, is executed in a special domain called Domain 0. This is the
first one that is loaded once the VMM has completely booted, and it hosts a Hyper Text Transfer
Protocol (HTTP) server that serves requests for VM creation, configuration, and termination. This
component constitutes the embryonic version of a distributed VMM, which is an essential component
of cloud computing systems providing Infrastructure-as-a-Service (IaaS) solutions.
244
Page 27 of 32
Notes
KVM has all these components because it’s part of the Linux kernel.
Every VM is implemented as a regular Linux process, scheduled by the standard Linux scheduler,
with dedicated virtual hardware like a network card, graphics adapter, CPU(s), memory, and disks.
Implementing KVM
You have to run a version of Linux that was released after 2007 and it needs to be installed on X86
hardware that supports virtualization capabilities. If both of those boxes are checked, then all you have
to do is load 2 existing modules (a host kernel module and a processor-specific module), an emulator,
and any drivers that will help you run additional systems.But implementing KVM on a supported
Linux distribution—like Red Hat Enterprise Linux—expands KVM's capabilities, letting you swap
resources among guests, share common libraries, optimize system performance, and a lot more.
KVM Features
Security- KVM uses a combination of security-enhanced Linux (SELinux) and secure virtualization
(sVirt) for enhanced VM security and isolation. SELinux establishes security boundaries around VMs.
sVirt extends SELinux’s capabilities, allowing Mandatory Access Control (MAC) security to be applied
to guest VMs and preventing manual labeling errors.
Storage- KVM is able to use any storage supported by Linux, including some local disks and network-
attached storage (NAS). Multipath I/O may be used to improve storage and provide redundancy. KVM
also supports shared file systems so VM images may be shared by multiple hosts. Disk images support
thin provisioning, allocating storage on demand rather than all up front.
Hardware Support- KVM can use a wide variety of certified Linux-supported hardware platforms.
Because hardware vendors regularly contribute to kernel development, the latest hardware features are
often rapidly adopted in the Linux kernel.
Memory Management- KVM inherits the memory management features of Linux, including non-
uniform memory access and kernel same-page merging. The memory of a VM can be swapped, backed
by large volumes for better performance, and shared or backed by a disk file.
Live Migration- KVM supports live migration, which is the ability to move a running VM between
physical hosts with no service interruption. The VM remains powered on, network connections remain
active, and applications continue to run while the VM is relocated. KVM also saves a VM's current state
so it can be stored and resumed later.
Performance and Scalability- KVM inherits the performance of Linux, scaling to match demand
load if the number of guest machines and requests increases. KVM allows the most demanding
application workloads to be virtualized and is the basis for many enterprise virtualization setups, such
as data centers and private clouds (via OpenStack®).
Scheduling and Resource Control- In the KVM model, a VM is a Linux process, scheduled and
managed by the kernel. The Linux scheduler allows fine-grained control of the resources allocated to a
Linux process and guarantees a quality of service for a particular process. In KVM, this includes the
completely fair scheduler, control groups, network name spaces, and real-time extensions.
Lower Latency and Higher Prioritization- The Linux kernel features real-time extensions that
allow VM-based apps to run at lower latency with better prioritization (compared to bare metal). The
kernel also divides processes that require long computing times into smaller components, which are
then scheduled and processed accordingly.
VMware
VMware Workstation is the most dependable, high-performing, feature-rich virtualization platform for
your Windows or Linux PC (Figure 12 and Figure 13). It allows one physical PC to run multiple
operating systems at the same time. Actually, no restarting or hard-drive partitioning is required. The
software developers rely on workstation to develop and test client-server, Web and cloud applications
in a replica of their production environments.
245
Page 28 of 32
Notes
Cloud Computing
VMware’s technology is based on the concept of full virtualization, where the underlying hardware is
replicated and made available to the guest OS, which runs unaware of such abstraction layers and does
not need to be modified.VMware implements full virtualization either in the desktop environment, by
means of Type II hypervisors, or in the server environment, by means of Type I hypervisors. In both
cases, full virtualization is made possible by means of direct execution (for non sensitive instructions)
and binary translation (for sensitive instructions), thus allowing the virtualization of architecture such
as x86. Besides these two core solutions, VMware provides additional tools and software that simplify
the use of virtualization technology either in a desktop environment, with tools enhancing the
integration of virtual guests with the host, or in a server environment, with solutions for building and
managing virtual computing infrastructures.
246
Page 29 of 32
Notes
o Create VMs that are encrypted, block USB devices and have read-only settings.
Virtual Box
It is a powerful x86 and AMD64/Intel64 virtualization product for enterprise as well as home use. An
extremely feature rich, high performance product for enterprise customers also, the only professional
solution that is freely available as Open Source Software under the terms of the GNU General Public
License (GPL) version 2. Presently, it runs on Windows, Linux, Macintosh, and Solaris hosts and
supports a large number of guest OSs including but not limited to Windows (NT 4.0, 2000, XP, Server
2003, Vista, Windows 7, Windows 8, Windows 10), DOS/Windows 3.x, Linux (2.4, 2.6, 3.x and 4.x),
Solaris and OpenSolaris, OS/2, and OpenBSD.
Oracle VM VirtualBox-
Microsoft Hyper-V
Hyper-V is a primary engine that drives Windows Server 2008 “beyond virtualization” initiative. The
primary responsibility of Windows Server 2008 Hyper-V is to provide the tool kit that organizations
will use to create a shared pool of compute, network, and storage resources where servers and
applications can be virtualized for consolidation, scalability, and mobility purposes.
o Parent partition (also called the root partition) is the only one that has direct access to the
hardware. It runs the virtualization stack, hosts all the drivers required to configure guest OSs,
and creates child partitions through the hypervisor.
o Child partitions are used to host guest OSs and do not have access to the underlying hardware,
but their interaction with it is controlled by either the parent partition or the hypervisor itself.
Hypervisor is the component that directly manages the underlying hardware (processors and memory).
It is logically defined by the following components:
247
Page 30 of 32
Notes
Cloud Computing
Hyper calls Interface: This is the entry point for all the partitions for the execution of sensitive
instructions. This is an implementation of the Para virtualization approach discussed with Xen. This
interface is used by drivers in the partitioned OS 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
itsaccessfrompartitions.Byleveraginghardware-assistedvirtualization,thehypervisor 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,whichmanagesthesignalscoming from the underlyinghardwarewhensomeevent 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 OS.
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.
248
Page 31 of 32
Notes
Summary
Virtualization raises abstraction. Abstraction pertains to hiding of the inner details from a particular
user. Virtualization helps in enhancing or increasing the capability of abstraction.
Virtualization enables sharing of resources much easily, it helps in increasing the degree of
hardware level parallelism, basically, there is sharing of the same hardware unit among different
kinds of independent units.
In a bare metal architecture, one hypervisor or VMM is actually installed on the bare metal
hardware. There is no intermediate OS existing over here. The VMM communicates directly with
the system hardware and there is no need for relying on any host OS.
Type I Hypervisors run directly on top of the hardware. Therefore, they take the place of the OSs
and interact directly with the ISA interface exposed by the underlying hardware, and they emulate
this interface in order to allow the management of guest OSs.
Type II Hypervisors require the support of an operating system to provide virtualization services.
This means that they are programs managed by the OS, which interact with it through the ABI and
emulate the ISA of virtual hardware for guest OSs.
Xen is an open-source initiative implementing a virtualization platform based on paravirtualization.
Xen is a VMM for IA-32 (x86, x86-64), IA-64 and PowerPC 970 architectures.
KVM is part of existing Linux code, it immediately benefits from every new Linux feature, fix, and
advancement without additional engineering. KVM converts Linux into a type-1 (bare-metal)
hypervisor.
VMware Workstation is the most dependable, high-performing, feature-rich virtualization platform
for your Windows or Linux PC.
Keywords
Virtualization: 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.
Type 0 Hypervisors- Hardware-based solutions that provide support for virtual machine creation
and management via firmware. Example: IBM LPARs and Oracle LDOMs are examples.
Type 1 Hypervisors- Operating-system-like software built to provide virtualization. Example:
Including VMware ESX, JoyentSmartOS, and Citrix XenServer. It also includes general-purpose
operating systems that provide standard functions as well as VMM functions. Example: Microsoft
Windows Server with HyperV and RedHat Linux with KVM.
Type 2 Hypervisors- Applications that run on standard OSs but provide VMM features to guest
OSs. Example: VMware Workstation and Fusion, Parallels Desktop, and Oracle VirtualBox.
Interpretation: Interpretation involves relatively inefficient instruction-at-a-time.
Binary Translation: Binary translation involves block-at-a-time optimization for repeated.
249
Page 32 of 32