Cloud-Computing - Module 2 (1)
Cloud-Computing - Module 2 (1)
(BCS601)
MODULE – 2
Virtual Machines and Virtualization
of Clusters and Data Centers
Introduction
• The reincarnation of virtual machines (VMs) presents a
great opportunity for parallel, cluster, grid, cloud, and
distributed computing.
• Virtualization technology benefits the computer and IT
industries by enabling users to share expensive hardware
resources by multiplexing VMs on the same set of
hardware hosts.
3.1 Implementation Levels Of
Virtualization
• Virtualization is a computer architecture technology by
which multiple virtual machines (VMs) are multiplexed in
the same hardware machine.
• The idea of VMs can be dated back to the 1960s.
• The purpose of a VM is to enhance resource sharing by
many users and improve computer performance in terms
of resource utilization and application flexibility.
• According to a 2009 Gartner Report, virtualization was the
top strategic technology poised to change the computer
industry.
• With sufficient storage, any computer platform can be
installed in another host computer, even if they use
processors with different instruction sets and run with
distinct operating systems on the same hardware
3.1.1 Levels of Virtualization
Implementation
• A traditional computer runs with a host operating system
specially tailored for its hardware architecture, as shown
in Figure 3.1(a).
• After virtualization, different user applications managed by
their own operating systems (guest OS) can run on the
same hardware, independent of the host OS.
• This is often done by adding additional software, called a
virtualization layer as shown in Figure 3.1(b).
• This virtualization layer is known as hypervisor or virtual
machine monitor (VMM).
• The main function of the software layer for virtualization is
to virtualize the physical hardware of a host machine into
virtual resources to be used by the VMs, exclusively.
• The virtualization software creates the abstraction of VMs
by interposing a virtualization layer at various levels of a
computer system.
• Common virtualization layers include the instruction set
architecture (ISA) level, hardware level, operating system
level, library support level, and application level.
3.1.1.1 Instruction Set Architecture Level
• At the Instruction Set Architecture (ISA) level,
virtualization means making one computer system behave
like another by emulating its instructions.
• For example, a MIPS binary code can run on an x86-
based computer using ISA emulation. This helps to run
old software (legacy code) on new hardware.
• The basic method to do this is called code
interpretation, where an interpreter converts each
instruction from the source machine to the target
machine, but it is slow.
• To improve speed, dynamic binary translation is used. It
converts a block of instructions instead of one-by-one,
making the process faster.
• This process requires binary translation and
optimization to make old code work on new hardware.
• Virtual Instruction Set Architecture (V-ISA) is created
by adding a software translation layer that helps in
running different types of machine code on one hardware
platform.
3.1.1.2 Hardware Abstraction Level
• In hardware-level virtualization, virtualization is done
directly on the physical hardware.
• It creates a virtual hardware environment for virtual
machines (VMs).
• It also manages the physical hardware resources like
CPU, memory, and I/O devices.
• The main purpose is to allow multiple users to share
hardware resources, improving hardware utilization.
• This concept was first introduced in the IBM VM/370
system in the 1960s.
• Nowadays, Xen hypervisor is commonly used to
virtualize x86-based machines to run Linux or other
operating systems.
3.1.1.3 Operating System Level
• In OS-level virtualization, a layer is created between the
operating system (OS) and user applications.
• It uses containers to isolate applications on a single
physical server, making each container act like a separate
server.
• This helps in sharing hardware and software resources
in data centers.
• It is mainly used for virtual hosting, where resources are
shared among multiple users.
• It is also useful for consolidating servers, meaning
moving services from different servers into containers or
VMs on one server to save resources.
3.1.1.4 Library Support Level
• In library support level virtualization, user-level
libraries are used instead of making direct system calls to
the operating system (OS).
• It works by virtualizing the API (Application
Programming Interface), which acts as a bridge
between the application and the system.
• This allows applications from one OS to run on another
OS.
• Example:
• WINE software helps run Windows applications on UNIX
systems.
• vCUDA allows VM applications to use GPU hardware for faster
performance.
3.1.1.5 User-Application Level
• In application-level virtualization, an application is
virtualized to run like a virtual machine (VM).
• In a normal OS, applications run as processes, but here
they run as virtualized processes, so it is also called
process-level virtualization.
• This is commonly done using High-Level Language
(HLL) Virtual Machines, like:
• Java Virtual Machine (JVM) – Runs Java programs.
• .NET CLR (Common Language Runtime) – Runs
.NET applications.
• Another form of application-level virtualization is
application isolation or sandboxing, where:
• The application is isolated from the host OS and other
applications.
• This makes it easier to install, distribute, and remove
applications without affecting the system.
• Example:
• LANDesk Application Virtualization allows running
applications as executable files without installation or
system changes.
3.1.1.6 Relative Merits of Different Approaches
• The column headings correspond to four technical merits.
• ―Higher Performance‖ and ―Application Flexibility‖ are self-
explanatory.
• ―Implementation Complexity‖ implies the cost to implement that
particular virtualization level.
• ―Application Isolation‖ refers to the effort required to isolate resources
committed to different VMs.
• Each row corresponds to a particular level of virtualization.
3.1.2 VMM Design Requirements and
Providers
• In hardware-level virtualization, a layer called the
Virtual Machine Monitor (VMM) is placed between the
hardware and the operating system (OS).
• The VMM manages hardware resources like CPU,
memory, and storage.
• Whenever a program tries to access the hardware, the
VMM captures and controls the process, making it work
like a traditional OS.
• The CPU can be divided into multiple virtual CPUs,
allowing multiple operating systems (same or
different) to run on the same hardware.
• There are three requirements for a VMM:
• First, a VMM should provide an environment for pro
grams which is essentially identical to the original
machine.
• Second, programs run in this environment should show,
at worst, only minor decreases in speed.
• Third, a VMM should be in complete control of the system
resources.
• Two possible exceptions in terms of differences are
permitted with this requirement:
• Differences caused by the availability of system
resources and differences caused by timing
dependencies.
• Each virtual machine (VM) uses fewer hardware
resources like memory, but when multiple VMs run at the
same time, their combined resource usage is higher than
the actual physical machine's capacity.
• This happens because there is an extra software layer
(VMM) between the hardware and VMs. Multiple VMs
running together affect overall performance.
• However, despite these performance differences, the
VMM still functions like a real machine.
• A VMM should demonstrate efficiency in using the VMs.
• Table 3.2 compares four hypervisors and VMMs that are
in use today.
• Complete control of the resources by a VMM includes the
following aspects:
1) The VMM is responsible for allocating hardware
resources for programs;
2) It is not possible for a program to access any resource
not explicitly allocated to it; and
3) It is possible under certain circumstances for a VMM to
regain control of resources already allocated.
3.1.3 Virtualization Support at the OS Level
Why OS-Level Virtualization?
• In a cloud computing environment, perhaps thousands of
VMs need to be initialized simultaneously.
• Besides slow operation, storing the VM images also
becomes an issue.
• Moreover, full virtualization at the hardware level also has
the disadvantages of slow performance and low density,
and the need for para-virtualization to modify the guest
OS.
• To reduce the performance overhead of hardware-level
virtualization, even hardware modification is needed.
• OS-level virtualization provides a feasible solution for
these hardware-level virtualization issues.
• Operating system virtualization 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.
• A VE has its own set of processes, file system, user accounts,
network interfaces with IP addresses, routing tables, firewall
rules, and other personal settings.
• 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.
• Figure 3.3 illustrates operating system virtualization from the
point of view of a machine stack.
Advantages of OS Extensions