Virtualization Guide Virtualization Guide SUSE Linux Enterprise Server 15 SP3

Virtualization Guide Virtualization Guide SUSE Linux Enterprise Server 15 SP3

SUSE Linux Enterprise Server 15 SP3 Virtualization Guide Virtualization Guide SUSE Linux Enterprise Server 15 SP3 This guide describes virtualization technology in general. It introduces libvirt—the unied interface to virtualization—and provides detailed information on specic hypervisors. Publication Date: September 24, 2021 SUSE LLC 1800 South Novell Place Provo, UT 84606 USA https://documentation.suse.com Copyright © 2006– 2021 SUSE LLC and contributors. All rights reserved. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”. For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its aliates. Asterisks (*) denote third-party trademarks. All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its aliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof. Contents Preface xvii 1 Available documentation xvii 2 Improving the documentation xvii 3 Documentation conventions xviii 4 Support xx Support statement for SUSE Linux Enterprise Server xx • Technology previews xxi I INTRODUCTION 1 1 Virtualization technology 2 1.1 Overview 2 1.2 Virtualization benefits 2 1.3 Virtualization modes 3 1.4 I/O virtualization 4 2 Virtualization scenarios 6 2.1 Server consolidation 6 2.2 Isolation 7 2.3 Disaster recovery 7 2.4 Dynamic load balancing 7 3 Introduction to Xen virtualization 8 3.1 Basic components 8 3.2 Xen virtualization architecture 9 iii Virtualization Guide 4 Introduction to KVM virtualization 11 4.1 Basic components 11 4.2 KVM virtualization architecture 11 5 Virtualization tools 13 5.1 Virtualization console tools 13 5.2 Virtualization GUI tools 14 6 Installation of virtualization components 18 6.1 Specifying a system role 18 6.2 Running the yast2-vm module 19 Installing KVM 19 • Installing Xen 19 6.3 Patterns 20 6.4 Installing UEFI support 20 6.5 Enable nested virtualization in KVM 22 7 Virtualization limits and support 24 7.1 Architecture support 24 KVM hardware requirements 24 • Xen hardware requirements 25 7.2 Hypervisor limits 25 KVM limits 26 • Xen limits 26 7.3 Supported host environments (hypervisors) 27 7.4 Supported guest operating systems 28 Availability of paravirtualized drivers 29 7.5 Supported VM migration scenarios 30 Offline migration scenarios 30 • Live migration scenarios 32 7.6 Feature support 34 Xen host (Dom0) 34 • Xen paravirtualized guest (DomU) 35 • Fully virtualized guest 36 iv Virtualization Guide 7.7 Nested virtualization 37 II MANAGING VIRTUAL MACHINES WITH libvirt 38 8 Starting and stopping libvirtd 39 9 Preparing the VM Host Server 41 9.1 Configuring networks 41 Network bridge 41 • Virtual networks 45 9.2 Configuring a storage pool 55 Managing storage with virsh 57 • Managing storage with Virtual Machine Manager 63 10 Guest installation 69 10.1 GUI-based guest installation 69 Configuring the virtual machine for PXE boot 71 10.2 Installing from the command line with virt-install 72 10.3 Advanced guest installation scenarios 75 Memory ballooning with Windows guests 75 • Including add-on products in the installation 75 11 Basic VM Guest management 77 11.1 Listing VM Guests 77 Listing VM Guests with Virtual Machine Manager 77 • Listing VM Guests with virsh 78 11.2 Accessing the VM Guest via console 78 Opening a graphical console 78 • Opening a serial console 80 11.3 Changing a VM Guest's state: start, stop, pause 81 Changing a VM Guest's state with Virtual Machine Manager 82 • Changing a VM Guest's state with virsh 82 11.4 Saving and restoring the state of a VM Guest 83 Saving/restoring with Virtual Machine Manager 84 • Saving and restoring with virsh 85 v Virtualization Guide 11.5 Creating and managing snapshots 85 Terminology 85 • Creating and managing snapshots with Virtual Machine Manager 86 • Creating and managing snapshots with virsh 88 11.6 Deleting a VM Guest 90 Deleting a VM Guest with Virtual Machine Manager 90 • Deleting a VM Guest with virsh 91 11.7 Migrating VM Guests 91 Migration requirements 91 • Migrating with Virtual Machine Manager 93 • Migrating with virsh 94 • Step-by-step example 96 11.8 Monitoring 98 Monitoring with Virtual Machine Manager 98 • Monitoring with virt- top 99 • Monitoring with kvm_stat 100 12 Connecting and authorizing 102 12.1 Authentication 102 libvirtd authentication 103 • VNC authentication 107 12.2 Connecting to a VM Host Server 111 “system” access for non-privileged users 112 • Managing connections with Virtual Machine Manager 113 12.3 Configuring remote connections 114 Remote tunnel over SSH (qemu+ssh or xen+ssh) 115 • Remote TLS/SSL connection with x509 certificate (qemu+tls or xen+tls) 115 13 Advanced storage topics 123 13.1 Locking disk files and block devices with virtlockd 123 Enable locking 123 • Configure locking 124 13.2 Online resizing of guest block devices 125 13.3 Sharing directories between host and guests (file system pass- through) 126 13.4 Using RADOS block devices with libvirt 127 vi Virtualization Guide 14 Configuring virtual machines with Virtual Machine Manager 128 14.1 Machine setup 129 Overview 129 • Performance 130 • Processor 131 • Memory 132 • Boot options 134 14.2 Storage 134 14.3 Controllers 136 14.4 Networking 137 14.5 Input devices 139 14.6 Video 140 14.7 USB redirectors 142 14.8 Miscellaneous 142 14.9 Adding a CD/DVD-ROM device with Virtual Machine Manager 143 14.10 Adding a floppy device with Virtual Machine Manager 144 14.11 Ejecting and changing floppy or CD/DVD-ROM media with Virtual Machine Manager 145 14.12 Assigning a host PCI device to a VM Guest 146 Adding a PCI device with Virtual Machine Manager 146 14.13 Assigning a host USB device to a VM Guest 147 Adding a USB device with Virtual Machine Manager 147 15 Configuring virtual machines with virsh 149 15.1 Editing the VM configuration 149 15.2 Changing the machine type 150 15.3 Configuring hypervisor features 151 15.4 Configuring CPU 152 Configuring the number of CPUs 152 • Configuring the CPU model 154 vii Virtualization Guide 15.5 Changing boot options 155 Changing boot order 156 • Using direct kernel boot 156 15.6 Configuring memory allocation 157 15.7 Adding a PCI device 158 PCI Pass-Through for IBM Z 161 15.8 Adding a USB device 162 15.9 Adding SR-IOV devices 163 Requirements 163 • Loading and configuring the SR-IOV host drivers 164 • Adding a VF network device to a VM Guest 167 • Dynamic allocation of VFs from a pool 170 15.10 Listing attached devices 171 15.11 Configuring storage devices 172 15.12 Configuring controller devices 173 15.13 Configuring video devices 175 Changing the amount of allocated VRAM 175 • Changing the state of 2D/3D acceleration 175 15.14 Configuring network devices 176 Scaling network performance with multiqueue virtio-net 176 15.15 Using macvtap to share VM Host Server network interfaces 177 15.16 Disabling a memory balloon device 178 15.17 Configuring multiple monitors (dual head) 179 15.18 Crypto adapter pass-through to KVM guests on IBM Z 180 Introduction 180 • What is covered 180 • Requirements 180 • Dedicate a crypto adapter to a KVM host 181 • Further reading 183 16 Managing virtual machines with Vagrant 184 16.1 Introduction to Vagrant 184 Vagrant concepts 184 • Vagrant example 185 viii Virtualization Guide 16.2 Vagrant boxes for SUSE Linux Enterprise 185 16.3 Further reading 186 17 Xen to KVM migration guide 187 17.1 Migration to KVM using virt-v2v 187 Introduction to virt-v2v 187 • Installing virt-v2v 188 • Preparing the virtual machine 188 • Converting virtual machines to run under KVM managed by libvirt 189 • Running converted virtual machines 194 17.2 Xen to KVM manual migration 194 General outline 194 • Back up the Xen VM Guest 195 • Changes specific to paravirtualized guests 195 • Update the Xen VM Guest configuration 198 • Migrate the VM Guest 202 17.3 More information 203 III HYPERVISOR-INDEPENDENT FEATURES 204 18 Disk cache modes 205 18.1 Disk interface cache modes 205 18.2 Description of cache modes 205 18.3 Data integrity implications of cache modes 207 18.4 Performance implications of cache modes 208 18.5 Effect of cache modes on live migration 208 19 VM Guest clock settings 209 19.1 KVM: using kvm_clock 209 Other timekeeping methods 210 19.2 Xen virtual machine clock settings 210 20 libguestfs 211 20.1 VM Guest manipulation overview 211 VM Guest manipulation risk 211 • libguestfs design 212 ix Virtualization Guide 20.2 Package installation 212 20.3 Guestfs tools 213 Modifying virtual machines 213 • Supported file systems and disk images 213 • virt-rescue 214 • virt-resize 214 • Other virt-* tools 216 • guestfish 218 • Converting a physical machine into a KVM guest 219 20.4 Troubleshooting 221 Btrfs-related problems 221 • Environment 222 • libguestfs-test- tool 222 20.5 More information 222 21 QEMU guest agent 223 21.1 Running QEMU GA commands 223 21.2 virsh commands that require QEMU GA 223 21.3 Enhancing libvirt commands 224 21.4 More information 225 22 Software TPM emulator 226 22.1 Introduction 226 22.2 Prerequisites 226 22.3 Installation 226 22.4 Using swtpm with QEMU 226 22.5 Using swtpm with libvirt 228 22.6 TPM measurement with OVMF

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    431 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us