0 ratings0% found this document useful (0 votes) 488 views22 pagesCloudComputing Unit 2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
i
UNIT II
Virtualization Basics
Syllabus
Virtual Machine Basics - Taxonomy of Virtual Machines - Hypervisor - Key Concepts -
Virtualization structure - Implementation levels of virtualization - Virtualization Types : Full
Virtual n - Para Virtualization - Hardware Virtualization - Virtualization of CPU, Memory and
W/O devices.
iG Contents
2.1 Virtual Machine Basics
2.2 Taxonomy of Virtual Machines Dec.-21,22, Marks 13
2.3 Hypervisor
2.4 Implementation Levels of Virtualization
Dec.-21, Marks 13
2.5 Virtualization Types : Full Virtualization
2.6 Two Marks Questions with Answers
(2-1)Cloud Computing
Virtual Machine Basics
eet ieceer ea) ote |
i Fe 214 Virtual machine
Virtualization
Virtual Machine (VM) is a virtual environment that functions as a
computer system with its own CPU, memory, network interface, and sto,
created on a physical hardware system.
‘A Virtual machine is a software construct that mimics the characteristics of
physical server.
A Virtual Machine (VM) is a software program or operating system that not only
exhibits the behavior of a separate computer, but is also capable of |
tasks such as running applications and programs like a separate computer.
In a pure virtual machine architecture the operating system gives each process tl
illusion that it is the only process on the machine. The user writes an application
as if only its code were running on the system.
Each user interacts with the computer by typing commands to the virtual machine
on a virtual system console and receiving results back from the machine as soon
as they are computed.
Each user directs the virtual machine to perform different commands. These
commands are then executed on the physical machine in a multiprogramming
environments.
Virtualization is an abstraction layer that decouples the physical hardware from
the operating system to deliver greater IT resource utilization and flexibility.
It allows multiple virtual machines, with heterogeneous operating systems to rut
in isolation, side-by-side on the same physical machine.
Fig. 2.1.1 shows virtual machine.
Applications | Applications | Applications
Windows Unix Linux
Virtual Virtual Virtual
hardware | hardware | hardware
‘i Virtual
Pplications | srdware | Applications
Operating system |
Hardware
CCPU, Memory , Secondary storage2-2 Virtualization
eI Virtual Machine Basics
* Virtual Machine (VM) is a virtual environment that functions as a
with its own CPU, memory, network interface, and sto,
ysical hardware system.
A Virtual is a software construct that mimics the characteristics of
physical serve
* A Virtual Machine (VM) is a software program or operating system that not only
exhibits the behavior computer, but is also capable of performing
tasks such as running ret ions and programs like a separate computer.
In a pure virtual machine architecture the operating system gives each process the
illusion that it is the only process on the machine. The user writes an application
as if only its code were running on the system.
Each user interacts with the computer by typing commands to the virtual machine
on a virtual system console and receiving results back from the machine as soon
as they are computed.
Each user directs the virtual machine to perform
ds. These
commands are then executed on the physical machine in a multiprogramming
environments.
¢ Virtualization is an bso layer that decouples the physical hardware from
the operating system to deliver greater IT resource utilization and fle
ibility.
It allows multiple virtual machines, with heterogene
‘Ous operating systems to run
in isolation, side-by-side on the same physical machi
ine.
* Fig. 2.1.1 shows virtual machine.
Applications | Applications | Applications
Windows Unix Linux
Virtual Virtual Virtual
hardware | hardware | hardware
1
Applications eae Applications
Operating system
Hardware
CCPL. Memory , Secondary storage
Fig,
2.4.4 Virtual machine
TECHNICAL PUB), ICATIONS®
> AN UD-thrst for JensCloud Computing 2-3 Virtualization Basics
Benefits :
1, There is no overlap amongst memory as each Virtual Memory has its own
memory space.
2, Virtual machines are completely isolated from the host machine and other virtual
machines,
Data does not leak across virtual machines.
»
Can use multiple operating system environments on the same computer
ae
The cost reduction is possible using small virtual servers on a more powerful
single server.
Disadvantages :
1. Virtual machines =lliidigienathanasasiamaslines because they: access the
hardware indirectly.
2. A virtual machine can be infected with the weaknesses of the host machine
3. Difficulty in direct access to hardware, for example, specific cards or USB devices
4. Great use of disk space, since it takes all the files for each operating system
installed on each virtual machine.
EA Taxonomy of Virtual Machines
User Application
Host operating system
* Virtualization is a broad term that refers to
ss many,
‘he (nani alli"
aspects of computing. For our purposes :
One physical machine to support multiple
Computer Hardware
virtual machines that run in parallel.
+ Virtualization is or = ,
(a) Before virtualizat
methodology of dividing the resources of ®) vinualizeiien
computer into. multiple execution
environments Application
+ Virtualization is an abstraction layer that
Guest OS Guest OS
decouples the physical hardware from the
erating syste to deliver greater IT Computer Computer
peer ene § hardware hardware
resource utilization and flexibility.
* It allows multiple virtual machines, with iilization layer (Hceq Sea
ge is ‘a g systems to run in
eletos enous Operating vere Hardware running the host OS
isolation, side-by-side on the same physical
machine.
* Fig, 221 shows before and after
virtualization.
(b) After virtualization
Fig. 2.2.4
TECHNICAL PUBLICATIONS® - an up-thrust for knowledgeCloud Computing
ple machines on a single hardware.
ing multiple machines on
running
¢ Virtualization means sees an abstracted out
" nl
hardware invisible to operating eae Rhee
Only Virtual Machine Monitor (VMM) ta!
er | characteristics of computin,
* It is "a technique for hiding the physical charac 4 8
applications, or end users intera,
from the way in which other systems, app ct
those resources. ;
* This includes making a single physical resource appear to function as my
logical resources; or it can include making multiple physical resources appegy al
single logical resource."
* Itis divided into two main categories :
1. Platform virtualization involves the simulation of virtual machines,
2. Resource virtualization involves the simulation of combined, fragmented q
simplified resources.
* Fig. 22.2 shows taxonomy of virtualization.
(anneee)) (Geta
eo) fs
rl Emulation Application
= | :
ia Process level igh-Level Vb Programming |
[environment] 7 5 level High-Level vei ] cal
-—
[—]@ Storage |
Operating system
Virtualization
Sey Network
SemEaeE
ae eancad
Pies
Full virtualization
oa
System level Hi [tome |
Paravirtualiztion
zz
Partial virtualization
alization
Virtuali
Hzation is mainl
network. Execution ae fo emulate execution environment, storage
system levey nment classified into two types andCloud Computing 2-5 Virtualization Basics
* Process level is implemented on top of an existing operating system.
* System level is implemented directly on hardware and do not or minimum
requirement of existing operating system.
EEA Difference between Virtualization and Cloud Computing
Sr. No. Virtualization Cloud Computing
i Virtualization is t 2 Cloud computing means storing and
virtual environment on an e er x and programs over the
to run your desired program, without tead of your computer's hard
interfering with any of the other services drive.
provided by the server or host platform
to other users. |
2: tel machine s ona eae of virtual machine is on any
3. Instance storage is persistent. Instance storage is shortly lived.
4. Virtualization uses customizable VM Cloud computing uses standard VM
resource like CPU and RAM. resource like CPU and RAM
Si Recovery from failures: attempt to recover Recovery from failures : Discard instance
failed VM. spin up new one.
EEZ2Z] Pros and Cons of Virtualization
a) Pros
1 ter and energy-efficiency savings : As companies reduce the size of their
hardware and server footprint, they lower their energy consumption
2. Operational expenditure savings : Once servers are virtualized, your IT staff can
greatly reduce the ongoing administration and management of manual work,
duced costs : It reduced cost of IT infrastructure.
Data does not leak across virtual machine.
aoe
Virtual machine is completed isolated from host machine and other virtual
machine.
2
Simplifies resource management by pooling and sharing resources
7. Significantly reduce downtime.
8. — performance of IT resources
b) Cons
1. Not all hardwaré|6# Sofware can be virtualized.
2.Not all servers are applications are specifically designed to
Virtualization-friendly.
©
TECHNICA! PUIRLICATIONS® an uncthrict far bnnntartnnoe Virtualization
Cloud Computing
1. Outline the various levels of virtualization with an example for each category.
DELS
2, What is virtualization ? List the various levels of virtualization ? Explain
CEL
EER] Hypervisor
¢ In computing, ion platform that allows multiple
operating systems to run on a at the same time. The term usually
refers to an entation using full virtualization.
* A hypervisor is a software la physical hardware, which allows
splitting the physical machine into many virtual machines. This allows multiple
‘operating systems to be run simultaneously on the same physical hardware
© The operating system installéd on thé Virtual machine is called a guest OS, and is
sometimes also called)anvinstance. The hardware the hypervisor runs on is called
the host machine.
* A hypervisor management console, which is also called a virtual machine manager
(VMM), is computer software that enables easy management of virtual machines,
* Hypervisors are currently classified in two types type 1 and type 2
EEE] Type 1
* Type 1 hypervisor is software that runs directly Onsangiven|hardwarellplatform. 4
‘ai operating system thus runs at the second level above the hardware.
* Fig. 2.3.1 shows Type 1 hypervisor.
=
al
a
= ===> =,
=
Hardware Hypervisor
Fig. 2.3.1 Type 1 hypervisor
TECHNICAL PUBLICATIONS®
aieee Je Virtualization Basics
+ Type VMs have no SR. system because they are installed on a bare
system. An operating system running on a Type 1 VM is a full virtualization
because it is a complete simulation of the hardware that it is running on.
. nE 1 hypervisor is also called a native or bare-metal hypervisor that is installed
directly on the hardware, which splits the hardware into several virtual machines
where we can install guest operating systems.
« Virtual machine management software helps to manage this hypervisor, which
allows guest OSes to be moved automatically between physical servers based on
current resources requirements.
* It is completely independent from the Operating System.
« The hypervisor is small as its main task is sharing and managing hardware
resources between different operating systems.
¢ A major advantage is that any problems in one virtual machine or guest operating
system do not affect the other guest operating systems running on the hypervisor.
ERY] Type 2 Hypervisor
* This is also known as Hosted:Hypervisor,
e In this case, the
other ieee, above it.
« It is completely dependent on ‘host Operating System for its operations. Fig. 2.3.2
shows type 2 hypervisor.
or is installed on an operating system and then supports
os.
A
$
Hardware Hypervisor ey
Fig. 2.3.2 Type 2 Hypervisor
* While having a b 1m allows better specification of policies, any
problems in thi rating system affects the entire system as well even if the
hypervisor running above the base OS is secure
TECHNICAL PUBLICATIONS® - an up-thrust for knowledgeVirtualization
loud Computing 2-8 Basie
« Type 2 hypervisors don't support SO care
required when allocating resources to virtual machines
* This is why we call type 2 hypervisors ‘hosted hypervisors. As opposed to type 1
hypervisors that run directly on the hardware, hosted hypervisors have one
software layer underneath. What we have in this case is :
1. A physical machine.
2, An operating system installed on the hardware (Windows, Linux, MacOS).
3. A type 2 hypervisor software within that operating system.
4, The actual instances of guest virtual machines.
© Type 2 hypervisors are typically found in environments with a small number of
servers. Type 2 hypervisors are convenient for testing new software and research
projects.
EEE] Paravirtualization
+ Paravirtualization is ipieiniaeie a guest operating system
(0S) is recompiled, installe thine (VM), and operated on top
of « hygapigamanmnemmmemangigs othe host OS
¢ Para-virtualization refers to communication between the guest OS and the
hypervisor to improve performance and efficiency.
« Para-virtualization involves modifying the OS kernel to replace non-virtualizable
instructions with hyper-calls that communicate directly with the virtualization
layer hypervisor.
© The hypervisor also provides hyper-call interfaces for other critical kernel
operations such as memory management, interrupt handling and time keeping.
¢ Fig. 2.3.3 shows para-virtualization architecture.
Private | Private | ...., Private
server server server
Operating system
Hardware
Fig. 2.3.3 Para-virtualization architecture
* In Para-virtualization, the virtual machine does not necessarily simulate hardware,
but instead offers a special API that can only be used by modifying the “guest”
OS. This system call to the hypervisor is called a "hypercall” in Xen.
¢ Xen is an open source para-virtualization solution that requires modifications tO
the guest operating systems but achieves near native performance by collaborating
with the hypervisor.
TECHNICAL PUBLICATIONS” an up-thrust for knowledgeSs.
Cloud Computing 2-9 Virtualization Basics
* Microsoft Virtual PC is a para-virtualization virtual machine approach, User-mode
Linux (UML) is another para-virtualization solution that is open source.
« Each guest operating system executes as a process of the host operating system.
Cooperative Linux, is a virtualization solution that allows two operating systems
to cooperatively share the underlying hardware.
Linux-V server is an operating system-level virtualization solution for GNU/Linux
systems with secure isolation of independent guest servers.
« The Linux KVM is virtualization technology that has been integrated into the
mainline Linux kernel . Runs as a single kernel loadable module, a Linux kernel
running on virtualization-capable hardware is able to act as a hypervisor and
support unmodified Linux and Windows guest operating systems.
+ Para-virtualization shares the process with the. guest operating system.
Problems with para-virtualization
1. Para-virtualized systems won't run on native hardware
2. There are many different para-virtualization systems that use different. commands,
etc.
The main difference between full virtualization and paravirtualization in Cloud is
that full virtualization allows multiple guest operating systems to execute on a
host operating system independently while paravirtualization allows multiple guest
operating systems to run on host operating systems while communicating,
erence between Type 1 and Type 2 Hypervisor
Type 1 Hypervisor Type 2 Hypervisor
This is also known as Bare Metal or Embedded — This is also known as Hosted Hypervisor
or Native Hypervisor
It is completely dependent on host Operating
It is ident from the
is completely independe! System for its operations
Operating System
It works directly on the hardware of the host
and can monitor operating systems that run
__ above the hypervisor
In this case, the hypervisor is installed on an
operating system and then supports other
operating systems above it
It support hardware virtualization It support OS virtualization
Examples ESXi Server and Microsoft Examples : Vmware Workstation, Microsoft
ee Virtual PC, Oracle Virtual Box
Hyper-y
| Higher performance and scalability because of — Low performance as a result of host operating
being bare metal type system overhead
TECHNICAL PUBLICATIONS® - an up-thrust for knowledgeCloud Computing 2-10 Virtualization
Implementation Levels of Virtualization
* Virtualization is implemented at various levels :
1. Instruction set architecture level
2. Hardware abstraction level
3. Operating system level
4. Library support level
5. User application level
ESI instruction set Architecture Level
© The definition of the storage resources and the instructions that manipulate daty
are documented in what is referred to as Instruction Set Architecture (ISA).
ISA view of a machine corresponds to the machine and assembly language levels.
For example, MIPS binary code can run on an x86-based host machine with the
help of ISA emulation.
* Instruction set emulation leads to virtual ISAs created on any hardware machine
The basic emulation method is through code interpretation. An_ interpreter
Program interprets the source instructions to target instructions one by one.
¢ The key to virtualize a CPU lies in the execution of the guest instruction,
including both system-level and user-level instructions virtualizing a CPU can
achieved in one two ways
1. Emulation : The only processor vitalization mechanism available when the ISA
of the guest is different from the ISA of the host.
2. Direct native execution : Possible only if the ISA of the host is identical to the
ISA of the guest
* Fig. 24.1 shows ISA emulation
Guest Emulated by Host
Source ISA Target ISA
Fig. 2.4.1 ISA emulation
y yne
+ Emulation is the process of implementing the interface and functionality of q
system (or subsystem) on a system (or subsystem) having different interface #
functionality.
TECHNICAL PUBLICATIONS® an up-thrust for knowledgeCloud Computing 2-11 Virtualization Basics
In other words, emulation allows a machine implementing, one ISA (the target), to
reproduce the behavior of a software compiled for another ISA (the source).
Emulation can be carried out using
1, Interpretation
2. Binary traslation
Hardware Abstraction Level
+ This type of virtualization is performed right on top of the bare hardware. On the
hand, this approach generates a virtual hardware environment for a VM. On the
other hand, the process manages the underlying hardware through virtualization.
* The idea is to virtualizes a computer's resources, such as processors memory, and
devices. The intention is to upgrade the hardware utilization rate by multiple
li
+ The Xen hypervisor has been applied to virtualize X86:based machines to run
Linux or other guest OS applications
EZE Operating System Level Virtualization
© Operating-system-level virtualization is a server-virtualization method where the
kernel of an operating system allows for multiple isolated user-space instances,
instead of just one. Such instances, which are sometimes called containers and
software containers.
This refers to an abstraction layer between traditional OS and user applications.
+ This type of virtualization creates isolated containers on a single physical server
and the OS instances to utilize the hard-ware and software in data centers.
* Containers behave like real servers. With containers you can create a portable,
consistent operating environment for development, testing, and deployment.
© This virtualization creates virtual hosting environments to allocates hardware
resources among a large number of mutually distrusting users
+ Operating-system-level virtualization usually imposes little to no overhead,
because programs in virtual partitions use the operating system’
call interface and do not need to be subjected to emulation or be run in an
‘s normal system
intermediate virtual machine.
* Operating system-level virtualization is not as flexible as other virtualization
approaches since it cannot host a guest operating system different from the host
one, or a different guest kernel,
TECHNICAL PUBLICATIONS® - an up-thrust for knowledgeVirtualization Ba,
Cloud Computing eels =
run an entire guest OS, container virtualization isolates the
trying t
* Instead of trying to hardware. Instead, you have containers fo,
guests, but doesn’t try to virtualize the
each virtual environment.
* With container-based technologies, you'l
run the virtual environments. The kernel provides pro
resource management.
| need a patched kernel and user tools to
cess isolation and performs
Why operating system level virtualization is required ?
* Operating system level virtualization provides feasible solution for hardware leve|
virtualization issue. It inserts a virtualization layer inside an operating system
to partition a machine's physical resources.
¢ It enables multiple isolated VMs within a single operating system kernel,
This kind of VM is often called a virtual execution environment (VE),
Virtual Private System (VPS), or simply container.
¢ From the user’s point of view, virtual execution environment look like real
servers.
* This means a virtual execution environment has its own set of processes, file
system, user accounts, network interfaces with IP addresses, routing tables,
firewall rules etc
* Although VEs can be customized for different people, they share the
same operating system kernel. Therefore, OS-level virtualization is also called
single-OS image virtualization.
Challenges to cloud computing in OS level virtualization ?
* Cloud computing is transforming the computing landscape by shifting the
hardware and staffing costs of managing a computational center to third
parties.
* Cloud computing has at least two challenges :
1, The ability to use a variable number of physical machines and virtual
machine instances depending on the needs of a problem. For example, @
task may need only a single CPU during some phases of execution but
may need hundreds of CPUs at other times,
- It is related to slow operation of instantiating new virtual machine. Currently’
new virtual machines originate either as fresh boots or as replicates of #
template VM, unaware of the current application state. Therefore,
better support cloud computing, a large amount of research and developmett
should be done.een ee 2-13 Virtualization Basics
‘Advantages of OS virtualization :
1. OS virtualization provide least overhead among all types of virtualization solution.
2. They offer highest performance and highest density of virtual environment.
3, Low resource requirements,
4. High Scalability.
Disadvantage of OS virtualization
1. They support only one operating system as base and guest OS in a single server.
2, It supports library level virtualization.
EZM] Library Support Level
« Library-level virtualization is also known as user-level Application Binary Interface
(ABI).
* This type of virtualization can create execution environments for running alien
programs on a platform rather than creating a VM to run the entire operating
system.
© It is done by API call interception and remapping.
«Virtualization with library interfaces is possible by controlling the communication
link between applications and the rest of a system through APT hooks.
« Example : Wine, WAB, LxRun, Visual MainWin
«Advantage : It has very low implementation effort
Shortcoming and limitation : Poor application flexib
EZEX User Application Level
© Virtualization at the applicatior
traditional OS, an application often runs as a process. Therefore, application-level
con is also known as process-level virtualization.
ility and isolation.
wn level virtualizes an application as a VM. On a
virtualizati
ized application is not installed in the traditional sense, although it
ere. The application behaves at runtime like it is directly
al operating system and all the resources managed by it,
* A fully virtuali
is still executed as if it wi
interfacing with the origin:
.d to varying degrees.
virtualization requires a virtualization layer.
ent normally provided
but can be isolate
Application
* Full application
virtualization layers replace part of the runtime environm
by the operating system. 7
* The layer intercepts all disk operations of virtualized applications and
transparently redirects them to a virtualized location, often a single file.
TECHNICAL PUBLICATIONS® - an up-thrust for knowledgenM __Vituatization g
ee =
it accesses a virtual resource insteag
i ins unaware thal : z of 4
: ences eae application is now working, with one file instead of ee
i .
files spread throughout the system, it becomes easy to run the application on ,
diffe bi computer and previously incompatible applications can be
ifferent
side-by-side,
* The most popular approach is to deploy High Level Language (HLL) VMs, Hery
the virtualization layer sits as an application program on top of the operating
system, and the layer exports an abstraction of a VM that can run programs
written and compiled to a particular abstract machine definition, Any program
written in the HLL and compiled for this VM will be able to run on it
Tun
* Benefits :
1, Application virtualization uses fewer resources than a separate virtual machine,
2. Application virtualization also enables simplified operating, system migrations
3. Applications can be transferred to removable media or between computers
without the need of installing them, becoming portable software
* Limitations :
1, Not all computer programs can be virtualized
2. Lower performance
EBX Virtualization Types : Full Virtualization CORE
© Full Virtualization doesn’t need to modifystheshOst OS; it relies upon. binary
translation to trap and to virtualize certain Sensitive instruction:
¢ Fig. 2.5.1 shows full virtualization,= ee) Virtualization Basics
VMware Workstation applies full virtualization, which uses binary translation to
automatically modify x86 software on-the-fly to replace critical instructions
Normal instructions can run directly on the host OS. This is done to increase the
performance overhead - normal instructions are carried out in the normal manner,
but the difficult and precise executions are first discovered using a trap and
executed in a virtual manner.
This is done to improve the security of the system and also to increase the
performance.
Host based virtualization :
Virtualization implemented in a host computer rather than in a storage subsystem
or storage appliance.
Virtualization can be implemented either in host computers, in storage subsystems
or storage appliances, or in specific virtualization appliances in the storage
interconnect fabric.
The guest OS are installed and run on top of the virtualization layer. Dedicated
applications may run on the VMs. Certainly, some other applications can also run
with the host OS directly.
Advantages of host-based architecture :
1. The user can install this VM architecture without modifying the host OS.
2. The host-based approach appeals to many host machine configurations.
EEX] Memory Virtualization
Memory virtualization features allow abstraction isolation and monitoring of
memory on a per Virtual Machine (VM) basis. These features may also make live
migration of VMs possible, add to fault tolerance, and enhance security,
Example features include Direct Memory Access (DMA) remapping and Extended
Page Tables (EPT), including their extensions: accessed and dirty bits, and fast
switching of EPT contexts
The VMkernel manages all machine memory. The VMkernel dedicates part of this
managed machine memory for its own use. The rest is available for use by virtual
machines
Virtual machines use machine memory for two purposes : each virtual machine
requires its own memory and the VMM requires some memory and a dynamic
overhead memory for its code and data.
The virtual memory space is divided into blocks, typically 4 kB, called pages. The
physical memory is also divided into blocks, also typically 4 kB.
TECHNICAL PUBLICATIONS® - an up-thrust for knowledgeVirtualization
-16
Cloud Computing
‘i that are not pre
ta for virtual pages # Present
sy AN Gee SXi also provides support for lage
When physical memory is : ‘
physical memory are stored on disk. ESX/
pages.
* The VMM is responsible for mapping the guest physical memory to the actu
machine memory.
* Each page table of a guest OS has a page table allocated for it in the VMM_ Te
page table in the VMM which handles all these is called a shadow page table,
* As it can be seen all this process is nested and inter-connected at different level,
through the concerned address.
* If any change occurs in the virtual memory page table or TLB, the shadow page
table in the VMM is updated accordingly.
EEF] 1/0 Virtualization
* I/O Virtualization involves managing of the routing of I/O requests between
virtual devices and shared physical hardware.
* The there are three ways to implement this are full device emulation, para-VZ and
direct 1/0
¢ 1/O virtualization features facilitate offloading of multi-core packet processing to
network adapters as well as direct assignment of virtual machines to virtual
functions, including disk I/O.
vm Host
Applications Virtual Machines
App. App App vM VM vM
Guest OS Fypenvisor
y Butler cache a
* . translation
$ VO scheduler 4 Interposeransforn}
2 a e.g. Log, encrypt
Device driver " /O scheduler
i
Device driver
Lief
Virtual hardware 7. SY Physical hardware
NTC
Emulates
disk device
Fig. 2.5.2 V0 Virtualization
TECHNICA! BLIBY Ina TiAne®loud Computing 2-47 veatusvalen
« Examples include Virtual Machine Device Queues (VMDQ), Single Root I/O
Virtualization.
« Fig. 2.5.2 shows I/O virtualization. (See Fig. 2.5.2 on previous page)
1, Full Device Emulation ; This process emulates well-known and real-world
devices. All the functions of a device or bus infrastructure such as device
enumeration, identification, interrupts etc. are replicated in the software, which
itself is located in the VMM and acts as a virtual device. The I/O requests are
trapped in the VMM accordingly
2. Para-virtualization : This method of I/O VZ is taken up since software
emulation runs slower than the hardware it emulates. In para-VZ, the frontend
driver runs in Domain-U; it manages the requests of the guest OS. The
backend driver runs in Domain-0 and is responsible for managing the real 1/O
devices. This methodology (para) gives more performance but has a higher
CPU overhead.
3. Direct V/O virtualization : This lets the VM access devices directly; achieves
high performance with lower costs. Currently, it is used only for the
mainframes.
EEE] Difference between Full and Para Virtualization
Sr. No. Full Virtualization Para Virtualization
i Full Virtualization relies upon binary Para-Virtualization refers to communication
translation to trap and to virtualize between the guest OS and the hypervisor to
certain sensitive instructions. improve performance and efficiency.
Example : VMware Example : Xen architecture
2 Full Virtualization doesn't need to Para-Virtualization involves modification of
modify the host OS. OS kernel,
3. Normal instructions can run directly on Para-virtualized systems won't run on
the host OS. native hardware.
4 Full Virtualization uses binary Para-Virtualization uses hyper - calls,
translation and direct execution.
5. Performance is good. Performance is better in certain cases.
Hardware is not simulated and the guest
6 Guest software does not require any
software run their own isolated domains.
modification since the undelying
hardware is fully simulated,
EBX] Virtualization of CPU
such as Intel VT provide hardware stance for CPU
* Certain processors
Virtualization.
eed is aes
TECHNICAL PUBLICATIONS® - anVirtualization bq
Cloud Computing pee tieg
4 can use a separate mode of execution ea,
ing thie. ebetetance, the gues : :
* When using this assistance, MN Ether application code or privileged code, rung a
_ guest mode. The guest code, whether
the guest mode.
de and enters
* On certain events, the processor exits ‘out of guest mov ae “i Toot Mode
The hypervisor executes in the root mode, determines the reason for the exit, tae
any required actions, and restarts the gues!
* When you use hardware assistance for virtualization,
the code, As a result, system calls or trap-intensive workloads run very close ty
native speed.
* Some workloads, such as those involving updates to page tables, lead to a large
number of exits from guest mode to root mode. Depending on the number of such
exits and total time spent in exits, this can slow down execution significantly,
* CPU virtualization features enable faithful abstraction of the full prowess of Intel
CPU to a virtual machine.
t in guest mode.
there is no need to translate
* All software in the VM can run without any performance, as if it was running
natively on a dedicated CPU. Live migration from one Intel CPU generation to
another, as well as nested virtualization, is possible.
EEG Binary Translation with Full Virtualization
¢ This approach relies on binary translation to trap and to virtualize certain sensitive
and non-virtualizable instructions with new sequences of instructions that have the
intended effect on the virtual hardware. Meanwhile, user level code is directly
executed on the processor for high performance virtualization.
* Fig. 25.3 shows full virtualization with binary translation
Ring 3 User application }—___
Ring 2
Ring 7
Ring 0 a
Binary translation
Rui Hevea of OS requests
Hardware‘Cloud Computing 2-19 Virtualization Basics
© This combination of binary translation and direct execution provides full
virtualization as the guest OS is completely decoupled from the underlying
hardware by the virtualization layer.
+ The guest OS is not aware it is being virtualized and requires no modification.
+ The hypervisor translates all operating system instructions at run-time on the fly
and caches the results for future use, while user level instructions run unmodified
at native speed.
+ VMware's virtualization products such as VMWare ESXi and Microsoft Virtual
Server are examples of full virtualization.
« The performance of full virtualization may not be ideal because it involves binary
translation at run-time which is time consuming and can incur a. large
performance overhead.
ms
1. Outline the problems in virtualizing in CPU, 1/0 and memory devices and suggest how it
could be overridden for efficient utilization of cloud services. Ee ae
EM Two Marks Questions with Answers
| Q1 What is virtualization ?
‘Ans. : Virtualization is an abstraction layer that decouples the physical hardware from
the operating system to deliver greater IT resource utilization and flexibility. It allows
multiple virtual machines, with heterogeneous operating systems to run in isolation,
side-by-side ‘on the same physical machine, Virtualization means running multiple |
machines on a single hardware. The "Real" hardware invisible to operating system. OS
only sees an abstracted out picture. Only Virtual Machine Monitor (VMM) talks to
hardware |
Q.2 What are the benefits of virtualization in the context of cloud computing ?
Ans. :
1. It is possible to achieve a more efficient use of resources.
2. Portability and self-containment also contribute to reducing the costs of
maintenance.
3. A virtual execution environment can be configured as a sandbox, thus preventing
any harmful operation.
TECHNICAL PUBLICA’ Tions® = an up-thrust for knowledoeVirtualizati
2-20 ston Bagi,
Cloud Computing
Q3 List disadvantages of virtualization.
Ans. :
1. Performance degradation.
ineffici f the host
2. Virtualization can some time lead to an inefficient use of the hos
3. Virtualization opens the door to a new and unexpected form of phishing.
Q.4 What is operating system level virtualization ?
Ans. : Operating-system-level virtualization is a server-virtualization method where the
Kemel of an operating system allows for multiple isolated user-space instances, insteag
of just one. Such instances, which are sometimes called containers and software
containers.
as
Ans.
What are hardware virtualization techniques ?
This technology allows simulating the hardware interface expected by an
Operating system. Hardware virtualization allows the coexistence of different software
stacks on top of the same hardware. These stacks are contained inside virtual machine
instances, which operate in complete isolation from each other.
Q.6 What is application server virtualization 7
Ans. : Application server virtualization abstracts a collection of application servers that
Provide the same services as a single virtual application server by using load-balancing |
Strategies and providing a high-availability infrastructure for the services hosted in the |
application server
&7 Why operating system level virtualization is required 2
| Ans. :
| |
* Operating system level virtualization
Provides feasible solution for hardware
level virtualization issue. It inserts a vi
irtualization layer inside an operating
system to partition a machine's physical resources,
Jt enables multiple isolated VMs within a si |
ingle operating system kernel
This kind of VM is often called a ate Oe
Virtual execution environment (VE):
Virtual Private System (VPS) or simply container
* From the user's point of view, virtual €xecution environment look like re4!
servers,
| system, user accounts,
firewall rules etc.
file
has its own set of process
ie s
letwork interfaces with IP addresses, routing tablesF
loud Computing 2-24
Virtualization Basics
|
as Define emulation,
: Emulation i ,
fehl Naat Process of implementing the interface and funciona of one
5 veil
functionality. yystem (or subsystem) having different interface and
‘Ans
a9 _ List advantages of OS virtualization,
Ans. ¢
1. OS virtualization provide least overhead among all types of virtualization solution.
2. They offer highest performance and highest density of virtual environment.
3, Low resource requirements.
4, High Scalability
Q.10 Define V/O virtualization.
of the routing of I/O requests between |
Ans. : 1/O virtualization involves managing
0 implement this |
virtual devices and shared physical hardware. There are three ways t
are full device emulation, para-VZ and direct I/O.
Q11 What is Type 2 hypervisor ?
ans.: Type 2 hypervisor is software that runs within’ a7 operating system
environment, A "guest" operating system thus runs at the third level above the |
hardware.
Q00
eee
TECHNICAL PUBLICATIONS® ~ an upethrust fOr knowledoe