Linux/QEMU/Libvirt. 4 Years in the Trenches. Chet Burgess Cisco Systems Scale 14x Sunday January 24th

Similar documents
Storage Performance Tuning for FAST! Virtual Machines

A block layer overview. Red Hat Kevin Wolf 8 November 2012

Red Hat Enterprise Virtualization Hypervisor Roadmap. Bhavna Sarathy Senior Technology Product Manager, Red Hat

KVM 在 OpenStack 中的应用. Dexin(Mark) Wu

Installing the Cisco IOS XRv 9000 Router in KVM Environments

Effective Virtual CPU Configuration in Nova

Ceph Block Devices: A Deep Dive. Josh Durgin RBD Lead June 24, 2015

Tuning Your SUSE Linux Enterprise Virtualization Stack. Jim Fehlig Software Engineer

Virtual Server Management

Developing cloud infrastructure from scratch: the tale of an ISP

Deterministic Storage Performance

Cloud environment with CentOS, OpenNebula and KVM

Painless switch from proprietary hypervisor to QEMU/KVM. Denis V. Lunev

Live block device operations in QEMU

Deterministic Storage Performance

Virtualization at Scale in SUSE Linux Enterprise Server

DEEP DIVE: OPENSTACK COMPUTE

Accelerating NVMe-oF* for VMs with the Storage Performance Development Kit

USB Status report 2012

libvirt integration and testing for enterprise KVM/ARM Drew Jones, Eric Auger Linaro Connect Budapest 2017 (BUD17)

Red Hat Ceph Storage Ceph Block Device

Backing Chain Management in libvirt and qemu. Eric Blake KVM Forum, August 2015

Virtual Machine Migration

ClearPass Policy Manager 6.3

Veritas InfoScale 7.4 Virtualization Guide - Linux

Red Hat Ceph Storage 2 Ceph Block Device to OpenStack Guide

RED HAT CEPH STORAGE ROADMAP. Cesar Pinto Account Manager, Red Hat Norway

Scalability and stability of libvirt: Experiences with very large hosts

CPU models after Spectre & Meltdown. Paolo Bonzini Red Hat, Inc. KVM Forum 2018

Turtles all the Way Down. Image 2013 CC-BY-NC-SA by Tony Gray

Bacula Systems Virtual Machine Performance Backup Suite

KVM Virtualized I/O Performance

Accelerating NVMe I/Os in Virtual Machine via SPDK vhost* Solution Ziye Yang, Changpeng Liu Senior software Engineer Intel

Live Block Device Operations in QEMU. Kashyap Chamarthy FOSDEM 2018 Brussels

Application Note. P2V and V2V Concepts for Scale Computing HC³

Disruptive Forces Affecting the Future

Know your competition A review of qemu and KVM for System z

Webinar Series: Triangulate your Storage Architecture with SvSAN Caching. Luke Pruen Technical Services Director

Red Hat Ceph Storage Ceph Block Device

The following sections below list the deployment scenarios and also list all the requirement XML files.

Configuring Cisco UCS Server Pools and Policies

Building Your Own Robust and Powerful Software Defined Storage with VMware vsan. Tips on Choosing Hardware for vsan Deployment

Facilitating Incremental Backup. Eric Blake KVM Forum, 26 October 2018

All you need to know about OpenStack Block Storage in less than an hour. Dhruv Bhatnagar NirendraAwasthi

VMware vsan Ready Nodes

The following sections below list the deployment scenarios and also list all the requirement XML files.

Red Hat Enterprise Linux 8.0 Beta

Cloud and Datacenter Networking

A comparison of performance between KVM and Docker instances in OpenStack

Veritas InfoScale 7.2 Virtualization Guide - Linux

Deploy the ExtraHop Explore Appliance on a Linux KVM

Take Back Lost Revenue by Activating Virtuozzo Storage Today

Deploy the ExtraHop Explore Appliance on a Linux KVM

vtserver Running vtserver on Hypervisors

Rethinking Machine Types

Why Scale-Out Big Data Apps Need A New Scale- Out Storage

qcow2 Red Hat Kevin Wolf 15 August 2011

SUSE An introduction...

Managing the New Block Layer. Kevin Wolf Max Reitz KVM Forum 2017

Helion OpenStack Carrier Grade 4.0 RELEASE NOTES

DRAFT Pure Storage FlashArray OpenStack Cinder Volume Driver Setup Guide

Pure Storage FlashArray OpenStack Cinder Volume Driver Setup Guide

Contents. HyperCore OS Software Versions 13 Supported 13 Unsupported 13. Definitions 2 Supported 2 Unsupported 2

Definitions 2 Supported 2 Unsupported 2. Tested System Limits 3. HC3 System Configuration General Guidelines 5. HC3 System Configurations 7

Xen Project. An overview of the Verizon Cloud Architecture. Don Slutz

Disks and their Cloudy Future

Forget IOPS: A Proper Way to Characterize & Test Storage Performance Peter Murray SwiftTest

A New Key-value Data Store For Heterogeneous Storage Architecture Intel APAC R&D Ltd.

SCSI support improvement

Emulator Clustering Hands on Lab Session I319 Camiel Vanderhoeven and Barry Kierstein

Transparent Service Migration to the Cloud Clone existing VMs to CloudStack/OpenStack templates without user downtime. CloudOpen Seattle 2015

TIPS TO. ELIMINATE LATENCY in your virtualized environment

Deploying Software Defined Storage for the Enterprise with Ceph. PRESENTATION TITLE GOES HERE Paul von Stamwitz Fujitsu

Installation and Cluster Deployment Guide for KVM

Cisco and EMC Release Joint Validated Design for Desktop Virtualization with Citrix XenDesktop. Daniel Chiu Business Development Manager, EMC

Onboarding VMs to Cisco Metacloud

Creating the Fastest Possible Backups Using VMware Consolidated Backup. A Design Blueprint

CREATING, EDITING AND MANAGING VMS

IBM Exam C IBM Storwize V7000 Implementation V1 Version: 6.0 [ Total Questions: 78 ]

The following modifications have been made to this version of the DSM specification:

KVM Weather Report. Amit Shah SCALE 14x

kernels-in-kernels kernels within kernels by Lee Elston Version 1.0 c CC-BY SA4

Thanks for Live Snapshots, Where's Live Merge?

1Y0-A26 Citrix XenServer 6.0 Practice Exam

INTEGRATING HPFS IN A CLOUD COMPUTING ENVIRONMENT

Configuration Maximums

Changpeng Liu. Senior Storage Software Engineer. Intel Data Center Group

Symantec System Recovery 2011 Management Solution Technical FAQ

VALE: a switched ethernet for virtual machines

TITANIUM CLOUD VIRTUALIZATION PLATFORM

Installation and Cluster Deployment Guide for KVM

WIND RIVER TITANIUM CLOUD FOR TELECOMMUNICATIONS

StarlingX. StarlingX is aligned with the OpenStack Foundation Edge Working Group and the Linux Foundation Akraino Edge Stack.

Changpeng Liu, Cloud Software Engineer. Piotr Pelpliński, Cloud Software Engineer

System Requirements. Hardware and Virtual Appliance Requirements

Activating Flex Grid License for Managed Services

Paul Hodge 25 Oct 2016 RUN FAST. NEVER STOP. The Next Generation Virtual Platform

Deploy a High-Performance Database Solution: Cisco UCS B420 M4 Blade Server with Fusion iomemory PX600 Using Oracle Database 12c

StorMagic SvSAN 6.1. Product Announcement Webinar and Live Demonstration. Mark Christie Senior Systems Engineer

When (and how) to move applications from VMware to Cisco Metacloud

Transcription:

Linux/QEMU/Libvirt 4 Years in the Trenches Chet Burgess Cisco Systems Scale 14x Sunday January 24th

Introduction What do I know? I ve spent the last 4 years designing, building, and managing OpenStack based clouds. I ve seen millions of unique VMs running on QEMU. What I am going to talk about? I m going to share some interesting tips and trips we've learned over the years. I m not covering the basics of libvirt and QEMU. 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2

Building Blocks 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3

Libvirt & QEMU QEMU is the emulation layer Libvirt is a tool for controlling QEMU Provides local API http://tinyurl.com/libvirt-api-ref) Provides command line interface (http://tinyurl.com/virsh-doc) Supports XML configuration format (http://tinyurl.com/libvirt-xml-doc) 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4

Libvirt saves your sanity! 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5

Machine Type Machine type defines the characteristics of the hardware that will be presented (http://tinyurl.com/qemu-machine-type) USB bus, PCI bus, available types of NIC cards, video card, etc qemu_x86-64 -machine help Machine types are passed by name example: -machine pc-i440fx-rhel7.1.0,accel=kvm,usb=off You cannot change the machine type once a VM is booted 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6

CPU Models CPU Models define CPU architecture and flags QEMU (http://tinyurl.com/qemu-cpu-model) libvirt (http://tinyurl.com/libvirt-cpu-model) qemu_x86-64 -cpu help QEMU supports host model (pass all available flags of the physical CPU that are supported) Libvirt supports passthrough model (lists each flag on the command line of the physical CPU that are supported Some flags must be emulated 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7

Storage 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8

Storage Backend Considerations Understand your workload and how your storage backend works Do NOT forget about IOPS! Add more spindles to increase your available IOPS Consider using SSDs as cache (bcache, dm-cache, CEPH journals and monitors) Be careful trading IOPS for more storage (compression, de-duplication) Tiered storage Consider a build storage tier (spinning drives) and a high performance tier (SSDs) 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9

Disk Errors What happens when QEMU can t read/write to the device? Configurable via error_policy and rerror_policy in XML Values report (default) - Send the error from the underlying storage subsystem to the guest kernel stop - pause the VM instead of reporting the error ignore - Error? What error? enospace - Send enospace error to the guest kernel 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10

Disk Cache Mode Configures disk caching mode QEMU will use for I/O Values none, writethrough (default), writeback, directsync, unsafe Enabling Set cache='$value' in driver definition in XML Detailed explanation of each at http://tinyurl.com/libvirt-cache 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11

UNMAP/TRIM Support UNMAP will purge data from some disk formats and device types QCOW2, RBD, some iscsi backends Requirements Guest Kernel Support QEMU 1.5.0+ Libvirt 1.0.6+ virtio-scsi bus type Enabling Add discard='unmap' to driver definition in XML 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12

Libvirt XML for Disk Device <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none' discard='unmap' error_policy='stop'/> <source file='/mnt/vm/discard/disk'/> <target dev='sda' bus='scsi'/> <alias name='scsi0-0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13

VM Migrations 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14

Why Migrations Matter Operations Key to performing non-disruptive work Re-balancing workloads and resources Expectations versus reality Special snowflakes Ephemeral instances and the cloud way 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15

Migrations Cold Migrations Shutdown the VM, copy the data and XML, start the VM Live Migrations Copy machine (CPU & RAM) from source to destination with minimal impact, implies some form of shared storage Live Block Migrations Also copies the disk files of the running machine to the destination, implies local storage http://tinyurl.com/libvirt-migrate 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16

Tips for Successful Live Migrations virsh migrate Pause VM and migrate to new destination --live flag to minimize pause time Still pauses for final incremental sync of CPU and RAM Impacted by high memory churn rate (JVMs) Use virsh migrate-setmaxdowntime to control length of pause --timeout controls how long to try before pausing and doing a full sync File based disk paths cannot be changed unless you use --xml 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17

Tips for Successful Live Block Migrations virsh migrate --copy-storage-all Copy full content of disk to destination Flattens disk on copy virsh migrate --copy-storage-inc Doesn t flatten disk Any file based disk device will be copied to destination No safety check to see if the file is shared 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18

Machine, CPU, and Live Migrations Machine type must be identical on source and destination during migrations Since its passed by name it means the name and the actual definition must match CPU Model and flags also need to be identical Challenges arise with heterogeneous hardware environments Pick the smallest and simplest set of flag needed to ensure maximum capability 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19

Disk Cache Mode and Live Migrations Libvirt will deny live migrations if cache!= none Except RBD has special handling in libvirt. As long as the cache type is set to writeback libvirt will allow the migration. 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20

Upgrades 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21

Upgrading In theory newer versions of QEMU are backward compatible; in theory. Issues may arise attempting to boot or live migrate a VM to a newer QEMU with an older machine type Consider having multiple versions installed and using a wrapper If you don t include a machine type in your XML you will get the latest Good - Just reboot your VM to upgrade it Bad - If your OS/application is machine/cpu sensitive a reboot could break your VM. General Rule - migrate from older to newer versions (QEMU, libvirt, Kernel) 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22

Libvirt Potpourri 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23

Libvirt Tunables Improves scalability for programatic clients max_clients = 50 prio_workers = 25 min_workers = 5 max_workers = 50 max_client_requests = 25 Libvirt UUID Some distros ship with the libvirt UUID set to all 0 s in the config file Be sure its unique or that dmidecode -s system-uuid returns a unique value 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24

Libvirt XML Setting smbios Used by some licensing schemes to fingerprint the hardware <sysinfo type='smbios'> <system> <entry name='manufacturer'>openstack Foundation</entry> <entry name='product'>openstack Nova</entry> <entry name= version'>7.0</entry> <entry name='serial'>12345</entry> <entry name='uuid'>17417240-7f62-4a30-8821-c86ef0e9bf6f</entry> </system> </sysinfo> 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25

Q&A You ve got questions? I ve got answers. Maybe. 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26