Introduction to
Cloud Computing
Virtualization
Introduction
q Technology that allows us to create virtual resources such as servers,
networks, and storage in the cloud.
q Physical machines are operated by cloud providers, who take care of
maintenance, and hardware supplies.
q Enables us to set up access control over the resources to secure them.
q Resource sharing among multiple applications
2
Introduction
q Virtualization hides the physical characteristics of computing resources from
their users, their applications or end users.
q Makes a single physical resource appear to function as multiple virtual
resources.
q Virtualization is a broad concept that refers to the creation of a virtual
version of something, whether hardware, software environment, storage, or
network.
q In a virtualized environment there are three major components: guest, host,
and virtualization layer.
3
Introduction
Figure : Host Machine and Guest
Machine
4
Host Machine
q The host represents the original environment where the guest is supposed to
be managed.
q Each guest runs on the host using shared resources donated to it by the host.
q The operating system, works as the host and manages the physical resource
management, and the device support.
5
Virtualization Layer
q The virtualization layer is responsible for recreating the same or a different
environment where the guest will operate.
q It is an additional abstraction layer between a network and storage hardware,
computing, and the application running on it.
6
Guest Machine
q The guest represents the system component that interacts with the
virtualization layer rather than with the host.
q Guests usually consist of one or more virtual disk files, and a VM definition
file.
q Virtual Machines are centrally managed by a host application that sees and
manages each virtual machine as a different application.
7
Need of virtualization
q Web Server A belonging to Company B has the following utilization profile:
§ It is being used by the employees of Company B around 50% of the time
(on an average), per day (over a 24 hour time period).
§ The rest of the time it is lying idle (and is not being utilized)
Figure : Utilization Profile of Web
Server A
8
Need of virtualization
q Company B strategizes to make available the unused capacity of Web Server A
(50%) to other consumers.
q The technology which enables Company B to divide the Web Server A, into two
logical units; and provide each part to different consumers is “Virtualization”.
q The Web Server A is divided “virtually” into two web servers. Each of these
logically divided web server is termed as “virtual server” or “virtual machine
(VM)”.
q A VM is slice of the physical machine implemented by software.
q The user of each virtual machine is able to use it and carry out the same
activities, as they would, if they were working on the physical web server (Web
Server A).
q Nature of activities performed by the VMs (such as data processing, storage etc..)
is same as that of that of the physical machine
9
Need of virtualization
Figure : Utilization resources
10
Virtual Machines
q Process Virtual Machine (PVM)
q System Virtual Machine (Host) (SVM- Host)
q System Virtual Machine (Native) (SVM- Native)
11
Process Virtual Machine (PVM)
q PVM provides a platform for the execution of a single program (Process).
q Java Virtual machine (JVM) - One of the most common forms of PVM:
§ Runs as a process on underlying shared hardware and OS;
§ Creates and uses a logically separate slice of resources such as RAM
memory for itself.
12
Step 1: Programmer write Java
code using a Java compiler . It is
usually stored as a *.class file
Java Code (*.class)
Programmer
Step 2: When a Java program is
compiled, it is first converted
into an intermediate byte code. It
Java Byte Code is usually stored as a *.java or *.jar
(*.java) file. The Byte code is platform
independent.
Step 3: The JVM takes the byte
Java Virtual Machine code and translates it to machine
runs on shared OS and Machine Code code specific for that platform.
hardware as an (*.exe) The machine code includes OS
application or a process and hardware calls specific for
that platform (as an *.exe file).
Application Applicatio
JVM nN
2 The JVM presents a platform
independent environment for
Java developers.
Shared OS
amongst all the Shared Operating System
applications
Shared Shared Hardware
hardware
amongst all the
applications
13
Application 1
Application 2
Application n
Applications (or
processes) execute
on the shared OS
and Hardware
PVM n
PVM 1
PVM 2
………….
Shared Operating System
Shared OS
amongst all the
applications (or
processes)
Shared Hardware
Shared hardware
amongst all the
applications (or Figure: Process Virtual Machine
processes)
14
System Virtual Machine (Host)
q In contrast to PVM, each virtual machine in SVM-Host, can run an
independent operating system instance, independent of the other VM
instances, Such virtual machines are termed as “system virtual machines”.
q In System Virtual Machine (Host) [SVM-Host], the virtual machines instances
share the same hardware, and the same operating system (“host operating
system”)
q A SVM-Host can have many “instances” of the same operating system (say
Linux or Windows) being run on it (“Guest OS”)
15
Application 2
Application 1
Application 2
Application 1
Application 2
Application 2
Application 1
Application 1
Applications executing
on top of the VM’s
(Windows)
Multiple operating
Guest OS2
(Windows)
Guest OS3
Guest OS1
Guest OSn
(Unix)
systems installed on the ………….
(Linux)
same System virtual
machine (Host)
Shared VM Host Virtual Machine Monitor
monitor amongst
all the virtual
machines
Shared Operating System
Shared OS
amongst all the
virtual machines
Shared Hardware
Shared hardware
amongst all the
virtual machines
16
System Virtual Machine (Native)
q System Virtual Machine (Native) [SVM-Native] does not have a host
operating system
q The virtual machine monitor is installed and executes directly on the shared
underlying hardware.
q VMM is responsible for creating and running the virtual machine instances
on the underlying shared hardware (this process is known as “native”; in
contrast to the shared host OS)
q The VMM maintains the state of each virtual machine
17
Application 2
Application 1
Application 2
Application 1
Application 2
Application 2
Application 1
Application 1
Applications executing
on top of the VM’s
Multiple operating
(Windows)
(Windows)
Guest OSn
systems installed on the
Guest OS1
Guest OS3
Guest OS2
………….
(Linux)
(Unix)
same System virtual
machine (Host)
Shared VM Native Virtual Machine Monitor
monitor amongst
all the virtual
machines
Shared Hardware
Shared hardware
amongst all the
virtual machines
18
What is a hypervisor?
• A hypervisor, also known as a virtual machine monitor or VMM,
is software that creates and runs virtual machines (VMs).
• A hypervisor allows one host computer to support multiple
guest VMs by virtually sharing its resources, such as memory
and processing.
Why use a hypervisor?
• Hypervisors make it possible to use more of a system’s available
resources and provide greater IT mobility since the guest VMs
are independent of the host hardware. This means they can be
easily moved between different servers. Because multiple virtual
machines can run off of one physical server with a hypervisor, a
hypervisor reduces:
1. Space
2. Energy
3. Maintenance requirements
Types of hypervisors
• There are two main hypervisor types, referred to as “Type 1” (or
“ b a re m e t a l ” ) a n d “ Ty p e 2 ” ( o r “ h o s t e d ” ) . A t y p e 1
hypervisor acts like a lightweight operating system and runs
directly on the host’s hardware, while a type 2 hypervisor runs
as a software layer on an operating system, like other computer
programs.
Type-1 hypervisors
• A bare-metal hypervisor (Type 1) is a layer of software we install
directly on top of a physical server and its underlying hardware.
• There is no software or any operating system in between, hence the
name bare-metal hypervisor. A Type 1 hypervisor is proven in
providing excellent performance and stability since it does not run
inside Windows or any other operating system.
• Type 1 hypervisors are an OS themselves, a very basic one on top of
which you can run virtual machines. The physical machine the
hypervisor is running on serves virtualization purposes only. You
cannot use it for anything else.
• Type 1 hypervisors are mainly found in enterprise environments.
Type-2 hypervisors
• This type of hypervisor runs inside of an operating system of a physical
host machine.
• 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. In this case we have:
q A physical machine.
q An operating system installed on the hardware (Windows, Linux, macOS).
q A type 2 hypervisor software within that operating system.
q The actual instances of guest virtual machines.
SVM vs PVM
Features System Virtual Machine Process Virtual Machine
Each system virtual machine needs to be able The various processes share the same
Operating System to run a full operating system (of its own) and operating system and cannot execute
maintain isolation with their virtual machines or run their own operating system
24
SVM(Host) vs SVM(Native)
Features System Virtual Machine Process Virtual Machine
Host Operating A host (or base) operating system is shared
There is no host operating system
Systems across all the instances of the virtual machines.
Virtual Machine Executes on top of the host Executes on top of underlying
Monitor operating system (shared) hardware
25
Virtualization Reference Model
26
Taxonomy of Virtualization
27
Types of Virtualization
q Network Virtualization
q Server Virtualization
q Desktop Virtualization
q Applications Virtualization
q Storage Virtualization
28
Network Virtualization
q The ability to run multiple virtual networks with each has a separate control
and data plan.
q Network virtualization provides a facility to create and provision virtual
networks—logical switches, routers, firewalls, load balancer, Virtual Private
Network (VPN), and workload security within days or even in weeks.
q Network Virtualization is the process of combining hardware and software
network resources and network functionality into a single, software-based
administrative entity, a virtual network.
29
Server Virtualization
q Virtualizing your server infrastructure where you do not have to use any
more physical servers for different purposes.
q Central-server(physical server) is divided into multiple different virtual
servers by changing the identity number, processors.
q Each system can operate its own operating systems in isolate manner. Where
each sub-server knows the identity of the central server.
q To control and monitoring the processor, memory and other hardware
resources.
q It refers to a single physical server that consolidates multiple physical servers
into virtual servers for running the key physical server.
30
Server Virtualization
31
Server Virtualization types
q Full Virtualization: it is underlying Hardware that is entirely simulated. The
Guest software does not need to perform any modifications to run their
applications. Environment is quite similar to host os.
q Para-Virtualization: The Hardware is not simulated in Para-Virtualization.
Here, the Guest software must run its own isolated domains.
32
Full Virtualization
q Enables hypervisors to run an unmodified
guest operating system (e.g. Windows 2003
or XP).
q Guest OS is not aware that it is being
virtualized.
q E.g.: VMware uses a combination of direct
execution and binary translation techniques
to achieve full virtualization of server
systems.
33
Para Virtualization
q Involves explicitly modifying guest operating
system (e.g. SUSE Linux Enterprise Server
11) so that it is aware of being virtualized
to allow near native performance.
q Improves performance.
q Lower overhead.
q E.g.: Xen supports both Hardware Assisted
Virtualization (HVM) and Para-
Virtualization (PV).
34
Desktop virtualization
q Desktop virtualization allows creating and storing different user desktop
instances on a single host, living in a data center or the cloud.
q It is achieved by using a hypervisor (virtual machine monitor), which lives on
top of the host server hardware to run and allows virtual desktops to use the
computing power of the basic server hardware.
35
Application virtualization
q Application virtualization helps a user to have remote access of an application
from a server.
q The server stores all personal information and other characteristics of the
application but can still run on a local workstation through the internet.
q Example of this would be a user who needs to run two different versions of
the same software.
36
Storage Virtualization
q Storage virtualization is an array of servers that are managed by a virtual
storage system.
q The servers aren’t aware of exactly where their data is stored.
q It makes managing storage from multiple sources to be managed and utilized
as a single repository.
q Mainly used for back-up and recovery purposes.
37
Virtualization and cloud computing
q Virtualization plays an important role in cloud computing since it allows for the appropriate
degree of customization, security, isolation, and manageability that are fundamental for
delivering IT services on demand.
q Virtualization technologies are primarily used to offer configurable computing environments
and storage.
q A virtual computer system is known as a “virtual machine” (VM): a tightly isolated software
container with an operating system and application inside.
q Each self-contained VM is completely independent. Putting multiple VMs on a single computer
enables several operating systems and applications to run on just one physical server, or
“host”.
38
Virtualization and cloud computing
q “A thin layer of software called a hypervisor decouples the virtual machines from the host and
dynamically allocates computing resources to each virtual machine as needed.”
q Virtualization is one of the hardware reducing, cost saving and energy saving
technology.
39
Hypervisor
q Hypervisor is a software program that manages multiple operating systems (or
multiple instances of the same operating system) on a single computer system.
q Hypervisors are designed for a particular processor architecture and may also be
called virtual machine manager/monitor (VMM), or virtualization manager.
q The virtualization layer is the software responsible for hosting and managing all
VMs. The virtualization layer is a hypervisor running directly on the hardware.
q The hypervisor manages the system's processor, memory, and other resources to
allocate what each operating system requires.
q Each guest operating system appears to have the host's processor, memory, and
other resources all to itself. But Hypervisor works like that.
40
Hypervisor
41
Types of Hypervisor
q Type I Hypervisor(Native Hypervisor)
q Type II Hypervisor(Hosted Hypervisor)
42
Type I Hypervisor
q Hosted Approach V V
M M
q Runs virtual machines on top of a host OS Applicatio
(windows, Unix etc.) ns
Hypervisor
q Relies on host OS for physical resource
management.
q Host operating system provides drivers for Host Operating System
communicating with the server hardware.
q E.g.: VirtualBox
Hardware
43
Type II Hypervisor
q Bare metal Approach
VM VM VM
q Runs directly on the system hardware.
q May require hardware assisted virtualization
technology support by the CPU.
Hypervisor
q Limited set of hardware drivers provided by the
hypervisor vendor. Kernel Driver
q E.g.: Xen, VMWare ESXi
Hardware
44
Advantages of Hypervisor
q With a hypervisor, you can successfully run and monitor concurrent virtual
machines on a host. Without it, operating multiple applications on the same
hardware often creates conflicts.
q VMMs make co-existing on one system possible and consolidate workloads
and multiple operating environments.
q It furthermore abstracts and isolates different operating systems and
applications from the underlying host, creating independence.
q Hypervisor secures the operating environment from internal conflicts.
45
disadvantages of Hypervisor
q It becomes challenging to find reliable hypervisor services for your particular
enterprise needs within a budget. Though free and open-source hypervisors
are available for the same.
q Hypervisor lacks the capability of running VMs on domestic computers. As an
alternative, there are many non-hypervisor virtualization technologies for
that.
q Security may become an issue. While robust, hypervisors may become an
easy cyberattack target. Vulnerability increases because of the centralized
system, the company network, server rooms, etc.
46
Levels of Implementation
q Virtualization is not that easy to implement. A computer runs an OS that is
configured to that particular hardware. Running a different OS on the same
hardware is not exactly feasible.
q To tackle this, there exists a hypervisor. What hypervisor does is, it acts as a
bridge between virtual OS and hardware to enable its smooth functioning of
the instance.
q There are five levels of virtualizations available that are most commonly used
in the industry. These are as follows:
47
Levels of Implementation
48
Levels of Implementation
q Instruction Set Architecture Level (ISA)
q Hardware Abstraction Level (HAL)
q Operating System Level
q Library Level
q Application Level
49
Levels of Implementation
50
Instruction Set Architecture Level
q At the ISA level, virtualization is performed by emulating a given ISA by the
ISA of the host machine.
q The basic emulation method is through code interpretation.
q An interpreter program interprets the source instructions to target
instructions one by one.
q One source instruction may require tens or hundreds of native target
instructions to perform its function.
q A virtual instruction set architecture (V-ISA) thus requires adding a
processor-specific software translation layer to the compiler.
51
Hardware Abstraction Level
q It is performed right on top of the bare hardware and generates a virtual
hardware environment for a VM.
q On the other hand, the process manages the underlying hardware through
virtualization. The idea is to virtualize a computer’s resources, such as its
processors, memory, and I/O devices so as hardware utilization rate by
multiple users concurrently may be upgraded .
52
Operating System Level
q OS-level virtualization creates isolated containers on a single physical server
and the OS instances to utilize the hardware and software in data centers.
q The containers behave like real servers.
q OS-level virtualization is commonly used in creating virtual hosting
environments to allocate hardware resources among a large number of
mutually distrusting users.
53
Library Support Level
q Virtualization with library interfaces is possible by controlling the
communication link between applications and the rest of a system through
API hooks.
q The software tool WINE has implemented this approach to support Windows
applications on top of UNIX hosts.
q Another example is the vCUDA which allows applications executing within
VMs to leverage GPU hardware acceleration.
54
User-Application Level
q On a traditional OS, an application often runs as a process. Therefore,
application-level virtualization is also known as process-level virtualization.
q The most popular approach is to deploy high level language (HLL) VMs.
q In this scenario, the virtualization layer exports an abstraction of a VM that
can run programs written and compiled to a particular abstract machine
definition.
q Any program written in the HLL and compiled for this VM will be able to
run on it. The Microsoft .NET CLR and Java Virtual Machine (JVM) are two
good examples of this class of VM.
55
Advantages of Virtualization
q More flexible and efficient allocation of resources.
q Cost of IT infrastructure
q Remote access and rapid scalability.
q High availability.
q Pay peruse of the IT infrastructure on demand.
q Enables running multiple operating systems.
56
Virtualization Structures/Tools
and Mechanisms
q The Xen Architecture
q Binary Translation with Full Virtualization
q Para-Virtualization with Compiler Support
q KVM (Kernel-Based VM)
57
Virtualization Structures/Tools and Mechanisms
58
The Xen Architecture
q Xen is an open source hypervisor program developed by Cambridge University.
q Xen is a micro-kernel hypervisor, which separates the policy from the mechanism.
q The Xen hypervisor implements all the mechanisms, leaving the policy to be handled by
Domain 0, as shown in Figure Xen does not include any device drivers natively.
q It just provides a mechanism by which a guest OS can have direct access to the physical
devices.
q As a result, the size of the Xen hypervisor is kept rather small.
q Xen provides a virtual environment located between the hardware and the OS.
59
The Xen Architecture
q The core components of a Xen system are the hypervisor, kernel, and applications.
q The organization of the three components is important.
q Like other virtualization systems, many guest OSes can run on top of the hypervisor. However,
not all guest OSes are created equal, and one in particular controls the others.
q The guest OS, which has control ability, is called Domain 0, and the others are called Domain
U. Domain 0 is a privileged guest OS of Xen.
60
Binary Translation with Full Virtualization
61
Binary Translation with Full Virtualization
q This approach was implemented by VMware and many other software companies.
q As shown in Figure, VMware puts the VMM at Ring 0 and the guest OS at Ring 1.
q The VMM scans the instruction stream and identifies the privileged, control- and behavior-sensitive instructions.
q When these instructions are identified, they are trapped into the VMM, which emulates the behavior of these
instructions.
q The method used in this emulation is called binary translation.
q Therefore, full virtualization combines binary translation and direct execution.
q The guest OS is completely decoupled from the underlying hardware.
q Consequently, the guest OS is unaware that it is being virtualized.
62
Para-Virtualization with Compiler Support
63
Para-Virtualization with Compiler Support
q Para-virtualization needs to modify the guest operating systems.
q A para-virtualized VM provides special APIs requiring substantial OS modifications in user
applications.
q Performance degradation is a critical issue of a virtualized system. No one wants to use a VM
if it is much slower than using a physical machine.
q The virtualization layer can be inserted at different positions in a machine soft-ware stack.
However, para-virtualization attempts to reduce the virtualization overhead, and thus improve
performance by modifying only the guest OS kernel.
64
Para-Virtualization Architecture
65
Para-Virtualization Architecture
q When the x86 processor is virtualized, a virtualization layer is inserted between the hardware
and the OS.
q According to the x86 ring definition, the virtualization layer should also be installed at Ring 0.
q Different instructions at Ring 0 may cause some problems.
q In Figure, we show that para-virtualization replaces nonvirtualizable instructions with
hypercalls that communicate directly with the hypervisor or VMM.
q However, when the guest OS kernel is modified for virtualization, it can no longer run on the
hardware directly.
66
KVM (Kernel-Based VM)
q This is a Linux para-virtualization system—a part of the Linux version 2.6.20 kernel.
q Memory management and scheduling activities are carried out by the existing Linux kernel.
q The KVM does the rest, which makes it simpler than the hypervisor that controls the entire
machine.
q KVM is a hardware-assisted para-virtualization tool, which improves performance and supports
unmodified guest OSes such as Windows, Linux, Solaris, and other UNIX variants.
67
KVM (Kernel-Based VM)
q When the x86 processor is virtualized, a virtualization layer is inserted between the hardware
and the OS.
q According to the x86 ring definition, the virtualization layer should also be installed at Ring 0.
q Different instructions at Ring 0 may cause some problems.
q In Figure, we show that para-virtualization replaces nonvirtualizable instructions with
hypercalls that communicate directly with the hypervisor or VMM.
q However, when the guest OS kernel is modified for virtualization, it can no longer run on the
hardware directly.
68
Characteristics Of Virtualization
q Partitioning: In virtualization, many applications and operating systems are supported in a
single physical system by partitioning (separating) the available resources.
q Sharing: Virtualization allows the creation of a separate computing environment within the
same host. This basic feature is used to reduce the number of active servers and limit power
consumption.
q Aggregation: It is possible to share physical resources among several guests, but virtualization
also allows aggregation, which is the opposite process. A group of separate hosts can be tied
together and represented to guests as a single virtual host.
69
Characteristics Of Virtualization
q Portability: The concept of portability applies in different ways according to the specific type of
virtualization considered. In the case of a hardware virtualization solution, the guest is
packaged into a virtual image that, in most cases, can be safely moved and executed on top of
different virtual machines.
q Increased Security: The ability to control the execution of a guest program in a completely
transparent manner opens new possibilities for delivering a secure, controlled execution
environment. Increased security is a requirement when dealing with untrusted code.
q Emulation: Guest programs are executed within an environment that is controlled by the
virtualization layer, which ultimately is a program. Also, a completely different environment
with respect to the host can be emulated, thus allowing the execution of guest programs
requiring specific characteristics
70
Thank You…
71