MODULE 3 Virtualization
MODULE 3 Virtualization
Morgan Kauffman, USA McGraw Hill, India China Machine Press, China
9.1 1
Chapter 3 - Virtualization : Objectives
IBM Power Systems
2
Introduction IBM Power Systems
3
Virtualization: reasons for renewed interest
IBM Power Systems
4
Virtualization: reasons for renewed interest
IBM Power Systems
• Contd..
– Greening initiatives: Recently, companies are increasingly looking for
ways to reduce the amount of energy they consume and to reduce
their carbon footprint. Hence, reducing the number of servers through
server consolidation will definitely reduce the impact of cooling and
power consumption of a data center. Virtualization technologies can
provide an efficient way of consolidating servers.
– Rise of administrative costs: Power consumption and cooling costs
have now become higher than the cost of the IT equipment.
Virtualization can help in reducing the number of required servers for a
given workload, thus reducing the cost of the administrative personnel.
5
Virtualization reference model
IBM Power Systems
6
Virtualization reference model
IBM Power Systems
9
Characteristics of virtualized environments contd…
IBM Power Systems
• Sharing:
– Virtualization allows the creation of a separate computing environment
within the same host. In this way it is possible to fully exploit the
capabilities of a powerful guest, which would be otherwise underutilized.
– Sharing is a particularly important feature in virtualized data centers,
where this basic feature is used to reduce the number of active servers
and limit power consumption.
• Aggregation.
– It is not only possible to share the physical resource among several
guests, but virtualization also allows the aggregation, which is the
opposite process. A group of separate hosts can be tied together and
represented to guests as a single virtual host. This function is naturally
implemented in middleware for distributed computing and a classical
example is represented by cluster management software, which
harnesses the physical resources of a homogeneous group of machines
and represents them as a single resource.
10
Characteristics of virtualized environments contd…
IBM Power Systems
12
Characteristics of virtualized environments contd…
IBM Power Systems
14
Taxonomy of Virtualization Techniques
IBM Power Systems
15
Virtualization
How it is done? Technique
Model
Emulation Application
Execution Programming
Process Level High-Level VM
Environment Language
Storage Operating
Multiprogramming System
Virtualizatio
n
Network Hardware-assisted
Virtualization
Full Virtualization
System Level Hardware
…. Paravirtualization
Partial
Virtualization
Execution Virtualization
IBM Power Systems
17
Machine Reference Model
IBM Power Systems
• Virtualizing an execution environment
at different levels of the computing
stack requires a reference model that
def in es the interfaces between the
levels of abstractions, which hide
implementation details.
• From this perspective, virtualization
techniques actually replace one of the
layers and intercept the calls that are
directed towards it.
• Therefore, a clear separation between
layers simplifies their implementation,
which only requires the emulation of
the interfaces and a proper interaction
with the underlying layer.
• Modern computing systems can be
expressed in terms of the reference Fig: Machine reference Model
model described in the figure.
18
Machine Reference Model contd…
IBM Power Systems
• At the bottom layer, the model for the hardware is expressed in terms of the Instruction Set
Architecture (ISA), which defines the instruction set for the processor, registers, memory, and
interrupts management.
• ISA is the interface between hardware and software and it is important for the OS developer
(System ISA), and developers of applications that directly manage the underlying hardware
(User ISA).
• The Application Binary Interface (ABI) separates the operating system layer from the
applications and libraries, which are managed by the OS.
• ABI covers details such as low-level data types, alignment, and call conventions and defines a
format for executable programs. System calls are defined at this level. This interface allows
portability of applications and libraries across operating systems that implement the same ABI.
• The highest level of abstraction is represented by the Application Programming Interface (API),
which interfaces applications to libraries and/or the underlying operating system.
• The machine level resources such as processor registers and main memory capacities are used
to perform the operation in the hardware level of CPU.
• Such layered approach simplifies the development and implementation of computing systems
and also simplifies the implementation of multi-tasking and the co-existence of multiple
executing environments.
19
Security Rings and Privileged Modes
IBM Power Systems
• Machine reference model also provides ways for
implementing a minimal security model for managing
and accessing shared resources.
• For this purpose, the instruction set exposed by the
hardware has been divided into different security
classes, which define who can operate with them.
• The first distinction can be made between privileged
and non-privileged instructions.
• Non-privileged instructions are those instructions that
can be used without interfering with other tasks because
they do not access shared resources. This category
contains, for example, all the floating, fixed point, and
arithmetic instructions.
• Privileged instructions are those that are executed under
specific restrictions and are mostly used for sensitive
operations, which expose (behavior sensitive) or modify
(control sensitive) the privileged state.
• a possible implementation features a hierarchy of
privileges (see Figure ) in the form of ring based security:
Ring 0, Ring 1, Ring 2, and Ring 3; Ring 0 is in the most
privileged level and the Ring 3 in the least privileged level.
Ring 0 is used by the kernel of the OS and rings 1 and 2
are used by the OS level services and Ring 3 is used by
the user. Recent systems support only two levels with
Ring 0 for the supervisor mode and Ring 3 for user mode.
20
Hardware Level Virtualization
IBM Power Systems
• 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.
• In this model, the guest is represented by the
operating system, the host by the physical
computer hardware, the virtual machine by its
emulation, and virtual machine manager by
the hypervisor.
• The hypervisor is generally a program, or a
combination of software and hardware, that
allows the abstraction of the underlying
physical hardware.
• 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. This is
to differentiate from process virtual
machines, which expose ABI to virtual
machines.
21
Hypervisors
IBM Power Systems
• A f u n d a men t a l elemen t of h a r d w a r e
vir t ualizat ion is t he hypervisor, or vir t ual
ma ch in e ma n a ger ( VMM). It recrea t es a
hardware environment, where 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
the ISA interface exposed by the underlying
hardware, and emulate this interface in order
to allow the management of guest operating
systems. This type of hypervisors is also called
native virtual machine, since it run 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, w hich
interact with it through the ABI and emulate
the ISA of virtual hardware for guest operating
Fig-Hosted (left) and Native (right) Virtual
systems. This type of hypervisors is also called Machine
hosted virtual machine, since it is hosted within
an operating system.
22
Hypervisor Reference Architecture
IBM Power Systems
• Conceptually, a virtual machine manager is
internally organized as described in the Figure.
• Three main modules coordinate their activity in
order to emulate the underlying hardware:
dispatcher, allocator, and interpreter.
• The dispatcher constitutes the entry point of
the monitor and reroutes the instructions
issued by the virtual machine instance to one
of the two other modules.
• The allocator is responsible for deciding the
system resources to be provided to the VM:
whenever a virtual machine tries to execute
an instruction that results in changing the
machine resources associated with that VM,
the allocator is invoked by the dispatcher.
• The interpreter module consists of interpreter
routines. These are executed whenever a
virtual machine executes a privileged
instruction: a trap is triggered and the
corresponding routine is executed.
Fig- hypervisor reference architecture
23
Hypervisor Reference Architecture contd…
IBM Power Systems
• The design and architecture of a virtual machine manager, together with the
underlying hardware design of the host machine, determine the full realization
of hardware virtualization, where a guest operating system can be transparently
executed on top of a VMM as if it was run on the underlying hardware.
• The criteria that need to be met by a virtual machine manager to efficiently
support virtualization were established by Goldberg and Popek in 1974 [23].
Three properties have to be satisfied:
– Equivalence: a guest running under the control of a virtual machine manager should exhibit the
same behavior that when it is executed directly on the physical host.
– Resource control: the virtual machine manager should be in complete control of virtualized
resources.
– Efficiency: a statistically dominant fraction of the machine instructions should be executed
without intervention from the virtual machine manager.
• The major factor that determines whether these properties are satisfied is
represented by the layout of the ISA of the host running a virtual machine
manager. Popek and Goldberg provided a classification of the instruction set
and proposed three theorems that define the properties that hardware
instructions need to satisfy in order to efficiently support virtualization.
24
Popek and Goldberg theorems
IBM Power Systems
25
Hardware Virtualization Techniques
IBM Power Systems
• Hardware-assisted virtualization:
– This term refers to a scenario in which the hardware provides architectural support for
building a virtual machine manager able to run a guest operating system in complete
isolation.
– This technique was originally introduced in the IBM System/370. At present, examples of
hardware-assisted virtualization are the extensions to the x86-64 bit architecture introduced
with Intel VT
• Full virtualization
– Full virtualization refers to the ability of running a program, most likely an operating system,
on top of a virtual machine directly and without any modification, as if it were run on the raw
hardware.
– In order to make this possible, virtual machine managers are required to provide a complete
emulation of the entire underlying hardware.
– The principal advantage of full virtualization is complete isolation, which leads to enhanced
security, ease of emulation of different architectures, and coexistence of different systems on
the same platform. Whereas it is a desired goal for many virtualization solutions, it poses
important concerns on performance and technical implementation.
26
Hardware Virtualization Techniques
IBM Power Systems
• Paravirtualization
– 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 operation directly on the host.
– solutions using paravirtualization include: VMWare, Parallels, and some solutions for
embedded and real time environment such as TRANGO, Wind River, and XtratuM.
• 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 of
the operating system can be supported as happens with full virtualization.
– An example of partial virtualization is address space virtualization used in time sharing
systems.
– Partial virtualization was implemented on the experimental IBM M44/44X. Address space
virtualization is a common feature of contemporary operating systems.
27
Operating System Level Virtualization
IBM Power Systems
29
Application Level Virtualization
IBM Power Systems
30
Application Level Virtualization
IBM Power Systems
• Emulation can also be used to execute program binaries compiled for different
hardware architectures. In this case, one of the following strategies can be
implemented:
– Interpretation. In this technique every source instruction is interpreted by emulator for
executing native ISA instructions leading to poor performance. Interpretation has a minimal
startup cost but a huge overhead since each instruction is emulated.
– Binary Translation. In this technique every source instruction is converted to native
instructions with equivalent functions. After a block of instructions is translated it is cached
and reused. Binary translation has a large initial overhead cost but over time it is subject to a
better performance, since previously translated instruction blocks are directly executed.
• Application virtualization is a good solution in the case of missing libraries in the host
operating system: in this case a replacement library can be linked with the application or
library calls can be remapped to existing functions available in the host system.
• Another advantage is that in this case the virtual machine manager is much lighter since
it provides a partial emulation of the run time environment if compared to hardware
virtualization.
• One of the most popular solution implementing application virtualization is Wine, which
is a software application allowing Unix-like operating systems to execute programs
written for the Microsoft Windows platform.
31
Storage Virtualization
IBM Power Systems
32
Network Virtualization
IBM Power Systems
33
Desktop Virtualization
IBM Power Systems
34
Application Server Virtualization
IBM Power Systems
35
Virtualization and Cloud Computing
IBM Power Systems
• Virtualization plays an important role in Cloud
computing, since it allows for the appropriate
degree of customization, security, isolation.
• Virtualization technologies are primarily used to
offer configurable computing environments and
storage.
• Particularly important is the role of virtual
computing environment and execution
virtualization techniques. Among these, hardware
and programming language virtualization are the
techniques adopted in Cloud computing systems.
• virtualization also gives the opportunity of
designing more efficient computing systems by
means of consolidation
• Server consolidation and virtual machine migration
are principally used in case of hardware
virtualization even though technically possible also
in case of programming language virtualization.
• Storage virtualization constitutes an interesting
opportunity given by virtualization technologies,
often complimentary to the execution virtualization.
• Finally, Cloud computing revamps the concept of
desktop virtualization, initially introduced in the
mainframe era. Fig- . Live Migration and Server Consolidation
36
Pros and Cons of Virtualization
IBM Power Systems
• Advantages of Virtualization
– Managed execution and isolation are perhaps the most important advantages of
virtualization.
– these two characteristics allow building secure and controllable computing
environments. A virtual execution environment can be configured as a sandbox,
thus preventing any harmful operation to cross the borders of the virtual host.
– Moreover, allocation of resources and their partitioning among different guests is
simplified, being the virtual host controlled by a program.
– Portability is another advantage of virtualization, especially for execution
virtualization techniques.
– Portability and self-containment also contribute to reduce the costs for
maintenance, since the number of hosts is expected to be lower than the number
of virtual machine instances.
– Finally, by means of virtualization it is possible to achieve a more efficient use of
resources. Multiple systems can securely coexist and share the resources of the
underlying host, without interfering with each other.
37
Pros and Cons of Virtualization
IBM Power Systems
• Disadvantages of Virtualization
– Performance Degradation
• Performance is definitely one of the major concerns when using virtualization technology.
Since virtualization interposes an abstraction layer between the guest and the host,
increased latencies and delays can be experienced by the guest.
• Also, when hardware virtualization is realized through a program that is installed or
executed on top of the host operating systems, a major source of performance
degradation is represented by the fact that the virtual machine manager is executed and
scheduled together with other applications, thus sharing with them the resources of the
host.
– Inefficiency and Degraded User Experience
• Virtualization can sometime led to an inefficient use of the host. In particular, some of the
specific features of the host cannot be exposed by the abstraction layer and then become
not accessible.
– Security Holes and New Threats
• Virtualization opens the door to a new and unexpected form of phishing. The capability of
emulating a host in a complete transparent manner, has led the way to malicious programs
which are designed to extract from the guest sensitive information.
38
Review questions
IBM Power Systems
39
Conclusions
IBM Power Systems
40
References
IBM Power Systems
41