- 340 pages
- English
- ePUB (mobile friendly)
- Available on iOS & Android
KVM Virtualization Cookbook
About This Book
Deploy, manage, and scale virtual instances using Kernel-based Virtual MachinesAbout This Book⢠Build, manage and scale virtual machines with practical step-by-step examples⢠Leverage the libvirt user-space tools and libraries to manage the life-cycle of KVM instances⢠Deploy and scale applications inside KVM virtual machines with OpenStackWho This Book Is ForIf you are a system administrator working KVM virtualization, this book will help you grow on your expertise of working with the infrastructure to manage things in a better way. You should have a knowledge of working with Linux based systems.What You Will Learn⢠Deploy different workloads in isolation with KVM virtualization and better utilize the available compute resources⢠Explore the benefits of running applications with KVM and learn to prevent the "bad-neighbor" effect⢠Leveraging various networking technologies in the context of virtualization with Open vSwitch and the Linux bridge.⢠Create KVM instances using Python and inspect running KVM instances⢠Understand Kernel Tuning for enhanced KVM performance and better memory utilizationIn DetailVirtualization technologies such as KVM allow for better control over the available server resources, by deploying multiple virtual instances on the same physical host, or clusters of compute resources. With KVM it is possible to run various workloads in isolation with the hypervisor layer providing better tenant isolation and higher degree of security.This book will provide a deep dive into deploying KVM virtual machines using qemu and libvirt and will demonstrate practical examples on how to run, scale, monitor, migrate and backup such instances. You will also discover real production ready recipes on deploying KVM instances with OpenStack and how to programatically manage the life cycle of KVM virtual machines using Python. You will learn numerous tips and techniques which will help you deploy & plan the KVM infrastructure. Next, you will be introduced to the working of libvirt libraries and the iPython development environment.Finally, you will be able to tune your Linux kernel for high throughput and better performance. By the end of this book, you will gain all the knowledge needed to be an expert in working with the KVM virtualization infrastructure.Style and approachThis book takes a complete practical approach with many step-by-step example recipes on how to use KVM in production. The book assumes certain level of expertise with Linux systems and virtualization in general. Some knowledge of Python programming is encouraged, to fully take advantage of the code recipes.
Frequently asked questions
Information
Deploying KVM Instances with OpenStack
- Preparing the host for the OpenStack deployment
- Installing and configuring the OpenStack Keystone identity service
- Installing and configuring the OpenStack Glance image service
- Installing and configuring the OpenStack Nova compute service
- Installing and configuring the OpenStack Neutron networking service
- Building and inspecting KVM instances with OpenStack
- Stopping KVM instances with OpenStack
- Terminating KVM instances with OpenStack
Introduction
Preparing the host for the OpenStack deployment
Getting ready
- An Ubuntu server with great virtualization capabilities
- Access to the internet for package installation
How to do it...
- Update the host and install the package repository for the Newton release:
root@controller:~# apt install software-properties-common
root@controller:~# add-apt-repository cloud-archive:newton
root@controller:~# apt update && apt dist-upgrade
root@controller:~# reboot
root@controller:~# apt install python-openstackclient
- Install the MariaDB database server:
root@controller:~# apt install mariadb-server python-pymysql
root@controller:~# cat /etc/mysql/mariadb.conf.d/99-openstack.cnf
[mysqld]
bind-address = 10.208.130.36
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
root@controller:~#
- Restart the service and secure the installation:
root@controller:~# service mysql restart
root@controller:~# mysql_secure_installation
- Install the RabbitMQ messaging service, create a new user, password, and set permissions:
root@controller:~# apt install rabbitmq-server
root@controller:~# rabbitmqctl add_user openstack lxcpassword
Creating user "openstack" ...
root@controller:~# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/" ...
root@controller:~#
- Install and configure the memcached service:
root@controller:~# apt install memcached python-memcache
root@controller:~# sed -i 's/127.0.0.1/10.208.130.36/g'
/etc/memcac...
Table of contents
- Title Page
- Copyright
- Credits
- About the Author
- About the Reviewer
- www.PacktPub.com
- Customer Feedback
- Preface
- Getting Started with QEMU and KVM
- Using libvirt to Manage KVM
- KVM Networking with libvirt
- Migrating KVM Instances
- Monitoring and Backup of KVM Virtual Machines
- Deploying KVM Instances with OpenStack
- Using Python to Build and Manage KVM Instances
- Kernel Tuning for KVM Performance