Virtual Machine Architectures. Virtual Machines. Why Virtualize?

Similar documents
Cloud Computing #6 - Virtualization

Virtualization. Pradipta De

COS 318: Operating Systems. Virtual Machine Monitors

Full and Para Virtualization

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

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

Virtualization. Dr. Yingwu Zhu

Virtualization. Types of Interfaces

Virtualization Technology. Zhiming Shen

System Virtual Machines

Virtual Machines. COMP 3361: Operating Systems I Winter

Virtual Machines. Virtualization

Distributed Systems. Virtualization. Paul Krzyzanowski

COS 318: Operating Systems. Virtual Machine Monitors

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

Virtualization for Cloud Computing

Virtualization. Jia Rao Assistant Professor in CS

Virtualization. Jukka K. Nurminen

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Introduction to Virtual Machines

Virtual machines and operating systems

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

Distributed and Cloud Computing

COM 444 Cloud Computing

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

Introduction to Virtual Machines

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

Knut Omang Ifi/Oracle 19 Oct, 2015

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

Hypervisors and Virtual Machines

kvm: Kernel-based Virtual Machine for Linux

x86 ISA Modifications to support Virtual Machines

Virtualization. Clothing the Wolf in Wool. Wednesday, April 17, 13

Chapter 5 Cloud Resource Virtualization

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

Virtualization Technologies (ENCS 691K Chapter 3)

OS Virtualization. CSC 456 Final Presentation Brandon D. Shroyer

An Introduction to Virtual Machines Implementation and Applications

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

Basics of Virtualisation

ARM Virtualization: CPU & MMU Issues

12. Introduction to Virtual Machines

Virtual Machines.

Virtual Computing and VMWare. Module 4

Chapter 2 Addendum (More on Virtualization)

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

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

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

A Unified View of Virtual Machines

Xen and the Art of. Virtualization. Ian Pratt

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

Virtualization in a Carrier Grade Environment

The Xen of Virtualization

Virtual Machine Security

nanohub.org An Overview of Virtualization Techniques

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

Virtualization VMware Inc. All rights reserved

IOS110. Virtualization 5/27/2014 1

Enabling Technologies for Distributed Computing

Virtualization and the U2 Databases

Multi-core Programming System Overview

Virtualization is set to become a key requirement

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

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

Cloud Computing CS

Data Centers and Cloud Computing

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

Operating System Structures

Enabling Technologies for Distributed and Cloud Computing

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

Virtualization Technology. Zhonghong Ou Data Communications Software Lab, Aalto University

Virtual Servers. Virtual machines. Virtualization. Design of IBM s VM. Virtual machine systems can give everyone the OS (and hardware) that they want.

x86 Virtualization Hardware Support Pla$orm Virtualiza.on

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

Jukka Ylitalo Tik TKK, April 24, 2006

Virtual Machines. Adapted from J.S. Smith and R. Nair, VIRTUAL MACHINES, Morgan-Kaufmann Teodor Rus.

Cloud Architecture and Virtualisation. Lecture 4 Virtualisation

Cloud Computing. Up until now

Virtualization Technology

How To Understand The Power Of A Virtual Machine Monitor (Vm) In A Linux Computer System (Or A Virtualized Computer)

Virtualization Approaches in Cloud Computing

Virtual Machines Fact Sheet

Compromise-as-a-Service

FRONT FLYLEAF PAGE. This page has been intentionally left blank

Hybrid Virtualization The Next Generation of XenLinux

Virtual Machines. Virtual Machines

matasano Hardware Virtualization Rootkits Dino A. Dai Zovi

Development of Type-2 Hypervisor for MIPS64 Based Systems

Virtualization Technologies

COS 318: Operating Systems

Database Virtualization

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

A Survey on Virtualization Technologies

Survey On Hypervisors

A quantitative comparison between xen and kvm

Virtualization: Concepts, Applications, and Performance Modeling

Models For Modeling and Measuring the Performance of a Xen Virtual Server

Chapter 14 Virtual Machines

The MIPS architecture and virtualization

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

Transcription:

Virtual Machine Architectures Virtual Machines Allow a system or execution platform to appear to be a different (or multiple) platform(s) Implemented by adding a software layer CS 256/456 Dept. of Computer Science, University of Rochester 12/7/2010 CSC 2/456 1 12/7/2010 CSC 2/456 2 Emulation Why Virtualize? Optimization Server consolidation Robust level of security Reliability Kernel development Why Virtual Machines? Allow flexible management of machines at software level experimenting with new architecture debugging an OS checkpointing and migrating all state on a machine Enhanced reliability and security VM monitor much smaller than OS, therefore: the full privileged code base (VM monitor) is small the trusted code base (VM monitor) is small Strong isolation between VMs fault and resource isolation your Qemu/Linux assignment 12/7/2010 CSC 2/456 3 12/7/2010 CSC 2/456 4 CSC 256/456 Fall 2010 1

History A Taxonomy of Virtual Machine Architectures VM/370 Developed by IBM for OS/360 in the 1970s. Introduced timesharing. Provided multiprogramming and an extended machine with a more convenient interface than bare hardware. 12/7/2010 CSC 2/456 6 Applications Types of Virtualization Cheaper fault tolerance than independent systems Strong isolation Environment portability Easier load balancing Running legacy applications Software development Process VM vs. System VM CSC 256/456 Fall 2010 2

Real machine address Physical address within the VM Operating Systems 12/7/2010 Virtualization Challenges Virtualization Approach - Interpretation CPU virtualization how to switch out a VM? Memory virtualization VM physical memory address may not be real machine address a VM s memory access must be restricted 30 20 10 Memory region of a VM 10 0 Do not directly run VM code Interpretation inspect each instruction in software and realize its intended effects using software Nachos VM does this CPU virtualization Memory virtualization I/O virtualization I/O virtualization similar issues with memory virtualization 0 Problem: too slow! 12/7/2010 CSC 2/456 9 12/7/2010 CSC 2/456 10 Process VMs Process VMs Memory Virtualization of single processes ABI = application binary interface Combination of ISA and operating system (ex., x86 and Windows) Instruction emulation: interpretation vs. binary translation I/O is similar to non-virtualized processes. Memory address space mapping Runtime software-supported translation tables: Use a software table, similar to a page table, to map corresponding memory addresses. Similar to the process of virtualizing hardware memory. Alternative: Direct mapping to host virtual address space. CSC 256/456 Fall 2010 3

Process VMs Memory Process VMs Memory Memory architecture emulation: Three aspects to consider 1) The overall structure of the address space (segmented vs. flat, linear) 2) The supported access privilege types (R,W,X) 3) The protection/allocation granularity (e.g., page sizes) OS Emulation Process VMs Same-OS emulation: May need to translate function parameters and return values for system calls Some system calls may be handled by the runtime implementation Different-OS emulation: Harder than emulating different ISAs Some OS functions required by the guest may not be possible given the host OS Case-by-case process is necessary due to wide range of systems System VMs Similar to the concept of time-sharing among processes Capable of supporting multiple system images simultaneously Virtual Machine Monitor (VMM): A layer of software between the host platform and guest VM that manages allocation of and access to the hardware resources of the host CSC 256/456 Fall 2010 4

Virtual Machine Architecture OS hardware Non-VM VM monitor hardware Native VM OS OS OS on native OS OS VMM native OS hardware Hosted VM Virtual Machine Transparency Full transparency (perfect virtualization): stock OS (without change) can run within VM VMware Less-than-full transparency (para-virtualization): modified OS runs within VM Xen for performance (memory virtualization) batched page table accesses through explicit monitor calls for simplicity (I/O virtualization) 12/7/2010 CSC 2/456 17 12/7/2010 CSC 2/456 18 System VMs Processors Instruction execution can be through interpretation or binary translation. Can also use direct native execution (only if ISAs are identical) Must address issue of sensitive and privileged instruction references Challenges Instruction Architecture Sensitive May only be executed in kernel mode Privileged Cause a trap if executed in mode Trap Switch to kernel mode for execution. For a system to be virtualizable, the sensitive instructions must be a subset of the privileged instructions (Popek and Goldberg, 1974) CSC 256/456 Fall 2010 5

ISA Challenge: Potential Solution ISA Challenge: Potential Solution Paravirtualization Remove (some or all) sensitive instructions from the guest OS and replace them with hypervisor calls The VMM basically acts as a microkernel by emulating guest OS system calls Architecture design can limit potential for virtualizability Some ISAs have instructions that can read sensitive information without trapping (Ex: Pentium) Solution: Design from the start with virtualization in mind Ex: Intel Core 2 Duo (VT) and AMD Pacific (SVM) Virtualization Approach Direct Execution Directly executing VM code to attain high speed CPU virtualization VM monitor catches timer interrupts and switches VM if necessary I/O access virtualization cause a trap to VM monitor, which processes appropriately extra overhead is not too bad System VMs Memory Each guest VM has its own set of virtual memory tables VM virtual addresses are translated to real memory (a mapping kept by the VMM), which maps to physical memory Adds an extra level of address translation Memory virtualization a trap at each memory access is not a very good idea How? 12/7/2010 CSC 2/456 23 CSC 256/456 Fall 2010 6

System VMs Memory For ISA-implemented page tables: VMM keeps shadow page tables, one for each guest VM Used by the hardware in address translation and TLB caching Page fault handling must take into account differences between shadow page tables and the guest VM page tables System VMs Memory Example: VMware s ESX Server VMM intercepts virtual machine instructions that manipulate guest memory so that the actual physical MMU is not directly updated Host ESX Server keeps virtual-to-machine page mappings in shadow page tables, which are updated with the physical-to-machine mappings Shadow pages tables then used by the processor s paging hardware Memory Virtualization Under Direct Execution (protected page table) From the VM OS s view, the page table contains mapping from virtual to VM physical addresses For proper operation, the page table hooked up with MMU must map virtual to real machine addresses VM OS cannot directly access the page table each page table read is trapped by VM monitor, the physical address field is translated (from real machine address to VM physical address) each page table write is also trapped, for a reverse translation and for security checking 12/7/2010 CSC 2/456 28 CSC 256/456 Fall 2010 7

Memory Virtualization Under Direct Execution (shadow page table) VM OS maintains virtual to VM physical (V2P) page table VM monitor maintains a VM physical to machine (P2M) mapping table combines V2P and P2M table into a virtual to machine mapping table (V2M) supplies the V2M table to the MMU hardware Page table updates any VM change on its V2P page table must be trapped by VM monitor VM monitor modifies V2M table appropriately 12/7/2010 CSC 2/456 29 System VMs Memory Example: VMware s ESX Server System VMs I/O Challenging for VMM, but can adapt techniques from time-sharing of I/O devices on typical systems Create a virtualized version of system devices. VMM intercepts request by guest VM and converts the request to equivalent physical device request System VMs I/O The VMM can catch and virtualize the I/O action at three levels: I/O operation level device driver level system call level Virtualizing at the device driver level is most practical CSC 256/456 Fall 2010 8

Sources Modern Operating Systems, Tanenbaum Chapters 1, 8 Virtual Machines, Smith and Nair Chapters 1, 2, 3, 8 VMware Resource Management Guide http://pubs.vmware.com/vi301/resmgmt/wwhelp/wwhimpl /common/html/wwhelp.htm?context=resmgmt&file=vc_ad vanced_mgmt.11.16.html Survey of Virtual Machine Research, Robert P. Goldberg, 1974. CSC 256/456 Fall 2010 9