Libvirt provides the ability to connect to Xen using any of the following languages:
C: This is the main language supported by libvirt.
Python: Bindings are generated from the C API. So they tend to stay up to
date longer than other languages.
Ocaml: A recent addition to the list of supported languages.
Perl: A recent addition to the list of supported languages.
We used virt-manager earlier in this book. Virt-manager is a desktop application
that displays the currently running domains and their statistics. It uses the
libvirt-python bindings (http://virt-manager.et.redhat.com/). Xen itself
provides an API in its recent versions for accessing Xen virtual instances but it falls
short of the capabilities provided by libvirt in many ways:
1. Xen API is not very stable and there is a lot of breakage with every released
version of Xen. Things seem to be stabilizing slowly but we are not
completely there yet. This can be very frustrating when changing versions
of Xen. Libvirt API is much more stable and provides a solid foundation for
interacting with Xen as you move or change versions.
?° ?° ?° ?°
??? ??? ??? ???
Chapter 9
[ 125 ]
2. If you use Xen API, you are restricted to using just the Xen hypervisor. This
may be OK in certain cases, but the vendor neutral and vendor independent
API provided by libvirt is a lot more attractive and it enables you to keep
some of your virtualization options open.
3. Xen API being less stable and still evolving has an API that is fairly difficult
to discern and is not very intuitive.
Pages:
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112