logo资料库

KVM Virtualization Cookbook 无水印pdf.pdf

第1页 / 共333页
第2页 / 共333页
第3页 / 共333页
第4页 / 共333页
第5页 / 共333页
第6页 / 共333页
第7页 / 共333页
第8页 / 共333页
资料共333页,剩余部分请下载后查看
Cover
Copyright
About the Author
Table of Contents
Preface
1: Getting Started with QEMU and KVM
Introduction
Installing and configuring QEMU
Getting ready
How to do it...
How it works...
Managing disk images with qemu-img
Getting ready
How to do it...
How it works...
There's more...
Preparing images for OS installation with qemu-nbd
Getting ready
How to do it...
How it works...
Installing a custom OS on the image with debootstrap
Getting ready
How to do it...
How it works...
Resizing an image
Getting ready
How to do it...
How it works...
Using pre-existing images
Getting ready
How to do it...
How it works...
There's more...
See also
Running virtual machines with qemu-system-*
Getting ready
How to do it...
How it works...
Starting the QEMU VM with KVM support
Getting ready
How to do it...
How it works...
There's more...
Connecting to a running instance with VNC
Getting ready
How to do it...
How it works...
2: Using libvirt to Manage KVM
Introduction
Installing and configuring libvirt
Getting ready
How to do it...
How it works...
Defining KVM instances
Getting ready
How to do it...
How it works...
There's more...
Starting, stopping, and removing KVM instances
Getting ready
How to do it...
How it works...
Inspecting and editing KVM configs
Getting ready
How to do it...
How it works...
Building new KVM instances with virt-install and using the console
Getting ready
How to do it...
How it works...
Managing CPU and memory resources in KVM
Getting ready
How to do it...
How it works...
There's more...
Attaching block devices to virtual machines
Getting ready
How to do it...
How it works...
Sharing directories between a running VM and the host OS
Getting ready
How to do it...
How it works...
There's more...
Autostarting KVM instances
Getting ready
How to do it...
How it works...
Working with storage pools
Getting ready
How to do it...
How it works...
There's more...
Managing volumes
Getting ready
How to do it...
How it works...
Managing secrets
Getting ready
How to do it...
How it works...
3: KVM Networking with libvirt
Introduction
The Linux bridge
Getting ready
How to do it...
How it works...
There's more...
The Open vSwitch
Getting ready
How to do it...
How it works...
There's more...
Configuring NAT forwarding network
Getting ready
How to do it...
How it works...
Configuring bridged network
Getting ready
How to do it...
How it works...
Configuring PCI passthrough network
Getting ready
How to do it...
How it works...
Manipulating network interfaces
Getting ready
How to do it...
How it works...
4: Migrating KVM Instances
Introduction
Manual offline migration using an iSCSI storage pool
Getting ready
How to do it...
How it works...
There's more...
Manual offline migration using GlusterFS shared volumes
Getting ready
How to do it...
How it works...
Online migration using the virsh command with shared storage
Getting ready
How to do it...
How it works...
There's more...
Offline migration using the virsh command and local image
Getting ready
How to do it...
How it works...
Online migration using the virsh command and local image
Getting ready
How to do it...
How it works...
5: Monitoring and Backup of KVM Virtual Machines
Introduction
Resource usage collection with libvirt
Getting ready
How to do it...
How it works...
There's more...
Monitoring KVM instances with Sensu
Getting ready
How to do it...
How it works...
There's more...
Simple KVM backups with tar and rsync
Getting ready
How to do it...
How it works...
Creating snapshots
Getting ready
How to do it...
How it works...
Listing snapshots
Getting ready
How to do it...
How it works...
Inspecting snapshots
Getting ready
How to do it...
How it works...
Editing snapshots
Getting ready
How to do it...
How it works...
Reverting snapshots
Getting ready
How to do it...
How it works...
Deleting snapshots
Getting ready
How to do it...
How it works...
6: Deploying KVM Instances with OpenStack
Introduction
Preparing the host for the OpenStack deployment
Getting ready
How to do it...
How it works...
Installing and configuring the OpenStack Keystone identity service
Getting ready
How to do it...
How it works...
Installing and configuring the OpenStack Glance image service
Getting ready
How to do it...
How it works...
Installing and configuring the OpenStack Nova compute service
Getting ready
How to do it...
How it works...
Installing and configuring the OpenStack Neutron networking service
Getting ready
How to do it...
How it works...
Building and inspecting KVM instances with OpenStack
Getting ready
How to do it...
How it works...
Stopping KVM instances with OpenStack
Getting ready
How to do it...
How it works...
Terminating KVM instances with OpenStack
Getting ready
How to do it...
How it works...
7: Using Python to Build and Manage KVM Instances
Introduction
Installing and using the Python libvirt library
Getting ready
How to do it...
How it works...
Defining KVM instances with Python
Getting ready
How to do it...
How it works...
There's more...
Starting, stopping, and deleting KVM instances with Python
Getting ready
How to do it...
How it works...
There's more...
Inspecting KVM instances with Python
Getting ready
How to do it...
How it works...
There's more...
Building a simple REST API server with libvirt and bottle
Getting ready
How to do it...
How it works...
There's more...
8: Kernel Tuning for KVM Performance
Introduction
Tuning the kernel for low I/O latency
Getting ready
How to do it...
How it works...
Memory tuning for KVM guests
Getting ready
How to do it...
How it works...
CPU performance options
Getting ready
How to do it...
How it works...
NUMA tuning with libvirt
Getting ready
How to do it...
How it works...
There is more...
Tuning the kernel for network performance
Getting ready
How to do it...
How it works...
Index
KVM Virtualization Cookbook Learn how to effectively use KVM in production Konstantin Ivanov BIRMINGHAM - MUMBAI
KVM Virtualization Cookbook Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: June 2017 Production reference: 1140617 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78829-467-6 www.packtpub.com
Credits Author Konstantin Ivanov Copy Editor Dipti Mankame Reviewer Jay Payne Project Coordinator Judie Jose Acquisition Editor Rahul Nair Proofreader Safis Editing Content Development Editor Devika Battike Indexer Rekha Nair Technical Editor Prachi Sawant Graphics Kirk D'Penha Production Coordinator Aparna Bhagat
About the Author Konstantin Ivanov is a Linux systems engineer, an open source developer, and a technology blogger who has been designing, configuring, deploying, and administering large-scale, highly available Linux environments for more than 15 years. His interests include large distributed systems and task automation, along with solving technical challenges involving multiple technology stacks. Konstantin received two master of science in computer science degrees from universities in Bulgaria and the United States, specializing in system and network security and software engineering. In his spare time, he loves writing technology blogs and spending time with his two boys. To my amazing wife, Deepa, my trusty companion through the many long days of writing.
About the Reviewer Jay Payne has been a database administrator 5 at Rackspace for over 10 years, working on the design, development, implementation, and operation of storage systems. Previously, Jay worked on billing and support systems for hosting companies. For the last 20 years, he has primarily focused on the data life cycle, from database architecture, administration, operations, and reporting to disaster recovery and compliance. He has domain experience in hosting, finance, billing, and customer-support industries.
www.PacktPub.com For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. h t t p s ://w w w . p a c k t p u b . c o m /m a p t Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser
Customer Feedback Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at h t t p s ://w w w . a m a z o n . c o m /d p /178829467X . If you'd like to join our team of regular reviewers, you can e-mail us at customerreviews@packtpub.com. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
分享到:
收藏