Virtualization
Virtualization
Rahul Hada
Road Map
● Introduction
● Virtualized environment
● Architecture of VM
● Taxonomy of virtualization
● Machine Reference Model
– ISA:Security class
– Privileged Hierarchy
● Hardware-level virtualization
– Hypervisor & types
– VMM
– Theorems
● OS-level virtualization
● Programming-level virtualization and few more
● Virtulization and cloud computing
● Xen: Paravirtualization,KVM:Full virtualization,WINE:Application-level
virtualization and few more
Introduction
● It is a large umbrella of technologies and
concepts.
● Virtualization levels :-
– Hardware level
– Operating system level
– Programming Language level
– Application level
● Types :- Hardware , Software & Networking
Introduction [Cont.]
● Virtualization gained interest :-
– Increased performance and computing capacity
●
PCs are having immense computing power.
– Underutilized hardware and software resources
● Limited use of increased performance & computing capacity.
– Lack of space
● Continious need for additional capacity.
– Greening initiatives
● Reduce carbon footprints
● Reducing the number of servers, reduce power consumption.
– Rise of administrative costs
● Power and cooling costs are higher then IT equipments.
Architecture of Virtual Machines
● VM can support individual processes or a
complete system
● Virtualization can be from OS to programming
languages to processor architecture.
● VMs enhance
– Software interoperability (to work together)
– System impregnability (having strength)
– Platform versatility
Abstraction and Virtualization
● Computer system is complex, and yet it
continue to evolve.
● It appears to application
software as a variable sized
files.
● It transforms a entire
system or components of the
system
● Full virtualization
– Ability to run program (OS) directly on top of a
virtual machine and without any modification.
– VMM require complete emulation of the entire
underneath h/w
– Advantages
● Complete isolation
● Enhanced security
● Ease of emulation of different architectures and
coexistence
– Key challenge is interception of privileged
instructions
Full Virtualization
● Hypervisor has Ring 0
authority
● and , guest OS has Ring 1
authority
● ISA of guest OS are
converted into ISA of host
using binary translation
process.
● Privileged instructions are
traped.
Hardware virtualization
Techniques
● Hardware-assisted virtualization
– In this hardware provides architectural support for
building a VMM able to run a guest OS in complete
isolation.
– Intel VT and AMD V extensions.
– Early products were using binary translation to
trap some sensitive instructions and provide an
emulated version
Hardware-assisted virtualization
● Additional Ring -1
● No binary translation of
privileged instructions
● Commands are are executed
directly to h/w via the
hypervisor
Hardware virtualization
Techniques [Cont.]
● Paravirtualization
– Not-transparent virtualization
– Thin VMM
– Expose software interface to the virtual machine
that is slightly modified from the host.
– Guest OS need to be modified.
– Simply transfer the execution of instructions which
were hard to virtualized, directly to the host.
Paravirtualization
● Privileged instructions of
guest OS is delivered to the
hypervisor by using
hypercalls
● Hypercalls handles these
instructions and accesses
the h/w and return the result.
● Guest has authority to
directly control of
resources.
Hardware virtualization
Techniques [Cont.]
● Partial virtualization
– Partial emulation of the underlying hardware
– Not allow complete isolation to guest OS.
– Address space virtualization is a common feature of
comtemporary operating systems.
– Address space virtualization used in time-sharing
system.
Operating system-level
virtualization
● It offers the opportunity to create different and
separated execution environments for
applications that are managed concurrently.
● No VMM or hypervisor
● Virtualization is in single OS
● OS kernel allows for multiple isolated user
space instances
● Good for server consolidation.
● Ex. chroot , Jails, OpenVZ etc.
Programming language-level
virtualization
● It is mostly used to achieve ease of deployment of
application, managed execution and portability across
different platform and OS.
● It consists of a virtual machine executing the byte code
of a program, which is the result of the compilation
process.
● Produce a binary format representing the machine code
for an abstract architecture.
● Example
– Java platform – Java virtual machine (JVM)
– .NET provides Common Language Infrastructure (CLI)
● They are stack-based virtual machines
Advantage of
programming/process-level VM
● Provide uniform execution environment across
different platforms.
● This simplifies the development and deployment
efforts.
● Allow more control over the execution of
programs.
● Security; by filtering the I/O operations
● Easy support for sandboxing
Application-level virtualization
● It is a technique allowing applications to run in
runtime environments that do not natively
support all the features required by such
applications.
● In this, applications are not installed in the
expected runtime environment.
● This technique is most concerned with :-
– Partial file system
– Libraries
– Operating System component emulation
Strategies for Implementation
Application-Level Virtualization
● Two techniques:-
– Interpretation -
● In this every source instruction is interpreted by an
emulator for executing native ISA instructions,
● Minimal start up cost but huge overhead.
– Binary translation -
● In this every source insruction is converted to native
instructions with equivalent functions.
● Block of instructions translated , cached and reused.
● Large overhead cost , but over time it is subject to
better performance.
Different from H/w Virtualization
● In h/w virtualization , it allows the execution of a
program compiled against a different h/w.
● In Application level emulation , complete h/w
environment.
● Ex:-
– Wine
– CrossOver
– and , many more
Storage Virtualization
● It allows decoupling the physical organization of
the h/w from its logical representation.
● Using Network based virtualization known as
storage area network (SAN).
● SAN – Self Study
Network Virtualization
● It combines h/w appliances and specific
software for the creation and management of a
virtual n/w.
● It can aggregate different physical networks
into a single logical network.
● VLAN – Self Study
Virtualization and cloud
computing
● Plays an important role in cloud computing.
● Primarily used to offer configurable computing
environments and storage.
● H/w virtualization enabling solution in IaaS
● Programming language virtualization in PaaS.
● Virtualization provides :-
– Consolidating
– Isolation
– Controlled environments
Pros & Cons of
Virtualization
● Disadvantages
– Performance degradation -
● As it interposes and abstraction layer between guest &
host.
– Inefficiency and degraded user experience -
● Some of specific features of the host is unexposed.
– Security holes and new threats
● Case 1 – emulating a host in a completely transparent
manner.
● Case 2 - H/w virtualization , malicious programs can
preload themselves before the OS and act as a thin
VMM.
?