Download as pdf or txt
Download as pdf or txt
You are on page 1of 66

Introduction to

Cloud Computing
Virtualization
A S S T. P R O F. H A R S H K A N TA W A L A

C O M P U T E R E N G I N E E R I N G D E P T,

G . H . P AT E L C O L L E G E O F E N G I N E E R I N G & T E C H N O L O G Y harshkantawala@gcet.ac.in
Introduction
❑ Technology that allows us to create virtual resources such as servers, networks, and storage in the
cloud.

❑ Physical machines are operated by cloud providers, who take care of maintenance, and hardware
supplies.

❑ Enables us to set up access control over the resources to secure them.

❑ Resource sharing among multiple applications

ASST. PROF. HARSH KANTAWALA 2


Introduction
❑ Virtualization hides the physical characteristics of computing resources from their users, their
applications or end users.

❑ Makes a single physical resource appear to function as multiple virtual resources.

❑ Virtualization is a broad concept that refers to the creation of a virtual version of something,
whether hardware, software environment, storage, or network.

❑ In a virtualized environment there are three major components: guest, host, and virtualization
layer.

ASST. PROF. HARSH KANTAWALA 3


Introduction

Figure : Host Machine and Guest Machine

ASST. PROF. HARSH KANTAWALA 4


Host Machine
❑ The host represents the original environment where the guest is supposed to be managed.

❑ Each guest runs on the host using shared resources donated to it by the host.

❑ The operating system, works as the host and manages the physical resource management, and
the device support.

ASST. PROF. HARSH KANTAWALA 5


Virtualization Layer
❑ The virtualization layer is responsible for recreating the same or a different environment where
the guest will operate.

❑ It is an additional abstraction layer between a network and storage hardware, computing, and the
application running on it.

ASST. PROF. HARSH KANTAWALA 6


Guest Machine
❑ The guest represents the system component that interacts with the virtualization layer rather
than with the host.

❑ Guests usually consist of one or more virtual disk files, and a VM definition file.

❑ Virtual Machines are centrally managed by a host application that sees and manages each virtual
machine as a different application.

ASST. PROF. HARSH KANTAWALA 7


Need of virtualization
❑ 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 ServerA

ASST. PROF. HARSH KANTAWALA 8


Need of virtualization
❑ Company B strategizes to make available the unused capacity of Web Server A (50%) to other
consumers.
❑ 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”.
❑ 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)”.
❑ A VM is slice of the physical machine implemented by software.
❑ 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).
❑ Nature of activities performed by the VMs (such as data processing, storage etc..) is same as that of
that of the physical machine

ASST. PROF. HARSH KANTAWALA 9


Need of virtualization

Figure : Utilization resources

ASST. PROF. HARSH KANTAWALA 10


Virtual Machines
❑ Process Virtual Machine (PVM)

❑ System Virtual Machine (Host) (SVM- Host)

❑ System Virtual Machine (Native) (SVM- Native)

ASST. PROF. HARSH KANTAWALA 11


Process Virtual Machine (PVM)
❑ PVM provides a platform for the execution of a single program (Process).

❑ 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.

ASST. PROF. HARSH KANTAWALA 12


Step 1: Programmer write Java
code using a Java compiler . It is
usually stored as a *.classfile
Java Code (*.class)

Programmer
Step 2: When a Java program is
compiled, it is first converted into
an intermediate byte code. It is
Java Byte Code 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 tomachine
runs on shared OS and Machine Code code specific for thatplatform.
hardware as an (*.exe) The machine code includesOS
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
Javadevelopers.
Shared OS
amongst all the Shared Operating System
applications

Shared Shared Hardware


hardware
amongst all the
applications

ASST. PROF. HARSH KANTAWALA 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)

ASST. PROF. HARSH KANTAWALA 14


System Virtual Machine (Host)
❑ 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”.

❑ In System Virtual Machine (Host) [SVM-Host], the virtual machines instances share the same
hardware, and the same operating system (“host operating system”)

❑ A SVM-Host can have many “instances” of the same operating system (say Linux or Windows)
being run on it (“Guest OS”)

ASST. PROF. HARSH KANTAWALA 15


Application 2
Application 1

Application 2
Application 1
Application 2

Application 2
Application 1
Application 1
Applicationsexecuting
on top of theVM’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


monitoramongst
all the virtual
machines
Shared Operating System
Shared OS
amongst all the
virtual machines

Shared Hardware
Shared hardware
amongst all the
virtual machines

ASST. PROF. HARSH KANTAWALA 16


System Virtual Machine (Native)
❑ System Virtual Machine (Native) [SVM-Native] does not have a host operating system

❑ The virtual machine monitor is installed and executes directly on the shared underlying hardware.

❑ 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)

❑ The VMM maintains the state of each virtual machine

ASST. PROF. HARSH KANTAWALA 17


Application 2
Application 1

Application 2
Application 1
Application 2

Application 2
Application 1
Application 1
Applicationsexecuting
on top of theVM’s

Multiple operating

(Windows)
(Windows)

Guest OSn
Guest OS1

Guest OS3
Guest OS2
systems installed on the

(Linux)
………….

(Unix)
same System virtual
machine (Host)

Shared VM Native Virtual Machine Monitor


monitoramongst
all the virtual
machines

Shared Hardware
Shared hardware
amongst all the
virtual machines

ASST. PROF. HARSH KANTAWALA 18


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 andcannot execute
maintain isolation with their virtualmachines or run their own operating system

ASST. PROF. HARSH KANTAWALA 19


SVM(Host) vs SVM(Native)

Features System Virtual Machine Process Virtual Machine

A host (or base) operating system is shared


Host Operating
across all the instances of the virtual There is no host operating system
Systems
machines.

Virtual Machine Executes on top of thehost Executes on top of underlying


Monitor operating system (shared) hardware

ASST. PROF. HARSH KANTAWALA 20


Virtualization Reference Model

ASST. PROF. HARSH KANTAWALA 21


Taxonomy of Virtualization

ASST. PROF. HARSH KANTAWALA 22


Types of Virtualization
❑ Network Virtualization

❑ Server Virtualization

❑ Desktop Virtualization

❑ Applications Virtualization

❑ Storage Virtualization

ASST. PROF. HARSH KANTAWALA 23


Network Virtualization
❑ The ability to run multiple virtual networks with each has a separate control and data plan.

❑ 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.

❑ 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.

ASST. PROF. HARSH KANTAWALA 24


Server Virtualization
❑ Virtualizing your server infrastructure where you do not have to use any more physical servers for
different purposes.

❑ Central-server(physical server) is divided into multiple different virtual servers by changing the
identity number, processors.

❑ Each system can operate its own operating systems in isolate manner. Where each sub-server
knows the identity of the central server.

❑ To control and monitoring the processor, memory and other hardware resources.

❑ It refers to a single physical server that consolidates multiple physical servers into virtual servers
for running the key physical server.

ASST. PROF. HARSH KANTAWALA 25


Server Virtualization

ASST. PROF. HARSH KANTAWALA 26


Server Virtualization types
❑ 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.

❑ Para-Virtualization: The Hardware is not simulated in Para-Virtualization. Here, the Guest


software must run its own isolated domains.

ASST. PROF. HARSH KANTAWALA 27


Full Virtualization
❑ Enables hypervisors to run an unmodified guest
operating system (e.g. Windows 2003 or XP).

❑ Guest OS is not aware that it is being virtualized.

❑ E.g.: VMware uses a combination of direct execution


and binary translation techniques to achieve full
virtualization of server systems.

ASST. PROF. HARSH KANTAWALA 28


Para Virtualization
❑ 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.

❑ Improves performance.

❑ Lower overhead.

❑ E.g.: Xen supports both Hardware Assisted


Virtualization (HVM) and Para-Virtualization (PV).

ASST. PROF. HARSH KANTAWALA 29


Desktop virtualization
❑ Desktop virtualization allows creating and storing different user desktop instances on a single
host, living in a data center or the cloud.

❑ 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.

ASST. PROF. HARSH KANTAWALA 30


Application virtualization
❑ Application virtualization helps a user to have remote access of an application from a server.

❑ The server stores all personal information and other characteristics of the application but can still
run on a local workstation through the internet.

❑ Example of this would be a user who needs to run two different versions of the same software.

ASST. PROF. HARSH KANTAWALA 31


Storage Virtualization
❑ Storage virtualization is an array of servers that are managed by a virtual storage system.

❑ The servers aren’t aware of exactly where their data is stored.

❑ It makes managing storage from multiple sources to be managed and utilized as a single
repository.

❑ Mainly used for back-up and recovery purposes.

ASST. PROF. HARSH KANTAWALA 32


Virtualization and cloud computing
❑ 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.
❑ Virtualization technologies are primarily used to offer configurable computing environments
and storage.
❑ A virtual computer system is known as a “virtual machine” (VM): a tightly isolated software
container with an operating system and application inside.
❑ 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”.

ASST. PROF. HARSH KANTAWALA 33


Virtualization and cloud computing
❑ “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.”

❑ Virtualization is one of the hardware reducing, cost saving and energy saving technology.

ASST. PROF. HARSH KANTAWALA 34


Hypervisor
❑ Hypervisor is a software program that manages multiple operating systems (or multiple instances of
the same operating system) on a single computer system.
❑ Hypervisors are designed for a particular processor architecture and may also be called virtual machine
manager/monitor (VMM), or virtualization manager.
❑ The virtualization layer is the software responsible for hosting and managing all VMs. The virtualization
layer is a hypervisor running directly on the hardware.
❑ The hypervisor manages the system's processor, memory, and other resources to allocate what each
operating system requires.
❑ Each guest operating system appears to have the host's processor, memory, and other resources all to
itself. But Hypervisor works like that.

ASST. PROF. HARSH KANTAWALA 35


Hypervisor

ASST. PROF. HARSH KANTAWALA 36


Types of Hypervisor
❑ Type I Hypervisor(Native Hypervisor)

❑ Type II Hypervisor(Hosted Hypervisor)

ASST. PROF. HARSH KANTAWALA 37


Type I Hypervisor
❑ Hosted Approach V V
M M
❑ Runs virtual machines on top of a host OS (windows, Unix Applicatio
etc.) ns
Hypervisor
❑ Relies on host OS for physical resource management.

❑ Host operating system provides drivers for communicating


with the server hardware. Host Operating System
❑ E.g.: VirtualBox

Hardware

ASST. PROF. HARSH KANTAWALA 38


Type II Hypervisor
❑ Bare metal Approach
VM VM VM
❑ Runs directly on the system hardware.

❑ May require hardware assisted virtualization technology


support by the CPU.
Hypervisor
❑ Limited set of hardware drivers provided by the hypervisor
vendor. Kernel Driver

❑ E.g.: Xen, VMWare ESXi

Hardware

ASST. PROF. HARSH KANTAWALA 39


Advantages of Hypervisor
❑ 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.

❑ VMMs make co-existing on one system possible and consolidate workloads and
multiple operating environments.

❑ It furthermore abstracts and isolates different operating systems and applications


from the underlying host, creating independence.

❑ Hypervisor secures the operating environment from internal conflicts.

ASST. PROF. HARSH KANTAWALA 40


disadvantages of Hypervisor
❑ 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.

❑ Hypervisor lacks the capability of running VMs on domestic computers. As an


alternative, there are many non-hypervisor virtualization technologies for that.

❑ 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.

ASST. PROF. HARSH KANTAWALA 41


Levels of Implementation
❑ 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.

❑ 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.

❑ There are five levels of virtualizations available that are most commonly used in the
industry. These are as follows:

ASST. PROF. HARSH KANTAWALA 42


Levels of Implementation

ASST. PROF. HARSH KANTAWALA 43


Levels of Implementation
❑ Instruction Set Architecture Level (ISA)

❑ Hardware Abstraction Level (HAL)

❑ Operating System Level

❑ Library Level

❑ Application Level

ASST. PROF. HARSH KANTAWALA 44


Levels of Implementation

ASST. PROF. HARSH KANTAWALA 45


Instruction Set Architecture Level
❑ At the ISA level, virtualization is performed by emulating a given ISA by the ISA of the
host machine.

❑ The basic emulation method is through code interpretation.

❑ An interpreter program interprets the source instructions to target instructions one


by one.

❑ One source instruction may require tens or hundreds of native target instructions to
perform its function.

❑ A virtual instruction set architecture (V-ISA) thus requires adding a processor-specific


software translation layer to the compiler.

ASST. PROF. HARSH KANTAWALA 46


Hardware Abstraction Level
❑ It is performed right on top of the bare hardware and generates a virtual hardware
environment for a VM.

❑ 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 .

ASST. PROF. HARSH KANTAWALA 47


Operating System Level
❑ OS-level virtualization creates isolated containers on a single physical server and the
OS instances to utilize the hardware and software in data centers.

❑ The containers behave like real servers.

❑ OS-level virtualization is commonly used in creating virtual hosting environments to


allocate hardware resources among a large number of mutually distrusting users.

ASST. PROF. HARSH KANTAWALA 48


Library Support Level
❑ Virtualization with library interfaces is possible by controlling the communication link
between applications and the rest of a system through API hooks.

❑ The software tool WINE has implemented this approach to support Windows
applications on top of UNIX hosts.

❑ Another example is the vCUDA which allows applications executing within VMs to
leverage GPU hardware acceleration.

ASST. PROF. HARSH KANTAWALA 49


User-Application Level
❑ On a traditional OS, an application often runs as a process. Therefore, application-
level virtualization is also known as process-level virtualization.

❑ The most popular approach is to deploy high level language (HLL) VMs.

❑ 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.

❑ 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.

ASST. PROF. HARSH KANTAWALA 50


Advantages of Virtualization
❑ More flexible and efficient allocation of resources.

❑ Cost of IT infrastructure

❑ Remote access and rapid scalability.

❑ High availability.

❑ Pay peruse of the IT infrastructure on demand.

❑ Enables running multiple operating systems.

ASST. PROF. HARSH KANTAWALA 51


Virtualization Structures/Tools
and Mechanisms
❑ The Xen Architecture

❑ Binary Translation with Full Virtualization

❑ Para-Virtualization with Compiler Support

❑ KVM (Kernel-Based VM)

ASST. PROF. HARSH KANTAWALA 52


Virtualization Structures/Tools and Mechanisms

ASST. PROF. HARSH KANTAWALA 53


The Xen Architecture
❑ Xen is an open source hypervisor program developed by Cambridge University.

❑ Xen is a micro-kernel hypervisor, which separates the policy from the mechanism.

❑ 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.

❑ It just provides a mechanism by which a guest OS can have direct access to the physical
devices.

❑ As a result, the size of the Xen hypervisor is kept rather small.

❑ Xen provides a virtual environment located between the hardware and the OS.

ASST. PROF. HARSH KANTAWALA 54


The Xen Architecture
❑ The core components of a Xen system are the hypervisor, kernel, and applications.

❑ The organization of the three components is important.

❑ 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.

❑ 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.

ASST. PROF. HARSH KANTAWALA 55


Binary Translation with Full Virtualization

ASST. PROF. HARSH KANTAWALA 56


Binary Translation with Full Virtualization
❑ This approach was implemented by VMware and many other software companies.

❑ As shown in Figure, VMware puts the VMM at Ring 0 and the guest OS at Ring 1.

❑ The VMM scans the instruction stream and identifies the privileged, control- and behavior-sensitive instructions.

❑ When these instructions are identified, they are trapped into the VMM, which emulates the behavior of these
instructions.

❑ The method used in this emulation is called binary translation.

❑ Therefore, full virtualization combines binary translation and direct execution.

❑ The guest OS is completely decoupled from the underlying hardware.

❑ Consequently, the guest OS is unaware that it is being virtualized.

ASST. PROF. HARSH KANTAWALA 57


Para-Virtualization with Compiler Support

ASST. PROF. HARSH KANTAWALA 58


Para-Virtualization with Compiler Support
❑ Para-virtualization needs to modify the guest operating systems.

❑ A para-virtualized VM provides special APIs requiring substantial OS modifications in user


applications.

❑ 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.

❑ 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.

ASST. PROF. HARSH KANTAWALA 59


Para-Virtualization Architecture

ASST. PROF. HARSH KANTAWALA 60


Para-Virtualization Architecture
❑ When the x86 processor is virtualized, a virtualization layer is inserted between the hardware
and the OS.

❑ According to the x86 ring definition, the virtualization layer should also be installed at Ring 0.

❑ Different instructions at Ring 0 may cause some problems.

❑ In Figure, we show that para-virtualization replaces nonvirtualizable instructions with


hypercalls that communicate directly with the hypervisor or VMM.

❑ However, when the guest OS kernel is modified for virtualization, it can no longer run on the
hardware directly.

ASST. PROF. HARSH KANTAWALA 61


KVM (Kernel-Based VM)
❑ This is a Linux para-virtualization system—a part of the Linux version 2.6.20 kernel.

❑ Memory management and scheduling activities are carried out by the existing Linux kernel.

❑ The KVM does the rest, which makes it simpler than the hypervisor that controls the entire
machine.

❑ 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.

ASST. PROF. HARSH KANTAWALA 62


KVM (Kernel-Based VM)
❑ When the x86 processor is virtualized, a virtualization layer is inserted between the hardware
and the OS.

❑ According to the x86 ring definition, the virtualization layer should also be installed at Ring 0.

❑ Different instructions at Ring 0 may cause some problems.

❑ In Figure, we show that para-virtualization replaces nonvirtualizable instructions with


hypercalls that communicate directly with the hypervisor or VMM.

❑ However, when the guest OS kernel is modified for virtualization, it can no longer run on the
hardware directly.

ASST. PROF. HARSH KANTAWALA 63


Characteristics Of Virtualization
❑ Partitioning: In virtualization, many applications and operating systems are supported in a
single physical system by partitioning (separating) the available resources.

❑ 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.

❑ 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.

ASST. PROF. HARSH KANTAWALA 64


Characteristics Of Virtualization
❑ 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.
❑ 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.
❑ 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

ASST. PROF. HARSH KANTAWALA 65


Thank You…

ASST. PROF. HARSH KANTAWALA 66

You might also like