FUNDAMENTALS OF VIRTUALIZATION

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

Introduction to Virtual Machines

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

Virtualization VMware Inc. All rights reserved

VMware Server 2.0 Essentials. Virtualization Deployment and Management

Full and Para Virtualization

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

The Art of Virtualization with Free Software

IOS110. Virtualization 5/27/2014 1

Clouds Under the Covers. Elgazzar - CISC Fall

Virtualization: Know your options on Ubuntu. Nick Barcet. Ubuntu Server Product Manager

Virtualization. Types of Interfaces

Virtual Machines. COMP 3361: Operating Systems I Winter

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

Comparing Virtualization Technologies

2972 Linux Options and Best Practices for Scaleup Virtualization

Virtualization Technologies

Virtualization. Jukka K. Nurminen

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

Basics of Virtualisation

kvm: Kernel-based Virtual Machine for Linux

Virtualization. Dr. Yingwu Zhu

SUSE Linux Enterprise 10 SP2: Virtualization Technology Support

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

Hypervisors and Virtual Machines

Data Centers and Cloud Computing

Enterprise-Class Virtualization with Open Source Technologies

Options in Open Source Virtualization and Cloud Computing. Andrew Hadinyoto Republic Polytechnic

Virtualization. Jia Rao Assistant Professor in CS

Virtualization and Performance NSRC

Enabling Technologies for Distributed Computing

Virtualization. Pradipta De

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

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

Introduction to Virtualization & KVM

Enabling Technologies for Distributed and Cloud Computing

Distributed systems Techs 4. Virtualization. October 26, 2009

OPEN-XCHANGE. Open-Xchange and SUSE Linux Enterprise 10 Whitepaper

Virtualization. Michael Tsai 2015/06/08

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

Virtualization of Linux based computers: the Linux-VServer project

Virtualization for Cloud Computing

Virtualization and Other Tricks.

Virtual Hosting & Virtual Machines

COS 318: Operating Systems. Virtual Machine Monitors

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

Computing in High- Energy-Physics: How Virtualization meets the Grid

COM 444 Cloud Computing

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

Open Source Virtualization

Introduction to Virtual Machines

Virtualization Technology. Zhiming Shen

A quantitative comparison between xen and kvm

Regional SEE-GRID-SCI Training for Site Administrators Institute of Physics Belgrade March 5-6, 2009

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

OPEN SOURCE VIRTUALIZATION TRENDS. SYAMSUL ANUAR ABD NASIR Warix Technologies / Fedora Community Malaysia

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

Virtual machines and operating systems

Practical Applications of Virtualization. Mike Phillips IAP 2008 SIPB IAP Series

12. Introduction to Virtual Machines

Tom Eastep Linuxfest NW April 26-27, 2008 Bellingham, Washington

Intro to Virtualization

Distributed and Cloud Computing

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

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

Table of Contents. Server Virtualization Peer Review cameron : modified, cameron

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

Virtualization. P. A. Wilsey. The text highlighted in green in these slides contain external hyperlinks. 1 / 16

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

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

Cloud Computing #6 - Virtualization

Advanced Computer Networks. Network I/O Virtualization

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

COS 318: Operating Systems. Virtual Machine Monitors

The QEMU/KVM Hypervisor

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

Hybrid Virtualization The Next Generation of XenLinux

TOP TEN CONSIDERATIONS

Satish Mohan. Head Engineering. AMD Developer Conference, Bangalore

Virtualization Technologies (ENCS 691K Chapter 3)

Intel Virtualization Technology Overview Yu Ke

Jukka Ylitalo Tik TKK, April 24, 2006

Comparing Free Virtualization Products

Virtualization in Linux a Key Component for Cloud Computing

Virtualization and the U2 Databases

Installing & Using KVM with Virtual Machine Manager COSC 495

Servervirualisierung mit Citrix XenServer

HRG Assessment: Stratus everrun Enterprise

The Xen of Virtualization

KVM on S390x. Revolutionizing the Mainframe

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

matasano Hardware Virtualization Rootkits Dino A. Dai Zovi

Distributed Systems. Virtualization. Paul Krzyzanowski

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Virtualizing a Virtual Machine

de virtualisation Octobre Octobre 2009 VL/TR

Virtualization: What does it mean for SAS? Karl Fisher and Clarke Thacher, SAS Institute Inc., Cary, NC

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

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

Developing a dynamic, real-time IT infrastructure with Red Hat integrated virtualization

Transcription:

Grupo de Arquitectura de Computadores, Comunicaciones y Sistemas FUNDAMENTALS OF VIRTUALIZATION Lesson 3 Virtualization for the Alejandro Calderón Mateos work

Goals Introduction of what virtualization is. Understanding of where virtualization can be applied. Knowledge of virtualization could help for BG. 2

Contents What virtualization is. Where virtualization could be used. Why virtualization is used. Which kind of virtualization options could be used. Main aspects to remember when deploying a virtualization system. 3

Contents What virtualization is. Where virtualization could be used. Why virtualization is used. Which kind of virtualization options could be used. Main aspects to remember when deploying a virtualization system. 4

Googling for virtualization It is possible to search information from several sites: Wikipedia: http://en.wikipedia.org/wiki/virtualization Forums: http://virt.kernelnewbies.org/ On-line courses: http://www.govirtual.org/docs/doc-1024 Etc. 5

Googling for virtualization Main aspects that we are going to find: 1. Virtualization term is not new: It has been used since 60 s 2. It has been applied to different aspects and areas of computing: Components, servers, personal computers, etc. 6

Virtualization in computing Virtualization is a broad term that refers to the abstraction of computer resources. A technique for hiding the physical characteristics of computing resources from the way in which other systems, applications or end users interact with those resources. Virtual resource 7

Contents What virtualization is. Where virtualization could be used. Why virtualization is used. Which kind of virtualization options could be used. Main aspects to remember when deploying a virtualization system. 8

Virtualization in computing Virtualization is a broad term that refers to the abstraction of computer resources. A technique for hiding the physical characteristics of computing resources from the way in which other systems, applications or end users interact with those resources. Virtual resource Device Process Computer Etc. 9

Virtualization examples device level Storage device: E.g.: RAID Networking: E.g.: IP bonding, IP aliasing, NAT Processor: E.g.: emulate a different instruction set 10

Virtualization examples device level Storage device: E.g.: RAID Networking: E.g.: IP bonding, IP aliasing, NAT Processor: E.g.: emulate a different instruction set 11

Virtualization examples device level Storage device: E.g.: RAID Networking: E.g.: IP bonding, IP aliasing, NAT Processor: E.g.: emulate a different instruction set Rosetta was used by Apple in the PowerPC to Intel transition. 12

Virtualization examples process level Emulation of the application private environment: E.g.: Windows Vista/7 compatibilite mode Languaje level virtualization: E.g.: Java and.net 13

Virtualization examples process level Emulation of the application private environment: E.g.: Windows Vista/7 compatibilite mode Languaje level virtualization: E.g.: Java and.net 14

Virtualization examples computer level Guest desktop as a window: E.g.: VMWare, VirtualBox, etc. A window for each guest application: E.g.: Coherence mode, fluid view, etc. Remote desktop window: E.g.: XEN, VMWare ESX, VirtualBox Headless, etc. 15

Virtualization in computing summary Virtualization is a broad term that refers to the abstraction of computer resources. A technique for hiding the physical characteristics of computing resources from the way in which other systems, applications or end users interact with those resources. Virtual resource Device Process Computer Etc. 16

Virtualization in computing summary It includes: To make a single physical resource (such as a server, an operating system, an application, etc.) be exposed as a different logical resource. To make a single physical resource (such as storage devices, servers, etc.) be exposed as multiple logical resources. To make multiple physical resources (such as storage devices, servers, etc.) be exposed as a single logical resource. 17

Platform Virtualization We will focus on the platform virtualization in terms of virtual machines. The real system will be named as host system, the virtualization system will be named guest. 18

Example: Windows on Linux http://www.kitty.in.th/files/376/qemu.png 19

Contents What virtualization is. Where virtualization could be used. Why virtualization is used. Which kind of virtualization options could be used. Main aspects to remember when deploying a virtualization system. 20

Reasons for Virtualization Server consolidation Service isolation Disaster recovery Testing or training Application portability 21

Consolidation Server consolidation: To reduce costs (by multiplexing resources). Simplifying the administration and management. 1000 1000 1000 1000 22

Consolidation Server consolidation: To reduce costs (by multiplexing resources). Simplifying the administration and management 3000 23

Insolation Improve security: Insolate services in different computers. Different security policy for each computer. 24

Insolation Improve security: Insolate services in different computers. Different security policy for each computer. 25

Disaster recovery Improve disaster recovery: Hot-spare machine(s). Automatic work re-routing while rebooting/fixing. 26

Disaster recovery Improve disaster recovery: Hot-spare machine(s). Automatic work re-routing while rebooting/fixing. 27

Disaster recovery Improve disaster recovery: Hot-spare machine(s). Automatic work re-routing while rebooting/fixing. 28

Testing or training Better testing environment: It enables the execution in other work environment. It improves the restoring process (easier/bit-faster). 29

Testing or training Better testing environment: It enables the execution in other work environment. It improves the restoring process (easier/bit-faster). 30

Application portability http://www.intel.com/technology/magazine/computing/intel-virtualization-0405.htm 31

Reasons for NOT using Virtualization? Complex dimensioning ++ More resources per node are needed Double administration level Some performance loss 32

Complex dimensioning An appropriated sizing is required: The (virtual) servers might change it requirements (memory, cpu,...) An unappropriated sizing has impact in all (virtual) servers. 33

Big resources More resources per host are needed: 8 1GiB servers consolidated on 1 8GiB server Not always is easy (and cheaper) to buy one server with n network cards, n GB of RAM, n TB of disk, etc. 34

Big resources More resources per host are needed: 8 1GiB servers consolidated on 1 8GiB server Not always is easy (and cheaper) to buy one server with n network cards, n GB of RAM, n TB of disk, etc. 35

Two administration levels Double administration level: (Real) host computers (Virtual) guest computers Management of host/guest relationship If a host computer has problems, all guest computer has to be migrated. ssh real 36

Loss of performance A little loss of performance: In CPU could be low: between 3% and 12% Graphic card and buses bandwidth? Hard disk shared among several guest computers? 37

Contents What virtualization is. Where virtualization could be used. Why virtualization is used. Which kind of virtualization options could be used. Main aspects to remember when deploying a virtualization system. 38

Many options Good news: many options User Mode Linux OpenVZ 39

Many options Bad news: many options User Mode Linux OpenVZ 40

Many options To know how internally works. Dependencies, restrictions, etc. To know the important details about virtualization system architectures. To group solutions by common characteristics. 41

How internally is Apps Apps Apps Apps Apps Guest OS Hardware Guest OS Guest OS Guest OS Monitor/Hypervisor Hardware 42

How internally is Apps Apps Apps Guest OS Guest OS Guest OS Monitor/Hypervisor Hardware A new layer is added between the operating system and hardware It will talk with all kind of hardware Arbitrate hardware resources across all operating systems Each operating system is executed in privileged mode but the monitor/hypervisor intercepts its requests to server them. 43

How internally is Apps Apps Apps Guest OS Guest OS Guest OS Monitor/Hypervisor Hardware 1 A new layer is added between the operating system and hardware 3 It will talk with all kind of hardware 4 Arbitrate hardware resources across all operating systems Each operating system is executed in privileged mode but the monitor/hypervisor intercepts its requests to server them. 2 44

Types of Virtualization Hardware Emulation Full Virtualization Para-virtualization Containers http://www-128.ibm.com/developerworks/library/l-linuxvirt/index.html 45

Hardware emulation A virtual machine on the host system is created to emulate the target hardware. Advantage: you can execute software for CPU1 on CPU2 without modifications. Apps Apps Apps Guest OS Guest OS Guest OS Hardware VM A Hardware VM B Hardware Disadvantage: s-l-o-w (about x100) 46

Hardware emulation Bochs Qemu Linux/W95 W95/WXP 47

Full Virtualization Hardware is shared among all guest operating systems through a hypervisor. Advantage: the operating system do not need to be modified. Disadvantage: it is necessary to intercept the access of the operating system to the hardware: Hardware support On-the-fly binary patching 48

Full Virtualization VMware WXP/MacOS WXP/Linux z/vm z/linux sobre z/vm 49

Para-Virtualization Similar to the full-virtualization but the guest software collaborate with hypervisor. Advantage: The operating system works with the hypervisor (less wasted time by interception mechanism). Disadvantage: The operating system has to be modified in order to interact with the hypervisor. 50

Para-Virtualization XEN Hiper-v Linux(S,F,D)/Linux(F) Windows S2008+Vista+Suse / Windows 51

Para-Virtualization User Mode Linux (UML) Linux/Linux 52

Containers Different approach: the operating system provides virtual copies of itself. Advantage: it is NOT possible to execute different operating systems. Disadvantage: best performance and more number of virtual machines executing (with less memory). 53

Containers OpenVZ Density of OpenVZ in a 768 MiB (¾ Gb) RAM computer 54

Containers: dockers 55

Types of Virtualization summary Hardware Emulation Full Virtualization Para-virtualization Containers http://www-128.ibm.com/developerworks/library/l-linuxvirt/index.html 56

How internally is Apps Apps Apps Guest OS Guest OS Guest OS Monitor/Hypervisor Hardware 3 4 A new layer is added between the operating system and hardware It will talk with all kind of hardware Arbitrate hardware resources across all operating systems Each operating system is executed in privileged mode but the monitor/hypervisor intercepts its requests to server them. 2 57

Full/Para-virtualization Interception User Kernel Level 0 Level 1 Regular operating system has been designed to be executed in hardware in privileged mode. In x86 processors, on ring 0 Level 2 But now the privileged code has to be executed without been privileged anymore (the hypervisor is now privileged) Binary patching New virtualization instructions http://pdc-amd01.poly.edu/~wein/cs6243/ppts/cpuvirtualization.pptx 58

Full/Para-virtualization Interception Binary translation/patching: Guest Code Translator Patching the instructions on the fly. The guest code is analyzed and the privileged instructions are replaced with hypervisor calls. Speed-up by caching the patched fragments. Advantage: Can be used on any kind of CPU. TC Index Translation Cache Callouts Disadvantage: S-l-o-w. Guest Code Translation Cache CPU Emulation Routines vpc mov ebx, eax cli and ebx, ~0xfff mov ebx, cr3 sti ret mov ebx, eax call HANDLE_CLI and ebx, ~0xfff mov [CO_ARG], ebx call HANDLE_CR3 call HANDLE_STI jmp HANDLE_RET start 59

Full/Para-virtualization Interception User Kernel monitor Level -1 Level 0 Level 1 Level 2 Special hardware Instrucciones : Ring -1 where the hypervisor is executed. It reduce the performance penalty of dynamic on-the-fly translation. Intel and AMD have developed instructions set extensions for virtualization. There are similar but no compatible. Advantage: Fast request to the hypervisor. Disadvantage: It needs special CPU support. Intel has: VT-x as extensions IVT for IA-32 (Vanderpool) VT-i as extensions IVT for IA-64 (Silvervale) VT-d in 32/64 for Directed I/O AMD has: AMD-V (Pacifica) for 32/64 IOMMU as Directed I/O or PCI-Passthrough http://en.wikipedia.org/wiki/virtualization_technology 60

How internally is Apps Apps Apps Guest OS Guest OS Guest OS Monitor/Hypervisor Hardware 3 4 A new layer is added between the operating system and hardware It will talk with all kind of hardware Arbitrate hardware resources across all operating systems Each operating system is executed in privileged mode but the monitor/hypervisor intercepts its requests to server them. 61

Hypervisor Deployment The monitor/hypervisor have to be able to work with all kind of hardware It has to have drivers for all hardware. It is very difficult to get drivers for all existing (and new) hardware. But we can use a modified operating system as monitor/hypervisor: Hosted or Split Pure Hypervisor http://www.ibm.com/developerworks/linux/library/l-pci-passthrough/ 62

Type 1 hypervisor Deployment Hypervisor To remove from an existent operating system everything but what is needed to transform it into a hypervisor. The hypervisor boots first, and then every virtual machine that uses it: A: less interferences between guests D: no so easier to install 63

Type 1 hypervisor Deployment XEN is now included in the Linux kernel (4.6 in progress) XEN could be described as a Linux system to which all has been remove but the base to be used as hypervisor. Initially designed as para-virtualization system. http://www.ibm.com/developerworks/linux/library/l-xen/ 64

Type 2 hypervisor Deployment Hosted or Split Transform an existent operating system into a hypervisor. A V.M. is a process in the host system: D: Double scheduling D: Expensive access to the hardware A: Easy to install (like a familiar application) 1. Device I/O User App Guest OS (Linux) Kernel Module Host OS (Window XP) 2. CPU/Mem Virtual Machine Monitor Hardware http://www.govirtual.org/servlet/jiveservlet/download/1024-4-1042/introtovms.pptx 65

Type 2 hypervisor Deployment KVM is include in the Linux kernel since versión 2.6.20 KVM transforms the Linux kernel into an hypervisor as a module Other guest operating system can be executed in user-space. It use a modified QEMU process. 66

How internally is Apps Apps Apps Guest OS Guest OS Guest OS Monitor/Hypervisor Hardware 4 A new layer is added between the operating system and hardware It will talk with all kind of hardware Arbitrate hardware resources across all operating systems Each operating system is executed in privileged mode but the monitor/hypervisor intercepts its requests to server them. 67

Full/Para-virtualization device accesses The monitor/hypervisor must be able to deal with all types of hardware: It must have driver for all devices. It provides access to the underlying hardware. Expose the hardware to the guest operating system: Hypervisor device emulation. User-space device emulation. Gateway to device SR-IOV and MR-IOV http://www.ibm.com/developerworks/linux/library/l-pci-passthrough/ 68

Full/Para-virtualization device accesses Hypervisor device emulation. E.g.: VMware workstation Advantage: easy to migrate 69

Full/Para-virtualization device accesses User-space device emulation. E.g.: KVM Advantage: easy to migrate (even to other hypervisor) and safe (no privileged) 70

Full/Para-virtualization device accesses Gateway to device. E.g.: VMware, XEN, etc. Advantage: efficient 71

Full/Para-virtualization device accesses SR-IOV and MR-IOV. Single-Root I/O Virtualization (one server) Multi-Root I/O Virtualization (blades) 72

User App K e r n e l M o d u l e Summary Guest Code Translation Cache v P C mov ebx, eax cli mov ebx, eax call HANDLE_CLI s t a r t and ebx, ~0xfff and ebx, ~0xfff mov ebx, cr3 mov [CO_ARG], ebx sti call HANDLE_CR3 Hardware emulation ret call HANDLE_STI jmp HANDLE_RET Binary translation (patching) Hypervisor device emulation User Full Virtualization Kernel monitor Level -1 Level 0 Level 1 Level 2 New instructions 2 User-space device emulation Para-Virtualization Host OS (Window XP) 1. Devi ce I/O Guest OS (Linux) Virtual Machine Monitor Hardware Hosted or split Gateway to device O.S. Virtualization level 1 Hypervisor 3 SR-IOV and MR-IOV 4 73

Contents What virtualization is. Where virtualization could be used. Why virtualization is used. Which kind of virtualization options could be used. Main aspects to remember when deploying a virtualization system. 74

Platform selection OpenVZ Requirements Virtualization options To understand Criteria: Features Performance Information To apply 75

Platform selection OpenVZ Requirements Virtualization options To understand Criteria: Features Performance Information To apply 76

Features XEN full virt paravirt containers (OS virt) license architectures performance GPL i686, x86-64, IA64, PPC KVM GPL i686, x86-64 paravirt very fast, full virt medium paravirt very fast, full virt medium SMP guests CPU / memory hotplug standalone host notes full virt needs VT / AMD-V full and para virt need VT / AMD-V lguest GPL i686 slow/medium rhype GPL i686, x86-64, research fast (?) PPC project MoL GPL PPC fast 32 bit only UML GPL i686, x86-64, PPC slow upstream L4Linux GPL i686, ARM medium qemu GPL slow/medium, i686, x86-64, fast with IA64, PPC kqemu OpenVZ Linux- VServer GPL GPL i686, x86-64, IA64, PPC, SPARC i686, x86-64, IA64, PPC native native VMware proprietary i686, x86-64 medium LPAR proprietary s390 native z/vm proprietary s390 very fast live migration poor performance isolation typically runs under LPAR http://virt.kernelnewbies.org/techcomparison 77

Performance https://alohalb.wordpress.com/2012/04/24/hypervisors-virtual-network-performance-comparison-from-a-virtualized-load-balancer-point-of-view/ 78

Information Support Documentation Forums Recent deployments 79

Platform selection OpenVZ Requirements Virtualization options To understand Criteria: Features Performance Information To apply 80

Requirement identification Personal Work group 81

Requirement identification Personal Work group Temporal Desktop Permanent Desktop 82

Requirement identification Personal Work group Temporal Desktop Permanent Desktop 83

Requirement identification Personal Work group Temporal Desktop Permanent Desktop Few and Fixed number of services Adaptive number of services 84

Requirement identification Personal Work group Temporal Desktop Permanent Desktop Few and Fixed number of services Adaptive number of services 85

Requirement identification Personal Work group Temporal Desktop Permanent Desktop Few and Fixed number of services Adaptive number of services Own infrastructure Rented infrastructure 86

Requirement identification Personal Work group Temporal Desktop Permanent Desktop Few and Fixed number of services Adaptive number of services Own infrastructure Rented infrastructure 87

Requirement identification Personal Work group Temporal Desktop Permanent Desktop Few and Fixed number of services Adaptive number of services Own infrastructure Rented infrastructure https://groups.google.com/group/cloud-computing/web/list-of-cloud-platforms-providers-and-enablers 88

Requirement identification summary Personal Work group Temporal Desktop Permanent Desktop Few and Fixed number of services Adaptive number of services Own infrastructure Rented infrastructure 89

Grupo de Arquitectura de Computadores, Comunicaciones y Sistemas FUNDAMENTALS OF VIRTUALIZATION ON BIG DATA SYSTEMS Lesson 3 Virtualization for the Alejandro Calderón Mateos work