The QEMU/KVM Hypervisor

Similar documents
KVM Architecture Overview

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

BHyVe. BSD Hypervisor. Neel Natu Peter Grehan

Operating Systems Virtualization mechanisms

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

KVM on S390x. Revolutionizing the Mainframe

An Introduction to OpenStack and its use of KVM. Daniel P. Berrangé

Using Linux as Hypervisor with KVM

Advanced Computer Networks. Network I/O Virtualization

Beyond the Hypervisor

RED HAT ENTERPRISE VIRTUALIZATION

Basics of Virtualisation

KVM KERNEL BASED VIRTUAL MACHINE

RUNNING vtvax FOR WINDOWS

RPM Brotherhood: KVM VIRTUALIZATION TECHNOLOGY

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

Linux Virtualization Nesting and Management

Xen Project 4.4: Features and Futures. Russell Pavlicek Xen Project Evangelist Citrix Systems

Real-Time KVM for the Masses Unrestricted Siemens AG All rights reserved

Running vtserver in a Virtual Machine Environment. Technical Note by AVTware

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

Architecture of the Kernel-based Virtual Machine (KVM)

Virtualization. Pradipta De

RED HAT ENTERPRISE VIRTUALIZATION 3.0

Virtualization. Dr. Yingwu Zhu

ZEN LOAD BALANCER EE v3.04 DATASHEET The Load Balancing made easy

The Art of Virtualization with Free Software

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

KVM in Embedded Requirements, Experiences, Open Challenges

Real-time KVM from the ground up

ZEN LOAD BALANCER EE v3.02 DATASHEET The Load Balancing made easy

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

Full and Para Virtualization

Red Hat Enterprise Linux 7 Virtualization Getting Started Guide

CS5460: Operating Systems. Lecture: Virtualization 2. Anton Burtsev March, 2013

Network Virtualization Technologies and their Effect on Performance

With Red Hat Enterprise Virtualization, you can: Take advantage of existing people skills and investments

Virtualised MikroTik

Servervirualisierung mit Citrix XenServer

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

Installing & Using KVM with Virtual Machine Manager COSC 495

Open Source Virtualization with ovirt. DI (FH) René Koch Systems Engineer Siedl Networks GmbH Grazer Linuxtage,

Enhancing Hypervisor and Cloud Solutions Using Embedded Linux Iisko Lappalainen MontaVista

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

Enabling Technologies for Distributed Computing

Microkernels, virtualization, exokernels. Tutorial 1 CSC469

Virtualization and Performance NSRC

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

Enterprise-Class Virtualization with Open Source Technologies

Date: December 2009 Version: 1.0. How Does Xen Work?

Knut Omang Ifi/Oracle 19 Oct, 2015

Virtualization. Types of Interfaces

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

2972 Linux Options and Best Practices for Scaleup Virtualization

Hyper-V vs ESX at the datacenter

Software SIParator / Firewall

Hypervisors and Virtual Machines

I/O Virtualization Using Mellanox InfiniBand And Channel I/O Virtualization (CIOV) Technology

Nested Virtualization

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

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

Real-Time Virtualization How Crazy Are We?

Enabling Technologies for Distributed and Cloud Computing

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

COS 318: Operating Systems. Virtual Machine Monitors

Introduction to ovirt

Virtualization: Hypervisors for Embedded and Safe Systems. Hanspeter Vogel Triadem Solutions AG

BIG-IP Virtual Edition Setup Guide for Linux KVM. Version 11.4

With Red Hat Enterprise Virtualization, you can: Take advantage of existing people skills and investments.

A Survey on Virtual Machine Security

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

Securing Your Cloud with Xen Project s Advanced Security Features

KVM Virtualization Roadmap and Technology Update

RED HAT ENTERPRISE VIRTUALIZATION FOR SERVERS: COMPETITIVE FEATURES

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

KVM Security Comparison

ovirt: Open Your Virtual Data Center

COM 444 Cloud Computing

Introduction to Virtualization & KVM

kvm: Kernel-based Virtual Machine for Linux

SUSE Linux Enterprise 10 SP2: Virtualization Technology Support

High-performance vnic framework for hypervisor-based NFV with userspace vswitch Yoshihiro Nakajima, Hitoshi Masutani, Hirokazu Takahashi NTT Labs.

Next Generation Now: Red Hat Enterprise Linux 6 Virtualization A Unique Cloud Approach. Jeff Ruby Channel Manager jruby@redhat.com

Virtualization. Michael Tsai 2015/06/08

Mobile Cloud Computing T Open Source IaaS

FOR SERVERS 2.2: FEATURE matrix

Virtualization in Linux KVM + QEMU

Mirantis

Virtualization Technology

Red Hat enterprise virtualization 3.0 feature comparison

Performance tuning Xen

Database Virtualization

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

Open Source Virtualization

Transcription:

The /KVM Hypervisor Understanding what's powering your virtual machine Dr. David Alan Gilbert dgilbert@redhat.com 2015-10-14

Topics Hypervisors and where /KVM sits Components of a virtual machine KVM Devices: Real, Emulated, and Paravirtualised Storage Networking Graphics Controlling Guest agents Migration tips Nesting 2

Hypervisors (aka Virtual Machine Manager) & where /KVM fits Something that sits above a guest kernel Supervisor old name for an Guest has it's own kernel Can be a different OS Host is isolated from guest kernel security issues App App Firmware App App App App Hypervisor Firmware App App App App App Linux kernel KVM Firmware 3

Components of a virtual machine One virtual machine 4

KVM Linux kernel component for handling virtualisation How to virtualise a CPU can't let the guest interfere with the host Emulate? Slow Emulate tricky instructions? Messy, and still not that fast Change the guest to remove tricky bits? Fast but limits the guests (Early Xen) Use newer CPU features to do all the hard work CPU put in a special mode then just runs the guests code natively But exits back when it needs some help KVM controls these features (Lots of architectures: x86, ARM, Power, mainframe etc) Each vcpu appears as just a Linux thread Also has speedups for emulating some performance critical devices Timers, networking 5

Quick EMUlator Emulates CPU or uses KVM Also used by Xen and other projects Emulates all the other devices Disks, Networking, user input, graphics, timers, interrupt hardware etc Handles all the setup Allocates memory, opens disk files Just a normal Linux process Follows normal security rules (can add SELinux, cgroups etc to isolate) Provides control interfaces Start/stop VM, dynamically add devices, debug output etc 6

Providing devices Emulate real devices e.g. a specific model of IDE controller + works with any OS that already knows the device - Lots of legacy detail, can be slower, need to be bug compatible Paravirtual devices (e.g. virtio) + optimised for virtual environment No hardware oddities to match - Needs special drivers in guest Real device pass through Pass through PCI devices very low overhead Need IOMMU on host, can't migrate Pass through USB Virtual function of real devices One slice of a high end network card (SR-IOV), some GPUs 7

Storage Guest view: IDE, SCSI, SATA, virtio-blk/scsi, USB storage Where? Local file Local block device Take care of host security! - e.g. guest can label block device, or create LVM Remote Format? Via iscsi, HTTP, SSH, Gluster, CEPH, Sheepdog, NBD Or via host kernel's remote iscsi, NFS etc Raw QCOW2 Snapshotting, COW, thin provision 8

Networking Guest view: e1000, virtio-net (& some more obscure) passes packets to kernel TUN/TAP setup, then connected to bridges/etc Macvtap can avoid the bridge setup (but can't connect to host) userspace NAT Bad idea except for simple testing/desktop use Vhost-net Kernel extension to bypass Networking messy to setup by hand Let the management layers do it! 9

Graphics Guest view: Cirrus, VGA, QXL/Spice Connection: VNC, Spice, local GUI VNC/ Spice Viewer 3D acceleration being worked on Can pass spare host GPU through But can be tricky, very model dependent Security: Don't expose VNC, Spice direct to the internet, use a proxy Proxy Viewer/ Browser 10

Controlling /KVM Huge command line Specify each optional device (typically controller+device, e.g. IDE+file) Specifies size of RAM, number of CPUs, type of CPU etc Try and avoid driving it by hand let libvirt and higher levels do the hard work QMP/HMP interfaces HMP Human commands [mainly for debug] QMP JSON commands Runtime e.g. hot add, status etc Again let libvirt handle it Libvirt puts logs in /var/log/libvirt/qemu/guestname.log App App OpenStack Libvirt App App Linux kernel 'virsh' to control libvirt Firmware App KVM 11

Guest agents Optional installation inside the guest As a package/application installed by the admin of the guest OS Various tools e.g. Set guest time Suspend OpenStack Libvirt Get stats Read files App GA App Linux kernel KVM Firmware 12

Migration Move a VM from one host to another Guest config must be IDENTICAL Non-Live Check machine type, devices, ROMs Pause guest, move it, carry on Guest CPU type Live Move it while it's changing Pick one that is lowest common denominator in your cloud Needs fast network Networking gets reconfigured as it moves App App Linux kernel KVM Linux kernel KVM Firmware Firmware 13

Fun with Nesting Very useful for development probably not a good idea for production yet On most systems needs explicitly enabling in the top level (L0) host Can run an entire little cluster inside one host Convention for naming increases as you go down: L0 top level host L1 Guest of top level host L2 Guest of L1 Networking can be 'interesting' Make sure you don't use the same address range in L1 as L0 Migrating a nest generally breaks Make sure KVM enabled in L1 App App App App App App App Linux kernel KVM Linux kernel KVM Firmware 14

The /KVM Hypervisor Understanding what's powering your virtual machine Dr. David Alan Gilbert dgilbert@redhat.com 2015-10-14