5/20/2016 MIT 1
Virtualization
5/20/2016 MIT 2
Overview
Virtualization is a proven software technology
that is rapidly transforming the IT landscape and
fundamentally changing the way that
people compute. In essence, virtualization lets you
transform hardware into software.
Virtualization is a
technology that can
benefit anyone who uses a
computer, from IT
professionals and Mac
enthusiasts to commercial
businesses and
government
organizations.
Cited from: www.vmware.com/virtualization
5/20/2016 MIT 3
History
1960
Virtualization was first presented in Time
Sharing in Large Fast Computers in 1959
as an extension of the work being done
into time-sharing on mainframe
computers.
The term virtualization originated in the
IBM M44/44X project. M44 referred to the
hardware, 44X were the virtual machines.
1970
IBMs research continued through many
other projects, and were soon joined by
projects at other institutions, such as MITs
Multics.
All of
5/20/2016
these systemsMITran VMs identical to 4
Source:
History
1980
Availability of personal computers, main
frames phased out. Virtualization
relegated to labs.
Development of purely virtual machines.
2000
Dot-com boom: Massive need for servers
to run Internet applications; low utilization
Development of server virtualization by
Xen/VMware
Desktop virtualization
2010
5/20/2016 MIT 5
Application virtualization
Source:
What is virtualization?
Virtualization (or virtualisation), in
computing, is the creation of a virtual (rather
than actual) version of something, such as a
hardware platform, operating system, storage
device, or network resources.
Virtualization is the process by which one
computer hosts the appearance of many
computers.
virtualization is used to improve IT throughput
and costs by using physical resources as a pool
from which virtual resources can be allocated.
MIT
5/20/2016 6
Architecture Differences
1. Traditional 1.
2. Hosted virtualization
3. Bare-metal virtualization
2. 3.
5/20/2016 MIT 7
Traditional computing architecture has the
following:
Hardware ( cpu, memory, nic, disk)
Operating system
Application program
Hosted virtualization architecture has the following:
Hardware ( cpu, memory, nic, disk)
Host Operating System
Application program
Virtualization layer
Hosted (guest) operating system
Hosted (guest) application program
MIT
5/20/2016 8
Virtual Machine Monitor
(VMM)
Program in charge of virtualization
Hypervisor
Arbitrates access to physical resources
Presents a set of virtual device interfaces to
each host
Guest OS runs until:
Privileged instruction traps
System interrupts
Exceptions (page faults)
Explicit call: VMCALL (intel) or VMMCALL (AMD)
5/20/2016 MIT 9
Hypervisor
What is a hypervisor?
A hypervisor, a.k.a., a virtual machine
manager/monitor (VMM), or virtualization manager.
A program that allows multiple operating systems to
share a single hardware host.
Another technology at the heart of
system virtualization
Each operating system appears to have the host's
processor, memory, and other resources all to itself.
However, the hypervisor is actually controlling the host
processor and resources, allocating what is needed to
each operating system in turn and making sure that
the guest operating systems (called virtual machines)
cannot disrupt each other.
5/20/2016 MIT 10
Benefits from Virtualization
Load balancing
Create VM for new work loads
Increased Resource utilization
Create VM in the under utilized
resources
Reusable
One VM created can be reused
somewhere else
Isolation
Destruction of one VM doesnt affect
the other VM
5/20/2016 MIT
11
Benefits Continued
Live migration
Support suspend resume and
migration of created VMs
Persistent and Non Persistent
Support for keep/drop the changes
made in VM images
Undoable and Append
Allows undo and append options in
VM images
5/20/2016 MIT
12
Virtualization Functions and Benefits
Virtual Virtual
Resources Resources
Sharing Aggregation
Resources Resources
Emulation Insulation
Resource
Type X Resources Add, Replace, Resources
or Change
fits: Compatibility,
Slide 13/144 Benefits:
investment protection , Continuous availability, flexibility,
MIT
5/20/2016
interoperability, flexibility investment protection
Machines: Stacked
Architecture
APPLICATIONS
API Calls
USER LEVEL LIBRARIES User
System Calls Space
Kernel
KERNEL Space
Instructions
HARDWARE
5/20/2016 MIT 14
Abstraction
Computer
systems are
built on levels
of
abstraction.
Higher level
of abstraction
hide details at
lower levels.
(Example:
Files are an
abstraction of 15
a disk)
5/20/2016 MIT
Perspective of Machine by OS Developer
ISA
Instruction
Set
Architectur
e
Major ISA
division
between
hardware
and
software
5/20/2016 16
MIT
Perspective of Machine by Compiler
Developer
ABI
Applicati
on Binary
Interface
User ISA
+ OS
calls ABI
5/20/2016 17
MIT
Perspective of Machine by Application
Developer
API
Applicatio
n
Program
Interface
User ISA
+ library API
calls
5/20/2016 18
MIT
Architecture & Interfaces
5/20/2016 MIT 19
Virtualization
A layer mapping its visible interface and
resources onto the interface and resources of
the underlying layer or system on which it is
implemented
Purposes
Abstraction to simplify the use of the
underlying resource (e.g., by removing
details of the resources structure)
Replication to create multiple
instances of the resource (e.g., to
simplify management or allocation)
Isolation to separate the uses which
clients make of the underlying
5/20/2016 resources (e.g.,MITto improve security) 20
Architectural Support
Intel Virtual Technology (Intel Core 2 Duo)
AMD Opteron
Paravirtualization
OS modified to execute under VMM
Requires porting OS code
Execution overhead
Necessary for some (popular)
architectures (e.g., x86)
Examples: Xen, Denali
5/20/2016
MIT 22
Full Virtualization
Virtual Machine
Guest OS
App. C
App. B
1st Generation offering of x86/x64 server
App. A
virtualization
Dynamic binary translation Device Drivers
Hardware
5/20/2016 MIT 23
Full Virtualization -
Advantages
The emulation layer
Isolates VMs from the host OS and from each other
Controls individual VM access to system resources, preventing
an unstable VM from impacting system performance
Total VM portability
By emulating a consistent set of system hardware, VMs have the
ability to transparently move between hosts with dissimilar
hardware without any problems
It is possible to run an operating system that was
developed for another architecture on your own
architecture
A VM running on a Dell server can be relocated to a
Hewlett-Packard server
5/20/2016 MIT 24
Full Virtualization -
Drawbacks
Hardware emulation comes with a performance price
In traditional x86 architectures, OS kernels expect to run privileged
code in Ring 0
However, because Ring 0 is controlled by the host OS,
VMs are forced to execute at Ring 1/3, which requires the
VMM to trap and emulate instructions
Due to these performance limitations, paravirtualization and
hardware-assisted virtualization were developed
Application Ring 3
Guest OS Ring 1 / 3
Application Ring 3
Virtual
Operating Ring 0 Machine Ring 0
System Monitor
Virtual Machine
kernel-level operations at Ring 1 (or 3)
Guest OS
App. B
App. C
App. A
the guest is fully aware of how to
process privileged instructions Device Drivers
thus, privileged instruction translation
by the VMM is no longer necessary
The guest operating system uses a Specialized API
specialized API to talk to the VMM and, Virtual Machine Monitor
in this way, execute the privileged
instructions
The VMM is responsible for handling Device Drivers
Hardware
5/20/2016 MIT 26
Para-Virtualization
Today, VM guest operating systems are paravirtualized using two
different approaches:
Recompiling the OS kernel
Paravirtualization drivers and APIs must reside in the guest operating
system kernel
You do need a modified operating system that includes this specific
API, requiring a compiling operating systems to be virtualization
aware
Some vendors (such as Novell) have embraced paravirtualization
and have provided paravirtualized OS builds, while other vendors
(such as Microsoft) have not
Installing paravirtualized drivers
In some operating systems it is not possible to use complete
paravirtualization, as it requires a specialized version of the operating
system
To ensure good performance in such environments, paravirtualization
can be applied for individual devices
For example, the instructions generated by network boards or
graphical interface cards can be modified before they leave the
5/20/2016 MIT 27
virtualized machine by using paravirtualized drivers
Hypervisors or Virtual Machine
Monitors
Xen
KVM
VMWare
5/20/2016 MIT 28
KVM - Kernel-based Virtual Machine
5/20/2016 MIT 30
Guest OS Supported by KVM
Many flavours of Linux
BSD
Solaris
Windows
Haiku
ReactOS
AROS Research Operating System
Mac OS X
5/20/2016 MIT 31
Xen
Open source VMM developed by University of
Cambridge
Designed to be able to run 100 instances of OSs at
the same time
OS must be modified to run within Xen, due to
paravirtualization
Xen runs by having one OS in a privileged state
called Domain-0 which is booted on start up and is
then used to start all other unprivileged OSs in Xen
Citrix Server is the commercial version of Xen
5/20/2016 MIT 32
Xen Design
5/20/2016 MIT 33
Xen Approach
Xen uses paravirtualization
Paravirtualization is a process where the guest
operating system is modified to run in parallel with
other modified systems
Advantage: Improved performance
Disadvantage: The hosted operating system
must be modified before it can be hosted by
the Xen Hypervisor (can be difficult)
5/20/2016 MIT 34
VMware Workstation
Runs on Linux and Windows
machines
Allows you to create and run your
own virtual machines
5/20/2016 MIT 35
Software Virtualization using
VMWare
VMware Server (ESX)
http://openlab-mu-internal.web.cern.ch/openlab-mu-internal/openlab-
II_Projects/Platform_Competence_Centre/Virtualization/Virtualization.as
p
5/20/2016 MIT 36
X86 VIrtualization
In computing, x86 virtualization is the facility
that allows multiple operating systems to
simultaneously share x86 processor resources in
a safe and efficient manner, a facility generically
known as hardware virtualization.
In the late 1990s x86 virtualization was achieved
by complex software techniques which overcame
the processor's lack of virtualization support and
attained reasonable performance. In the mid
2000s, both Intel and AMD added hardware
support to their processors making virtualization
software simpler, and later hardware changes
provided substantial speed improvements.
5/20/2016 MIT 37
Todays x86 computer hardware was designed to
run a single operating system and a single
application, leaving most machines vastly
underutilized.
Virtualization lets you run multiple virtual
machines on a single physical machine, with each
virtual machine sharing the resources of that one
physical computer across multiple environments.
Different virtual machines can run different
operating systems and multiple applications on
the same physical computer.
5/20/2016 MIT 38
Virtualization
5/20/2016 MIT 40
Virtual Machines
MIT
5/20/2016 41
Virtual Machines
Virtual machines
provide:
Hardware independence
VM sees the same
hardware regardless of
the host hardware
Encapsulation Entire VM
encapsulated into a single
5/20/2016
file MIT 42
Major Program Interfaces
ISA Interface -- supports all conventional
software
Application Software
System Calls
Operating System
Operating System
MIT
5/20/2016 44
Process VMs
Process-level VMs provide user applications with a virtual ABI
environment. In their various implementations, process VMs
can provide replication, emulation, and optimization.
Runtime Virtualizing
Software
OS Virtual
Machine
Host Machine
Hardware
5/20/2016 MIT 45
HLL VMs (Process VM)
Java and Microsoft CLI are recent examples
Platform independent Binary class files are distributed
OS interaction via APIs (part of VM platform)
Platform dependent VMs
VM VM VM
implementation implementation implementation
5/20/2016 MIT 46
High Level Language Virtual Machines
Loader VM Interpreter/Translator
Memory Image Host Instructions
Applications Applications
Guest
OS OS
Virtualizing
VMM Software
Virtual
Machine
Hardware
Host "Machine"
5/20/2016 MIT 48
System Virtual Machines
5/20/2016 MIT 49
Features of System VMs
They provide a secure way of partitioning major software
systems that run concurrently on the same hardware
platform.
Software running on one guest system is isolated from
software running on other guest systems.
If security on one guest system is compromised or if the
guest OS suffers a failure, the software running on other
guest systems is not affected.
Ability to support different operating systems
simultaneously
In system VMs, platform replication is the major feature
provided by a VMM. The central problem is that of dividing
a single set of hardware resources among multiple guest
operating system environments. The VMM has access to
and manages all the hardware resources.
5/20/2016 MIT 50
Classic System VM vs Hosted VM
Type 1
Structure
Type 1: runs directly on host hardware
Type 2: runs on HostOS
Primary goals
Type 1: High performance
Type 2: Ease of
construction/installation/acceptability
Examples
Type 1: VMWare ESX Server, Xen, OS/370 Type 2
Type 2: User-mode Linux
5/20/2016 MIT 51
Whole-system VMMs
5/20/2016 MIT 52
Codesigned VM
5/20/2016 MIT 53
Summary (Taxonomy)
5/20/2016 MIT 54