失效链接处理 |
Foundations of Libvirt Development PDF 下载
本站整理下载:
相关截图:
主要内容:
Introduction
Welcome to the first chapter of Foundations of Libvirt Development. In
this chapter, you’ll learn what this book covers and the conventions I use
throughout.
What This Book Covers
This book is about the libvirt APIs and how to work with it to control virtual
machines under the QEMU/KVM system. libvirt has APIs that support
many languages, but this work concentrates on the Python language
exclusively.
libvirt can be used to support a number of virtual machine types, and
the APIs are a common entry point to any type of virtual machine. The
virtual machines that are supported include (but are not limited to) KVM,
QEMU, Xen, Virtuozzo, VMware ESX, LXC, bhyve, and more. All of these
can be controlled programmatically via the libvirt APIs. The libvirt APIs
works the same way across all the supported platforms.
This book does not cover how to install QEMU/KVM on any platform.
It is assumed that you either have that knowledge already or are working
on a system where it is already installed. See the documentation for
your operating system for instructions on how to install virtual machine
support.
2
The libvirt Python API is an object-oriented system. It provides classes for
virtual connections, virtual machine (domain) interactions, virtual and real
network support, storage support, and information retrieval from the main
host system. All interaction with the system is through the supported classes,
and thus you will need to understand object orientation under Python. Be sure
you have this knowledge before attempting to use the Python libvirt API.
In addition to the API topics mentioned, the book covers general
interactions such as creating/destroying entities like domains, networks,
storage, and others. The book also covers topics such as obtaining
information about objects, getting statistics about objects, changing
the configuration of an object, starting/stopping an object, and adding/
removing hardware from objects.
The libvirt API covers the entire life cycle of virtual objects, from
creation to destruction. It contains everything needed to manage a
virtual object during that life cycle. However, it doesn’t contain APIs for
managing the object from inside (i.e., there are no APIs that connect to
the object’s internal APIs). Thus, for domains (virtual machines), there is
no way to submit jobs to the domain or monitor anything going on in the
domain. That type of administration is left up to the administrator.
|