virtualization and the cloud chapter 7 ++ tanenbaum & bo, modern operating systems:4th ed., (c)...

31
Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.

Upload: nathan-jones

Post on 21-Dec-2015

467 views

Category:

Documents


54 download

TRANSCRIPT

Page 1: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

Virtualization and the Cloud

Chapter 7 ++

Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.

Page 2: 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.

Page 3: Virtualization and the Cloud Chapter 7 ++ 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.

Page 4: Virtualization and the Cloud Chapter 7 ++ 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.

Page 5: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

Virtual Machines Rediscovered

(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.

(a) (b)

Page 6: Virtualization and the Cloud Chapter 7 ++ 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.

Page 7: Virtualization and the Cloud Chapter 7 ++ 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.

Page 8: Virtualization and the Cloud Chapter 7 ++ 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.

Page 9: Virtualization and the Cloud Chapter 7 ++ 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.

Page 10: Virtualization and the Cloud Chapter 7 ++ 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.

Page 11: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

Memory VirtualizationHypervisor 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.

Page 12: Virtualization and the Cloud Chapter 7 ++ 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.

Page 13: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

Memory VirtualizationReclaiming 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 increasesdeflates – more memory becomes available for guest

Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.

Page 14: Virtualization and the Cloud Chapter 7 ++ 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.

Page 15: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

Switch

Bridge

Virtual LAN Virtual LAN

Internet

Bridge Bridge

02:01:0A:00:01:0110.0.1.1/24

02:01:0A:00:02:0110.0. 2.1/24

02:01:93:60:51:f1157.96,81,241/24

02:01:0A:00:02:0210.0.2.2/24

02:01:0A:00:01:0310.0.1.3/24

Virtual LAN

PUBLIC ACCESS

vm

Host A Host B

vmvmvm vm

Page 16: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

I/O Virtualizations

Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.

Page 17: Virtualization and the Cloud Chapter 7 ++ 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 IssuesLicense 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.

Page 18: Virtualization and the Cloud Chapter 7 ++ 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.

Page 19: Virtualization and the Cloud Chapter 7 ++ 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.

Page 20: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

Clouds

National Institute of Standards and Technology defines characteristics of “cloud”1.On-demand self-service2.Broad network access3.Resource pooling4.Rapid elasticity5.Measured service

Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved.

Page 21: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

Service Models

NIST Definition

Software as a Service

Platform as a Service

Infrastructure as a Service

Page 22: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

Cloud computing layershttp://en.wikipedia.org/wiki/Cloud_computing

Page 23: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

Deployment Models

NIST Definition

*Public Cloud

*Private Cloud

*Hybrid Cloud

*Community Cloud

Page 24: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

IaaS

IaaS is the delivery of computer hardware as a service• Servers• Networks• Storage

Page 25: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

VIM: Virtualization Infrastructure Management

IaaS

H

Web ServerDB

Email Server

Window Linux

Facebook appDB

Java

Guest OS

App AApp BApp C

HOST

Virtual Machine Monitor (Hypervisor)

HARDWARE

Page 26: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

VM1

VM 2

VM3

VM7VM5

VM6VM 4

Cloud Interface

Page 27: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

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

Page 28: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

PaaS

There isn’t one approach to PaaS.The line between Iaas and Paas is blurred

Common PaaS Characteristics:•Offers development environment

Development lifecycle, languageAbility to develop, test and deploy applicationsCustomer 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

Page 29: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

PaaS

Provides a specialized capability, such as a tool or tool set

Ex. Amazon’s Simple DB and Simple Query Service

Page 30: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

SaaS

30 years ago…… Time-sharing systems …..

SaaS model today motivated byFaster, ubiquitous networked

communicationsSoftware costs and complexities IT costs

Page 31: Virtualization and the Cloud Chapter 7 ++ Tanenbaum & Bo, Modern Operating Systems:4th ed., (c) 2013 Prentice-Hall, Inc. All rights reserved

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