Clouds Under the Covers. Elgazzar - CISC 886 - Fall 2014 1

Similar documents
Introduction to Virtual Machines

Virtualization. ! Physical Hardware. ! Software. ! Isolation. ! Software Abstraction. ! Encapsulation. ! Virtualization Layer. !

Virtualization VMware Inc. All rights reserved

Outline. Outline. Why virtualization? Why not virtualize? Today s data center. Cloud computing. Virtual resource pool

Virtualization. Types of Interfaces

Full and Para Virtualization

COS 318: Operating Systems. Virtual Machine Monitors

Virtualization. Dr. Yingwu Zhu

Virtual Machine Monitors. Dr. Marc E. Fiuczynski Research Scholar Princeton University

Virtualization Concepts And Applications. Yash Jain DA-IICT (DCOM Research Group)

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

Cloud Computing #6 - Virtualization

Virtualization. Pradipta De

Virtualization. Jia Rao Assistant Professor in CS

COM 444 Cloud Computing

CPET 581 Cloud Computing: Technologies and Enterprise IT Strategies. Virtualization of Clusters and Data Centers

Basics in Energy Information (& Communication) Systems Virtualization / Virtual Machines

COS 318: Operating Systems. Virtual Machine Monitors

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Virtual Machines. COMP 3361: Operating Systems I Winter

Distributed and Cloud Computing

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

Networking for Caribbean Development

Chapter 16: Virtual Machines. Operating System Concepts 9 th Edition

9/26/2011. What is Virtualization? What are the different types of virtualization.

Virtualization for Cloud Computing

The Xen of Virtualization

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

Understanding Full Virtualization, Paravirtualization, and Hardware Assist. Introduction...1 Overview of x86 Virtualization...2 CPU Virtualization...

Cloud Computing CS

FREE AND OPEN SOURCE SOFTWARE FOR CLOUD COMPUTING SERENA SPINOSO FULVIO VALENZA

Virtualization Technologies

CS 695 Topics in Virtualization and Cloud Computing. More Introduction + Processor Virtualization

Chapter 5 Cloud Resource Virtualization

Virtualization Overview

Basics of Virtualisation

The Art of Virtualization with Free Software

Lecture 2 Cloud Computing & Virtualization. Cloud Application Development (SE808, School of Software, Sun Yat-Sen University) Yabo (Arber) Xu

Virtualization. Jukka K. Nurminen

Virtualization and the U2 Databases

Virtualization. Explain how today s virtualization movement is actually a reinvention

Eucalyptus: An Open-source Infrastructure for Cloud Computing. Rich Wolski Eucalyptus Systems Inc.

How To Create A Cloud Based System For Aaas (Networking)

Operating Systems Virtualization mechanisms

CSE 501 Monday, September 09, 2013 Kevin Cleary

Intro to Virtualization

Intel s Virtualization Extensions (VT-x) So you want to build a hypervisor?

Cloud Computing. Dipl.-Wirt.-Inform. Robert Neumann

Distributed Systems. Virtualization. Paul Krzyzanowski

Best Practices for Virtualised SharePoint

Cloud^H^H^H^H^H Virtualization Technology. Andrew Jones May 2011

VMware and CPU Virtualization Technology. Jack Lo Sr. Director, R&D

Virtualization Technologies and Blackboard: The Future of Blackboard Software on Multi-Core Technologies

Enabling Technologies for Distributed and Cloud Computing

Introduction to Virtual Machines

MIT IAP Course Lecture #1: Virtualization 101

LSKA 2010 Survey Report I Device Drivers & Cloud Computing

Virtualization Technologies (ENCS 691K Chapter 3)

Anh Quach, Matthew Rajman, Bienvenido Rodriguez, Brian Rodriguez, Michael Roefs, Ahmed Shaikh

Eucalyptus: An Open-source Infrastructure for Cloud Computing. Rich Wolski Eucalyptus Systems Inc.

Virtualization. Introduction to Virtualization Virtual Appliances Benefits to Virtualization Example Virtualization Products

Virtualization with Windows

IaaS Cloud Architectures: Virtualized Data Centers to Federated Cloud Infrastructures

Cloud Computing. Up until now

Enabling Technologies for Distributed Computing

Enterprise-Class Virtualization with Open Source Technologies

Hypervisor Software and Virtual Machines. Professor Howard Burpee SMCC Computer Technology Dept.

Virtual Machines.

VIRTUALIZATION 101. Brainstorm Conference 2013 PRESENTER INTRODUCTIONS

International Journal of Advancements in Research & Technology, Volume 1, Issue6, November ISSN

Expert Reference Series of White Papers. vterminology: A Guide to Key Virtualization Terminology

Chapter 14 Virtual Machines

Infrastructure as a Service (IaaS)

CS 695 Topics in Virtualization and Cloud Computing and Storage Systems. Introduction

Virtualization Technology. Zhiming Shen

Hypervisors and Virtual Machines

Hyper-V vs ESX at the datacenter

Virtualization. Michael Tsai 2015/06/08

The Future of Virtualization Technology. Stephen Alan Herrod VP of Technology VMware

Virtualization Technologies. Embrace the new world of healthcare

CS 695 Topics in Virtualization and Cloud Computing. Introduction

KVM KERNEL BASED VIRTUAL MACHINE

nanohub.org An Overview of Virtualization Techniques

Chapter 2 Addendum (More on Virtualization)

Virtualization: Concepts, Applications, and Performance Modeling

Virtualization. Nelson L. S. da Fonseca IEEE ComSoc Summer Scool Trento, July 9 th, 2015

What is virtualization

2) Xen Hypervisor 3) UEC

GUEST OPERATING SYSTEM BASED PERFORMANCE COMPARISON OF VMWARE AND XEN HYPERVISOR

KVM: A Hypervisor for All Seasons. Avi Kivity avi@qumranet.com

System Virtual Machines

Virtual machines and operating systems

PERFORMANCE ANALYSIS OF KERNEL-BASED VIRTUAL MACHINE

Xen and the Art of. Virtualization. Ian Pratt

Virtual Machines. Virtualization

Rackspace Cloud Databases and Container-based Virtualization

Performance Comparison of VMware and Xen Hypervisor on Guest OS

RED HAT ENTERPRISE VIRTUALIZATION FOR SERVERS: COMPETITIVE FEATURES

Red Hat enterprise virtualization 3.0 feature comparison

Intel Virtualization Technology Overview Yu Ke

Transcription:

Clouds Under the Covers KHALID ELGAZZAR GOODWIN 531 ELGAZZAR@CS.QUEENSU.CA Elgazzar - CISC 886 - Fall 2014 1

References Understanding Full Virtualization, Paravirtualization, and Hardware Assist White Paper, VMware Inc. Virtualization Overview White Paper, VMware Inc. The Eucalyptus Open-Source Cloud-Computing System D. Nurmi, R. Wolski, C. Grzegorczyk, G. Obertelli, S. Soman, L. Youseff and D. Zagorodnov. CCGRID 2009. Based on materials from: Introduction to Virtual Machines by Carl Waldspurger R. Buyya, C. Vecchiola, and T. Selvi, Mastering Cloud Computing Morgan Kaufmann, 2013. Elgazzar - CISC 886 - Fall 2014 2

Outline 1. Virtualization 2. Cloud Infrastructure (IaaS Stacks) Elgazzar - CISC 886 - Fall 2014 3

1. Virtualization VIRTUALIZATION AND VMS MEMORY VIRTUALIZATION PROCESSOR VIRTUALIZATION I/O VIRTUALIZATION Elgazzar - CISC 886 - Fall 2014 4

Virtualization Virtualization broadly describes the separation of request for resources from the underlying physical delivery of that resource. Example, virtual memory gives programs access to more memory than is physically installed via the background swapping of data to disk. Virtualization techniques can be applied to other IT infrastructure layers hardware, networks, storage, operating systems and applications. Elgazzar - CISC 886 - Fall 2014 5

Starting Point: A Physical Machine Physical Hardware Processors, memory, chipset, I/O devices, etc. Resources often underutilized Software Tightly coupled to physical hardware Single active OS instance OS controls hardware Elgazzar - CISC 886 - Fall 2014 6

What s the Virtualization Layer for? Each operating system was designed to be in total control of the system, which makes it impossible for two or more operating systems to be executing concurrently on the same platform unless total control is taken away from them by a new layer of control-software: the VMM app app app app app app Operating System #1 (Win-XP) Virtual Machine Operating System #2 (Mac-OS) Virtual Machine Operating System #3 (Linux) Virtual Machine Virtual Machine Manager Elgazzar - CISC 886 - Fall 2014 7

What is a Virtual Machine? Software Abstraction Behaves like hardware Encapsulates all OS and application state Virtualization Layer Extra level of indirection Decouples hardware, OS Enforces isolation Multiplexes physical hardware across VMs Elgazzar - CISC 886 - Fall 2014 8

Single OS image per machine Software and hardware tightly coupled Running multiple applications on same machine often creates conflict Underutilized resources Inflexible and costly infrastructure Hardware-independence of operating system and applications Virtual machines can be provisioned to any system Can manage OS and application as a single unit by encapsulating them into virtual machines Elgazzar - CISC 886 - Fall 2014 9

Virtualization Layers Guest Virtual Image Applications Applications Virtualization Layer Virtual Hardware Virtual Storage Software Emulation Virtual Networking Host Physical Hardware Physical Storage Physical Networking Elgazzar - CISC 886 - Fall 2014 10

Virtualization Properties Isolation Fault isolation Performance isolation Encapsulation Cleanly capture all VM state Enables VM snapshots, clones Portability Independent of physical hardware Enables migration of live, running VMs Interposition Transformations on instructions, memory, I/O Enables transparent resource overcommitment, encryption, compression, replication

Modern Virtualization Renaissance Recent Proliferation of VMs Considered exotic mainframe technology in 90s Now pervasive in datacenters and clouds Huge commercial success Why? Introduction on commodity x86 hardware Ability to do more with less saves $$$ Innovative new capabilities Extremely versatile technology

Modern Virtualization Applications Server Consolidation Convert underutilized servers to VMs Significant cost savings (equipment, space, power) Increasingly used for virtual desktops Improved Availability Automatic restart Fault tolerance Disaster recovery Test and Development Simplified Management Datacenter provisioning and monitoring Dynamic load balancing

Better Resource Utilization VM VM VM VM VM VM Virtual Machine Manager Server A (running) Before Migration Server B (running) VM VM VM VM VM VM Virtual Machine Manager Server A (running) Server B (inactive) After Migration Elgazzar - CISC 886 - Fall 2014 14

Execution Stack Virtualization Execution Stack Applications Programming Languages Application - level Virtualization Programming Language level Virtualization Operative Systems OS- level Virtualization Hardware Hardware - level Virtualization Elgazzar - CISC 886 - Fall 2014 15

Types of Virtualization Process Virtualization Language-level Java,.NET, Smalltalk OS-level processes, Solaris Zones, BSD Jails, Virtuozzo Cross-ISA emulation Apple 68K-PPC-x86, Digital FX!32 Device Virtualization Logical vs. physical VLAN, VPN, NPIV, LUN, RAID System Virtualization Hosted VMware Workstation, Microsoft VPC, Parallels Bare metal VMware ESX, Xen, Microsoft Hyper-V

Virtualization Granularity Virtual Resources Virtualization Sharing Aggregation Emulation Isolation Physical Resources Elgazzar - CISC 886 - Fall 2014 17

How it is done? Technique Virtualization Model Virtualization Spectrum Emulation Application Execution Environment Process Level High-Level VM Programming Language Virtualization Storage Multiprogramming Operating System Network Hardware-assisted Virtualization System Level Full Virtualization Hardware. Paravirtualization Partial Virtualization Elgazzar - CISC 886 - Fall 2014 18

Virtualization Architectures Installs and runs as an application Relies on host OS for device support and physical resource management Bare-Metal (Hypervisor) Architecture Lean virtualization-centric kernel Service Console for agents and helper applications

Execution Privilege levels Full Virtualization using Binary Translation Privilege level architecture without virtualization

Execution Privilege levels (cont.) Hardware-assisted Virtualization Paravirtualization Virtualization (OS-assisted)

What type of virtualization does Amazon EC2 use? http://docs.aws.amazon.com/awsec2/latest/userguide/virtualization_types.html Elgazzar - CISC 886 - Fall 2014 22

Components of System-Level Virtualization Processor virtualization Memory virtualization I/O virtualization

Processor Virtualization Trap and Emulate Binary Translation

Privileged Unprivileged Trap and Emulate Guest OS + Applications Page Fault Undef Instr virq MMU Emulation CPU Emulation I/O Emulation Virtual Machine Monitor Elgazzar - CISC 886 - Fall 2014 25

Control Register CR0 The CPU can readily access register CR0 when it is executing in real-mode (ring0), but it lacks the necessary privileges for executing mov %cr0, %eax when it is running in Virtual-8086 Mode (ring3) The attempt by ring3 code to access any of the Control Registers will be trapped (raise an exception) by the CPU (a General Protection Fault) Elgazzar - CISC 886 - Fall 2014 26

Binary Translation Guest Code Translation Cache vepc mov ebx, eax cli and mov sti ret ebx, ~0xfff ebx, cr3 Translate dangerous instruction sequences into safe instruction sequences Replace privileged instructions with calls to VMM Cache translations for performance Advantages: Can run unmodified OS Disadvantages: Frequent traps to VMM mov ebx, eax mov [VIF], 0 and ebx, ~0xfff mov [CO_ARG], ebx call HANDLE_CR3 mov [VIF], 1 test [INT_PEND], 1 jne call HANDLE_INTS jmp HANDLE_RET start

Memory Virtualization Shadow Page Tables Nested Page Tables

Memory Virtualization The operating system keeps mappings of virtual page numbers to physical page numbers stored in page tables. All modern x86 CPUs include a memory management unit (MMU) and a translation lookaside buffer (TLB) to optimize virtual memory performance. The guest OS continues to control the mapping of virtual addresses to the guest memory physical addresses, but the guest OS cannot have direct access to the actual machine memory. The VMM is responsible for mapping guest physical memory to the actual machine memory.

Memory Virtualization Native Virtualized

Traditional Address Spaces 0 4GB Virtual Address Space 0 4GB Physical Address Space

Traditional Address Translation Virtual Address TLB Physical Address 1 4 2 5 3 Operating System s Page Fault Handler Process Page Table 2

Virtualized Address Spaces 0 4GB Virtual Address Space 0 Guest Page Table Physical Address Space 4GB 0 VMM PhysMap Machine Address Space 4GB Elgazzar - CISC 886 - Fall 2014 34

Shadow Page Table Virtualized Address Spaces w/ Shadow Page Tables 0 4GB Virtual Address Space 0 Guest Page Table Physical Address Space 4GB 0 VMM PhysMap Machine Address Space 4GB

Virtualized Address Translation w/ Shadow Page Tables Virtual Address TLB Machine Address 1 5 2 6 4 3 Shadow Page Table Guest Page Table 3 PMap 2 A Elgazzar - CISC 886 - Fall 2014 36

Device and I/O Virtualization Software based I/O virtualization and management, in contrast to a direct pass-through to the hardware, enables simplified management. The key to effective I/O virtualization is to preserve these virtualization benefits while keeping the added CPU utilization to a minimum. The hypervisor virtualizes the physical hardware and presents each virtual machine with a standardized set of virtual devices. Virtual devices effectively emulate well-known hardware and translate the virtual machine requests to the system hardware.

I/O Virtualization Implementations Hosted or Split Emulated I/O Hypervisor Direct Passthrough I/O Guest OS Guest OS Guest OS Device Driver Device Driver Device Driver Device Emulation Host OS/Dom0/ Parent Domain Device Emulation Device Emulation I/O Stack Device Driver I/O Stack Device Driver Device Manager VMware Workstation, VMware Server, Xen, Microsoft Hyper-V, Virtual Server VMware ESX VMware ESX (FPT) Elgazzar - CISC 886 - Fall 2014 39

2. Cloud Infrastructure Elgazzar - CISC 886 - Fall 2014 41

IaaS Stacks CloudStack, a 100 percent Java open source IaaS, backed by Citrix Eucalyptus, the academic IaaS OpenStack, the best-known open source IaaS, backed by Rackspace Amazon VPC, a closed-source option (but AWS is the "invisible hand" that guides the others)

Eucalyptus EUCALYPTUS an open-source software framework for cloud computing Implements Infrastructure as a Service (IaaS) Emulates Amazon cloud EC2, S3 and Elastic Block Storage (EBS) Intended as a tool for cloud computing researchers

Eucalyptus (Cont.) Original work addressed several cloud computing questions: VM instance scheduling, VM and user data storage, Cloud computing administrative interfaces, Construction of virtual networks, Definition and execution of service level agreements (cloud/user and cloud/cloud) Cloud computing user interfaces. Elgazzar - CISC 886 - Fall 2014 44

Eucalyptus Main Components Node Controller controls the execution, inspection, and terminating of VM instances on the host where it runs. Cluster Controller gathers information about and schedules VM execution on specific node controllers manages virtual instance network. Storage Controller (Walrus) put/get storage service that implements Amazon s S3 interface, provides a mechanism for storing and accessing virtual machine images and user data. Cloud Controller the entry-point into the cloud for users and administrators queries node managers for information about resources makes high-level scheduling decisions, and implements them by making requests to cluster controllers. Elgazzar - CISC 886 - Fall 2014 45

Goals for Eucalyptus Foster research in elastic/cloud/utility computing models of service provisioning, scheduling, SLA formulation, hypervisor portability and feature enhancement, etc. Experimentation vehicle prior to buying commercial services Tech Preview using local machines with local system administration support Provide a debugging and development platform for EC2 (and other clouds) Allow the environment to be set up and tested before it is instantiated in a for-fee environment Provide a basic software development platform for the open source community E.g. the Linux Experience Not a designed as a replacement technology for EC2 or any other cloud service

OpenStack Elgazzar - CISC 886 - Fall 2014 47