You are on page 1of 46

Webvalley 2010

From virtual machine to the cloud computing

What is a Virtual Machine (VM)?


An application program is usually bound to a specific platform: ISA (Instruction Set Architecture) + OS

What is a Virtual Machine (VM)?


VM eliminates real-hardware constraint Appearance of a different platform or even multiple platforms

A platform can run programs bounded to a different platform

VM may have an OS or an ISA or both, which can be different from the ones in the real platform

VM Classification
There are two types of VM classified in the textbook
Process VM: virtualization of individual processes
E.g., running x86 applications on PowerPC Wine

System VM: virtualization of complete systems E.g., running Linux (and its applications) on Windows

Wine, VirtualBox, QEmu ?

Process VM
Run executables of different ISA or OS
VM emulates ABI (user-level instructions & system calls) Called runtime

Process VM Examples
Digital FX!32 Run x86 binaries on Alpha

Java Virtual Machine Run bytecode binaries on x86

The Java Virtual Machine

Own idealized architecture Stylized machine language


Byte codes

Readily available interpreter


CS502 Spring 2006

System VM
Run whole OS(es) & executables
VM emulates whole ISA (user-level & system-level) Called VMM

System VM Variations

Virtual Machine Monitor (VMM)


Small special purpose operating system
Interface simulates a CPU Not a set of system calls, as in a conventional OS Each process acts like a separate computer or virtual machine Can run a full OS in each virtual machine

Also called a hypervisor Each VM also called a partition


8/16/2006 Is Your VMM Secure? 10

VMM History
First prototype VMMs were developed in mid 60s
M44X (modified 7044 CPU) at IBM Watson Research CP-40 (modified 360/40 CPU) at IBM Cambridge Scientific Center

First commercial VMM


CP-67/CMS (on 360/67 CPU) for time sharing
8/16/2006 Is Your VMM Secure? 11

VM Implementation
How to execute guest instructions on a host
Interpretation (emulation) Slow execution speed, but easy implementation Translation Dynamic translation (JIT): recompile/translation done while running Static translation (AOT): multiple binary problem Complicated but faster execution, especially with optimizations Run directly on the hardware When the host and guest ISA are binary compatible

VM Implementaion
Hosted
Runs as a process on an existing host OS Rely on host OS for H/W interaction VMWare GSX, user-mode Linux

Stand-alone
VMM on top of bare hardware All H/W interactions on VMM itself Highly efficient VMWare ESX, IBM z/VM, HyperV

Virtualization
Defined by Popek & Goldberg in 1974. Establishes 3 essential characteristics of a VMM:
Fidelity
Running on VMM == Running directly on HW.

Performance
Performance on VMM == Performance on HW.

Safety
VMM manages all hardware resources (correctly?).

Is This Definition Still Valid?


It assumes the traditional trap-and-emulate style of full virtualization.
This was extremely popular circa 1974. Completely transparent for guest.

It does not account for hardware support


Paravirtualization.
Not transparent. Guest software is modified.

The Timeline of Virtualization


1970s: virtual machines first used
1990s:
x86 becomes prominent server platform No vertical integration in x86 Lack of enterprise features in commodity OSs

1999: VMWare first product to virtualize x86


2006: AMD and Intel offer hardware support

VMWare
Binary translation!
(mostly safe, user-mode)

X86

X86

VMWares Binary Translation


On-the-fly Only need to translate OS code
Makes SPEC run fast by default

Most instruction sequences dont change Instructions that do change:


Indirect control flow: call/ret, jmp PC-relative addressing Privileged instructions

Adaptive Translation
Innocent until proven guilty

AMD SVM and Intel VT


Extensions to x86-32 and x86-64
Allows classic trap-and-emulate! Hardware VM modes to reduce traps Details:
VMCB virtual machine control block VMX mode for running guest OSs Vmrun instruction to enter VMX mode Many instructions and events cause VMX exits Control fields in VMCB can change VMX exit behavior

VMware Virtualization Architectures


VMware Workstation VMware ESX Server
VM VM
App VMX VMX
VMM VMM

VMX

VMX

VMX

VM VM VM
VMM VMM VMM

Resource Scheduling

Storage Stack

Network Stack

Host OS Hosted design


Runs on Windows, Linux, MacOS Device support is inherited from host operating system Virtualization installs like an application rather than like an operating system

VMkernel

Device Drivers

Hypervisor
Virtualization supported via small kernel (VMkernel)

Highly efficient direct I/O pass-through architecture for network and disk
Excellent management/scheduling of hardware resources

Copyright 2006 VMware, Inc. All rights reserved.

New VMM Players


Hyper-V
Microsoft Hypervisor, bare metal, W2k8 Enterprise

XEN
Citryx, Open-Source, Hypervisor, bare metal, Linux, stable but hard to mantain

KVM Kernel Virtual Machine


Linux is the Hypervisor, non bare metal, part of standard kernel, fast growing and developping

Fast catching vmware on features/provisioning/installed base

Hyper-V Architecture
Parent Partition

Provided by:
OS ISV / IHV / OEM Microsoft Hyper-V Microsoft / XenSource

Child Partitions

VM Worker Processes

Applications
WMI Provider VM Service

Applications

Applications

Applications

User Mode

Windows Server 2008


Windows Kernel IHV Drivers

Windows Server 2003, 2008


Windows Kernel

NonHypervisor Aware OS

Xen-Enabled Linux Kernel


Linux VSC

VSP

VSC

VMBus

VMBus

VMBus

Emulation

Hypercall Adapter

Kernel Mode Ring -1

Windows hypervisor Designed for Windows Server Hardware

KVM Architecture

VM Performances

Xen Summit Boston 2008

Virtualization: Performance

Whats a VM
A resource description file (xml)
Cpus: virtual from the host pools (overbooking) Memory: physical from host Network Interfaces: via a virtual switch Disks usually a file on same physical storage

Each VMM has different xml format

Each VMM has differente disk (file) format

Virtualization Scope
Home users: Isolation Developer: Marketing: Enterprise: Testing/Debugging Showcase/demos Consolidation

Enterprise Virtualization

Reduced cost
Improve server utilization Reduce hardware costs

Reduce power consumption


Manage more efficiently

Agility
Operational scalability
Rapid provisioning Business continuity

Security
Isolated Systems

Simplified Data Centre Topology

Virtual Desktop Infrastructure

What is cloud and cloud computing?


Cloud Demand resources or services over Internet with the scale and reliability of a data center.

What is cloud and cloud computing?


Cloud computing is a style of computing in which dynamically scalable and virtualized resources are provided as a services over the Internet.
Users need not have knowledge of, expertise in, or control over the technology infrastructure in the "cloud" that supports them.

The architecture of cloud computing system

Characteristics of cloud computing


Virtualization based. software, databases, Web servers, operating systems, storage and networking as virtual servers. On demand. add and subtract processors, memory, network bandwidth, storage. Opaque

Commercial Cloud Formation

Amazon Cloud
Elastic Compute Cloud (EC2)
Rent computing resources by the hour Basic unit of accounting = instance-hour Additional costs for bandwidth

Simple Storage Service (S3)


Persistent storage Charge by the GB/month Additional costs for bandwidth

Used for scientific data mining/research And Google ?

Amazon Cloud
http://aws.amazon.com/ec2/instance-types/

http://aws.amazon.com/ec2/pricing/ http://aws.amazon.com/ec2-sla/

WEB-SCALE PROBLEMS
Google processes 20 PB a day (2008) all words ever spoken by human beings ~ 5 EB NOAA has ~1 PB climate data (2007) CERNs LHC will generate 15 PB a

year (2008)

640K ought to be enough for anybody.

Maximilien Brice, CERN

Maximilien Brice, CERN

Maximilien Brice, CERN

VM CLOUD WV2010 ?
Distribuzione risultati progetto
una VM da usare sulla cloud (EC2/S3)

Implementare una cloud di test


In un giorno e mezzo Eucalyptus: http://open.eucalyptus.com/

You might also like