Professional Documents
Culture Documents
Cloud Computing CCS335 - Unit 2
Cloud Computing CCS335 - Unit 2
VIRTUALIZATION BASICS
Basics of Virtualization
Before Virtualization
Virtualization is a technique, which allows to share single physical instance of an application
or resource among multiple organizations or tenants (customers). It does so by assigning a
logical name to a physical resource and providing a pointer to that physical resource on
demand.
One of the main cost-saving, hardware-reducing, and energy-saving techniques used by cloud
providers is virtualization. Virtualization is done with software-based computers that share the
underlying physical machine resources among different virtual machines (VMs). With OS
virtualization each VM can use a different operating system (OS), and each OS is isolated from
the others. Many companies use VMs to consolidate servers, enabling different services to run
in separate VMs on the same physical machine. VMs allow time-sharing of a single computer
among several single-tasking operating systems. Utilizing VMs requires the guest operating
systems to use memory virtualization to share the memory of the one physical host. Memory
Virtualization removes volatile random access memory (RAM) resources from individual
systems, and aggregates those resources into a virtualized memory pool available to any
computer in the cluster. Memory virtualization leverages large amount of memory which
improves overall performance, system utilization, and increased efficiency. Allowing
applications on multiple servers to share data without replication also reduces the total amount
of memory needed.
One of the most important ideas behind cloud computing is scalability, and the key technology
that makes that possible is virtualization. Virtualization, in its broadest sense, is the emulation
of one of more workstations/servers within a single physical computer. Put simply,
virtualization is the emulation of hardware within a software platform. The most well known
virtualization software in use today is VMware. VMware will simulate the hardware resources
of an x86 based computer, to create a fully functional virtual machine. An operating system
and associated applications can then be installed on this virtual machine, just as would be done
on a physical machine. Multiple virtual machines can be installed on a single physical machine,
as separate entities. This eliminates any interference between the machines, each operating
separately. Although virtualization technology has been around for many years, it is only now
beginning to be fully deployed. One of the reasons for this is the increase in processing power
and advances in hardware technology.
Before Virtualization
• Single OS image per machine.
• Software and hardware tightly coupled.
• Running multiple applications on same machine often creates conflict.
• Underutilized resources.
• Inflexible and costly infrastructure.
Before Virtualization
After Virtualization
Virtualization Architecture
• Installs and runs as an application
• Relies on host OS for device support and physical resource management
Virtualization Architecture
Objectives of virtualization:
• Increased use of hardware resources
With improvements in technology, typical server hardware resources are not being used to their
full capacity. On average, only 5-15% of hardware resources are being utilized. One of the
goals of virtualization is to resolve this problem. By allowing a physical server to run
virtualization software, a server’s resources are used much more efficiently. This can greatly
reduce both management and operating costs. For example, if an organization used 5 different
servers for 5 different services, instead of having 5 physical servers, these servers could be run
on a single physical server operating as virtual servers.
• Reduced management and resource costs
Due to the sheer number of physical servers/workstations in use today, most organizations have
to deal with issues such as space, power and cooling. Not only is this bad for the environment
but, due to the increase in power demands, the construction of more buildings etc is also very
costly for businesses. Using a virtualized infrastructure, businesses can save large amounts of
money because they require far fewer physical machines.
• Improved business flexibility
Whenever a business needs to expand its number of workstations or servers, it is often a lengthy
and costly process. An organisation first has to make room for the physical location of the
machines. The new machines then have to be ordered in, setup, etc. This is a time consuming
process and wastes a business’s resources both directly and indirectly. Virtual machines can be
easily setup. There are no additional hardware costs, no need for extra physical space and no
need to wait around. Virtual machine management software also makes it easier for
administrators to setup virtual machines and control access to particular resources, etc.
• Improved security and reduced downtime
When a physical machine fails, usually all of its software content becomes in accessible. All
the content of that machine becomes unavailable and there is often some downtime to go along
with this, until the problem is fixed. Virtual machines are separate entities from one another.
Therefore if one of them fails or has a virus, they are completely isolated from all the other
software on that physical machine, including other virtual machines. This greatly increases
security, because problems can be contained. Another great advantage of virtual machines is
that they are not hardware dependent. What this means is that if a server fails due to a hardware
fault, the virtual machines stored on that particular server can be migrated to another server.
Functionality can then resume as though nothing has happened, even though the original server
may no longer be working.
Virtualization Concept
Creating a virtual machine over existing operating system and hardware is referred as Hardware
Virtualization. Virtual Machines provide an environment that is logically separated from the
underlying hardware.
The machine on which the virtual machine is created is known as host machine and virtual
machine is referred as a guest machine. This virtual machine is managed by a software or
firmware, which is known as hypervisor.
Hypervisor
The hypervisor is a firmware or low-level program that acts as a Virtual Machine Manager.
There are two types of hypervisor:
Type 1 hypervisor executes on bare system. LynxSecure, RTS Hypervisor, Oracle VM, Sun
xVM Server, VirtualLogic VLX are examples of Type 1 hypervisor. The following diagram
shows the Type 1 hypervisor.
The type1 hypervisor does not have any host operating system because they are installed on
a bare system.
Type 2 hypervisor is a software interface that emulates the devices with which a system
normally interacts. Containers, KVM, Microsoft Hyper V, VMWare Fusion, Virtual Server
2005 R2, Windows Virtual PC and VMWare workstation 6.0 are examples of Type 2
hypervisor. The following diagram shows the Type 2 hypervisor.
Virtualization Processes
Some of the service management processes involved with Virtualization include,
Demand Management
Capacity Management
Financial Management
Availability Management
Information Security Management
IT Service Continuity Management
Release and Deployment Management
Service Asset & Configuration Management
Knowledge Management
Incident Management
Problem Management
Change Management
Service Desk Function
Benefits:
Sharing of resources helps cost reduction
Isolation: Virtual Machines are isolated from each other as if they were present on a physical
machine.
Encapsulation: VMs encapsulate a complete computing environment.
Hardware Independence: VMs run independently of underlying hardware.
Portability: VMs can be migrated between different hosts.
TAXONOMY OF VIRTUALIZATION TECHNIQUES
Virtualization covers a wide range of emulation techniques that are applied to different areas
of computing.
A classification of these techniques helps us better understand their characteristics and use.
The first classification discriminates against the service or entity that is being emulated.
Virtualization is mainly used to emulate execution environments, storage, and networks.
Among these categories, execution virtualization constitutes the oldest,most popular, and
most developed area. Therefore, it deserves major investigation and a further categorization
We can divide these execution virtualization techniques into two major categories by
considering the type of host they require.
Hardware-level virtualization:
Hardware-level virtualization is a virtualization technique that provides an abstract execution
environment in terms of computer hardware on top of which a guest operating system can be
run .
Hardware-level virtualization is also called system virtualization, since it provides ISA to
virtual machines, which is the representation of the hardware interface of a system.
Hardware-level virtualization is also called system virtualization.
Hypervisors:
A fundamental element of hardware virtualization is the hypervisor, or virtual machine
manager (VMM). It recreates a hardware environment in which guest operating systems are
installed. There are two major types of hypervisors: Type I and Type II .
Type I :
hypervisors run directly on top of the hardware. Therefore, they take the place of the operating
systems and interact directly with underlying hardware . This type of hypervisor is also called
a native virtual machine since it runs natively on hardware .
Type II :
hypervisors require the support of an operating system to provide virtualization services. This
means that they are programs managed by the operating system, which interact with it hardware
for guest operating systems. This type of hypervisor is also called a
hosted virtual machine
since it is hosted within an operating system .
Type II
Full virtualization :
Full virtualization refers to the ability to run a program, most likely an operating system,
directly on top of a virtual machine and without any modification, as though it were run on the
raw hardware. To make this possible, virtual machine manager are required to provide a
complete emulation of the entire underlying hardware .
Para - virtualization :
This is a not-transparent virtualization solution that allows implementing thin virtual machine
managers. Paravirtualization techniques expose a software interface to the virtual machine that
is slightly modified from the host and, as a consequence, guests need to be modified. The
aim of paravirtualization is to provide the capability to demand the execution of
performance-critical operations directly on the host .
Partial virtualization :
Partial virtualization provides a partial emulation of the underlying hardware, thus not
allowing the complete execution of the guest operating system in complete isolation. Partial
virtualization allows many applications to run transparently, but not all the features ofthe
operating system can be supported, as happens with full virtualization
Application-level virtualization :
The application-level virtualization is used when there is a desire to virtualize only one
application .
Application virtualization software allows users to access and use an application from a
separate computer than the one on which the application is installed .
It combines hardware appliances and specific software for the creation and management of a
virtual network.
Full Virtualization
With full virtualization, noncritical instructions run on the hardware directly while critical
instructions are discovered and replaced with traps into the VMM to be emulated by software.
Both the hypervisor and VMM approaches are considered full virtualization.
Why are only critical instructions trapped into the VMM? This is because binary translation
can incur a large performance overhead.
Noncritical instructions do not control hardware or threaten the security of the system, but
critical instructions do. Therefore, running noncritical instructions on hardware not only can
promote efficiency, but also can ensure system security.
Binary Translation of Guest OS Requests Using a VMM
This approach was implemented by VMware and many other software companies. As shown
in Figure below, 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 behaviour 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 unaware that it is being virtualized.
Indirect execution of complex instructions via binary translation of guest OS requests using the
VMM plus direct execution of simple instructions on the same host.
The performance of full virtualization may not be ideal, because it involves binary translation
which is rather time-consuming. In particular, the full virtualization of I/O intensive
applications is a really a big challenge. Binary translation employs a code cache to store
translated hot instructions to improve performance, but it increases the cost of memory usage.
Host-Based Virtualization
An alternative VM architecture is to install a virtualization layer on top of the host OS. This
host OS is still responsible for managing the hardware. The guest OSes 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. This host-based
architecture has some distinct advantages, as,
First, the user can install this VM architecture without modifying the host OS. The virtualizing
software can rely on the host OS to provide device drivers and other low-level services. This
will simplify the VM design and ease its deployment.
Second, the host-based approach appeals to many host machine configurations. Compared to
the hypervisor/VMM architecture, the performance of the host-based architecture may also be
low. When an application requests hardware access, it involves four layers of mapping which
downgrades performance significantly. When the ISA of a guest OS is different from the ISA
of the underlying hardware, binary translation must be adopted. Although the host-based
architecture has flexibility, the performance is too low to be useful in practice.
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 software stack.
However, para-virtualization attempts to reduce the virtualization overhead, and thus improve
performance by modifying only the guest OS kernel. The guest operating systems are
paravirtualized.
The traditional x86 processor offers four instruction execution rings: Rings 0,1, 2, and 3. The
lower the ring number, the higher the privilege of instruction being executed. The OS is
responsible for managing the hardware and the privileged instructions to execute at Ring 0,
while user-level applications run at Ring 3.
Para-virtualized VM architecture
• Second, programs run in this environment should show, at worst, only minor decreases in
speed.
• The second challenge concerns the slow operation of instantiating new VMs.
Currently, new VMs originate either as fresh boots or as replicates of a template VM, unaware
of the current application state. Therefore, to better support cloud computing, a large amount
of research and development should be done.
(2) The virtualization layer can be designed in a way that allows processes in VMs to access as
many resources of the host machine as possible, but never to modify them.
Virtualization on Linux or Windows Platforms
(1) Virtualization support on the Windows-based platform is still in the research stage. The
Linux kernel offers an abstraction layer to allow software processes to work with and operate
on resources without knowing the hardware details. New hardware may need a new Linux
kernel to support. Therefore, different Linux platforms use patched kernels to provide special
support for extended functionality.
Middleware Support for Virtualization
Library-level virtualization is also known as user-level Application Binary Interface (ABI) or
API emulation. 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. API call
interception and remapping are the key functions performed. This provides an overview of
several library-level virtualization systems: namely the Windows Application Binary Interface
(WABI), lxrun, WINE, Visual MainWin, and Vcuda.
Device emulation for I/O virtualization implemented inside the middle layer that maps real
I/O devices into the virtual devices for the guest device driver to use.
Full device emulation is the first approach for I/O virtualization. Generally, this approach
emulates well known, real-world devices. All the functions of a device or bus infrastructure,
such as device enumeration, identification, interrupts, and DMA, are replicated in software.
This software is located in the VMM and acts as a virtual device. The I/O access requests of
the guest OS are trapped in the VMM which interacts with the I/O devices.
A single hardware device can be shared by multiple VMs that run concurrently. However,
software emulation runs much slower than the hardware it emulates. The para virtualization
method of I/O virtualization is typically used in Xen. It is also known as the split driver model
consisting of a frontend driver and a backend driver. The frontend driver is running in Domain
U and the backend driver is running in Domain 0. They interact with each other via a block of
shared memory. The frontend driver manages the I/O requests of the guest OSes and the
backend driver is responsible for managing the real I/O devices and multiplexing the I/O data
of different VMs. Although para I/O-virtualization achieves better device performance than
full device emulation, it comes with a higher CPU overhead.
a. Hardware Virtualization
Here are the three types of hardware virtualization:
Full Virtualization
Emulation Virtualization
Paravirtualization
Full Virtualization
In full virtualization, the underlying hardware is completely simulated. Guest software does
not require any modification to run.
Emulation Virtualization
In Emulation, the virtual machine simulates the hardware and hence becomes independent of
it. In this, the guest operating system does not require modification.
Paravirtualization
In Paravirtualization, the hardware is not simulated. The guest software run their own isolated
domains.
VMware vSphere is highly developed infrastructure that offers a management infrastructure
framework for virtualization. It virtualizes the system, storage and networking hardware.
b. Software Virtualization
Software virtualization is the virtualization of applications or computer programs. One of the
most widely used software virtualization programs is SVS (Software Virtualization Solution),
developed by Altiris. The concept is similar to hardware virtualization where physical
machines are simulated as virtual machines. Software virtualization involves creating a virtual
layer or virtual hard drive space where applications can be installed. From this virtual space,
applications can then be run as though they have been installed onto host OS. Once a user has
finished using an application, they can ‘switch it off’. When an application is switched off, any
changes that the application made to the host OS, will be completely reversed. This means that
registry entries and installation directores will have no trace of the application being installed
or executed at all.
Software virtualization offers many benefits like,
The ability to run applications without making permanent registry or library changes
The ability to run multiple versions of the same application
The ability to install applications that would otherwise conflict with each other (by
using multiple virtual layers)
The ability to test new applications in an isolated environment. Software virtualization
provides many benefits and is easy to implement. A fantastic advantage is that you can try out
software virtualization yourself by downloading Altiris’s SVS application completely free.
c. Storage Virtualization
Storage virtualization involves the virtualization of physical storage devices. It is a technique
that allows many different users or applications to access storage, regardless of where that
storage is located or what kind of storage device it is. When storage is virtualized, it appears
standardized and local to host machines, even though the storage may be distributed across
many different locations and many different types of hard drives. The great thing about storage
virtualization is that it allows many different machines and servers to access distributed storage
devices. However, a particular machine accessing a virtualized storage area will see one large
storage area, as though it is a single massive hard drive, rather than a load of scattered hard
drives. Other benefits offered by storage virtualization include the ability for administrators to
mask particular hard drives or storage volumes from particular machines. This obviously
improves security and the ability to increase a storage volumes size in real time. Again this is
very useful because if a server appears to be running out of space on their virtualized storage
area, an administrator can increase its size immediately with just a few clicks. One of the most
widely deployed
storage virtualization technologies is a SAN (Storage Area Network). Just as its name suggests,
a SAN is a large network of storage devices. These storage devices which are usually held in a
rack are independent of any servers or machines, and are instead directly connected to an
organization’s network. Through the use of Storage Area Networks a business can improve
their flexibility. Ror example, a Storage Area Network’s size can easily be increased by adding
additional hard drives or storage volumes. They can be used as an efficient backup solution;
for example by backing up data in a remote location away from business enterprises. Lastly,
Storage Area Networks can provide better storage volume utilization. This means that instead
of having one hard drive per server, a server can spread their data across multiple different hard
drives or storage volumes. This is a much more efficient use of hard drives, because a single
hard drive is not being constantly written and rewritten to. Instead, multiple hard drives share
the load, which should increase the lifespan of individual hard drives.
Storage Virtualization
Types:
Block – It works before the file system exists. It replaces controllers and takes over at the
disk level.
File – The server that uses the storage must have software installed on it in order to enable
file-level usage.
d. OS Virtualization
Although similar to full virtualization, OS-level virtualization is actually quite different. Full
virtualization involves the virtualization of a machines entire hardware. Each virtual
environment is then run under its own operating system and more importantly its own kernel.
OS virtualization is different in that separate virtual environments with their own separate
kernels are not created. Instead, OS virtualization works by running virtual environments
(known as containers) under a single kernel. Each container environment within an OS
virtualization solution will be isolated from other containers and will look and act like a
physical server. A container environment can then run applications and accept the workload of
its physical machine. The end result of OS virtualization is effectively the same as full
virtualization but as you can see, the process for each solution is actually different.
OS virtualization has a number of practical uses. In fact, it has been used in virtual hosting
environments for many years. Virtual hosting involves hosting more than one domain name on
the same physical machine. By using OS virtualization, web hosts can create secure isolated
environments for different domain names. This is obviously advantageous because otherwise
the resources of a single machine would be wasted if it could only be used as a host for one
domain name. Other benefits of using of OS virtualization include the separation of
applications along with the ability to more easily manage resources. For example, using OS
virtualization, you could separate or group applications into different containers. Software
resources would also be more manageable because administrators would be dealing with
smaller ‘chunks’ of resources, rather than entire groups of resources under a single
environment. OS virtualization sounds great and you may be wondering why most
organizations today are using full virtualization solutions rather than OS virtualization
solutions. Both solutions provide similar end results, however there are distinct differences
between the two and OS virtualization does have its own set of pros and cons. The major
advantage of OS virtualization over full virtualization solutions is that it is far more efficient.
OS virtualization has very little overheads because it does not need to emulate hardware.
Communication between hardware and software is carried out by a container’s host operating
system’s kernel, so again there is very little overhead. However, OS virtualization does have
its disadvantages. Firstly, OS virtualization cannot run operating systems which are different
from its original host operating system. If you want to run a Linux-based environment within
a Windows operating system, then OS virtualization is no good to you. Container environments
also have a number of restrictions within them. For example, a container cannot modify its
kernel directly, it cannot mount or dismount file systems and it cannot carry out other top level
actions. A full virtualization solution on the other hand, gives a user a completely unrestricted
environment on which many different operating systems can be installed. In the end it was the
flexibility that full virtualization solutions offered which made them the standard solution for
virtualization. Along with hardware-assisted virtualization and Paraassisted virtualization
technology, full virtualization is now just as efficient as OS virtualization. However OS
virtualization is a technology that is still widely used; for example in web hosting environments
and it will continue to be used in the future.
e. Memory virtualization
It introduces a way to decouple memory from the server to provide a shared, distributed or
networked function. It enhances performance by providing greater memory capacity without
any addition to the main memory. That’s why a portion of the disk drive serves as an extension
of the main memory.
Implementations:
Application-level integration – applications running on connected computers directly connect
to the memory pool through an API or the file system.
OS Level integration – The operating system first connects to the memory pool and makes
that polled memory available to applications.
f. Network virtualization
It refers to the management and monitoring of a computer network as a single managerial entity
from a single software-based administrator’s console. It is intended to allow network
optimization of data transfer rates, scalability, reliability, flexibility and security. It also
automates many network administrative tasks. Network virtualization is specifically useful for
networks experiencing a huge, rapid and unpredictable increase of usage.
The intended result of network virtualization provides improved network productivity and
efficiency.
Two categories:
a. Internal – Provide network like functionality to a single system.
b. External – Combine many networks or parts of networks into a virtual unit.
g. Data virtualization
Without any technical details, you can easily manipulate data and know how it is formatted or
where it is physically located. It decreases the data errors and workload.
h. Desktop virtualization
It provides the work convenience and security. As one can access remotely, you are able to
work from any location and on any PC. It provides a lot of flexibility for employees to work
from home or on the go. It also protects confidential data from being lost or stolen by keeping
it safe on central servers.