Guest OS

Virtualization and the Cloud
Chapter 7 ++
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Virtual Machines : History
The structure of VM/370 with CMS.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Microkernels
Simplified structure of a microkernel system
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Virtual Machines Rediscovered
Paravirtualization
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Virtual Machines Rediscovered
(a)
(b)
(a) A type 1 hypervisor.
(b) A practical type 2 hypervisor
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Requirements for Virtualization
Hypervisors should score well in three
dimensions:
1. Safety: hypervisor should have full control of
virtualized resources.
2. Fidelity: behavior of a program on a virtual machine
should be identical to same program running on
bare hardware.
3. Efficiency: much of code in virtual machine should
run without intervention by hypervisor.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Type 1 and Type 2 Hypervisors (1)
Location of type 1 and type 2 hypervisors.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Virtualizing the Unvirtualizable
The binary translates rewrites the guest operating system
running in ring 1, while the hypervisor runs in ring 0
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Virtualization Technology
2005 – Intel CPU’s introduced Virtual Technology (VT)
Containers are created in which virtual machines can be run.
I/O instructions, etc, Trap in the hypervisor who does the
work on behalf of the virtual machine.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Techniques for Efficient Virtualization
When the operating system in a virtual machine executes a
kernel only instruction, it traps to the hypervisor if
virtualization technology is present.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Memory Virtualization
Hypervisor creates a shadow page table that maps virtual
pages used by virtual machines to actual pages the
hypervisor gives it.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Hardware Support For
Nested Page Tables
Extended/nested page tables are walked every time a guest
physical address is accessed—including the accesses for each
level of the guest’s page tables.
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Memory Virtualization
Reclaiming memory
Hypervisor pretends that the total memory for all
VMs combined is more than the actual memory.
Deduplication : Pages sharing the same content are shared.
Ballooning : A small balloon module is loaded in the VM as a
pseudo device driver that talks to the hypervisor.
inflates – memory scarcity on guest increases
deflates – more memory becomes available for guest
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
I/O Virtualization
Problem: Each guest thinks it owns an entire disk partition.
• Hypervisor creates a file or region and gives it to the OS
Problem: the disk the guest OS is using is different from the
real one.
• Hypervisor converts disk commands to drive the real disk
• Allows upgrades to hardware without changing software.
Problem: Networking link for each guest OS
• Each VM has its own MAC address
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Switch
Virtual LAN
Virtual LAN
Host B
Host A
Bridge
Bridge
02:01:0A:00:01:01
10.0.1.1/24
02:01:0A:00:02:01
10.0. 2.1/24
vm
vm
vm
02:01:93:60:51:f1
157.96,81,241/24
Bridge
Virtual LAN
PUBLIC ACCESS
02:01:0A:00:01:03
10.0.1.3/24
Internet
vm
02:01:0A:00:02:02
10.0.2.2/24
vm
I/O Virtualizations
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Virtual Appliances
Shrink wrapped virtual machines used for product solutions
Licensing Issues
License contracted to one physical machine?
Virtual Machine?
All virtual machines on one physical machine?
What about licenses to multiple machines?
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Virtual Machines on Multicores
Read text
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Defining the Cloud
Model for enabling the
delivery of computing as
a SERVICE.
Clouds
National Institute of Standards and
Technology defines characteristics of “cloud”
1. On-demand self-service
2. Broad network access
3. Resource pooling
4. Rapid elasticity
5. Measured service
Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.
Service Models
Software as a Service
SaaS
Platform as a Service
PaaS
Infrastructure as a Service
IaaS
NIST Definition
Cloud computing layers
http://en.wikipedia.org/wiki/Cloud_computing
Deployment Models
* Public Cloud
* Private Cloud
* Hybrid Cloud
* Community Cloud
NIST Definition
IaaS is the delivery of computer hardware
as a service
• Servers
• Networks
• Storage
IaaS
VIM: Virtualization Infrastructure Management
HOST
Web Server
DB
Email Server
Facebook app
DB
Java
App A
App B
App C
Window
H
Linux
Guest OS
Virtual Machine Monitor (Hypervisor)
HARDWARE
IaaS
Client
Cloud Interface
VM1
VM 4
VM 2
VM5
VM3
VM6
VM7
All key machine’s components, CPU, storage disks,
networking and memory are completely virtualized.
This facilitates the entire state of the virtual machine
that must be captured and moved.
Various techniques:
• Live (hot or real time) migration : VM is powered on
• Regular (cold) migration: VM is powered off
• Live Storage migration
There isn’t one approach to PaaS.
The line between Iaas and Paas is blurred
Common PaaS Characteristics:
• Offers development environment
Development lifecycle, language
Ability to develop, test and deploy applications
Customer uses this to add value
• Support well-defined interfaces for:
– Composite applications
– Portals
– Mashups (brings together 2 or more business apps)
• Based on multi-tenancy architecture
PaaS
Provides a specialized capability, such as a
tool or tool set
Ex. Amazon’s Simple DB and Simple Query
Service
PaaS
30 years ago…… Time-sharing systems …..
SaaS model today motivated by
Faster, ubiquitous networked
communications
Software costs and complexities
IT costs
SaaS
Focus on a specific process, such as performance reviews,
financial management…
Moved to the cloud because customers are finding the
platforms hard to manage
Characteristics
–Designed with a specific business processes build in
–Modifiable by customers
Examples: Intuit, SAP, Oracle On Demand
SaaS