libvirt/examples/python
Eric Blake 11e80ddfe4 build: fix typo that broke 'make dist'
Bug introduced in commit 5c6ff42; 'make dist' fails:

make[3]: Entering directory `/home/eblake/libvirt-tmp/build3/examples/python'
make[3]: *** No rule to make target `topoology.py', needed by `distdir'.  Stop.
make[3]: Leaving directory `/home/eblake/libvirt-tmp/build3/examples/python'

* examples/python/Makefile.am (EXTRA_DIST): Spell topology right.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-09-03 16:38:29 -06:00
..
consolecallback.py Test for object identity when checking for None in Python 2013-08-23 08:12:26 +02:00
dominfo.py Test for object identity when checking for None in Python 2013-08-23 08:12:26 +02:00
domrestore.py Test for object identity when checking for None in Python 2013-08-23 08:12:26 +02:00
domsave.py Test for object identity when checking for None in Python 2013-08-23 08:12:26 +02:00
domstart.py Test for object identity when checking for None in Python 2013-08-23 08:12:26 +02:00
esxlist.py Use python discovered through env instead of hardcoding a path 2010-11-14 22:45:59 +01:00
Makefile.am build: fix typo that broke 'make dist' 2013-09-03 16:38:29 -06:00
README Add a Python example that lists active ESX domains 2009-11-08 01:03:24 +01:00
topology.py examples: Add script to parse topology from capabilities output 2013-09-03 14:27:58 +02:00

Some simple examples on how to use the Python API for libvirt

The examples are:

dominfo.py  - print information about a running domU based on the results of
              virDomainGetInfo and virDomainGetXMLDesc
domstart.py - create a domU from an XML description if the domU isn't
              running yet
domsave.py  - save all running domU's into a directory
domrestore.py - restore domU's from their saved files in a directory
esxlist.py  - list active domains of an VMware ESX host and print some info.
              also demonstrates how to use the libvirt.openAuth() method

The XML files in this directory are examples of the XML format that libvirt
expects, and will have to be adapted for your setup. They are only needed
for domstart.py


Some additional notes for the esxlist.py example:

You may see remote errors complaining about missing certificates:

  Cannot access CA certificate '/usr/local/etc/pki/CA/cacert.pem': No such file
  or directory

This is expected, libvirt tries to find network and storage drivers for ESX,
but those are not implemented yet (November 2009). While searching for this
drivers, libvirt may try to start a local libvirtd instance, but fails because
of the missing certificates. It'll warn about that:

  Failed to find the network: Is the daemon running?

This is also expected and can be ignored.