CST423 M2 Ktunotes - in
CST423 M2 Ktunotes - in
# What is Virtualization?
Virtualization refers to the representation of physical computing resources in simulated form
having made through the software. This special layer of software (installed over active physical
machines) is referred as layer of virtualization. This layer transforms the physical computing resources
into virtual form which users use to satisfy their computing needs.
In simple sense, the virtualization is the logical separation of physical resources from direct access of
users to fulfill their service needs. Virtualization provides a level of logical abstraction that liberates
user-installed software (starting from operating system and other systems as well as application
software) from being tied to a specific set of hardware. Rather, the users install everything over the
logical operating environment (rather than physical ones) having created through virtualization.
The virtual machines are created over the virtualization layers. This virtualization layer is actually a set of
control programs that creates the environment for the virtual machines to run on. This layer provides
the access to the system resources to the virtual machines. It also controls and monitors the execution
of the virtual machines over it. This software layer is referred as the Hypervisor or Virtual Machine
Monitor (VMM).
The hypervisor abstracts the underlying software and/or hardware environments and represents virtual
system resources to its users. This layer also facilitates the existence of multiple VMs those are not
bound to share same (underlying) OS kernel. Due to this reason, it becomes possible to run different
operating systems in those virtual machines as created over a hypervisor.
Benefits: Since the bare metal hypervisor can directly access the hardware resources in most of the
cases it provides better performance in comparison to the hosted hypervisor. For bigger application like
enterprise data centers, bare-metal virtualization is more suitable because usually it provides advanced
features for resource and security management. Administrators get more control over the host
environment.
Drawbacks: As any hypervisor usually have limited set of device drivers built into it, so the bare metal
hypervisors have limited hardware support and cannot run on a wide variety of hardware platform.
Hosted Approach & Type 2 Hypervisor
- In this approach, an operating system is first installed on the physical machine to activate it.
- This OS installed over the host machine is referred as host operating system.
- The hypervisor is then installed over this host OS. This type of hypervisor is referred to as Type 2
hypervisor or Hosted hypervisor.
Benefits: In this approach, the host OS supplies the hardware drivers for the underlying physical
resources. This eases the installation and configuration of the hypervisor. It makes the type-2
hypervisors compatible for a wide variety of hardware platform.
Drawbacks: A hosted hypervisor does not have direct access to the hardware resources and hence, all of
the requests from virtual machines must go through the host OS. This may degrade the performance of
the virtual machines. Another drawback of the hosted virtualization is the lack of support for real-time
operating systems. Since the underlying host OS controls the scheduling of jobs it becomes unrealistic to
run a real-time OS inside a VM using hosted virtualization.
Full Virtualization
- In full virtualization (also called as native virtualization), the hypervisor fully simulates or
emulates the underlying hardware.
- Virtual machines run over these virtual set of hardware.
- The guest operating systems assume that they are running on actual physical resources and thus
remain unaware that they have been virtualized. This enables the unmodified versions of
available operating systems (like Windows, Linux and else) to run as guest OS over hypervisor.
- In this model, it is the responsibility of the hypervisor to handle all OS-to-hardware (i.e. guest OS
to physical hardware) requests during running of guest machines. The guest OS remains
completely isolated from physical resource layers by the hypervisor. This provides flexibility as
almost all of the available operating systems can work as guest OS.
- VMware’s virtualization product VMWare ESXi Server and Microsoft Virtual Server are few
examples of full virtualization solution.
- In full virtualization technique, the guest operating systems can directly run over hypervisor.
It provides good options for guest It provides lesser options for It provides good options for guest
OS. guest OS. OS.
Hardware does not play role in Hardware does not play role in Hardware plays role in
virtualization. virtualization. virtualization.
Hypervisor takes care of all of the Guest OS along with hypervisor Specialized hardware device
virtualization tasks. take care of the virtualization along with hypervisor take care
tasks. of virtualization tasks.
Virtualization performance is Virtualization performance is Virtualization performance is
little slow. better. better.
# Network Virtualization
Network virtualization is the process of combining network resources and network functionality into a
single, software-based administrative entity called as a virtual network. There are two common forms of
network virtualization
- Virtual device-based virtual network: Here, virtualized devices form the network. All virtual
networking devices (including virtual computers, virtual switches, virtual routers etc.)
communicate using actual (non-virtual) network protocols such as Ethernet as well as
virtualization protocols such as the VLAN. This is actual network virtualization where the
network is formed with all virtual components.
- Protocol based virtual network: Rather than virtualizing devices, it creates virtual area network.
Virtual LAN (VLAN) and virtual private network (VPN) are examples of such virtualizations. These
are logical local area networks (logical LANs) where the underlying physical LAN’s structure is
something else. Here, several physical LANs which are actually part of public network (such as
the Internet) can function as a single logical LAN. This enables network devices (such as
computers and switches) to send and receive data across shared or public networks as if they
are part of a private network. The devices can communicate using LAN protocols which make
faster and secure network communication.
# Desktop Virtualization
Desktop virtualization abstracts the desktop environment available on a personal computer in order to
provide access to it using a client/server approach. Desktop virtualization provides the same out- come
of hardware virtualization but serves a different purpose. Similarly to hardware virtualization, desktop
virtualization makes accessible a different system as though it were natively installed on the host, but
this system is remotely stored on a different host and accessed through a network con- nection.
Moreover, desktop virtualization addresses the problem of making the same desktop envi- ronment
accessible from everywhere. Although the term desktop virtualization strictly refers to the ability to
remotely access a desktop environment, generally the desktop environment is stored in a remote server
or a data center that provides a high-availability infrastructure and ensures the acces- sibility and
persistence of the data. Infrastructures for desktop virtua- lization based on cloud computing solutions
include Sun Virtual Desktop Infrastructure (VDI), Parallels Virtual Desktop Infrastructure (VDI), Citrix
XenDesktop, and others.
# Advantages of Virtualization
Better Utilization of Existing Resources: In Traditional computing most of the processing power
simply remain unutilized for most of the computer systems. Running multiple virtual machines
on one physical server makes better utilization of the resources and this is known as server
consolidation.
Reduction in Hardware Cost: As virtualization makes better use of physical resources by running
multiple virtual machines on single set of physical resources, automatically cost of computing
comes down.
Reduction in Computing Infrastructure Costs: Reduced physical computing resource
requirements in turn reduces many other associated assets, like physical floor space, power
requirement, cooling system and human resource to administrate the systems.
Improved Fault Tolerance or Zero Downtime Maintenance: In cases of any hardware failure,
the virtual system can be migrated to another physical setup. This helps to build fault tolerant
system by creating scope for zero downtime maintenance.
Simplified Capacity Expansion: Capacities of virtual resources are easier to increase than
expanding and then synchronizing physical computing resources. This also becomes possible
due to the decoupling of physical resources from virtual systems.
10
# Downsides of Virtualization
Single Point of Failure Problem: The major benefit of virtualization is resource sharing. Multiple
virtual machines can run over one physical machine. But, this has a downside. It increases the
probability of failure of a number of virtual servers in cases of failure of single physical machine.
Although this situation can be handled easily by keeping backup resources and porting those
virtual servers on the backup set of physical resources. Porting is not a difficult task as
virtualization decouples virtual systems from physical resources.
Lower Performance Issue: There is a concern whether virtual environments have the capacity to
accomplish the full performance of the actual physical system. It has been seen that virtual
servers can achieve up to 85 percent to 90 percent of the performance of the actual physical
server as VMs cannot get direct access to the hardware.
Difficulty in Root Cause Analysis: With virtualization, a new layer of complexity is added which
can cause new problems. The main difficulty is that if something does not work as it is supposed
to it may require considerable extra efforts to find the cause of the problem.
# Case Study
Xen: paravirtualization
Xen is an open-source initiative implementing a virtualization platform based on
paravirtualization.
Initially developed by a group of researchers at the University of Cambridge in the United
Kingdom
Xen-based technology is used for either desktop virtualization or server virtualization, and
recently it has also been used to provide cloud computing solutions by means of Xen Cloud
Platform (XCP).
Xen is the most popular implementation of paravirtualization, which, in contrast with full vir-
tualization, allows high-performance execution of guest operating systems.
11
(Unmodified ABI)
Management Domain (Domain 0)
• VM Management
Ring 3
• HTTP interface
• Access to the Xen Hypervisor User Domains (Domain U)
Ring 2
Ring 1 • Guest OS
• Modified codebase
• Hypercalls into Xen VMM
Ring 0
Privileged
instructions
• Memory management
• CPU state registers
• Devices I/O
Hardware
trap
12
User Applications
Ring 3
(Unmodified ABI)
Ring 2
Ring 1
Guest Operating System
Ring 0
• Unmodified codebase
• VMM unaware
Hypervisor
• Binary translation
• Instruction caching
Hardware Trap
Dynamic / Cached Translation (Sensitive (Sensitive
Instructions) Instructions)
Hardware (x86)
13
*******************************************
14