1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-08-18 13:50:02 +03:00

Compare commits

..

76 Commits

Author SHA1 Message Date
cb8f47047b * NEWS configure.in libvirt.spec.in docs/*: documented and
regenerated for release of 0.1.0
* Makefile.am virsh.1: added man page from Andrew Puch
Daniel
2006-04-10 14:15:33 +00:00
7293407295 * src/xend_internal.c src/xml.c: applied patch from Jim Fehlig
for lifecycle events
* docs/format.html docs/libvir.html: added the associated docs for
  the new constructs
* TODO: small update
Daniel
2006-04-10 08:32:34 +00:00
572806a99b * TODO src/hash.[ch] src/internal.h src/libvirt.c src/xend_internal.c
src/xs_internal.c: implementing domain pointers unification, thread
  safety and reference counting for domain and connections, this was
  the last critical change needed before making further progresses at
  the API level. Still a couple fo things TODO for this, unification
  at the Python level and adding UUID to hash. All domain/connect alloc
  and free routines are now centralized in hash.c
* docs/APIchunk1.html docs/libvirt-api.xml docs/libvirt-refs.xml
  docs/html/libvirt-libvirt.html: regenerated the docs, that doesn't
  change the API.
Daniel
2006-04-09 13:11:22 +00:00
1ea832d65b use stdout rather than stderr, improve allocation checks 2006-04-06 10:33:06 +00:00
6bd95bf2a3 * src/hash.c: tiny fix
* src/internal.h: starting to work on reentrancy
* src/libvirt.c: applied patch from Jim Fehlig to fix
  virDomainLookupByID when run as root.
Daniel
2006-04-05 09:31:29 +00:00
48e85b5c41 virsh command names cleanup 2006-04-04 21:52:31 +00:00
f7e40ae879 add nodeinfo, rename dinfo to dominfo, fix libvirt.h typo 2006-04-04 14:37:32 +00:00
831f910e50 * include/libvirt.h[.in] src/driver.h src/libvirt.c
src/libvirt_sym.version src/*_internal.[ch]: added an entry
  point for reboot and corresponding driver plug
* src/virsh.c: added a reboot option using it
* docs/*: regenerated
Daniel
2006-04-03 13:46:43 +00:00
5fff4b0bed * src/xend_internal.c: applied patch from Daniel P. Berrange,
plus a bit of code cleanup
Daniel
2006-03-30 16:37:15 +00:00
2b4566b5b5 * src/virsh.c: allocation check (Jim Meyering) and adding a
new create command
* src/xend_internal.c src/xml.c: trying to cope with the new
  xvda domains states generated on FC5, but Dom0 bootloader
  really break the model, so that doesn't work.
Daniel
2006-03-30 16:08:13 +00:00
c9a8f27380 * src/virsh.c: catching memory allocation error and existing, as
pointed by Jim Meyering
Daniel
2006-03-30 12:14:40 +00:00
85c23ead9e * doc/*: rebuilt
Daniel
2006-03-29 14:35:52 +00:00
880f4e9ae2 * python/libvir.c: fixed a bug in the new wrapper
* python/tests/Makefile.am python/tests/node.py: added a new test for
  the new API
* python/tests/create.py: remove a debug
Daniel
2006-03-29 13:33:37 +00:00
212eaea323 * include/libvirt.h[.in] include/virterror.h src/driver.h
src/internal.h src/libvirt_sym.version src/xen_internal.c
  src/xs_internal.c: added a new entry point to get node hardware
  informations virGetNodeInfo, and associated driver hook.
* src/xend_internal.c: implemented the node and version information
  hooks for the Xen Daemon
* python/libvir.c python/libvirt-python-api.xml python/generator.py:
  also added Python bindings for the new call
Daniel
2006-03-29 12:46:03 +00:00
78de9baafc Fixing the python example, Daniel 2006-03-28 14:48:57 +00:00
538686f9c0 * python/libvir.c: call the initialize entry point
* src/libvirt_sym.version: add initialize entry point
* src/libvirt.c: make sure we always initialize the lib
* python/tests/*.py: start updating exemple for exception
  handling as pointed by Jim Meyering
Daniel
2006-03-28 14:41:04 +00:00
7743c7a7b1 * doc/site.xsl doc/libvir.html doc/*: added informations about
the Perl bindings, regenerated
* python/libvirt_wrap.h: added a missing include.
Daniel
2006-03-28 09:50:17 +00:00
4faeeb1041 * doc/*: updated module list and rebuilt
* include/libvirt.h include/libvirt.h.in: added intialization function
* include/virterror.h src/virterror.c: one more error code
* src/internal.h: first part of Jim's format checking
* src/libvirt.c src/xen_internal.[ch] src/xend_internal.[ch]
  src/xs_internal.[ch]: initialization and registration of drivers
Daniel
2006-03-27 15:24:36 +00:00
a5990ba624 * src/Makefile.am: add driver.h to SOURCES as pointed by Jim Meyering
* doc/*: rebuilt
Daniel
2006-03-25 10:47:41 +00:00
37a91cb049 * src/virterror.c: add message as pointed by Jim Meyering
Daniel
2006-03-25 10:38:30 +00:00
49359cfe63 * include/virterror.h: fix typos pointed by Jim Meyering
Daniel
2006-03-24 22:58:13 +00:00
978115dc04 * include/virterror.h: applied patch from Daniel Berrange for out of
tree compiles.
Daniel
2006-03-24 22:36:47 +00:00
a453b65e09 * libvirt.pc.in: applied patch from Daniel Berrange to fix --cflags
Daniel
2006-03-24 13:18:12 +00:00
561377ab8a * src/Makefile.am: fix out of tree build
Daniel
2006-03-24 13:03:29 +00:00
a21472c0fd * src/xs_internal.c src/xs_internal.h include/virterror.h
src/virterror.c: created a new module related to Xen Store accesses
* src/libvirt.c src/xen_internal.[ch] src/xend_internal.[ch]:
  nearly completed the separation of the code from the different modules
Daniel
2006-03-23 15:42:10 +00:00
faf61d94c1 * python/tests/create.py: add one more image path
* src/libvirt.c src/xend_internal.c src/xend_internal.h: more work
  on the xend refactoring
Daniel
2006-03-22 13:44:01 +00:00
44c2c10ea5 * python/tests/create.py: adapt to new naming scheme in FC5
Daniel
2006-03-22 13:33:20 +00:00
c54ae3f023 * src/driver.h src/xen_internal.c: just add a driver block for
the Xen hypervisor direct access module. Need to convert
  xend_internal.[ch] and make one for the Xenstore now ...
Daniel
2006-03-20 23:42:12 +00:00
de5a1d1dd5 * src/driver.h src/internal.h src/libvirt.c src/xen_internal.c
src/xen_internal.h docs/apibuild.py: starting the refactoring,
  first the direct Xen hypervisor module. New header describing the
  entry points of a driver.
Daniel
2006-03-20 17:49:28 +00:00
247cf7a3b2 * src/hash.c src/hash.h src/internal.h src/libvirt.c src/sexpr.c
src/sexpr.h src/virsh.c src/virterror.c src/xen_internal.c
  src/xen_internal.h src/xend_internal.c src/xend_internal.h
  src/xml.c src/xml.h: applied cb/indent to homogenize the source
  style, as a first pass.
Daniel
2006-03-15 12:13:25 +00:00
cda69700a0 First import of XML-RPC protocol support for newer versions of Xend. I've not
put it in the Makefiles yet as it's not actually being used by anything.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-03-10 17:02:25 +00:00
72b838fffc * configure.in: applied patch for --with-xen-distdir option from
Ronald Aigner
* docs/site.xsl docs/*.html: added link to Bugzilla
Daniel
2006-03-10 10:21:41 +00:00
0742c9313e * src/xml.c: another patch from David Lutterkort fixing a typo
when generating physical block devices descriptions.
Daniel
2006-03-04 09:00:15 +00:00
a720116103 * libvirt.spec.in: applied patch from David Lutterkort adding
missing reqs for readline.
Daniel
2006-03-04 08:57:22 +00:00
714532355f * NEWS configure.in libvirt.spec.in include/libvirt.h docs/*:
preparing release 0.0.6
Daniel
2006-02-28 14:22:33 +00:00
6c5a225725 * docs/errors.html docs/libvir.html docs/*: added a page about
error handling and regenerated the docs
Daniel
2006-02-28 13:58:30 +00:00
97e7e798b2 Fixed the test, daniel 2006-02-28 12:56:25 +00:00
65bace1765 * TODO: updated
* python/Makefile.am python/generator.py python/libvir.c
  python/libvir.py: improved python binding, raise exception
  when an instance creation or lookup fails, and add support
  for the global error handler, per conn handler still needed
* python/tests/error.py python/tests/Makefile.am: adding a
  regression test
Daniel
2006-02-28 12:17:00 +00:00
9aba17bd6c * doc//*: rebuilt
Daniel
2006-02-27 22:35:26 +00:00
8bc437e412 * TODO: updated, and added python hooks for error handling
* include/virterror.h src/virterror.c src/xml.c: error interception
  and reporting should be done.
Daniel
2006-02-27 22:32:54 +00:00
5548938d62 * src/libvirt.c src/xen_internal.[ch]: virConnectOpenReadOnly()
should not emit error when failing to open the hypervisor proc
  entry point.
Daniel
2006-02-27 21:42:32 +00:00
87d338374a * include/virterror.h src/libvirt_sym.version: exported
virDefaultErrorFunc()
* src/sexpr.c src/xen_internal.c src/virterror.c include/virterror.h:
  adding more error reporting though the code, nearly complete.
* src/sexpr.c: added specific error function to avoid an error report.
Daniel
2006-02-27 21:34:28 +00:00
739dfb531d * include/virterror.h src/virterror.c src/xend_internal.c: more work
plugging in the error system in the code.
Daniel
2006-02-27 19:56:23 +00:00
596b601021 * TODO: updated
* include/virterror.h src/internal.h src/libvirt.c src/virterror.c
  src/xend_internal.c: commiting a first pass at adding error handling
  in the code, not finished, but it starts to work, need more coverage
  and testing.
Daniel
2006-02-27 16:27:18 +00:00
4d9187a696 Fix search.php, Daniel 2006-02-24 22:43:09 +00:00
7d28bba98d Fixing link to search.php, Daniel 2006-02-24 22:42:27 +00:00
ac6eb960cf missing Daniel 2006-02-24 22:37:23 +00:00
8557bc67a4 * src/Makefile.am src/internal.h src/libvirt.c src/libvirt_sym.version
src/virterror.c include/Makefile.am include/virterror.h: adding
  the public APIs for errors, callbacks and synchronous. The boring
  stuff is still left to do, plugging it. Also need to be exposed
  at the python level.
* doc//*: rebuilt
Daniel
2006-02-24 22:36:10 +00:00
868f93ba8e Tiny fix, Daniel 2006-02-24 21:22:21 +00:00
4750942abe * docs/index.py docs/search.php: fixing the search engine.
Daniel
2006-02-24 21:17:54 +00:00
5800109158 A few libvir->libvirt, Daniel 2006-02-24 13:47:47 +00:00
fd21f1b3ec * python/generator.py python/libvir.c python/libvirt-python-api.xml:
UUID strings can contain zeroes, so the autogenerated conversion
  functions don't work.
Daniel
2006-02-24 12:26:56 +00:00
20cfd0c818 Oops forgot to update the spec file, Daniel 2006-02-23 11:35:37 +00:00
97f9566687 * src/libvirt.c: fixing a bug before the release of 0.0.5
* python/generator.py python/libvir.c python/libvirt-python-api.xml:
  also fixing the binding for getting a domain UUID
* python/tests/Makefile.am python/tests/uuid.py: added a test
  for the new UUID API
Daniel
2006-02-23 11:26:17 +00:00
6eaf35d077 * NEWS configure.in docs/libvir.html docs/news.html: preparing the
release of 0.0.5
* include/libvirt.h.in: fixed APIs definition
Daniel
2006-02-23 10:42:29 +00:00
6ce04643d0 * python/tests/Makefile.am: added the create.py in the regression tests
Daniel
2006-02-23 10:31:23 +00:00
6536c00f25 * include/libvirt.h[.in] src/libvirt.c src/xend_internal.[ch]
src/libvirt_sym.version: added virDomainLookupByUUID and
  virDomainGetUUID to be able to use the persistant UUID names
* docs//*: rebuilt the docs following the API extension
Daniel
2006-02-23 10:13:55 +00:00
21df1e503b * configure.in libvirt.spec.in docs/Makefile.am docs/devhelp/*:
added devhelp docs support, based on libxml2 stylesheets
Daniel
2006-02-22 10:54:54 +00:00
a3512b01f9 * TODO: updated
* libvirt.spec.in: package the examples in the doc
* src/Makefile.am: forgot to add xml.h
Daniel
2006-02-22 08:59:00 +00:00
d02fa086ff TODO update 2006-02-21 21:01:09 +00:00
c509b5cd0b * Makefile.am: extended make tests to run those in docs/examples
* docs/examples/suspend.c docs/examples/*: added an example of
  suspend/resume and regenerated
Daniel
2006-02-21 14:15:32 +00:00
d3a15eb303 * TODO: updated
* python/tests/Makefile.am: fix a small PYTHONPATH bug
* docs//*: fixed the xsl a bit for toc names, added doc for
  the python bindings, regenerated
Daniel
2006-02-21 13:23:16 +00:00
9a2ec00a05 * src/libvirt.c src/xend_internal.c src/xend_internal.h: move the
XML dump function around to make sure all entry points are centralized
  in libvirt.c and also avoid doc generation troubles.
* docs/examples/Makefile.am docs/examples/index.py: fix the makefile
  a bit.
* TODO: updated
* docs/format.html: added a description of the XML used for the
  domains.
* docs//*: rebuilt
Daniel
2006-02-20 23:08:47 +00:00
9c5111b9c9 * docs/examples/examples.xsl docs/examples/index.html
docs/site.xsl: integates the examples page in the web site
* docs//* : fixed generator and rebuilt the docs
* python/tests/basic.py python/tests/create.py: couple cleanups
Daniel
2006-02-20 20:50:48 +00:00
144141872b * TODO: updated
* include/libvirt.h include/libvirt.h.in: cleanup
* src/libvirt.c: remove debugging output
* src/xend_internal.c src/xml.c src/xml.h: reimplement
  virDomainGetXMLDesc() based on xend interface, now work as user too.
Daniel
2006-02-20 17:22:16 +00:00
82402982c8 * python/tests/create.py: trying to make test more generic, but it's
difficult since it requires a system image
* src/libvirt.c src/xend_internal.c: fixed the shutdown API which
  was broken due to a bad reason at the xend level.
Daniel
2006-02-17 13:18:57 +00:00
77e8b6c62c * configure.in src/Makefile.am: adding dependency to libxml2
* include/libvirt.h* src/libvirt.c src/xend_internal.[ch]
  src/xml.[ch]: added XML parsing for Xen domain descriptions
  needed for creates, plugged in a converter to s-exp and
  xend call. Modified the virDomainCreateLinux() to reflect
  that XML based description. Seems to work.
* python/tests/create.py: added a test case which seems to work
  not tested much yet
* docs/*: regenerated
Daniel
2006-02-16 22:50:52 +00:00
2985f0acdb * configure.in libvirt.spec.in include/libvirt.h.in python/Makefile.am
src/Makefile.am: fix rpm packaging problems whith head, more
  LIBVIR -> LIBVIRT changes.
Daniel
2006-02-15 13:21:17 +00:00
f32eee58b0 * Makefile.am configure.in python/Makefile.am python/tests/Makefile.am
python/tests/basic.py: added first python test script and
  a 'make tests' target
Daniel
2006-02-14 14:30:42 +00:00
a5f9391541 * libvirt.pc.in: Karel pointed out the name hadn't been updated
Daniel
2006-02-10 15:46:36 +00:00
04142f1c5e * python/libvir.c: fixed one more problem prior to 0.0.4
Daniel
2006-02-10 10:31:50 +00:00
2a9660e425 * NEWS configure.in docs/libvir.html docs/news.html include/libvirt.h
libvirt.spec.in: preparing 0.0.4 release
Daniel
2006-02-10 10:28:59 +00:00
7191077439 * README TODO config.h.in libvirt.pc.in: more cleanups.
Daniel
2006-02-10 10:11:21 +00:00
60c5aabc5a Adding missing files, Daniel 2006-02-10 08:47:26 +00:00
f2fec34604 * NEWS docs/*: regenerated and updated the docs post 0.0.3 release
Daniel
2006-02-10 08:43:31 +00:00
0b2869fb84 * autogen.sh configure.in: fixed snapshot autogeneration, had to
tweak a few things
Daniel
2006-02-10 08:40:20 +00:00
99 changed files with 12136 additions and 5064 deletions

415
ChangeLog
View File

@ -1,3 +1,418 @@
Mon Apr 10 15:15:13 CEST 2006 Daniel Veillard <veillard@redhat.com>
* NEWS configure.in libvirt.spec.in docs/*: documented and
regenerated for release of 0.1.0
* Makefile.am virsh.1: added man page from Andrew Puch
Mon Apr 10 09:32:29 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xend_internal.c src/xml.c: applied patch from Jim Fehlig
for lifecycle events
* docs/format.html docs/libvir.html: added the associated docs for
the new constructs
* TODO: small update
Sun Apr 9 13:10:34 EDT 2006 Daniel Veillard <veillard@redhat.com>
* TODO src/hash.[ch] src/internal.h src/libvirt.c src/xend_internal.c
src/xs_internal.c: implementing domain pointers unification, thread
safety and reference counting for domain and connections, this was
the last critical change needed before making further progresses at
the API level. Still a couple fo things TODO for this, unification
at the Python level and adding UUID to hash. All domain/connect alloc
and free routines are now centralized in hash.c
* docs/APIchunk1.html docs/libvirt-api.xml docs/libvirt-refs.xml
docs/html/libvirt-libvirt.html: regenerated the docs, that doesn't
change the API.
Thu Apr 6 11:32:46 CEST 2006 Karel Zak <kzak@redhat.com>
* src/virsh.c: use stdout for standard outputs, improve
allocation checks
Wed Apr 5 09:32:54 EDT 2006 Daniel Veillard <veillard@redhat.com>
* src/hash.c: tiny fix
* src/internal.h: starting to work on reentrancy
* src/libvirt.c: applied patch from Jim Fehlig to fix
virDomainLookupByID when run as root.
Tue Apr 4 22:49:33 CEST 2006 Karel Zak <kzak@redhat.com>
* src/virsh.c: rename dstate, idof and nameof to domstate,
domname and domid
Tue Apr 4 12:41:53 CEST 2006 Karel Zak <kzak@redhat.com>
* src/virsh.c: add new command "nodeinfo"
* include/libvirt.h.in: fix typo (virNodeInfo.memory is in kB)
* docs/FAQ.html docs/libvir.html src/virsh.c: rename command
"dinfo" to "dominfo"
Mon Apr 3 14:46:39 EDT 2006 Daniel Veillard <veillard@redhat.com>
* include/libvirt.h[.in] src/driver.h src/libvirt.c
src/libvirt_sym.version src/*_internal.[ch]: added an entry
point for reboot and corresponding driver plug
* src/virsh.c: added a reboot option using it
* docs/*: regenerated
Thu Mar 30 16:38:18 EST 2006 Daniel Veillard <veillard@redhat.com>
* src/xend_internal.c: applied patch from Daniel P. Berrange,
plus a bit of code cleanup
Thu Mar 30 16:04:47 EST 2006 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: allocation check (Jim Meyering) and adding a
new create command
* src/xend_internal.c src/xml.c: trying to cope with the new
xvda domains states generated on FC5, but Dom0 bootloader
really break the model, so that doesn't work.
Thu Mar 30 12:15:46 EST 2006 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: catching memory allocation error and existing, as
pointed by Jim Meyering
Wed Mar 29 16:36:24 CEST 2006 Daniel Veillard <veillard@redhat.com>
* doc/*: rebuilt
Wed Mar 29 13:34:25 EST 2006 Daniel Veillard <veillard@redhat.com>
* python/libvir.c: fixed a bug in the new wrapper
* python/tests/Makefile.am python/tests/node.py: added a new test for
the new API
* python/tests/create.py: remove a debug
Wed Mar 29 14:43:56 CEST 2006 Daniel Veillard <veillard@redhat.com>
* include/libvirt.h[.in] include/virterror.h src/driver.h
src/internal.h src/libvirt_sym.version src/xen_internal.c
src/xs_internal.c: added a new entry point to get node hardware
informations virGetNodeInfo, and associated driver hook.
* src/xend_internal.c: implemented the node and version information
hooks for the Xen Daemon
* python/libvir.c python/libvirt-python-api.xml python/generator.py:
also added Python bindings for the new call
Tue Mar 28 16:40:08 CEST 2006 Daniel Veillard <veillard@redhat.com>
* python/libvir.c: call the initialize entry point
* src/libvirt_sym.version: add initialize entry point
* src/libvirt.c: make sure we always initialize the lib
* python/tests/*.py: start updating exemple for exception
handling as pointed by Jim Meyering
Tue Mar 28 11:49:59 CEST 2006 Daniel Veillard <veillard@redhat.com>
* doc/site.xsl doc/libvir.html doc/*: added informations about
the Perl bindings, regenerated
* python/libvirt_wrap.h: added a missing include.
Mon Mar 27 17:22:16 CEST 2006 Daniel Veillard <veillard@redhat.com>
* doc/*: updated module list and rebuilt
* include/libvirt.h include/libvirt.h.in: added intialization function
* include/virterror.h src/virterror.c: one more error code
* src/internal.h: first part of Jim's format checking
* src/libvirt.c src/xen_internal.[ch] src/xend_internal.[ch]
src/xs_internal.[ch]: initialization and registration of drivers
Sat Mar 25 11:45:06 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/Makefile.am: add driver.h to SOURCES as pointed by Jim Meyering
* doc/*: rebuilt
Sat Mar 25 11:38:29 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/virterror.c: add message as pointed by Jim Meyering
Fri Mar 24 23:57:56 CET 2006 Daniel Veillard <veillard@redhat.com>
* include/virterror.h: fix typos pointed by Jim Meyering
Fri Mar 24 23:36:05 CET 2006 Daniel Veillard <veillard@redhat.com>
* include/virterror.h: applied patch from Daniel Berrange for out of
tree compiles.
Fri Mar 24 14:17:52 CET 2006 Daniel Veillard <veillard@redhat.com>
* libvirt.pc.in: applied patch from Daniel Berrange to fix --cflags
Fri Mar 24 14:03:26 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/Makefile.am: fix out of tree build
Thu Mar 23 16:40:37 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/xs_internal.c src/xs_internal.h include/virterror.h
src/virterror.c: created a new module related to Xen Store accesses
* src/libvirt.c src/xen_internal.[ch] src/xend_internal.[ch]:
nearly completed the separation of the code from the different modules
Wed Mar 22 14:43:16 CET 2006 Daniel Veillard <veillard@redhat.com>
* python/tests/create.py: add one more image path
* src/libvirt.c src/xend_internal.c src/xend_internal.h: more work
on the xend refactoring
Wed Mar 22 13:34:32 EST 2006 Daniel Veillard <veillard@redhat.com>
* python/tests/create.py: adapt to new naming scheme in FC5
Tue Mar 21 00:40:29 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/driver.h src/xen_internal.c: just add a driver block for
the Xen hypervisor direct access module. Need to convert
xend_internal.[ch] and make one for the Xenstore now ...
Mon Mar 20 18:43:19 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/driver.h src/internal.h src/libvirt.c src/xen_internal.c
src/xen_internal.h docs/apibuild.py: starting the refactoring,
first the direct Xen hypervisor module. New header describing the
entry points of a driver.
Wed Mar 15 13:10:25 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/hash.c src/hash.h src/internal.h src/libvirt.c src/sexpr.c
src/sexpr.h src/virsh.c src/virterror.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xend_internal.h
src/xml.c src/xml.h: applied cb/indent to homogenize the source
style, as a first pass.
Fri Mar 10 11:07:58 CET 2006 Daniel Veillard <veillard@redhat.com>
* configure.in: applied patch for --with-xen-distdir option from
Ronald Aigner
* docs/site.xsl docs/*.html: added link to Bugzilla
Sat Mar 4 09:59:13 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/xml.c: another patch from David Lutterkort fixing a typo
when generating physical block devices descriptions.
Sat Mar 4 09:56:18 CET 2006 Daniel Veillard <veillard@redhat.com>
* libvirt.spec.in: applied patch from David Lutterkort adding
missing reqs for readline.
Tue Feb 28 15:21:48 CET 2006 Daniel Veillard <veillard@redhat.com>
* NEWS configure.in libvirt.spec.in include/libvirt.h docs/*:
preparing release 0.0.6
Tue Feb 28 14:57:25 CET 2006 Daniel Veillard <veillard@redhat.com>
* docs/errors.html docs/libvir.html docs/*: added a page about
error handling and regenerated the docs
Tue Feb 28 13:12:50 CET 2006 Daniel Veillard <veillard@redhat.com>
* TODO: updated
* python/Makefile.am python/generator.py python/libvir.c
python/libvir.py: improved python binding, raise exception
when an instance creation or lookup fails, and add support
for the global error handler, per conn handler still needed
* python/tests/error.py python/tests/Makefile.am: adding a
regression test
Mon Feb 27 17:36:29 EST 2006 Daniel Veillard <veillard@redhat.com>
* doc//*: rebuilt
Mon Feb 27 17:33:16 EST 2006 Daniel Veillard <veillard@redhat.com>
* TODO: updated, and added python hooks for error handling
* include/virterror.h src/virterror.c src/xml.c: error interception
and reporting should be done.
Mon Feb 27 16:42:46 EST 2006 Daniel Veillard <veillard@redhat.com>
* src/libvirt.c src/xen_internal.[ch]: virConnectOpenReadOnly()
should not emit error when failing to open the hypervisor proc
entry point.
Mon Feb 27 16:32:55 EST 2006 Daniel Veillard <veillard@redhat.com>
* include/virterror.h src/libvirt_sym.version: exported
virDefaultErrorFunc()
* src/sexpr.c src/xen_internal.c src/virterror.c include/virterror.h:
adding more error reporting though the code, nearly complete.
* src/sexpr.c: added specific error function to avoid an error report.
Mon Feb 27 14:56:57 EST 2006 Daniel Veillard <veillard@redhat.com>
* include/virterror.h src/virterror.c src/xend_internal.c: more work
plugging in the error system in the code.
Mon Feb 27 17:25:48 CET 2006 Daniel Veillard <veillard@redhat.com>
* TODO: updated
* include/virterror.h src/internal.h src/libvirt.c src/virterror.c
src/xend_internal.c: commiting a first pass at adding error handling
in the code, not finished, but it starts to work, need more coverage
and testing.
Fri Feb 24 23:33:55 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/Makefile.am src/internal.h src/libvirt.c src/libvirt_sym.version
src/virterror.c include/Makefile.am include/virterror.h: adding
the public APIs for errors, callbacks and synchronous. The boring
stuff is still left to do, plugging it. Also need to be exposed
at the python level.
* doc//*: rebuilt
Fri Feb 24 22:17:12 CET 2006 Daniel Veillard <veillard@redhat.com>
* docs/index.py docs/search.php: fixing the search engine.
Fri Feb 24 13:25:36 CET 2006 Daniel Veillard <veillard@redhat.com>
* python/generator.py python/libvir.c python/libvirt-python-api.xml:
UUID strings can contain zeroes, so the autogenerated conversion
functions don't work.
Thu Feb 23 06:24:46 EST 2006 Daniel Veillard <veillard@redhat.com>
* src/libvirt.c: fixing a bug before the release of 0.0.5
* python/generator.py python/libvir.c python/libvirt-python-api.xml:
also fixing the binding for getting a domain UUID
* python/tests/Makefile.am python/tests/uuid.py: added a test
for the new UUID API
Thu Feb 23 11:41:06 CET 2006 Daniel Veillard <veillard@redhat.com>
* NEWS configure.in docs/libvir.html docs/news.html: preparing the
release of 0.0.5
* include/libvirt.h.in: fixed APIs definition
Thu Feb 23 05:31:46 EST 2006 Daniel Veillard <veillard@redhat.com>
* python/tests/Makefile.am: added the create.py in the regression tests
Thu Feb 23 05:13:03 EST 2006 Daniel Veillard <veillard@redhat.com>
* include/libvirt.h[.in] src/libvirt.c src/xend_internal.[ch]
src/libvirt_sym.version: added virDomainLookupByUUID and
virDomainGetUUID to be able to use the persistant UUID names
* docs//*: rebuilt the docs following the API extension
Wed Feb 22 11:53:45 CET 2006 Daniel Veillard <veillard@redhat.com>
* configure.in libvirt.spec.in docs/Makefile.am docs/devhelp/*:
added devhelp docs support, based on libxml2 stylesheets
Wed Feb 22 09:57:11 CET 2006 Daniel Veillard <veillard@redhat.com>
* TODO: updated
* libvirt.spec.in: package the examples in the doc
* src/Makefile.am: forgot to add xml.h
Tue Feb 21 22:00:11 CET 2006 Karel Zak <kzak@redhat.com>
* TODO: added virsh part
Tue Feb 21 09:14:07 EST 2006 Daniel Veillard <veillard@redhat.com>
* Makefile.am: extended make tests to run those in docs/examples
* docs/examples/suspend.c docs/examples/*: added an example of
suspend/resume and regenerated
Tue Feb 21 14:21:39 CET 2006 Daniel Veillard <veillard@redhat.com>
* TODO: updated
* python/tests/Makefile.am: fix a small PYTHONPATH bug
* docs//*: fixed the xsl a bit for toc names, added doc for
the python bindings, regenerated
Tue Feb 21 00:06:30 CET 2006 Daniel Veillard <veillard@redhat.com>
* src/libvirt.c src/xend_internal.c src/xend_internal.h: move the
XML dump function around to make sure all entry points are centralized
in libvirt.c and also avoid doc generation troubles.
* docs/examples/Makefile.am docs/examples/index.py: fix the makefile
a bit.
* TODO: updated
* docs/format.html: added a description of the XML used for the
domains.
* docs//*: rebuilt
Mon Feb 20 21:48:55 CET 2006 Daniel Veillard <veillard@redhat.com>
* docs/examples/examples.xsl docs/examples/index.html
docs/site.xsl: integates the examples page in the web site
* docs//* : fixed generator and rebuilt the docs
* python/tests/basic.py python/tests/create.py: couple cleanups
Mon Feb 20 12:20:32 EST 2006 Daniel Veillard <veillard@redhat.com>
* TODO: updated
* include/libvirt.h include/libvirt.h.in: cleanup
* src/libvirt.c: remove debugging output
* src/xend_internal.c src/xml.c src/xml.h: reimplement
virDomainGetXMLDesc() based on xend interface, now work as user too.
Fri Feb 17 08:17:36 EST 2006 Daniel Veillard <veillard@redhat.com>
* python/tests/create.py: trying to make test more generic, but it's
difficult since it requires a system image
* src/libvirt.c src/xend_internal.c: fixed the shutdown API which
was broken due to a bad reason at the xend level.
Thu Feb 16 17:47:00 EST 2006 Daniel Veillard <veillard@redhat.com>
* configure.in src/Makefile.am: adding dependency to libxml2
* include/libvirt.h* src/libvirt.c src/xend_internal.[ch]
src/xml.[ch]: added XML parsing for Xen domain descriptions
needed for creates, plugged in a converter to s-exp and
xend call. Modified the virDomainCreateLinux() to reflect
that XML based description. Seems to work.
* python/tests/create.py: added a test case which seems to work
not tested much yet
* docs/*: regenerated
Wed Feb 15 08:20:23 EST 2006 Daniel Veillard <veillard@redhat.com>
* configure.in libvirt.spec.in include/libvirt.h.in python/Makefile.am
src/Makefile.am: fix rpm packaging problems whith head, more
LIBVIR -> LIBVIRT changes.
Tue Feb 14 15:29:01 EST 2006 Daniel Veillard <veillard@redhat.com>
* Makefile.am configure.in python/Makefile.am python/tests/Makefile.am
python/tests/basic.py: added first python test script and
a 'make tests' target
Fri Feb 10 16:45:50 CET 2006 Daniel Veillard <veillard@redhat.com>
* libvirt.pc.in: Karel pointed out the name hadn't been updated
Fri Feb 10 11:30:41 EST 2006 Daniel Veillard <veillard@redhat.com>
* python/libvir.c: fixed one more problem prior to 0.0.4
Fri Feb 10 11:21:53 EST 2006 Daniel Veillard <veillard@redhat.com>
* NEWS configure.in docs/libvir.html docs/news.html include/libvirt.h
libvirt.spec.in: preparing 0.0.4 release
Fri Feb 10 11:09:11 CET 2006 Daniel Veillard <veillard@redhat.com>
* README TODO config.h.in libvirt.pc.in: more cleanups.
Fri Feb 10 09:42:45 CET 2006 Daniel Veillard <veillard@redhat.com>
* NEWS docs/*: regenerated and updated the docs post 0.0.3 release
Fri Feb 10 09:39:23 CET 2006 Daniel Veillard <veillard@redhat.com>
* autogen.sh configure.in: fixed snapshot autogeneration, had to
tweak a few things
Wed Feb 8 11:43:43 EST 2006 Daniel Veillard <veillard@redhat.com> Wed Feb 8 11:43:43 EST 2006 Daniel Veillard <veillard@redhat.com>
* //* : renamed the project libvirt , this affects all makefiles, * //* : renamed the project libvirt , this affects all makefiles,

View File

@ -4,10 +4,20 @@ SUBDIRS = src include docs @PYTHON_SUBDIR@
EXTRA_DIST = libvirt.spec.in libvirt.spec COPYING.LIB \ EXTRA_DIST = libvirt.spec.in libvirt.spec COPYING.LIB \
libvirt.pc.in libvirt.pc TODO AUTHORS ChangeLog \ libvirt.pc.in libvirt.pc TODO AUTHORS ChangeLog \
NEWS README NEWS README $(man_MANS)
man_MANS = virsh.1
pkgconfigdir = $(libdir)/pkgconfig pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libvirt.pc pkgconfig_DATA = libvirt.pc
rpm: clean rpm: clean
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz) @(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
check-local: all tests
tests:
@(cd docs/examples ; $(MAKE) MAKEFLAGS+=--silent tests)
@(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \
$(MAKE) MAKEFLAGS+=--silent tests ; fi)

49
NEWS
View File

@ -5,6 +5,55 @@
http://libvirt.org/news.html http://libvirt.org/news.html
Releases Releases
0.1.0: Apr 10 2006:
- building fixes: --with-xen-distdir option (Ronald Aigner), out of tree
build and pkginfo cflag fix (Daniel Berrange)
- enhancement and fixes of the XML description format (David Lutterkort
and Jim Fehlig)
- new APIs: for Node information and Reboot
- internal code cleanup: refactoring internals into a driver model, more
error handling, structure sharing, thread safety and ref counting
- bug fixes: error message (Jim Meyering), error allocation in virsh (Jim
Meyering), virDomainLookupByID (Jim Fehlig),
- documentation: updates on architecture, and format, typo fix (Jim
Meyering)
- bindings: exception handling in examples (Jim Meyering), perl ones out
of tree (Daniel Berrange)
- virsh: more options, create, nodeinfo (Karel Zak), renaming of some
options (Karel Zak), use stderr only for errors (Karel Zak), man page
(Andrew Puch)
0.0.6: Feb 28 2006:
- add UUID lookup and extract API
- add error handling APIs both synchronous and asynchronous
- added minimal hook for error handling at the python level, improved the
python bindings
- augment the documentation and tests to cover error handling
0.0.5: Feb 23 2006:
- Added XML description parsing, dependance to libxml2, implemented the
creation API virDomainCreateLinux()
- new APIs to lookup and name domain by UUID
- fixed the XML dump when using the Xend access
- Fixed a few more problem related to the name change
- Adding regression tests in python and examples in C
- web site improvement, extended the documentation to cover the XML
format and Python API
- Added devhelp help for Gnome/Gtk programmers
0.0.4: Feb 10 2006:
- Fix various bugs introduced in the name change
0.0.3: Feb 9 2006:
- Switch name from from 'libvir' to libvirt
- Starting infrastructure to add code examples
- Update of python bindings for completeness
0.0.2: Jan 29 2006: 0.0.2: Jan 29 2006:
- Update of the documentation, web site redesign (Diana Fong) - Update of the documentation, web site redesign (Diana Fong)
- integration of HTTP xend RPC based on libxend by Anthony Liquori for - integration of HTTP xend RPC based on libxend by Anthony Liquori for

2
README
View File

@ -1,7 +1,7 @@
LibVirt : simple API for virtualization LibVirt : simple API for virtualization
Libvir is a C toolkit to interract with the virtualization capabilities Libvirt is a C toolkit to interract with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software of recent versions of Linux (and other OSes). It is free software
available under the GNU Lesser General Public License. Virtualization of available under the GNU Lesser General Public License. Virtualization of
the Linux Operating System means the ability to run multiple instances of the Linux Operating System means the ability to run multiple instances of

44
TODO
View File

@ -1,14 +1,27 @@
Absolute TODOs: TODO:
- Create() API, how do we best keep flexibility and allow various - Create() API, how do we best keep flexibility and allow various
specific environment and space for evolution (VMX) specific environment and space for evolution (VMX)
- thread protection, reentrancy, refcounting, etc ... - track change of xend API & XML-RPC
- documentation and examples on using the toolkit - API for the Node: selecting scheduling policy
- Error API. probably similar to libxml2 structured API
TODO:
- track change of xend API, XML-RPC, UUID based lookup and naming
- API for the Node: extracting informations, selecting scheduling policy
- better resources allocation APIs (%CPU, set memory) - better resources allocation APIs (%CPU, set memory)
- DTD/RNG/XSD schemas for the XML Domain descriptions
- in python bindings raise an exception if a lookup or connection fails
to return a non-None object
- Add uuid to XML format
- add error handling hooks at the python level
- object unicity for domains at the Python level
- UUID lookup in hash.c
virsh TODO:
- decide where will be default directory for domains configurations (/etc/xen/domains/* ?)
- new cmd: create new domain by config file (like "xm create")
create [--conf /path/file.conf | name]
- new cmd: print info about domain configuration:
cinfo [--conf /path/file.conf | name]
- new cmd: print list of all domains configurations:
clist [--dir /path]
- new cmd: print info about saved domain image:
sinfo /path/domain.img
Probable TODOs: Probable TODOs:
- event on big domain state change (create, crashed, paused, shutdown, destroy) - event on big domain state change (create, crashed, paused, shutdown, destroy)
@ -17,8 +30,23 @@ Probable TODOs:
Would-be-nice TODO: Would-be-nice TODO:
- man page for virsh and the libraries entry points - man page for virsh and the libraries entry points
- support for QEmu and other virtualization engines - support for QEmu and other virtualization engines
- more documentation and examples on using the toolkit
- examples for the error handling code
Cleanup:
- now that libxml2 is linked in, drop hash.[ch] and get back to libxml2 ones ?
same for the buffers
Done: Done:
- make dist and make rpm targets - make dist and make rpm targets
- set a no public by default policy for libvir symbols - set a no public by default policy for libvir symbols
- fix the python bindings - fix the python bindings
- renamed to libvirt
- the CreateLinux() API is a first step toward a final Create()
- documentation and examples on using the toolkit
- UUID based lookup and naming
- Error API similar to libxml2 structured API
- extract error messages from the Xend rpc
- API for the Node: extracting informations
- docs for the principle in the error handling code
- thread protection, reentrancy, refcounting, etc ...

View File

@ -36,7 +36,7 @@ if test "$DIE" -eq 1; then
exit 1 exit 1
fi fi
test -f src/libvir.c || { test -f src/libvirt.c || {
echo "You must run this script in the top-level libxen directory" echo "You must run this script in the top-level libxen directory"
exit 1 exit 1
} }
@ -61,4 +61,4 @@ fi
$srcdir/configure "$@" $srcdir/configure "$@"
echo echo
echo "Now type 'make' to compile libvir." echo "Now type 'make' to compile libvirt."

View File

@ -3,33 +3,33 @@ AC_INIT(src/libvirt.c)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST AC_CANONICAL_HOST
LIBVIR_MAJOR_VERSION=0 LIBVIRT_MAJOR_VERSION=0
LIBVIR_MINOR_VERSION=0 LIBVIRT_MINOR_VERSION=1
LIBVIR_MICRO_VERSION=3 LIBVIRT_MICRO_VERSION=0
LIBVIR_MICRO_VERSION_SUFFIX= LIBVIRT_MICRO_VERSION_SUFFIX=
LIBVIR_VERSION=$LIBVIR_MAJOR_VERSION.$LIBVIR_MINOR_VERSION.$LIBVIR_MICRO_VERSION$LIBVIR_MICRO_VERSION_SUFFIX LIBVIRT_VERSION=$LIBVIRT_MAJOR_VERSION.$LIBVIRT_MINOR_VERSION.$LIBVIRT_MICRO_VERSION$LIBVIRT_MICRO_VERSION_SUFFIX
LIBVIR_VERSION_INFO=`expr $LIBVIR_MAJOR_VERSION + $LIBVIR_MINOR_VERSION`:$LIBVIR_MICRO_VERSION:$LIBVIR_MINOR_VERSION LIBVIRT_VERSION_INFO=`expr $LIBVIRT_MAJOR_VERSION + $LIBVIRT_MINOR_VERSION`:$LIBVIRT_MICRO_VERSION:$LIBVIRT_MINOR_VERSION
LIBVIR_VERSION_NUMBER=`expr $LIBVIR_MAJOR_VERSION \* 1000000 + $LIBVIR_MINOR_VERSION \* 1000 + $LIBVIR_MICRO_VERSION` LIBVIRT_VERSION_NUMBER=`expr $LIBVIRT_MAJOR_VERSION \* 1000000 + $LIBVIRT_MINOR_VERSION \* 1000 + $LIBVIRT_MICRO_VERSION`
if test -f CVS/Entries; then if test -f CVS/Entries; then
extra=`grep ChangeLog CVS/Entries | grep -v LIBVIR | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%` extra=`grep ChangeLog CVS/Entries | grep -v LIBVIR | sed -e s\%/ChangeLog/1\.%% -e s\%/.*$%%`
echo extra=$extra echo extra=$extra
if test "$extra" != "" if test "$extra" != ""
then then
LIBVIR_VERSION_EXTRA="-CVS$extra" LIBVIRT_VERSION_EXTRA="-CVS$extra"
fi fi
fi fi
AC_SUBST(LIBVIR_MAJOR_VERSION) AC_SUBST(LIBVIRT_MAJOR_VERSION)
AC_SUBST(LIBVIR_MINOR_VERSION) AC_SUBST(LIBVIRT_MINOR_VERSION)
AC_SUBST(LIBVIR_MICRO_VERSION) AC_SUBST(LIBVIRT_MICRO_VERSION)
AC_SUBST(LIBVIR_VERSION) AC_SUBST(LIBVIRT_VERSION)
AC_SUBST(LIBVIR_VERSION_INFO) AC_SUBST(LIBVIRT_VERSION_INFO)
AC_SUBST(LIBVIR_VERSION_NUMBER) AC_SUBST(LIBVIRT_VERSION_NUMBER)
AC_SUBST(LIBVIR_VERSION_EXTRA) AC_SUBST(LIBVIRT_VERSION_EXTRA)
VERSION=${LIBVIR_VERSION} VERSION=${LIBVIRT_VERSION}
AM_INIT_AUTOMAKE(libvirt, $VERSION) AM_INIT_AUTOMAKE(libvirt, $VERSION)
@ -64,7 +64,7 @@ AC_SUBST(HTML_DIR)
dnl dnl
dnl specific tests to setup DV devel environments with debug etc ... dnl specific tests to setup DV devel environments with debug etc ...
dnl dnl
if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/libvir" ]] ; then if [[ "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/libvirt" ]] ; then
STATIC_BINARIES="-static" STATIC_BINARIES="-static"
else else
STATIC_BINARIES= STATIC_BINARIES=
@ -78,6 +78,18 @@ dnl
CFLAGS="-g -O -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall" CFLAGS="-g -O -W -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls -Wall"
fi fi
dnl
dnl Specify the xen-distribution directory to be able to compile on a
dnl non-xenified host
dnl
AC_ARG_WITH(xen-distdir, AC_HELP_STRING([--with-xen-distdir=path],
[distribution directory of Xen, default /usr]))
if test "x$with_xen_distdir" != "x"
then
CPPFLAGS="$CPPFLAGS -I$withval/install/usr/include"
LDFLAGS="$LDFLAGS -L$withval/install/usr/lib"
fi
dnl dnl
dnl To be able to make dist on a non-xenified host dnl To be able to make dist on a non-xenified host
dnl dnl
@ -90,6 +102,50 @@ then
dnl search for the Xen store library dnl search for the Xen store library
AC_SEARCH_LIBS(xs_read, [xenstore], [], [AC_MSG_ERROR([Xen store library not found])]) AC_SEARCH_LIBS(xs_read, [xenstore], [], [AC_MSG_ERROR([Xen store library not found])])
dnl ==========================================================================
dnl find libxml2 library, borrowed from xmlsec
dnl ==========================================================================
LIBXML_MIN_VERSION="2.5.0"
LIBXML_CONFIG="xml2-config"
LIBXML_CFLAGS=""
LIBXML_LIBS=""
LIBXML_FOUND="no"
AC_ARG_WITH(libxml, [ --with-libxml=[PFX] libxml2 location])
if test "z$with_libxml" = "zno" ; then
AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_MIN_VERSION)
AC_MSG_ERROR(libxml2 >= $LIBXML_MIN_VERSION is required for $XMLSEC_PACKAGE)
elif test "z$with_libxml" = "z" -a "z$PKG_CONFIG_ENABLED" = "zyes" ; then
PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_MIN_VERSION,
[LIBXML_FOUND=yes],
[LIBXML_FOUND=no])
fi
AC_MSG_CHECKING(libxml2 $with_libxml $LIBXML_FOUND )
if test "z$LIBXML_FOUND" = "zno" ; then
AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_MIN_VERSION)
if test "z$with_libxml" != "z" ; then
LIBXML_CONFIG=$with_libxml/bin/$LIBXML_CONFIG
fi
AC_MSG_CHECKING(libxml2 $with_libxml $LIBXML_CONFIG )
if ! $LIBXML_CONFIG --version > /dev/null 2>&1 ; then
AC_MSG_ERROR(Could not find libxml2 anywhere (see config.log for details).)
fi
vers=`$LIBXML_CONFIG --version | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
minvers=`echo $LIBXML_MIN_VERSION | awk -F. '{ printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
if test "$vers" -ge "$minvers" ; then
LIBXML_LIBS="`$LIBXML_CONFIG --libs`"
LIBXML_CFLAGS="`$LIBXML_CONFIG --cflags`"
LIBXML_FOUND="yes"
AC_MSG_RESULT(yes ('$LIBXML_VERSION'))
else
AC_MSG_ERROR(You need at least libxml2 $LIBXML_MIN_VERSION for this version of $XMLSEC_PACKAGE)
fi
fi
AC_SUBST(LIBXML_CFLAGS)
AC_SUBST(LIBXML_LIBS)
AC_SUBST(LIBXML_CONFIG)
AC_SUBST(LIBXML_MIN_VERSION)
dnl virsh libraries dnl virsh libraries
AC_CHECK_LIB(curses, initscr, AC_CHECK_LIB(curses, initscr,
[VIRSH_LIBS="$VIRSH_LIBS -lcurses"], [VIRSH_LIBS="$VIRSH_LIBS -lcurses"],
@ -101,6 +157,9 @@ AC_CHECK_LIB(readline, main,
[$VIRSH_LIBS]) [$VIRSH_LIBS])
AC_SUBST(VIRSH_LIBS) AC_SUBST(VIRSH_LIBS)
# end of if with_depends
fi
dnl dnl
dnl check for python dnl check for python
dnl dnl
@ -184,12 +243,11 @@ AC_SUBST(PYTHON_INCLUDES)
AC_SUBST(PYTHON_SITE_PACKAGES) AC_SUBST(PYTHON_SITE_PACKAGES)
AC_SUBST(PYTHON_SUBDIR) AC_SUBST(PYTHON_SUBDIR)
# end of if with_depends
fi
# very annoying # very annoying
rm -f COPYING rm -f COPYING
cp COPYING.LIB COPYING
AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \ AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
docs/examples/Makefile \ docs/examples/Makefile docs/devhelp/Makefile \
libvirt.pc libvirt.spec include/libvirt.h python/Makefile) libvirt.pc libvirt.spec include/libvirt.h \
python/Makefile python/tests/Makefile)

View File

@ -1,38 +1,46 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>API Alphabetic Index A-f for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">API Alphabetic Index A-f for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-f</a> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>API Alphabetic Index A-c for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">API Alphabetic Index A-c for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="APIchunk1.html">g-r</a> <a href="APIchunk1.html">d-m</a>
<a href="APIchunk2.html">s-z</a> <a href="APIchunk2.html">n-s</a>
</h2><h2>Letter A:</h2><dl><dt>ABI</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> <a href="APIchunk3.html">t-z</a>
</dd><dt>API</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> </h2><h2>Letter A:</h2><dl><dt>APIs</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>APIs</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>After</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> </dd><dt>After</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd></dl><h2>Letter C:</h2><dl><dt>CPU</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> </dd></dl><h2>Letter C:</h2><dl><dt>CPU</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>CPUs</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>Collect</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> </dd><dt>Collect</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
</dd></dl><h2>Letter D:</h2><dl><dt>Destroy</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> </dd><dt>Copy</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
</dd></dl><h2>Letter D:</h2><dl><dt>Default</dt><dd><a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a><br />
</dd><dt>Destroy</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>Domain0</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> </dd><dt>Domain0</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>Dynamically</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> </dd><dt>Dynamically</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd></dl><h2>Letter E:</h2><dl><dt>Extract</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> </dd></dl><h2>Letter E:</h2><dl><dt>Extract</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd></dl><h2>Letter F:</h2><dl><dt>Free</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br /> </dd></dl><h2>Letter F:</h2><dl><dt>Free</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
</dd></dl><h2>Letter G:</h2><dl><dt>Get</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> </dd></dl><h2>Letter G:</h2><dl><dt>Get</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
</dd></dl><h2>Letter H:</h2><dl><dt>Hypervisor</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> </dd></dl><h2>Letter H:</h2><dl><dt>Hypervisor</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
</dd></dl><h2>Letter I:</h2><dl><dt>IDs</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> </dd></dl><h2>Letter I:</h2><dl><dt>IDs</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
</dd><dt>Informations</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>Initialize</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd></dl><h2>Letter K:</h2><dl><dt>KBytes</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd></dl><h2>Letter K:</h2><dl><dt>KBytes</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd></dl><h2>Letter L:</h2><dl><dt>Launch</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> </dd></dl><h2>Letter L:</h2><dl><dt>Launch</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>Linux</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> </dd><dt>Linux</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd></dl><h2>Letter M:</h2><dl><dt>Macro</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br /> </dd></dl><h2>Letter M:</h2><dl><dt>Macro</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
</dd></dl><h2>Letter N:</h2><dl><dt>NOTE:</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> </dd></dl><h2>Letter N:</h2><dl><dt>NULL</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
</dd><dt>NULL</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> <a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> <a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
@ -42,22 +50,39 @@
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>NUMA</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>Note</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> </dd><dt>Note</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd></dl><h2>Letter O:</h2><dl><dt>OUT</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> </dd></dl><h2>Letter O:</h2><dl><dt>OUT</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter P:</h2><dl><dt>Provide</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> </dd><dt>One</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
</dd></dl><h2>Letter P:</h2><dl><dt>Provide</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>Provides</dt><dd><a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br /> </dd><dt>Provides</dt><dd><a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter R:</h2><dl><dt>Read-Only</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> </dd></dl><h2>Letter R:</h2><dl><dt>Read-Only</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>Reboot</dt><dd><a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
</dd><dt>Reset</dt><dd><a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a><br />
<a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
<a href="html/libvirt-virterror.html#virResetLastError">virResetLastError</a><br />
</dd><dt>Resume</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> </dd><dt>Resume</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd><dt>Retrieve</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> </dd><dt>Retrieve</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
</dd></dl><h2>Letter S:</h2><dl><dt>Shutdown</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> </dd></dl><h2>Letter S:</h2><dl><dt>Set</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>Shutdown</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>Signature</dt><dd><a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
</dd><dt>Simpler</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>Suspends</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> </dd><dt>Suspends</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd></dl><h2>Letter T:</h2><dl><dt>TODO:</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd></dl><h2>Letter T:</h2><dl><dt>TODO:</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>This</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> </dd><dt>This</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
@ -71,25 +96,34 @@
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>Try</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br /> </dd><dt>Try</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
</dd></dl><h2>Letter U:</h2><dl><dt>UTF-8</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> </dd></dl><h2>Letter U:</h2><dl><dt>UTF-8</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>UUID</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
</dd><dt>Use</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> </dd><dt>Use</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd></dl><h2>Letter X:</h2><dl><dt>XML</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> </dd></dl><h2>Letter W:</h2><dl><dt>What</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
</dd></dl><h2>Letter X:</h2><dl><dt>XML</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>Xen</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> </dd><dt>Xen</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter a:</h2><dl><dt>about</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> </dd></dl><h2>Letter a:</h2><dl><dt>about</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>access</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> <a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd><dt>access</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> <a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> <a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> <a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>active</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> </dd><dt>accesses</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>active</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br /> <a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>add</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>add</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> </dd><dt>after</dt><dd><a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
</dd><dt>after</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> <a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>against</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> </dd><dt>against</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>alive</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br /> </dd><dt>alive</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
@ -98,6 +132,7 @@
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd><dt>allowed</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>allowed</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>already</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> </dd><dt>already</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>amount</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> </dd><dt>amount</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
@ -106,50 +141,80 @@
</dd><dt>application</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> </dd><dt>application</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>are</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>applications</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> </dd><dt>are</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> <a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>argument</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> </dd><dt>argument</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>array</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> </dd><dt>array</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
</dd><dt>assumed</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> </dd><dt>assumed</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>available</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>available</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>availble</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> </dd><dt>availble</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter b:</h2><dl><dt>back</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> </dd><dt>avoid</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd></dl><h2>Letter b:</h2><dl><dt>back</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>based</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br /> </dd><dt>based</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>being</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
</dd><dt>below</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>being</dt><dd><a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
</dd><dt>better</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>block</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br /> </dd><dt>block</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>but</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> </dd><dt>but</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd></dl><h2>Letter c:</h2><dl><dt>call</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> <a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> </dd><dt>bytes</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
</dd></dl><h2>Letter c:</h2><dl><dt>call</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> <a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> <a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>called</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> <a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>callback</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>called</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>caller</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>caller</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>calling</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> </dd><dt>calling</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd><dt>can</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>can</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>capacities</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> </dd><dt>capacities</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>caught</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-virterror.html#virResetLastError">virResetLastError</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>cell</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>change</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> </dd><dt>change</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>changes</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> </dd><dt>clean</dt><dd><a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
</dd><dt>check</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>clients</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>closes</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> </dd><dt>closes</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
</dd><dt>code</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> </dd><dt>code</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>collect</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> </dd><dt>collect</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
</dd><dt>command</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br /> </dd><dt>command</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>compiled</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> </dd><dt>compiled</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>connection</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>connection</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> <a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
@ -161,96 +226,23 @@
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br /> <a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>consequent</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
</dd><dt>content</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
</dd><dt>contents</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> </dd><dt>contents</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>control</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> </dd><dt>control</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>copy</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
</dd><dt>core</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>could</dt><dd><a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>currently</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> </dd><dt>currently</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd></dl><h2>Letter d:</h2><dl><dt>data</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br /> <a href="APIchunk1.html">d-m</a>
</dd><dt>deallocated</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> <a href="APIchunk2.html">n-s</a>
</dd><dt>defined</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> <a href="APIchunk3.html">t-z</a>
</dd><dt>description</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> </h2></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
</dd><dt>device</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>disk</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>doable</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>does</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>domains</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>down</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd></dl><h2>Letter e:</h2><dl><dt>encoded</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>error</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>especially</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
</dd><dt>extracted</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>extraction</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd></dl><h2>Letter f:</h2><dl><dt>failure</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>file</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>filename</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>find</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
</dd><dt>first</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>flags</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>for</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>format</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>found</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
</dd><dt>free</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>freed</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
</dd><dt>from</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd><dt>frozen</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>full</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>function</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>functionalities</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>further</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-f</a>
<a href="APIchunk1.html">g-r</a>
<a href="APIchunk2.html">s-z</a>
</h2></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,43 +1,139 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>API Alphabetic Index g-r for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">API Alphabetic Index g-r for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-f</a> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>API Alphabetic Index d-m for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">API Alphabetic Index d-m for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="APIchunk1.html">g-r</a> <a href="APIchunk1.html">d-m</a>
<a href="APIchunk2.html">s-z</a> <a href="APIchunk2.html">n-s</a>
</h2><h2>Letter g:</h2><dl><dt>general</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="APIchunk3.html">t-z</a>
</dd><dt>get</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> </h2><h2>Letter d:</h2><dl><dt>data</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>deallocated</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>default</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>description</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>device</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>disk</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>doable</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>does</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>domains</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>down</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd></dl><h2>Letter e:</h2><dl><dt>encoded</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>especially</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
</dd><dt>expected</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>extra</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
</dd><dt>extracted</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> </dd><dt>extraction</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>given</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> </dd></dl><h2>Letter f:</h2><dl><dt>failure</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>guest</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd></dl><h2>Letter h:</h2><dl><dt>have</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>hypervisor</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> <a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> </dd><dt>file</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>filename</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>find</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
</dd><dt>first</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>flags</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
</dd><dt>for</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>format</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>found</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> <a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br /> <a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
</dd><dt>free</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>freed</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd><dt>frequency</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>from</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd><dt>frozen</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>function</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> <a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> <a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br /> <a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
</dd></dl><h2>Letter i:</h2><dl><dt>ignore</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>functionalities</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>further</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd></dl><h2>Letter g:</h2><dl><dt>general</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>get</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>given</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
</dd><dt>global</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>guest</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd></dl><h2>Letter h:</h2><dl><dt>handler</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>handling</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>hardware</dt><dd><a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd><dt>have</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>how</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
</dd><dt>human-readable</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
</dd></dl><h2>Letter i:</h2><dl><dt>ignore</dt><dd><a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>image</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br /> </dd><dt>image</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> </dd><dt>indicating</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>information</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> </dd><dt>information</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd><dt>informations</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> </dd><dt>informations</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>informative</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
</dd><dt>init</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br /> </dd><dt>init</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>initrd</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> </dd><dt>initializing</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>instance</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> </dd><dt>instance</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br /> <a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
@ -45,46 +141,70 @@
</dd><dt>interaction</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> </dd><dt>interaction</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
</dd><dt>its</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> </dd><dt>its</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> <a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd></dl><h2>Letter k:</h2><dl><dt>kept</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br /> </dd></dl><h2>Letter k:</h2><dl><dt>kept</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
</dd><dt>kernel</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br /> </dd><dt>kernel</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> </dd><dt>kilobytes</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>kilobytes</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>knowing</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> </dd><dt>knowing</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd></dl><h2>Letter l:</h2><dl><dt>lack</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> </dd></dl><h2>Letter l:</h2><dl><dt>lack</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>last</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-virterror.html#virResetLastError">virResetLastError</a><br />
</dd><dt>later</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>level</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> </dd><dt>level</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-virterror.html#virResetLastError">virResetLastError</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>libbrary</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> </dd><dt>libbrary</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>library</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br /> </dd><dt>library</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
<a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
<a href="html/libvirt-virterror.html#virResetLastError">virResetLastError</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>lifetime</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> </dd><dt>lifetime</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>limited</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>limited</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>line</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br /> </dd><dt>line</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>list</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> </dd><dt>list</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
</dd><dt>listed</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> </dd><dt>listed</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>long</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>lookup</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> </dd><dt>lookup</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
</dd></dl><h2>Letter m:</h2><dl><dt>major</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> </dd></dl><h2>Letter m:</h2><dl><dt>major</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>maximum</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>maximum</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>may</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> </dd><dt>may</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> <a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> <a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> <a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>mem</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>memory</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>memory</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> <a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> <a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>message</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
</dd><dt>method</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br /> </dd><dt>method</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> <a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>methods</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> </dd><dt>methods</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
@ -92,135 +212,15 @@
</dd><dt>minor</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br /> </dd><dt>minor</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>model</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>monitoring</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> </dd><dt>monitoring</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
</dd><dt>must</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> </dd><dt>multithreaded</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
</dd></dl><h2>Letter n:</h2><dl><dt>name</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> <a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> <a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> </dd><dt>must</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd><dt>need</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>needed</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
</dd><dt>new</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>not</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="APIchunk1.html">d-m</a>
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="APIchunk2.html">n-s</a>
</dd><dt>number</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> <a href="APIchunk3.html">t-z</a>
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br /> </h2></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
</dd></dl><h2>Letter o:</h2><dl><dt>object</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>one</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>only</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>operation</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd><dt>option</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>optional</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>otherwise</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>output</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd></dl><h2>Letter p:</h2><dl><dt>padding</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>parameters</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>partial</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>pass</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>path</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>physical</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>pointer</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
</dd><dt>pointing</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>private</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>priviledged</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>problem</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>process</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>protection</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>providing</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
</dd><dt>public</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>publicly</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd></dl><h2>Letter r:</h2><dl><dt>ramdisk</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>reactivate</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>reboot</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>release</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>request</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>requires</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>reserved</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>resources</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>restarted</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd><dt>restore</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>restricted</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>return</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>returned</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>returns</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>root</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>running</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>runs</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-f</a>
<a href="APIchunk1.html">g-r</a>
<a href="APIchunk2.html">s-z</a>
</h2></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,9 +1,193 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>API Alphabetic Index s-z for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">API Alphabetic Index s-z for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-f</a> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>API Alphabetic Index n-s for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">API Alphabetic Index n-s for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="APIchunk1.html">g-r</a> <a href="APIchunk1.html">d-m</a>
<a href="APIchunk2.html">s-z</a> <a href="APIchunk2.html">n-s</a>
</h2><h2>Letter s:</h2><dl><dt>same</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> <a href="APIchunk3.html">t-z</a>
</h2><h2>Letter n:</h2><dl><dt>name</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>nanoseconds</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>need</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>needed</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
</dd><dt>new</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
</dd><dt>node</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd><dt>none</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>not</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>number</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
</dd></dl><h2>Letter o:</h2><dl><dt>object</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>occured</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>one</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>only</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>operation</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
</dd><dt>option</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>optional</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>otherwise</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>output</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd></dl><h2>Letter p:</h2><dl><dt>parameter</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
</dd><dt>parameters</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>part</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
</dd><dt>partial</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>pass</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>path</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>per</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>physical</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>pointed</dt><dd><a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
</dd><dt>pointer</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
<a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>pointing</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>potential</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>printing</dt><dd><a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>priviledged</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>problem</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>process</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>provided</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>providing</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
</dd><dt>public</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
</dd></dl><h2>Letter r:</h2><dl><dt>race</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>raised</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>ramdisk</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>reactivate</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>reboot</dt><dd><a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>receive</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
</dd><dt>relaunch</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>release</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>reporting</dt><dd><a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a><br />
</dd><dt>request</dt><dd><a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>requires</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>reserved</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>reset</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>resources</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>restart</dt><dd><a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
</dd><dt>restarted</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd><dt>restore</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>restricted</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>result</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
</dd><dt>return</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>returned</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>returns</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>reused</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>root</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>routine</dt><dd><a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>running</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>runs</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd></dl><h2>Letter s:</h2><dl><dt>same</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>save</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> </dd><dt>save</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>saved</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br /> </dd><dt>saved</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
</dd><dt>saving</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> </dd><dt>saving</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
@ -18,118 +202,58 @@
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br /> <a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>shutdown</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> </dd><dt>shutdown</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>size</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> </dd><dt>similar</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> </dd><dt>size</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>socket</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>software</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> </dd><dt>software</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
</dd><dt>startup</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>state</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd><dt>state</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> <a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd><dt>static</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> </dd><dt>static</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
</dd><dt>stay</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> </dd><dt>stay</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>still</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> </dd><dt>stderr</dt><dd><a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a><br />
</dd><dt>stopped</dt><dd><a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>still</dt><dd><a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>stopped</dt><dd><a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>store</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> </dd><dt>store</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
</dd><dt>string</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> </dd><dt>string</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd><dt>structure</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> </dd><dt>structure</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br /> <a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>subject</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> <a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd><dt>success</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> </dd><dt>success</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> <a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br /> <a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br /> <a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> <a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> <a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd><dt>successful</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> </dd><dt>successful</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>suitable</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>suspend</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> </dd><dt>suspend</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>suspended</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> </dd><dt>suspended</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd><dt>system</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br /> </dd><dt>system</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd></dl><h2>Letter t:</h2><dl><dt>term</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </dd></dl><h2 align="center"><a href="APIchunk0.html">A-c</a>
</dd><dt>terminated</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> <a href="APIchunk1.html">d-m</a>
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> <a href="APIchunk2.html">n-s</a>
</dd><dt>that</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> <a href="APIchunk3.html">t-z</a>
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> </h2></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>their</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
</dd><dt>then</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>there</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>thereafter</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
</dd><dt>this</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>two</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>type</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter u:</h2><dl><dt>unimplemented</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>unknown</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>unsigned</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
</dd><dt>unused</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>usable</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>used</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>user</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd></dl><h2>Letter v:</h2><dl><dt>value</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>values</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>version</dt><dd><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>virDomainFlags</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>virDomainInfo</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>virDomainRestore</dt><dd><a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
</dd><dt>virDomainResume</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>virDomainSave</dt><dd><a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
</dd><dt>virSuspendDomain</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd></dl><h2>Letter w:</h2><dl><dt>was</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>what</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>where</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>which</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>while</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>will</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>with</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>without</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>work</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>would</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd></dl><h2>Letter x:</h2><dl><dt>xen</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
</dd><dt>xenstore</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd></dl><h2>Letter y:</h2><dl><dt>yet</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd></dl><h2>Letter z:</h2><dl><dt>zero</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-f</a>
<a href="APIchunk1.html">g-r</a>
<a href="APIchunk2.html">s-z</a>
</h2></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -7,4 +7,7 @@
</p><h2>Type virDomainPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> </p><h2>Type virDomainPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> <a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
</p><h2>Type virErrorPtr:</h2><p><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -19,6 +19,7 @@
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a><br /> <a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a><br />
<a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> <a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br /> <a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnect">virConnect</a><br /> <a href="html/libvirt-libvirt.html#virConnect">virConnect</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> <a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
@ -39,6 +40,7 @@
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainInfo">virDomainInfo</a><br /> <a href="html/libvirt-libvirt.html#virDomainInfo">virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a><br /> <a href="html/libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a><br />
@ -46,7 +48,9 @@
<a href="html/libvirt-libvirt.html#virDomainKernelPtr">virDomainKernelPtr</a><br /> <a href="html/libvirt-libvirt.html#virDomainKernelPtr">virDomainKernelPtr</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a><br /> <a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestart">virDomainRestart</a><br /> <a href="html/libvirt-libvirt.html#virDomainRestart">virDomainRestart</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br /> <a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> <a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
@ -56,4 +60,62 @@
<a href="html/libvirt-libvirt.html#virDomainState">virDomainState</a><br /> <a href="html/libvirt-libvirt.html#virDomainState">virDomainState</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> <a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virNodeInfo">virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a><br />
</p><h2><a name="virterror" id="virterror">Module virterror</a>:</h2><p><a href="html/libvirt-virterror.html#VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_DRIVER_FULL">VIR_ERR_DRIVER_FULL</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_ERROR">VIR_ERR_ERROR</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_GET_FAILED">VIR_ERR_GET_FAILED</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_HTTP_ERROR">VIR_ERR_HTTP_ERROR</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_INTERNAL_ERROR">VIR_ERR_INTERNAL_ERROR</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_INVALID_ARG">VIR_ERR_INVALID_ARG</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_INVALID_CONN">VIR_ERR_INVALID_CONN</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_INVALID_DOMAIN">VIR_ERR_INVALID_DOMAIN</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NONE">VIR_ERR_NONE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_CONNECT">VIR_ERR_NO_CONNECT</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_DEVICE">VIR_ERR_NO_DEVICE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_KERNEL">VIR_ERR_NO_KERNEL</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_MEMORY">VIR_ERR_NO_MEMORY</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_NAME">VIR_ERR_NO_NAME</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_OS">VIR_ERR_NO_OS</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_ROOT">VIR_ERR_NO_ROOT</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_SOURCE">VIR_ERR_NO_SOURCE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_SUPPORT">VIR_ERR_NO_SUPPORT</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_TARGET">VIR_ERR_NO_TARGET</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_XEN">VIR_ERR_NO_XEN</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_XENSTORE">VIR_ERR_NO_XENSTORE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_OK">VIR_ERR_OK</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_OPERATION_FAILED">VIR_ERR_OPERATION_FAILED</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_OS_TYPE">VIR_ERR_OS_TYPE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_POST_FAILED">VIR_ERR_POST_FAILED</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_SEXPR_SERIAL">VIR_ERR_SEXPR_SERIAL</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_UNKNOWN_HOST">VIR_ERR_UNKNOWN_HOST</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_WARNING">VIR_ERR_WARNING</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_XEN_CALL">VIR_ERR_XEN_CALL</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_DOM">VIR_FROM_DOM</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_NONE">VIR_FROM_NONE</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_SEXPR">VIR_FROM_SEXPR</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_XEN">VIR_FROM_XEN</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_XEND">VIR_FROM_XEND</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_XENSTORE">VIR_FROM_XENSTORE</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_XML">VIR_FROM_XML</a><br />
<a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virError">virError</a><br />
<a href="html/libvirt-virterror.html#virErrorDomain">virErrorDomain</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virErrorLevel">virErrorLevel</a><br />
<a href="html/libvirt-virterror.html#virErrorNumber">virErrorNumber</a><br />
<a href="html/libvirt-virterror.html#virErrorPtr">virErrorPtr</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
<a href="html/libvirt-virterror.html#virResetLastError">virResetLastError</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,12 +1,18 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>List of function manipulating types in libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">List of function manipulating types in libvirt</h1><h2>Type int *:</h2><p><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>List of function manipulating types in libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">List of function manipulating types in libvirt</h1><h2>Type const unsigned char *:</h2><p><a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
</p><h2>Type int *:</h2><p><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
</p><h2>Type unsigned char *:</h2><p><a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
</p><h2>Type unsigned int:</h2><p><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> </p><h2>Type unsigned int:</h2><p><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</p><h2>Type unsigned long:</h2><p><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> <a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> </p><h2>Type unsigned long:</h2><p><a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</p><h2>Type unsigned long *:</h2><p><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> </p><h2>Type unsigned long *:</h2><p><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</p><h2>Type virConnectPtr:</h2><p><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> </p><h2>Type virConnectPtr:</h2><p><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br /> <a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
@ -14,7 +20,9 @@
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br /> <a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br /> <a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</p><h2>Type virDomainInfoPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br /> </p><h2>Type virDomainInfoPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</p><h2>Type virDomainPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br /> </p><h2>Type virDomainPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br /> <a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
@ -23,10 +31,23 @@
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> <a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br /> <a href="html/libvirt-libvirt.html#virDomainSave">virDomainSave</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> </p><h2>Type virErrorFunc:</h2><p><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</p><h2>Type virErrorPtr:</h2><p><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
</p><h2>Type virNodeInfoPtr:</h2><p><a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</p><h2>Type void *:</h2><p><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -17,9 +17,52 @@
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a><br /> <a href="html/libvirt-libvirt.html#VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a><br />
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a><br /> <a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a><br />
<a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a><br /> <a href="html/libvirt-libvirt.html#VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_DRIVER_FULL">VIR_ERR_DRIVER_FULL</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_ERROR">VIR_ERR_ERROR</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_GET_FAILED">VIR_ERR_GET_FAILED</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_HTTP_ERROR">VIR_ERR_HTTP_ERROR</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_INTERNAL_ERROR">VIR_ERR_INTERNAL_ERROR</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_INVALID_ARG">VIR_ERR_INVALID_ARG</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_INVALID_CONN">VIR_ERR_INVALID_CONN</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_INVALID_DOMAIN">VIR_ERR_INVALID_DOMAIN</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NONE">VIR_ERR_NONE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_CONNECT">VIR_ERR_NO_CONNECT</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_DEVICE">VIR_ERR_NO_DEVICE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_KERNEL">VIR_ERR_NO_KERNEL</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_MEMORY">VIR_ERR_NO_MEMORY</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_NAME">VIR_ERR_NO_NAME</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_OS">VIR_ERR_NO_OS</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_ROOT">VIR_ERR_NO_ROOT</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_SOURCE">VIR_ERR_NO_SOURCE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_SUPPORT">VIR_ERR_NO_SUPPORT</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_TARGET">VIR_ERR_NO_TARGET</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_XEN">VIR_ERR_NO_XEN</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_NO_XENSTORE">VIR_ERR_NO_XENSTORE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_OK">VIR_ERR_OK</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_OPERATION_FAILED">VIR_ERR_OPERATION_FAILED</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_OS_TYPE">VIR_ERR_OS_TYPE</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_POST_FAILED">VIR_ERR_POST_FAILED</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_SEXPR_SERIAL">VIR_ERR_SEXPR_SERIAL</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_UNKNOWN_HOST">VIR_ERR_UNKNOWN_HOST</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_WARNING">VIR_ERR_WARNING</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_XEN_CALL">VIR_ERR_XEN_CALL</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_DOM">VIR_FROM_DOM</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_NONE">VIR_FROM_NONE</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_SEXPR">VIR_FROM_SEXPR</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_XEN">VIR_FROM_XEN</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_XEND">VIR_FROM_XEND</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_XENSTORE">VIR_FROM_XENSTORE</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_XML">VIR_FROM_XML</a><br />
</p><h2>Letter _:</h2><p><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br /> </p><h2>Letter _:</h2><p><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br /> <a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</p><h2>Letter v:</h2><p><a href="html/libvirt-libvirt.html#virConnect">virConnect</a><br /> <a href="html/libvirt-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</p><h2>Letter v:</h2><p><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a><br />
<a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virConnect">virConnect</a><br />
<a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br /> <a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
@ -28,6 +71,8 @@
<a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br /> <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virConnectPtr">virConnectPtr</a><br /> <a href="html/libvirt-libvirt.html#virConnectPtr">virConnectPtr</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virDeviceMode">virDeviceMode</a><br /> <a href="html/libvirt-libvirt.html#virDeviceMode">virDeviceMode</a><br />
<a href="html/libvirt-libvirt.html#virDomain">virDomain</a><br /> <a href="html/libvirt-libvirt.html#virDomain">virDomain</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateFlags">virDomainCreateFlags</a><br /> <a href="html/libvirt-libvirt.html#virDomainCreateFlags">virDomainCreateFlags</a><br />
@ -39,6 +84,7 @@
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br /> <a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainInfo">virDomainInfo</a><br /> <a href="html/libvirt-libvirt.html#virDomainInfo">virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a><br /> <a href="html/libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a><br />
@ -46,7 +92,9 @@
<a href="html/libvirt-libvirt.html#virDomainKernelPtr">virDomainKernelPtr</a><br /> <a href="html/libvirt-libvirt.html#virDomainKernelPtr">virDomainKernelPtr</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br /> <a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a><br /> <a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestart">virDomainRestart</a><br /> <a href="html/libvirt-libvirt.html#virDomainRestart">virDomainRestart</a><br />
<a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br /> <a href="html/libvirt-libvirt.html#virDomainRestore">virDomainRestore</a><br />
<a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br /> <a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
@ -55,5 +103,19 @@
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br /> <a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainState">virDomainState</a><br /> <a href="html/libvirt-libvirt.html#virDomainState">virDomainState</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br /> <a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-virterror.html#virError">virError</a><br />
<a href="html/libvirt-virterror.html#virErrorDomain">virErrorDomain</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virErrorLevel">virErrorLevel</a><br />
<a href="html/libvirt-virterror.html#virErrorNumber">virErrorNumber</a><br />
<a href="html/libvirt-virterror.html#virErrorPtr">virErrorPtr</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br /> <a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> <a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virNodeInfo">virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a><br />
<a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
<a href="html/libvirt-virterror.html#virResetLastError">virResetLastError</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -4,30 +4,30 @@
<li><a href="FAQ.html#Installati">Installation</a></li> <li><a href="FAQ.html#Installati">Installation</a></li>
<li><a href="FAQ.html#Compilatio">Compilation</a></li> <li><a href="FAQ.html#Compilatio">Compilation</a></li>
<li><a href="FAQ.html#Developer">Developer corner</a></li> <li><a href="FAQ.html#Developer">Developer corner</a></li>
</ul><h3><a name="License" id="License">License</a>(s)</h3><ol><li><em>Licensing Terms for libvir</em> </ul><h3><a name="License" id="License">License</a>(s)</h3><ol><li><em>Licensing Terms for libvirt</em>
<p>libvir is released under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU Lesser <p>libvirt is released under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU Lesser
General Public License</a>, see the file COPYING.LIB in the distribution General Public License</a>, see the file COPYING.LIB in the distribution
for the precise wording. The only library that libvir depends upon is the for the precise wording. The only library that libvirt depends upon is
Xen store access library which is also licenced under the LGPL.</p> the Xen store access library which is also licenced under the LGPL.</p>
</li> </li>
<li><em>Can I embed libvir in a proprietary application ?</em> <li><em>Can I embed libvirt in a proprietary application ?</em>
<p>Yes. The LGPL allows you to embed libvir into a proprietary <p>Yes. The LGPL allows you to embed libvirt into a proprietary
application. It would be graceful to send-back bug fixes and improvements application. It would be graceful to send-back bug fixes and improvements
as patches for possible incorporation in the main development tree. It as patches for possible incorporation in the main development tree. It
will decrease your maintainance costs anyway if you do so.</p> will decrease your maintainance costs anyway if you do so.</p>
</li> </li>
</ol><h3><a name="Installati" id="Installati">Installation</a></h3><ol><li><em>Where can I get libvir</em> ? </ol><h3><a name="Installati" id="Installati">Installation</a></h3><ol><li><em>Where can I get libvirt</em> ?
<p>The original distribution comes from <a href="ftp://libvir.org/libvir/">ftp://libvir.org/libvir/</a>.</p> <p>The original distribution comes from <a href="ftp://libvirt.org/libvirt/">ftp://libvirt.org/libvirt/</a>.</p>
</li> </li>
<li><em>I can't install the libvir/libvir-devel RPM packages due to failed <li><em>I can't install the libvirt/libvirt-devel RPM packages due to
dependencies</em> failed dependencies</em>
<p>The most generic solution is to re-fetch the latest src.rpm , and <p>The most generic solution is to re-fetch the latest src.rpm , and
rebuild it locally with</p> rebuild it locally with</p>
<p><code>rpm --rebuild libvir-xxx.src.rpm</code>.</p> <p><code>rpm --rebuild libvirt-xxx.src.rpm</code>.</p>
<p>If everything goes well it will generate two binary rpm packages (one <p>If everything goes well it will generate two binary rpm packages (one
providing the shared libs and virsh, and the other one, the -devel providing the shared libs and virsh, and the other one, the -devel
package, providing includes, static libraries and scripts needed to build package, providing includes, static libraries and scripts needed to build
applications with libvir that you can install locally.</p> applications with libvirt that you can install locally.</p>
<p>One can also rebuild the RPMs from a tarball:</p> <p>One can also rebuild the RPMs from a tarball:</p>
<p><code>rpmbuild -ta libdir-xxx.tar.gz</code></p> <p><code>rpmbuild -ta libdir-xxx.tar.gz</code></p>
<p>Or from a configured tree with:</p> <p>Or from a configured tree with:</p>
@ -36,7 +36,7 @@
<li><em>Failure to use the API for non-root users</em> <li><em>Failure to use the API for non-root users</em>
<p>Large parts of the API may only be accessible with root priviledges, <p>Large parts of the API may only be accessible with root priviledges,
however the read only access to the xenstore data doesnot have to be however the read only access to the xenstore data doesnot have to be
forbidden to user, at least for monitoring purposes. If "virsh dinfo" forbidden to user, at least for monitoring purposes. If "virsh dominfo"
fails to run as an user, change the mode of the xenstore read-only socket fails to run as an user, change the mode of the xenstore read-only socket
with:</p> with:</p>
<p><code>chmod 666 /var/run/xenstored/socket_ro</code></p> <p><code>chmod 666 /var/run/xenstored/socket_ro</code></p>
@ -49,10 +49,10 @@
following command run as root:</p> following command run as root:</p>
<p><code>service xend restart</code></p> <p><code>service xend restart</code></p>
</li> </li>
</ol><h3><a name="Compilatio" id="Compilatio">Compilation</a></h3><ol><li><em>What is the process to compile libvir ?</em> </ol><h3><a name="Compilatio" id="Compilatio">Compilation</a></h3><ol><li><em>What is the process to compile libvirt ?</em>
<p>As most UNIX libraries libvir follows the "standard":</p> <p>As most UNIX libraries libvirt follows the "standard":</p>
<p><code>gunzip -c libvir-xxx.tar.gz | tar xvf -</code></p> <p><code>gunzip -c libvirt-xxx.tar.gz | tar xvf -</code></p>
<p><code>cd libvir-xxxx</code></p> <p><code>cd libvirt-xxxx</code></p>
<p><code>./configure --help</code></p> <p><code>./configure --help</code></p>
<p>to see the options, then the compilation/installation proper</p> <p>to see the options, then the compilation/installation proper</p>
<p><code>./configure [possible options]</code></p> <p><code>./configure [possible options]</code></p>
@ -61,8 +61,8 @@
<p>At that point you may have to rerun ldconfig or a similar utility to <p>At that point you may have to rerun ldconfig or a similar utility to
update your list of installed shared libs.</p> update your list of installed shared libs.</p>
</li> </li>
<li><em>What other libraries are needed to compile/install libvir ?</em> <li><em>What other libraries are needed to compile/install libvirt ?</em>
<p>Libvir requires libxenstore, which is usually provided by the xen <p>Libvirt requires libxenstore, which is usually provided by the xen
packages as well as the public headers to compile against libxenstore.</p> packages as well as the public headers to compile against libxenstore.</p>
</li> </li>
<li><em>I use the CVS version and there is no configure script</em> <li><em>I use the CVS version and there is no configure script</em>
@ -71,10 +71,10 @@
like:</p> like:</p>
<p><code>./autogen.sh --prefix=/usr --disable-shared</code></p> <p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
</li> </li>
</ol><h3><a name="Developer" id="Developer">Developer</a> corner</h3><ol><li><em>Troubles compiling or linking programs using libvir</em> </ol><h3><a name="Developer" id="Developer">Developer</a> corner</h3><ol><li><em>Troubles compiling or linking programs using libvirt</em>
<p>To simplify the process of reusing the library, libvir comes with <p>To simplify the process of reusing the library, libvirt comes with
pkgconfig support, which can be used directly from autoconf support or pkgconfig support, which can be used directly from autoconf support or
via the pkg-config command line tool, like:</p> via the pkg-config command line tool, like:</p>
<p><code>pkg-config libvir --libs</code></p> <p><code>pkg-config libvirt --libs</code></p>
</li> </li>
</ol></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> </ol></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
SUBDIRS=examples SUBDIRS= . examples devhelp
# The directory containing the source code (if it contains documentation). # The directory containing the source code (if it contains documentation).
DOC_SOURCE_DIR=../src DOC_SOURCE_DIR=../src

View File

@ -22,10 +22,19 @@ ignored_files = {
"hash.c": "internal hash table stuff", "hash.c": "internal hash table stuff",
"hash.h": "internal hash table stuff", "hash.h": "internal hash table stuff",
"internal.h": "internal includes and defines", "internal.h": "internal includes and defines",
"driver.h": "internal driver interfaces",
"xend_internal.h": "internal includes and defines", "xend_internal.h": "internal includes and defines",
"xend_internal.c": "internal code", "xend_internal.c": "internal code",
"xen_internal.h": "internal includes and defines",
"xen_internal.c": "internal code",
"xs_internal.h": "internal includes and defines",
"xs_internal.c": "internal code",
"sexpr.h": "internal includes and defines", "sexpr.h": "internal includes and defines",
"sexpr.c": "internal code", "sexpr.c": "internal code",
"xml.h": "internal includes and defines",
"xml.c": "internal code",
"xmlrpc.h": "internal include",
"xmlrpc.c": "internal code",
} }
ignored_words = { ignored_words = {

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>libvir architecture</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">libvir architecture</h1><h3>This is Xen specific since this is the only hypervisor supported at the <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>libvirt architecture</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">libvirt architecture</h1><h3>This is in a large part Xen specific since this is the only hypervisor
moment</h3><p>When running in a Xen environment, programs using libvir have to execute supported at the moment</h3><p>When running in a Xen environment, programs using libvirt have to execute
in "Domain 0", which is the primary Linux OS loaded on the machine. That OS in "Domain 0", which is the primary Linux OS loaded on the machine. That OS
kernel provides most if not all of the actual drivers used by the set of kernel provides most if not all of the actual drivers used by the set of
domains. It also runs the Xen Store, a database of informations shared by the domains. It also runs the Xen Store, a database of informations shared by the
@ -18,10 +18,28 @@ the Xen infrastructure:</p><ul><li>a connection to the Xen Daemon though an HTTP
</ul><p>The library will usually interract with the Xen daemon for any operation </ul><p>The library will usually interract with the Xen daemon for any operation
changing the state of the system, but for performance and accuracy reasons changing the state of the system, but for performance and accuracy reasons
may talk directly to the hypervisor when gathering state informations at may talk directly to the hypervisor when gathering state informations at
least when possible (i.e. when the running program using libvir has root least when possible (i.e. when the running program using libvirt has root
priviledge access).</p><p>If it runs without root access virConnectOpenReadOnly() should be used to priviledge access).</p><p>If it runs without root access virConnectOpenReadOnly() should be used to
connect to initialize the library. It will try to open the read-only socket connect to initialize the library. It will try to open the read-only socket
<code>/var/run/xenstored/socket_ro</code> to connect to the Xen Store and <code>/var/run/xenstored/socket_ro</code> to connect to the Xen Store and
also try to use the RPC to the Xen daemon. In this case use of hypervisor also try to use the RPC to the Xen daemon. In this case use of hypervisor
calls and write to the Xen Store will not be possible, restraining the amount calls and write to the Xen Store will not be possible, restraining the amount
of APIs available and slowing down information gathering about domains.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> of APIs available and slowing down information gathering about domains.</p><h3>Internal architecture</h3><p>As the previous section explains, libvirt can communicate using different
channels with the current hypervisor, and should also be able to use
different kind of hypervisor. To simplify the internal design, code, ease
maintainance and simplify the support of other virtualization engine the
internals have been structured as one core component, the libvirt.c module
acting as a front-end for the library API and a set of hypvisor drivers
defining a common set of routines. That way the Xen Daemon accces, the Xen
Store one, the Hypervisor hypercall are all isolated in separate C modules
implementing at least a subset of the common operations defined by the
drivers present in driver.h:</p><ul><li>xend_internal: implements the driver functions though the Xen
Daemon</li>
<li>xs_internal: implements the subset of the driver availble though the
Xen Store</li>
<li>xen_internal: provide the implementation of the functions possible via
direct hypervisor access</li>
</ul><p>Note that a given driver may only implement a subset of those functions,
for example saving a domain state to disk and restoring it is only possible
though the Xen Daemon, on the other hand all interfaces allow to query the
runtime state of a given domain.</p><p></p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reporting bugs and getting help</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reporting bugs and getting help</h1><p>There is a mailing-list <a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a> for libvir, <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reporting bugs and getting help</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reporting bugs and getting help</h1><p>There is a mailing-list <a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a> for libvirt,
with an <a href="https://www.redhat.com/archives/libvir-list/">on-line with an <a href="https://www.redhat.com/archives/libvir-list/">on-line
archive</a>. Please subscribe to this list before posting by visiting the <a href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a> archive</a>. Please subscribe to this list before posting by visiting the <a href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a>
page and follow the instructions. Patches with explanations and provided as page and follow the instructions. Patches with explanations and provided as
attachments are really appreciated and will be discussed on the mailing list. attachments are really appreciated and will be discussed on the mailing list.
If possible generate the patches by using cvs diff -u in a CVS checkout.</p><p>We expect to use <a href="https://bugzilla.redhat.com/">Red Hat If possible generate the patches by using cvs diff -u in a CVS checkout.</p><p>We expect to use <a href="https://bugzilla.redhat.com/">Red Hat
Bugzilla</a> to track bugs for libvir, though there isn't a libvir software Bugzilla</a> to track bugs for libvirt, though there isn't a libvirt software
module defined yet, in the meantime use the mailing-list, thanks !.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> module defined yet, in the meantime use the mailing-list, thanks !.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

27
docs/devhelp/Makefile.am Normal file
View File

@ -0,0 +1,27 @@
DEVHELP_DIR=$(datadir)/gtk-doc/html/libvirt
HTML_FILES=index.html general.html $(HTML_MODULES)
HTML_MODULES= \
libvirt-libvirt.html
EXTRA_FORMAT= \
home.png \
left.png \
right.png \
up.png \
style.css
EXTRA_DIST=devhelp.xsl html.xsl libvirt.devhelp $(HTML_FILES) $(EXTRA_FORMAT)
all: libvirt.devhelp $(HTML_FILES)
libvirt.devhelp $(HTML_FILES): devhelp.xsl html.xsl $(top_srcdir)/docs/libvirt-api.xml
-@(echo Rebuilding devhelp files)
-@(if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet -o $(srcdir)/libvirt.devhelp devhelp.xsl $(top_srcdir)/docs/libvirt-api.xml ; fi );
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 libvirt.devhelp $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 $(EXTRA_FORMAT) $(DESTDIR)$(DEVHELP_DIR)
-@INSTALL@ -m 0644 $(HTML_FILES) $(DESTDIR)$(DEVHELP_DIR)

127
docs/devhelp/devhelp.xsl Normal file
View File

@ -0,0 +1,127 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.devhelp.net/book"
xmlns:exsl="http://exslt.org/common"
xmlns:str="http://exslt.org/strings"
extension-element-prefixes="exsl str"
exclude-result-prefixes="exsl str">
<!-- The stylesheet for the html pages -->
<xsl:import href="html.xsl"/>
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<!-- Build keys for all symbols -->
<xsl:key name="symbols" match="/api/symbols/*" use="@name"/>
<xsl:template match="/api">
<book title="{@name} Reference Manual" link="index.html" author="" name="{@name}">
<xsl:apply-templates select="files"/>
<xsl:apply-templates select="symbols"/>
</book>
<xsl:call-template name="generate_index"/>
<xsl:call-template name="generate_general"/>
</xsl:template>
<xsl:template match="/api/files">
<chapters>
<sub name="API" link="general.html">
<xsl:apply-templates select="file"/>
</sub>
</chapters>
</xsl:template>
<xsl:template match="/api/files/file">
<xsl:variable name="module" select="@name"/>
<xsl:variable name="prev" select="string(preceding-sibling::file[position()=1]/@name)"/>
<xsl:variable name="next" select="string(following-sibling::file[position()=1]/@name)"/>
<sub name="{@name}" link="libvirt-{@name}.html"/>
<xsl:document xmlns="" href="libvirt-{@name}.html" method="xml" indent="yes" encoding="UTF-8">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title><xsl:value-of select="concat(@name, ': ', summary)"/></title>
<meta name="generator" content="Libvirt devhelp stylesheet"/>
<link rel="start" href="index.html" title="libvirt Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<xsl:if test="$prev != ''">
<td><a accesskey="p" href="libvirt-{$prev}.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"/></a></td>
</xsl:if>
<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"/></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
<xsl:if test="$next != ''">
<td><a accesskey="n" href="libvirt-{$next}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
</xsl:if>
<th width="100%" align="center">libvirt Reference Manual</th>
</tr>
</table>
<h2><span class="refentrytitle"><xsl:value-of select="@name"/></span></h2>
<p><xsl:value-of select="@name"/> - <xsl:value-of select="summary"/></p>
<p><xsl:value-of select="description"/></p>
<xsl:if test="deprecated">
<p> WARNING: this module is deprecated !</p>
</xsl:if>
<p>Author(s): <xsl:value-of select="author"/></p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
<xsl:apply-templates mode="synopsis" select="exports"/>
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<xsl:apply-templates mode="details" select="/api/symbols/macro[@file=$module]"/>
<xsl:apply-templates mode="details" select="/api/symbols/typedef[@file=$module] | /api/symbols/struct[@file=$module]"/>
<xsl:apply-templates mode="details" select="/api/symbols/functype[@file=$module]"/>
<xsl:apply-templates mode="details" select="/api/symbols/variable[@file=$module]"/>
<xsl:apply-templates mode="details" select="/api/symbols/function[@file=$module]"/>
</div>
</div>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="/api/symbols">
<functions>
<xsl:apply-templates select="macro"/>
<xsl:apply-templates select="enum"/>
<xsl:apply-templates select="typedef"/>
<xsl:apply-templates select="struct"/>
<xsl:apply-templates select="functype"/>
<xsl:apply-templates select="variable"/>
<xsl:apply-templates select="function"/>
</functions>
</xsl:template>
<xsl:template match="/api/symbols/functype">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/function">
<function name="{@name} ()" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/typedef">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/enum">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/struct">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/macro">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
<xsl:template match="/api/symbols/variable">
<function name="{@name}" link="libvirt-{@file}.html#{@name}"/>
</xsl:template>
</xsl:stylesheet>

BIN
docs/devhelp/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

579
docs/devhelp/html.xsl Normal file
View File

@ -0,0 +1,579 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:exsl="http://exslt.org/common"
xmlns:str="http://exslt.org/strings"
extension-element-prefixes="exsl str"
exclude-result-prefixes="exsl str">
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<!-- This is convoluted but needed to force the current document to
be the API one and not the result tree from the tokenize() result,
because the keys are only defined on the main document -->
<xsl:template mode="dumptoken" match='*'>
<xsl:param name="token"/>
<xsl:variable name="ref" select="key('symbols', $token)"/>
<xsl:choose>
<xsl:when test="$ref">
<a href="libvirt-{$ref/@file}.html#{$ref/@name}"><xsl:value-of select="$token"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$token"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- dumps a string, making cross-reference links -->
<xsl:template name="dumptext">
<xsl:param name="text"/>
<xsl:variable name="ctxt" select='.'/>
<!-- <xsl:value-of select="$text"/> -->
<xsl:for-each select="str:tokenize($text, ' &#9;')">
<xsl:apply-templates select="$ctxt" mode='dumptoken'>
<xsl:with-param name="token" select="string(.)"/>
</xsl:apply-templates>
<xsl:if test="position() != last()">
<xsl:text> </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!--
The following builds the Synopsis section
-->
<xsl:template mode="synopsis" match="function">
<xsl:variable name="name" select="string(@name)"/>
<xsl:variable name="nlen" select="string-length($name)"/>
<xsl:variable name="tlen" select="string-length(return/@type)"/>
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="return/@type"/>
</xsl:call-template>
<xsl:text>&#9;</xsl:text>
<a href="#{@name}"><xsl:value-of select="@name"/></a>
<xsl:if test="$blen - 40 &lt; -8">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:if test="$blen - 40 &lt; 0">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:text>&#9;(</xsl:text>
<xsl:if test="not(arg)">
<xsl:text>void</xsl:text>
</xsl:if>
<xsl:for-each select="arg">
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="@type"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text><br/>
<xsl:if test="$blen - 40 &gt; 8">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:if test="$blen - 40 &gt; 0">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>);</xsl:text>
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template mode="synopsis" match="functype">
<xsl:variable name="name" select="string(@name)"/>
<xsl:variable name="nlen" select="string-length($name)"/>
<xsl:variable name="tlen" select="string-length(return/@type)"/>
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
<xsl:text>typedef </xsl:text>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="return/@type"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<a href="#{@name}"><xsl:value-of select="@name"/></a>
<xsl:if test="$blen - 40 &lt; -8">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:if test="$blen - 40 &lt; 0">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:text>&#9;(</xsl:text>
<xsl:if test="not(arg)">
<xsl:text>void</xsl:text>
</xsl:if>
<xsl:for-each select="arg">
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="@type"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text><br/>
<xsl:if test="$blen - 40 &gt; 8">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:if test="$blen - 40 &gt; 0">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>);</xsl:text>
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template mode="synopsis" match="exports[@type='function']">
<xsl:variable name="def" select="key('symbols',@symbol)"/>
<xsl:apply-templates mode="synopsis" select="$def"/>
</xsl:template>
<xsl:template mode="synopsis" match="exports[@type='typedef']">
<xsl:text>typedef </xsl:text>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="string(key('symbols',@symbol)/@type)"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<a href="#{@symbol}"><xsl:value-of select="@symbol"/></a>
<xsl:text>;
</xsl:text>
</xsl:template>
<xsl:template mode="synopsis" match="exports[@type='macro']">
<xsl:variable name="def" select="key('symbols',@symbol)"/>
<xsl:text>#define </xsl:text>
<a href="#{@symbol}"><xsl:value-of select="@symbol"/></a>
<xsl:if test="$def/arg">
<xsl:text>(</xsl:text>
<xsl:for-each select="$def/arg">
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>)</xsl:text>
</xsl:if>
<xsl:text>;
</xsl:text>
</xsl:template>
<xsl:template mode="synopsis" match="exports[@type='enum']">
</xsl:template>
<xsl:template mode="synopsis" match="exports[@type='struct']">
</xsl:template>
<!--
The following builds the Details section
-->
<xsl:template mode="details" match="struct">
<xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en">
<h3><a name="{$name}">Structure </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting">
<xsl:value-of select="@type"/><xsl:text> {
</xsl:text>
<xsl:if test="not(field)">
<xsl:text>The content of this structure is not made public by the API.
</xsl:text>
</xsl:if>
<xsl:for-each select="field">
<xsl:text> </xsl:text>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="@type"/>
</xsl:call-template>
<xsl:text>&#9;</xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="@info != ''">
<xsl:text>&#9;: </xsl:text>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="substring(@info, 1, 70)"/>
</xsl:call-template>
</xsl:if>
<xsl:text>
</xsl:text>
</xsl:for-each>
<xsl:text>} </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>;
</xsl:text>
</pre>
<p>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="info"/>
</xsl:call-template>
</p><xsl:text>
</xsl:text>
</div><hr/>
</xsl:template>
<xsl:template mode="details" match="typedef[@type != 'enum']">
<xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en">
<h3><a name="{$name}">Typedef </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting">
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="string(@type)"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>;
</xsl:text>
</pre>
<p>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="info"/>
</xsl:call-template>
</p><xsl:text>
</xsl:text>
</div><hr/>
</xsl:template>
<xsl:template mode="details" match="variable">
<xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en">
<h3><a name="{$name}">Variable </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting">
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="string(@type)"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:value-of select="$name"/>
<xsl:text>;
</xsl:text>
</pre>
<p>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="info"/>
</xsl:call-template>
</p><xsl:text>
</xsl:text>
</div><hr/>
</xsl:template>
<xsl:template mode="details" match="typedef[@type = 'enum']">
<xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en">
<h3><a name="{$name}">Enum </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting">
<xsl:text>enum </xsl:text>
<a href="#{$name}"><xsl:value-of select="$name"/></a>
<xsl:text> {
</xsl:text>
<xsl:for-each select="/api/symbols/enum[@type=$name]">
<xsl:sort select="@value" data-type="number" order="ascending"/>
<xsl:text> </xsl:text>
<a name="{@name}"><xsl:value-of select="@name"/></a>
<xsl:if test="@value">
<xsl:text> = </xsl:text>
<xsl:value-of select="@value"/>
</xsl:if>
<xsl:if test="@info">
<xsl:text> /* </xsl:text>
<xsl:value-of select="@info"/>
<xsl:text> */</xsl:text>
</xsl:if>
<xsl:text>
</xsl:text>
</xsl:for-each>
<xsl:text>};
</xsl:text>
</pre>
<p>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="info"/>
</xsl:call-template>
</p><xsl:text>
</xsl:text>
</div><hr/>
</xsl:template>
<xsl:template mode="details" match="macro">
<xsl:variable name="name" select="string(@name)"/>
<div class="refsect2" lang="en">
<h3><a name="{$name}">Macro </a><xsl:value-of select="$name"/></h3>
<pre class="programlisting">
<xsl:text>#define </xsl:text>
<a href="#{$name}"><xsl:value-of select="$name"/></a>
<xsl:if test="arg">
<xsl:text>(</xsl:text>
<xsl:for-each select="arg">
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>)</xsl:text>
</xsl:if>
<xsl:text>;
</xsl:text>
</pre>
<p>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="info"/>
</xsl:call-template>
</p>
<xsl:if test="arg">
<div class="variablelist"><table border="0"><col align="left"/><tbody>
<xsl:for-each select="arg">
<tr>
<td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
<td>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="@info"/>
</xsl:call-template>
</td>
</tr>
</xsl:for-each>
</tbody></table></div>
</xsl:if>
<xsl:text>
</xsl:text>
</div><hr/>
</xsl:template>
<xsl:template mode="details" match="function">
<xsl:variable name="name" select="string(@name)"/>
<xsl:variable name="nlen" select="string-length($name)"/>
<xsl:variable name="tlen" select="string-length(return/@type)"/>
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
<div class="refsect2" lang="en">
<h3><a name="{$name}"></a><xsl:value-of select="$name"/> ()</h3>
<pre class="programlisting">
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="return/@type"/>
</xsl:call-template>
<xsl:text>&#9;</xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="$blen - 40 &lt; -8">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:if test="$blen - 40 &lt; 0">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:text>&#9;(</xsl:text>
<xsl:if test="not(arg)">
<xsl:text>void</xsl:text>
</xsl:if>
<xsl:for-each select="arg">
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="@type"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text><br/>
<xsl:if test="$blen - 40 &gt; 8">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:if test="$blen - 40 &gt; 0">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>)</xsl:text><br/>
<xsl:text>
</xsl:text>
</pre>
<p>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="info"/>
</xsl:call-template>
</p><xsl:text>
</xsl:text>
<xsl:if test="arg | return/@info">
<div class="variablelist"><table border="0"><col align="left"/><tbody>
<xsl:for-each select="arg">
<tr>
<td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
<td>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="@info"/>
</xsl:call-template>
</td>
</tr>
</xsl:for-each>
<xsl:if test="return/@info">
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="return/@info"/>
</xsl:call-template>
</td>
</tr>
</xsl:if>
</tbody></table></div>
</xsl:if>
</div><hr/>
</xsl:template>
<xsl:template mode="details" match="functype">
<xsl:variable name="name" select="string(@name)"/>
<xsl:variable name="nlen" select="string-length($name)"/>
<xsl:variable name="tlen" select="string-length(return/@type)"/>
<xsl:variable name="blen" select="(($nlen + 8) - (($nlen + 8) mod 8)) + (($tlen + 8) - (($tlen + 8) mod 8))"/>
<div class="refsect2" lang="en">
<h3><a name="{$name}"></a>Function type <xsl:value-of select="$name"/> </h3>
<pre class="programlisting">
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="return/@type"/>
</xsl:call-template>
<xsl:text>&#9;</xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="$blen - 40 &lt; -8">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:if test="$blen - 40 &lt; 0">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:text>&#9;(</xsl:text>
<xsl:if test="not(arg)">
<xsl:text>void</xsl:text>
</xsl:if>
<xsl:for-each select="arg">
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="@type"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:value-of select="@name"/>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text><br/>
<xsl:if test="$blen - 40 &gt; 8">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:if test="$blen - 40 &gt; 0">
<xsl:text>&#9;</xsl:text>
</xsl:if>
<xsl:text>&#9;&#9;&#9;&#9;&#9; </xsl:text>
</xsl:if>
</xsl:for-each>
<xsl:text>)</xsl:text><br/>
<xsl:text>
</xsl:text>
</pre>
<p>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="info"/>
</xsl:call-template>
</p><xsl:text>
</xsl:text>
<xsl:if test="arg | return/@info">
<div class="variablelist"><table border="0"><col align="left"/><tbody>
<xsl:for-each select="arg">
<tr>
<td><span class="term"><i><tt><xsl:value-of select="@name"/></tt></i>:</span></td>
<td>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="@info"/>
</xsl:call-template>
</td>
</tr>
</xsl:for-each>
<xsl:if test="return/@info">
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>
<xsl:call-template name="dumptext">
<xsl:with-param name="text" select="return/@info"/>
</xsl:call-template>
</td>
</tr>
</xsl:if>
</tbody></table></div>
</xsl:if>
</div><hr/>
</xsl:template>
<!--
The following builds the general.html page
-->
<xsl:template name="generate_general">
<xsl:variable name="next" select="string(/api/files/file[position()=1]/@name)"/>
<xsl:document xmlns="" href="general.html" method="xml" indent="yes" encoding="UTF-8">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title><xsl:value-of select="concat(@name, ': ', summary)"/></title>
<meta name="generator" content="Libvirt devhelp stylesheet"/>
<link rel="start" href="index.html" title="libvirt Reference Manual"/>
<link rel="up" href="index.html" title="libvirt Reference Manual"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="index.html" title="libvirt Reference Manual"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up"/></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
<xsl:if test="$next != ''">
<td><a accesskey="n" href="libvirt-{$next}.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
</xsl:if>
<th width="100%" align="center">libvirt Reference Manual</th>
</tr>
</table>
<h2><span class="refentrytitle">libvirt API Modules</span></h2>
<p>
<xsl:for-each select="/api/files/file">
<a href="libvirt-{@name}.html"><xsl:value-of select="@name"/></a> - <xsl:value-of select="summary"/><br/>
</xsl:for-each>
</p>
</body>
</html>
</xsl:document>
</xsl:template>
<!--
The following builds the index.html page
-->
<xsl:template name="generate_index">
<xsl:document xmlns="" href="index.html" method="xml" indent="yes" encoding="UTF-8">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>libvirt Reference Manual</title>
<meta name="generator" content="Libvirt devhelp stylesheet"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"/></a></td>
<td><a accesskey="n" href="general.html"><img src="right.png" width="24" height="24" border="0" alt="Next"/></a></td>
<th width="100%" align="center">libvirt Reference Manual</th>
</tr>
</table>
<h2><span class="refentrytitle">libvirt Reference Manual</span></h2>
<p>Libvir is a C toolkit to interract with the virtualization capabilities of
recent versions of Linux (and other OSes). It is free software available
under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
Lesser General Public License</a>. Virtualization of the Linux Operating
System means the ability to run multiple instances of Operating Systems
concurently on a single hardware system where the basic resources are driven
by a Linux instance. The library aim at providing long term stable C API
initially for the <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen
paravirtualization</a> but should be able to integrate other virtualization
mechanisms if needed.</p>
<p> If you get lost searching for some specific API use, try
<a href="http://libvirt.org/search.php">the online search
engine</a> hosted on <a href="http://libvirt.org/">libvirt.org</a>
it indexes the project page, the APIs as well as the mailing-list archives. </p>
</body>
</html>
</xsl:document>
</xsl:template>
</xsl:stylesheet>

BIN
docs/devhelp/left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

BIN
docs/devhelp/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

66
docs/devhelp/style.css Normal file
View File

@ -0,0 +1,66 @@
.synopsis, .classsynopsis
{
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting
{
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist
{
padding: 4px;
margin-left: 3em;
}
.variablelist td:first-child
{
vertical-align: top;
}
table.navigation
{
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a
{
color: #770000;
}
.navigation a:visited
{
color: #550000;
}
.navigation .title
{
font-size: 200%;
}
div.refnamediv
{
margin-top: 2em;
}
div.gallery-float
{
float: left;
padding: 10px;
}
div.gallery-float img
{
border-style: none;
}
div.gallery-spacer
{
clear: both;
}
a
{
text-decoration: none;
}
a:hover
{
text-decoration: underline;
color: #FF0000;
}

BIN
docs/devhelp/up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Downloads</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Downloads</h1><p>The latest versions of libvir can be found on the <a href="ftp://libvir.org/libvir/">libvir.org</a> server ( <a href="http://libvir.org/sources/">HTTP</a>, <a href="ftp://libvir.org/libvir/">FTP</a>). You will find there the released <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Downloads</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Downloads</h1><p>The latest versions of libvirt can be found on the <a href="ftp://libvirt.org/libvirt/">libvirt.org</a> server ( <a href="http://libvirt.org/sources/">HTTP</a>, <a href="ftp://libvirt.org/libvirt/">FTP</a>). You will find there the released
versions as well as <a href="http://libvir.org/sources/libvir-cvs-snapshot.tar.gz">snapshot versions as well as <a href="http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz">snapshot
tarballs</a> updated from CVS head every hour</p><p>Anonymous <a href="http://ximbiot.com/cvs/cvshome/docs/">CVS</a> is also tarballs</a> updated from CVS head every hour</p><p>Anonymous <a href="http://ximbiot.com/cvs/cvshome/docs/">CVS</a> is also
available, first register onto the server:</p><p><code>cvs -d :pserver:anoncvs@libvir.org:2401/data/cvs login</code></p><p>it will request a password, enter <strong>anoncvs</strong>. Then you can available, first register onto the server:</p><p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs login</code></p><p>it will request a password, enter <strong>anoncvs</strong>. Then you can
checkout the development tree with:</p><p><code>cvs -d :pserver:anoncvs@libvir.org:2401/data/cvs co libvir</code></p><p>Use ./autogen.sh to configure the local checkout, then <code>make</code> checkout the development tree with:</p><p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co
libvirt</code></p><p>Use ./autogen.sh to configure the local checkout, then <code>make</code>
and <code>make install</code>, as usual. All normal cvs commands are now and <code>make install</code>, as usual. All normal cvs commands are now
available except commiting to the base.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> available except commiting to the base.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

69
docs/errors.html Normal file
View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Handling of errors</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Handling of errors</h1><p>The main goals of libvirt when it comes to error handling are:</p><ul><li>provide as much detail as possible</li>
<li>provide the informations as soon as possible</li>
<li>dont force the library user into one style of error handling</li>
</ul><p>As result the library provide both synchronous, callback based and
asynchronous error reporting. When an error happens in the library code the
error is logged, allowing to retrieve it later and if the user registered an
error callback it will be called synchronously. Once the call to libvirt ends
the error can be detected by the return value and the full information for
the last logged error can be retrieved.</p><p>To avoid as much as prossible troubles with a global variable in a
multithreaded environment, libvirt will associate when possible the errors to
the current connection they are related to, that way the error is stored in a
dynamic structure which can be made thread specific. Error callback can be
set specifically to a connection with</p><p>So error handling in the code is the following:</p><ol><li>if the error can be associated to a connection for example when failing
to look up a domain
<ol><li>if there is a callback associated to the connection set with <a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a>,
call it with the error informations</li>
<li>otherwise if there is a global callback set with <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a>,
call it with the error information</li>
<li>otherwise call <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
on stderr</li>
<li>save the error in the connection for later retrieval with <a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a></li>
</ol></li>
<li>otherwise like when failing to create an hypervisor connection:
<ol><li>if there is a global callback set with <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a>,
call it with the error information</li>
<li>otherwise call <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
on stderr</li>
<li>save the error in the connection for later retrieval with <a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a></li>
</ol></li>
</ol><p>In all cases the error informations are provided as a <a href="html/libvirt-virterror.html#virErrorPtr">virErrorPtr</a> pointer to
read-only structure <a href="html/libvirt-virterror.html#virError">virError</a> containing the
following fields:</p><ul><li>code: an error number from the <a href="html/libvirt-virterror.html#virErrorNumber">virErrorNumber</a>
enum</li>
<li>domain: an enum indicating which part of libvirt raised the error see
<a href="html/libvirt-virterror.html#virErrorDomain">virErrorDomain</a></li>
<li>level: the error level, usually VIR_ERR_ERROR, though there is room for
warnings like VIR_ERR_WARNING</li>
<li>message: the full human-readable formatted string of the error</li>
<li>conn: if available a pointer to the <a href="html/libvirt-libvirt.html#virConnectPtr">virConnectPtr</a>
connection to the hypervisor where this happened</li>
<li>dom: if available a pointer to the <a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain
targetted in the operation</li>
</ul><p>and then extra raw informations about the error which may be initialized
to 0 or NULL if unused</p><ul><li>str1, str2, str3: string informations, usually str1 is the error
message format</li>
<li>int1, int2: integer informations</li>
</ul><p>So usually, setting up specific error handling with libvirt consist of
registering an handler with with <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a> or
with <a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a>,
chech the value of the code value, take appropriate action, if needed let
libvirt print the error on stderr by calling <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>.
For asynchronous error handing, set such a function doing nothing to avoid
the error being reported on stderr, and call virConnGetLastError or
virGetLastError when an API call returned an error value. It can be a good
idea to use <a href="html/libvirt-virterror.html#virResetLastError">virResetError</a> or <a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a>
once an error has been processed fully.</p><p>At the python level, there only a global reporting callback function at
this point, see the error.py example about it:</p><pre>def handler(ctxt, err):
global errno
#print "handler(%s, %s)" % (ctxt, err)
errno = err
libvirt.registerErrorHandler(handler, 'context') </pre><p>the second argument to the registerErrorHandler function is passed as the
fist argument of the callback like in the C version. The error is a tuple
containing the same field as a virError in C, but cast to Python.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -8,8 +8,8 @@ rebuild: examples.xml index.html
examples.xml: index.py *.c examples.xml: index.py *.c
-@($(srcdir)/index.py) -@($(srcdir)/index.py)
index.html: examples.xml examples.xsl index.html: examples.xml examples.xsl $(top_srcdir)/docs/site.xsl
-@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html) -@(if [ -x $(XSLTPROC) ] ; then $(XSLTPROC) examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html ; fi)
install-data-local: install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR) $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
@ -17,18 +17,24 @@ install-data-local:
EXTRA_DIST=examples.xsl index.py examples.xml EXTRA_DIST=examples.xsl index.py examples.xml
noinst_PROGRAMS=info1 noinst_PROGRAMS=info1 suspend
info1_SOURCES=info1.c info1_SOURCES=info1.c
info1_LDFLAGS= info1_LDFLAGS=
info1_DEPENDENCIES= $(DEPS) info1_DEPENDENCIES= $(DEPS)
info1_LDADD= $(LDADDS) info1_LDADD= $(LDADDS)
suspend_SOURCES=suspend.c
suspend_LDFLAGS=
suspend_DEPENDENCIES= $(DEPS)
suspend_LDADD= $(LDADDS)
valgrind: valgrind:
$(MAKE) CHECKER='valgrind' tests $(MAKE) CHECKER='valgrind' tests
tests: $(noinst_PROGRAMS) tests: $(noinst_PROGRAMS)
@(echo '## examples regression tests') @(echo '## examples regression tests')
@($(CHECKER) ./info1) @($(CHECKER) ./info1)
@($(CHECKER) ./suspend)

View File

@ -18,29 +18,69 @@
<function line='29' file='libvirt' name='virConnectOpenReadOnly'/> <function line='29' file='libvirt' name='virConnectOpenReadOnly'/>
</uses> </uses>
</example> </example>
<example filename='suspend.c'>
<synopsis>Suspend a domain and then resume its execution</synopsis>
<purpose>Demonstrate the basic use of the library to suspend and resume a domain. If no id is given on the command line this script will suspend and resume the first domain found which is not Domain 0.</purpose>
<usage>suspend [id]</usage>
<test>suspend</test>
<author>Daniel Veillard</author>
<copy>see Copyright for the status of this software. </copy>
<section>Scheduling</section>
<includes>
</includes>
<uses>
<function line='31' file='libvirt' name='virDomainGetInfo'/>
<function line='111' file='libvirt' name='virConnectListDomains'/>
<function line='93' file='libvirt' name='virDomainFree'/>
<function line='73' file='libvirt' name='virDomainResume'/>
<function line='50' file='libvirt' name='virDomainLookupByID'/>
<function line='132' file='libvirt' name='virConnectClose'/>
<struct line='28' file='libvirt' name='virDomainInfo'/>
<function line='62' file='libvirt' name='virDomainSuspend'/>
<function line='100' file='libvirt' name='virConnectOpenReadOnly'/>
</uses>
</example>
<symbols> <symbols>
<symbol name='virConnectClose'> <symbol name='virConnectClose'>
<ref filename='info1.c'/> <ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virConnectListDomains'>
<ref filename='suspend.c'/>
</symbol> </symbol>
<symbol name='virConnectOpenReadOnly'> <symbol name='virConnectOpenReadOnly'>
<ref filename='info1.c'/> <ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol> </symbol>
<symbol name='virDomainFree'> <symbol name='virDomainFree'>
<ref filename='info1.c'/> <ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol> </symbol>
<symbol name='virDomainGetInfo'> <symbol name='virDomainGetInfo'>
<ref filename='info1.c'/> <ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol> </symbol>
<symbol name='virDomainInfo'> <symbol name='virDomainInfo'>
<ref filename='info1.c'/> <ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol> </symbol>
<symbol name='virDomainLookupByID'> <symbol name='virDomainLookupByID'>
<ref filename='info1.c'/> <ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainResume'>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainSuspend'>
<ref filename='suspend.c'/>
</symbol> </symbol>
</symbols> </symbols>
<sections> <sections>
<section name='Informations'> <section name='Informations'>
<example filename='info1.c'/> <example filename='info1.c'/>
</section> </section>
<section name='Scheduling'>
<example filename='suspend.c'/>
</section>
</sections> </sections>
</examples> </examples>

View File

@ -31,28 +31,28 @@
<xsl:template match="include"> <xsl:template match="include">
<xsl:variable name="header" select="substring-before(substring-after(., '/'), '&gt;')"/> <xsl:variable name="header" select="substring-before(substring-after(., '/'), '&gt;')"/>
<xsl:variable name="doc" select="concat('../html/libxml-', $header, 'tml')"/> <xsl:variable name="doc" select="concat('../html/libvirt-', $header, 'tml')"/>
<li><a href="{$doc}"><xsl:value-of select="."/></a></li> <li><a href="{$doc}"><xsl:value-of select="."/></a></li>
</xsl:template> </xsl:template>
<xsl:template match="typedef"> <xsl:template match="typedef">
<xsl:variable name="name" select="@name"/> <xsl:variable name="name" select="@name"/>
<xsl:variable name="header" select="concat(@file, '.h')"/> <xsl:variable name="header" select="concat(@file, '.h')"/>
<xsl:variable name="doc" select="concat('../html/libxml-', @file, '.html#', $name)"/> <xsl:variable name="doc" select="concat('../html/libvirt-', @file, '.html#', $name)"/>
<li> line <xsl:value-of select="@line"/>: Type <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li> <li> line <xsl:value-of select="@line"/>: Type <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
</xsl:template> </xsl:template>
<xsl:template match="function"> <xsl:template match="function">
<xsl:variable name="name" select="@name"/> <xsl:variable name="name" select="@name"/>
<xsl:variable name="header" select="concat(@file, '.h')"/> <xsl:variable name="header" select="concat(@file, '.h')"/>
<xsl:variable name="doc" select="concat('../html/libxml-', @file, '.html#', $name)"/> <xsl:variable name="doc" select="concat('../html/libvirt-', @file, '.html#', $name)"/>
<li> line <xsl:value-of select="@line"/>: Function <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li> <li> line <xsl:value-of select="@line"/>: Function <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
</xsl:template> </xsl:template>
<xsl:template match="macro"> <xsl:template match="macro">
<xsl:variable name="name" select="@name"/> <xsl:variable name="name" select="@name"/>
<xsl:variable name="header" select="concat(@file, '.h')"/> <xsl:variable name="header" select="concat(@file, '.h')"/>
<xsl:variable name="doc" select="concat('../html/libxml-', @file, '.html#', $name)"/> <xsl:variable name="doc" select="concat('../html/libvirt-', @file, '.html#', $name)"/>
<li> line <xsl:value-of select="@line"/>: Macro <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li> <li> line <xsl:value-of select="@line"/>: Macro <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
</xsl:template> </xsl:template>
@ -60,12 +60,6 @@
<xsl:variable name="filename" select="string(@filename)"/> <xsl:variable name="filename" select="string(@filename)"/>
<h3><a name="{$filename}" href="{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="synopsis"/></h3> <h3><a name="{$filename}" href="{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="synopsis"/></h3>
<p><xsl:value-of select="purpose"/></p> <p><xsl:value-of select="purpose"/></p>
<p>Includes:</p>
<ul>
<xsl:for-each select="includes/include">
<xsl:apply-templates select='.'/>
</xsl:for-each>
</ul>
<p>Uses:</p> <p>Uses:</p>
<ul> <ul>
<xsl:for-each select="uses/*"> <xsl:for-each select="uses/*">
@ -101,9 +95,9 @@
</ul> </ul>
<p> Getting the compilation options and libraries dependancies needed <p> Getting the compilation options and libraries dependancies needed
to generate binaries from the examples is best done on Linux/Unix by using to generate binaries from the examples is best done on Linux/Unix by using
the xml2-config script which should have been installed as part of <i>make the pkg-config data which should have been installed as part of <i>make
install</i> step or when installing the libxml2 development package:</p> install</i> step or when installing the libvirt development package:</p>
<pre>gcc -o example `xml2-config --cflags` example.c `xml2-config --libs`</pre> <pre>gcc -o example example.c `pkg-config libvirt --libs`</pre>
</xsl:template> </xsl:template>
<xsl:template name="sections-list"> <xsl:template name="sections-list">
@ -115,58 +109,34 @@ install</i> step or when installing the libxml2 development package:</p>
</xsl:template> </xsl:template>
<xsl:template match="examples"> <xsl:template match="examples">
<xsl:variable name="title">Libxml2 set of examples</xsl:variable> <xsl:variable name="title">Libvirt set of C code examples</xsl:variable>
<xsl:document href="index.html" method="xml" encoding="ISO-8859-1" <xsl:document href="index.html" method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html> <html>
<head> <head>
<xsl:call-template name="style"/> <xsl:call-template name="style"/>
<xsl:element name="title"> <xsl:element name="title">
<xsl:value-of select="$title"/> <xsl:value-of select="$title"/>
</xsl:element> </xsl:element>
</head> </head>
<body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000"> <body>
<xsl:call-template name="titlebox"> <div id="container">
<xsl:with-param name="title" select="$title"/> <div id="intro">
</xsl:call-template> <div id="adjustments"/>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"> <div id="pageHeader"/>
<tr> <div id="content2">
<td bgcolor="#8b7765"> <xsl:call-template name="titlebox">
<table border="0" cellspacing="0" cellpadding="2" width="100%"> <xsl:with-param name="title" select="$title"/>
<tr> </xsl:call-template>
<td valign="top" width="200" bgcolor="#8b7765"> <xsl:apply-templates select="sections"/>
<xsl:call-template name="toc"/> <xsl:call-template name="sections-list"/>
</td> </div>
<td valign="top" bgcolor="#8b7765"> </div>
<table border="0" cellspacing="0" cellpadding="1" width="100%"> <xsl:call-template name="linkList2"/>
<tr> <xsl:call-template name="bottom"/>
<td> </div>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"> </body>
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates select="sections"/>
<xsl:call-template name="sections-list"/>
<p><a href="../bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html> </html>
</xsl:document> </xsl:document>
</xsl:template> </xsl:template>

7
docs/examples/index.html Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Libvirt set of C code examples</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Libvirt set of C code examples</h1><p> The examples are stored per section depending on the main focus
of the example:</p><ul><li><p><a href="#Informations">Informations</a> :</p><ul><li><a href="#info1.c">info1.c</a>: Extract informations about Xen domain 0</li></ul></li><li><p><a href="#Scheduling">Scheduling</a> :</p><ul><li><a href="#suspend.c">suspend.c</a>: Suspend a domain and then resume its execution</li></ul></li></ul><p> Getting the compilation options and libraries dependancies needed
to generate binaries from the examples is best done on Linux/Unix by using
the pkg-config data which should have been installed as part of <i>make
install</i> step or when installing the libvirt development package:</p><pre>gcc -o example example.c `pkg-config libvirt --libs`</pre><h2><a name="Informations" id="Informations"></a>Informations Examples</h2><h3><a name="info1.c" href="info1.c" id="info1.c">info1.c</a>: Extract informations about Xen domain 0</h3><p>Demonstrate the basic use of the library to connect to the hypervisor and extract domain informations.</p><p>Uses:</p><ul><li> line 29: Function <a href="../html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a> from libvirt.h</li><li> line 36: Function <a href="../html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a> from libvirt.h</li><li> line 43: Function <a href="../html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a> from libvirt.h</li><li> line 53: Function <a href="../html/libvirt-libvirt.html#virDomainFree">virDomainFree</a> from libvirt.h</li><li> line 55: Function <a href="../html/libvirt-libvirt.html#virConnectClose">virConnectClose</a> from libvirt.h</li></ul><p>Usage:</p><p>info1</p><p>Author: Daniel Veillard</p><h2><a name="Scheduling" id="Scheduling"></a>Scheduling Examples</h2><h3><a name="suspend.c" href="suspend.c" id="suspend.c">suspend.c</a>: Suspend a domain and then resume its execution</h3><p>Demonstrate the basic use of the library to suspend and resume a domain. If no id is given on the command line this script will suspend and resume the first domain found which is not Domain 0.</p><p>Uses:</p><ul><li> line 30: Function <a href="../html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a> from libvirt.h</li><li> line 49: Function <a href="../html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a> from libvirt.h</li><li> line 61: Function <a href="../html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a> from libvirt.h</li><li> line 72: Function <a href="../html/libvirt-libvirt.html#virDomainResume">virDomainResume</a> from libvirt.h</li><li> line 92: Function <a href="../html/libvirt-libvirt.html#virDomainFree">virDomainFree</a> from libvirt.h</li><li> line 99: Function <a href="../html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a> from libvirt.h</li><li> line 110: Function <a href="../html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a> from libvirt.h</li><li> line 131: Function <a href="../html/libvirt-libvirt.html#virConnectClose">virConnectClose</a> from libvirt.h</li></ul><p>Usage:</p><p>suspend [id]</p><p>Author: Daniel Veillard</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -230,8 +230,9 @@ rebuild: examples.xml index.html
examples.xml: index.py *.c examples.xml: index.py *.c
-@($(srcdir)/index.py) -@($(srcdir)/index.py)
index.html: examples.xml examples.xsl index.html: examples.xml examples.xsl $(top_srcdir)/docs/site.xsl
-@(xsltproc examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html) -@(if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) examples.xsl examples.xml && echo "Rebuilt web page" && xmllint --valid --noout index.html ; fi)
install-data-local: install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR) $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)

134
docs/examples/suspend.c Normal file
View File

@ -0,0 +1,134 @@
/**
* section: Scheduling
* synopsis: Suspend a domain and then resume its execution
* purpose: Demonstrate the basic use of the library to suspend and
* resume a domain. If no id is given on the command line
* this script will suspend and resume the first domain found
* which is not Domain 0.
* usage: suspend [id]
* test: suspend
* author: Daniel Veillard
* copy: see Copyright for the status of this software.
*/
#include <stdlib.h>
#include <stdio.h>
#include <libvirt.h>
virConnectPtr conn = NULL; /* the hypervisor connection */
/**
* checkDomainState:
* @dom: the domain
*
* Return the current state of a domain or -1 if non-exsitant
*/
static int
checkDomainState(virDomainPtr dom) {
virDomainInfo info; /* the informations being fetched */
int ret;
ret = virDomainGetInfo(dom, &info);
if (ret < 0) {
return(-1);
}
return(info.state);
}
/**
* SuspendAndResumeDomain:
* @id: the id of the domain
*
* extract the domain 0 informations
*/
static void
SuspendAndResumeDomain(int id) {
virDomainPtr dom = NULL; /* the domain being checked */
int ret, state;
/* Find the domain of the given id */
dom = virDomainLookupByID(conn, id);
if (dom == NULL) {
fprintf(stderr, "Failed to find Domain %d\n", id);
goto error;
}
/* Check state */
state = checkDomainState(dom);
if ((state == VIR_DOMAIN_RUNNING) ||
(state == VIR_DOMAIN_NOSTATE) ||
(state == VIR_DOMAIN_BLOCKED)) {
printf("Suspending domain...\n");
ret = virDomainSuspend(dom);
if (ret < 0) {
fprintf(stderr, "Failed to suspend Domain %d\n", id);
goto error;
}
state = checkDomainState(dom);
if (state != VIR_DOMAIN_PAUSED) {
fprintf(stderr, "Domain %d state is not suspended\n", id);
} else {
printf("Domain suspended, resuming it...\n");
}
ret = virDomainResume(dom);
if (ret < 0) {
fprintf(stderr, "Failed to resume Domain %d\n", id);
goto error;
}
state = checkDomainState(dom);
if ((state == VIR_DOMAIN_RUNNING) ||
(state == VIR_DOMAIN_NOSTATE) ||
(state == VIR_DOMAIN_BLOCKED)) {
printf("Domain resumed\n");
} else {
fprintf(stderr, "Domain %d state indicate it is not resumed\n", id);
}
} else {
fprintf(stderr, "Domain %d is not in a state where it should be suspended\n", id);
goto error;
}
error:
if (dom != NULL)
virDomainFree(dom);
}
int main(int argc, char **argv) {
int id = 0;
/* NULL means connect to local Xen hypervisor */
conn = virConnectOpenReadOnly(NULL);
if (conn == NULL) {
fprintf(stderr, "Failed to connect to hypervisor\n");
goto error;
}
if (argc > 1) {
id = atoi(argv[1]);
}
if (id == 0) {
int i, j, ids[10];
i = virConnectListDomains(conn, &ids[0], 10);
if (i < 0) {
fprintf(stderr, "Failed to list the domains\n");
goto error;
}
for (j = 0;j < i;j++) {
if (ids[j] != 0) {
id = ids[j];
break;
}
}
}
if (id == 0) {
fprintf(stderr, "Failed find a running guest domain\n");
goto error;
}
SuspendAndResumeDomain(id);
error:
if (conn != NULL)
virConnectClose(conn);
return(0);
}

84
docs/format.html Normal file
View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>XML Format</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">XML Format</h1><p>The library use an XML format to describe domains, as input to <a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux()</a>
and as the output of <a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc()</a>,
the following is an example of the format as returned by the shell command
<code>virsh xmldump fc4</code> , where fc4 was one of the running domains:</p><pre>&lt;domain type='xen' <span style="color: #0071FF; background-color: #FFFFFF">id='18'</span>&gt;
&lt;name&gt;fc4&lt;/name&gt;
<span style="color: #00B200; background-color: #FFFFFF">&lt;os&gt;
&lt;type&gt;linux&lt;/type&gt;
&lt;kernel&gt;/boot/vmlinuz-2.6.15-1.43_FC5guest&lt;/kernel&gt;
&lt;initrd&gt;/boot/initrd-2.6.15-1.43_FC5guest.img&lt;/initrd&gt;
&lt;root&gt;/dev/sda1&lt;/root&gt;
&lt;cmdline&gt; ro selinux=0 3&lt;/cmdline&gt;
&lt;/os&gt;</span>
&lt;memory&gt;131072&lt;/memory&gt;
&lt;vcpu&gt;1&lt;/vcpu&gt;
&lt;devices&gt;
<span style="color: #FF0080; background-color: #FFFFFF">&lt;disk type='file'&gt;
&lt;source file='/u/fc4.img'/&gt;
&lt;target dev='sda1'/&gt;
&lt;/disk&gt;</span>
<span style="color: #0000FF; background-color: #FFFFFF">&lt;interface type='bridge'&gt;
&lt;source bridge='xenbr0'/&gt;
&lt;mac address='</span><span style="color: #0000FF; background-color: #FFFFFF"></span><span style="color: #0000FF; background-color: #FFFFFF">aa:00:00:00:00:11'/&gt;
&lt;script path='/etc/xen/scripts/vif-bridge'/&gt;
&lt;/interface&gt;</span>
&lt;/devices&gt;
&lt;/domain&gt;</pre><p>The root element must be called <code>domain</code> with no namespace, the
<code>type</code> attribute indicates the kind of hypervisor used, 'xen' is
the default value. The <code>id</code> attribute gives the domain id at
runtime (not however that this may change, for example if the domain is saved
to disk and restored). The domain has a few children whose order is not
significant:</p><ul><li>name: the domain name, preferably ASCII based</li>
<li>memory: the maximum memory allocated to the domain in kilobytes</li>
<li>vcpu: the number of virtual cpu configured for the domain</li>
<li>os: a block describing the Operating System, its content will be
dependant on the OS type
<ul><li>type: indicate the OS type, always linux at this point</li>
<li>kernel: path to the kernel on the Domain 0 filesystem</li>
<li>initrd: an optional path for the init ramdisk on the Domain 0
filesystem</li>
<li>cmdline: optional command line to the kernel</li>
<li>root: the root filesystem from the guest viewpoint, it may be
passed as part of the cmdline content too</li>
</ul></li>
<li>devices: a list of <code>disk</code> and <code>interface</code>
descriptions in no special order</li>
</ul><p>The format of the devices and their type may grow over time, but the
following should be sufficient for basic use:</p><p>A disk device indicates a block device, it can have two values for the
type attribute either 'file' or 'block' corresponding to the 2 options
availble at the Xen layer. It has two mandatory children, and one optional
one in no specific order:</p><ul><li>source with a file attribute containing the path in Domain 0 to the
file or a dev attribute if using a block device, containing the device
name ('hda5' or '/dev/hda5')</li>
<li>target indicates in a dev attribute the device where it is mapped in
the guest</li>
<li>readonly an optional empty element indicating the device is
read-only</li>
</ul><p>An interface element describes a network device mapped on the guest, it
also has a type whose value is currently 'bridge', it also have a number of
children in no specific order:</p><ul><li>source: indicating the bridge name</li>
<li>mac: the optional mac address provided in the address attribute</li>
<li>ip: the optional IP address provided in the address attribute</li>
<li>script: the script used to bridge the interfcae in the Domain 0</li>
<li>target: and optional target indicating the device name.</li>
</ul><p>Life cycle actions for the domain can also be expressed in the XML format,
they drive what should be happening if the domain crashes, is rebooted or is
poweroff. There is various actions possible when this happen:</p><ul><li>destroy: The domain is cleaned up (that's the default normal processing
in Xen)</li>
<li>restart: A new domain is started in place of the old one with the same
configuration parameters</li>
<li>preserve: The domain will remain in memory until it is destroyed
manually, it won't be running but allows for post-mortem debugging</li>
<li>rename-restart: a variant of the previous one but where the old domain
is renamed before being saved to allow a restart</li>
</ul><p>The following could be used for a Xen production system:</p><pre>&lt;domain&gt;
...
&lt;on_reboot&gt;restart&lt;/on_reboot&gt;
&lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
&lt;on_crash&gt;rename-restart&lt;/on_crash&gt;
...
&lt;/domain&gt;</pre><p>While the format may be extended in various ways as support for more
hypervisor types and features are added, it is expected that this core subset
will remain functional in spite of the evolution of the library.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,3 +1,3 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li><li><a href="libvirt-virterror.html">virterror</a>: error handling interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,3 +1,3 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li><li><a href="libvirt-virterror.html">virterror</a>: error handling interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,3 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvir.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvir</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvir</h1><h2>Table of Contents</h2><ul><li><a href="libvir-libvir.html">libvir</a>: core interfaces for the libvir library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li><li><a href="libvirt-virterror.html">virterror</a>: error handling interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,44 +1,51 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvir.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Module libvir from libvir</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Module libvir from libvir</h1><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The virtualization API</a></th></tr></table><p>Provides the interfaces of the libvir library to handle Xen domains from a process running in domain 0 </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a></pre><pre class="programlisting">Structure <a href="#virConnect">virConnect</a><br />struct _virConnect <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Module libvirt from libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Module libvirt from libvirt</h1><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The virtualization API</a></th><th align="right"><a href="libvirt-virterror.html">virterror</a></th><td><a accesskey="n" href="libvirt-virterror.html"><img src="right.png" width="24" height="24" border="0" alt="Next" /></a></td></tr></table><p>Provides the interfaces of the libvirt library to handle Xen domains from a process running in domain 0 </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a></pre><pre class="programlisting">Structure <a href="#virConnect">virConnect</a><br />struct _virConnect
The content of this structure is not made public by the API. The content of this structure is not made public by the API.
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virConnect">virConnect</a> * <a name="virConnectPtr" id="virConnectPtr">virConnectPtr</a> </pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virConnect">virConnect</a> * <a name="virConnectPtr" id="virConnectPtr">virConnectPtr</a>
</pre><pre class="programlisting">Enum <a href="#virDeviceMode">virDeviceMode</a> </pre><pre class="programlisting">Enum <a href="#virDeviceMode">virDeviceMode</a>
</pre><pre class="programlisting">Structure <a href="#virDomain">virDomain</a><br />struct _virDomain </pre><pre class="programlisting">Structure <a href="#virDomain">virDomain</a><br />struct _virDomain
The content of this structure is not made public by the API. The content of this structure is not made public by the API.
</pre><pre class="programlisting">Enum <a href="#virDomainCreateFlags">virDomainCreateFlags</a> </pre><pre class="programlisting">Enum <a href="#virDomainCreateFlags">virDomainCreateFlags</a>
</pre><pre class="programlisting">Structure <a href="#virDomainInfo">virDomainInfo</a><br />struct _virDomainInfo </pre><pre class="programlisting">Structure <a href="#virDomainInfo">virDomainInfo</a><br />struct _virDomainInfo
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virDomainInfo">virDomainInfo</a> * <a name="virDomainInfoPtr" id="virDomainInfoPtr">virDomainInfoPtr</a> </pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomainInfo">virDomainInfo</a> * <a name="virDomainInfoPtr" id="virDomainInfoPtr">virDomainInfoPtr</a>
</pre><pre class="programlisting">Structure <a href="#virDomainKernel">virDomainKernel</a><br />struct _virDomainKernel </pre><pre class="programlisting">Structure <a href="#virDomainKernel">virDomainKernel</a><br />struct _virDomainKernel
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virDomainKernel">virDomainKernel</a> * <a name="virDomainKernelPtr" id="virDomainKernelPtr">virDomainKernelPtr</a> </pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomainKernel">virDomainKernel</a> * <a name="virDomainKernelPtr" id="virDomainKernelPtr">virDomainKernelPtr</a>
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virDomain">virDomain</a> * <a name="virDomainPtr" id="virDomainPtr">virDomainPtr</a> </pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomain">virDomain</a> * <a name="virDomainPtr" id="virDomainPtr">virDomainPtr</a>
</pre><pre class="programlisting">Enum <a href="#virDomainRestart">virDomainRestart</a> </pre><pre class="programlisting">Enum <a href="#virDomainRestart">virDomainRestart</a>
</pre><pre class="programlisting">Enum <a href="#virDomainState">virDomainState</a> </pre><pre class="programlisting">Enum <a href="#virDomainState">virDomainState</a>
</pre><pre class="programlisting">int <a href="#virConnectClose">virConnectClose</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)</pre> </pre><pre class="programlisting">Structure <a href="#virNodeInfo">virNodeInfo</a><br />struct _virNodeInfo
<pre class="programlisting">const char * <a href="#virConnectGetType">virConnectGetType</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)</pre> </pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> * <a name="virNodeInfoPtr" id="virNodeInfoPtr">virNodeInfoPtr</a>
<pre class="programlisting">int <a href="#virConnectGetVersion">virConnectGetVersion</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)</pre> </pre><pre class="programlisting">int <a href="#virConnectClose">virConnectClose</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virConnectListDomains">virConnectListDomains</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)</pre> <pre class="programlisting">const char * <a href="#virConnectGetType">virConnectGetType</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)</pre> <pre class="programlisting">int <a href="#virConnectGetVersion">virConnectGetVersion</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name)</pre> <pre class="programlisting">int <a href="#virConnectListDomains">virConnectListDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpenReadOnly">virConnectOpenReadOnly</a> (const char * name)</pre> <pre class="programlisting">int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateLinux">virDomainCreateLinux</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * kernel_path, <br /> const char * initrd_path, <br /> const char * cmdline, <br /> unsigned long memory, <br /> unsigned int flags)</pre> <pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name)</pre>
<pre class="programlisting">int <a href="#virDomainDestroy">virDomainDestroy</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre> <pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpenReadOnly">virConnectOpenReadOnly</a> (const char * name)</pre>
<pre class="programlisting">int <a href="#virDomainFree">virDomainFree</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre> <pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateLinux">virDomainCreateLinux</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)</pre>
<pre class="programlisting">unsigned int <a href="#virDomainGetID">virDomainGetID</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre> <pre class="programlisting">int <a href="#virDomainDestroy">virDomainDestroy</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainGetInfo">virDomainGetInfo</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvir-libvir.html#virDomainInfoPtr">virDomainInfoPtr</a> info)</pre> <pre class="programlisting">int <a href="#virDomainFree">virDomainFree</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">unsigned long <a href="#virDomainGetMaxMemory">virDomainGetMaxMemory</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre> <pre class="programlisting">unsigned int <a href="#virDomainGetID">virDomainGetID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre> <pre class="programlisting">int <a href="#virDomainGetInfo">virDomainGetInfo</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a> info)</pre>
<pre class="programlisting">char * <a href="#virDomainGetOSType">virDomainGetOSType</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre> <pre class="programlisting">unsigned long <a href="#virDomainGetMaxMemory">virDomainGetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">char * <a href="#virDomainGetXMLDesc">virDomainGetXMLDesc</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)</pre> <pre class="programlisting">const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByID">virDomainLookupByID</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)</pre> <pre class="programlisting">char * <a href="#virDomainGetOSType">virDomainGetOSType</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByName">virDomainLookupByName</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)</pre> <pre class="programlisting">int <a href="#virDomainGetUUID">virDomainGetUUID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned char * uuid)</pre>
<pre class="programlisting">int <a href="#virDomainRestore">virDomainRestore</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)</pre> <pre class="programlisting">char * <a href="#virDomainGetXMLDesc">virDomainGetXMLDesc</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)</pre>
<pre class="programlisting">int <a href="#virDomainResume">virDomainResume</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre> <pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByID">virDomainLookupByID</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)</pre>
<pre class="programlisting">int <a href="#virDomainSave">virDomainSave</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)</pre> <pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByName">virDomainLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)</pre>
<pre class="programlisting">int <a href="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)</pre> <pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByUUID">virDomainLookupByUUID</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)</pre>
<pre class="programlisting">int <a href="#virDomainShutdown">virDomainShutdown</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre> <pre class="programlisting">int <a href="#virDomainReboot">virDomainReboot</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int flags)</pre>
<pre class="programlisting">int <a href="#virDomainSuspend">virDomainSuspend</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre> <pre class="programlisting">int <a href="#virDomainRestore">virDomainRestore</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)</pre>
<pre class="programlisting">int <a href="#virDomainResume">virDomainResume</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainSave">virDomainSave</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)</pre>
<pre class="programlisting">int <a href="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)</pre>
<pre class="programlisting">int <a href="#virDomainShutdown">virDomainShutdown</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainSuspend">virDomainSuspend</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virGetVersion">virGetVersion</a> (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)</pre> <pre class="programlisting">int <a href="#virGetVersion">virGetVersion</a> (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)</pre>
<pre class="programlisting">int <a href="#virInitialize">virInitialize</a> (void)</pre>
<pre class="programlisting">int <a href="#virNodeGetInfo">virNodeGetInfo</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> info)</pre>
<h2>Description</h2> <h2>Description</h2>
<h3><a name="LIBVIR_VERSION_NUMBER" id="LIBVIR_VERSION_NUMBER"></a>Macro: LIBVIR_VERSION_NUMBER</h3><pre>#define LIBVIR_VERSION_NUMBER</pre><p>Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro</p> <h3><a name="LIBVIR_VERSION_NUMBER" id="LIBVIR_VERSION_NUMBER"></a>Macro: LIBVIR_VERSION_NUMBER</h3><pre>#define LIBVIR_VERSION_NUMBER</pre><p>Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro</p>
<h3><a name="virConnect" id="virConnect">Structure virConnect</a></h3><pre class="programlisting">Structure virConnect<br />struct _virConnect { <h3><a name="virConnect" id="virConnect">Structure virConnect</a></h3><pre class="programlisting">Structure virConnect<br />struct _virConnect {
@ -60,8 +67,8 @@ The content of this structure is not made public by the API.
unsigned char state : the running state, one of virDomainFlag unsigned char state : the running state, one of virDomainFlag
unsigned long maxMem : the maximum memory in KBytes allowed unsigned long maxMem : the maximum memory in KBytes allowed
unsigned long memory : the memory in KBytes used by the domain unsigned long memory : the memory in KBytes used by the domain
unsigned short nrVirtCpu : * Informations below are only available unsigned short nrVirtCpu : the number of virtual CPUs for the doma
unsigned long long cpuTime : * TODO: * - check what can be extracted unsigned long long cpuTime : the CPU time used in nanoseconds
}</pre> }</pre>
a virDomainInfoPtr is a pointer to a virDomainInfo structure. a virDomainInfoPtr is a pointer to a virDomainInfo structure.
<h3><a name="virDomainKernel" id="virDomainKernel">Structure virDomainKernel</a></h3><pre class="programlisting">Structure virDomainKernel<br />struct _virDomainKernel { <h3><a name="virDomainKernel" id="virDomainKernel">Structure virDomainKernel</a></h3><pre class="programlisting">Structure virDomainKernel<br />struct _virDomainKernel {
@ -88,54 +95,75 @@ The content of this structure is not made public by the API.
<a name="VIR_DOMAIN_SHUTOFF" id="VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a> = 5 : the domain is shut off <a name="VIR_DOMAIN_SHUTOFF" id="VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a> = 5 : the domain is shut off
<a name="VIR_DOMAIN_CRASHED" id="VIR_DOMAIN_CRASHED">VIR_DOMAIN_CRASHED</a> = 6 : the domain is crashed <a name="VIR_DOMAIN_CRASHED" id="VIR_DOMAIN_CRASHED">VIR_DOMAIN_CRASHED</a> = 6 : the domain is crashed
} }
</pre><h3><a name="virConnectClose" id="virConnectClose"></a>Function: virConnectClose</h3><pre class="programlisting">int virConnectClose (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)<br /> </pre><h3><a name="virNodeInfo" id="virNodeInfo">Structure virNodeInfo</a></h3><pre class="programlisting">Structure virNodeInfo<br />struct _virNodeInfo {
charmodel[32] model : string indicating the CPU model
unsigned long memory : memory size in kilobytes
unsigned int cpus : the number of active CPUs
unsigned int mhz : expected CPU frequency
unsigned int nodes : the number of NUMA cell, 1 for uniform
unsigned int sockets : number of CPU socket per node
unsigned int cores : number of core per socket
unsigned int threads : number of threads per core
}</pre>
a virNodeInfoPtr is a pointer to a virNodeInfo structure.
<h3><a name="virConnectClose" id="virConnectClose"></a>Function: virConnectClose</h3><pre class="programlisting">int virConnectClose (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</p> </pre><p>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConnectGetType" id="virConnectGetType"></a>Function: virConnectGetType</h3><pre class="programlisting">const char * virConnectGetType (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConnectGetType" id="virConnectGetType"></a>Function: virConnectGetType</h3><pre class="programlisting">const char * virConnectGetType (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Get the name of the Hypervisor software used.</p> </pre><p>Get the name of the Hypervisor software used.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a static zero terminated string otherwise.</td></tr></tbody></table></div><h3><a name="virConnectGetVersion" id="virConnectGetVersion"></a>Function: virConnectGetVersion</h3><pre class="programlisting">int virConnectGetVersion (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a static zero terminated string otherwise.</td></tr></tbody></table></div><h3><a name="virConnectGetVersion" id="virConnectGetVersion"></a>Function: virConnectGetVersion</h3><pre class="programlisting">int virConnectGetVersion (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)<br />
</pre><p>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</p> </pre><p>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>hvVer</tt></i>:</span></td><td>return value for the version of the running hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release</td></tr></tbody></table></div><h3><a name="virConnectListDomains" id="virConnectListDomains"></a>Function: virConnectListDomains</h3><pre class="programlisting">int virConnectListDomains (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>hvVer</tt></i>:</span></td><td>return value for the version of the running hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release</td></tr></tbody></table></div><h3><a name="virConnectListDomains" id="virConnectListDomains"></a>Function: virConnectListDomains</h3><pre class="programlisting">int virConnectListDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)<br />
</pre><p>Collect the list of active domains, and store their ID in @maxids</p> </pre><p>Collect the list of active domains, and store their ID in @maxids</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><span class="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDomains" id="virConnectNumOfDomains"></a>Function: virConnectNumOfDomains</h3><pre class="programlisting">int virConnectNumOfDomains (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><span class="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDomains" id="virConnectNumOfDomains"></a>Function: virConnectNumOfDomains</h3><pre class="programlisting">int virConnectNumOfDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provides the number of active domains.</p> </pre><p>Provides the number of active domains.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpen" id="virConnectOpen"></a>Function: virConnectOpen</h3><pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> virConnectOpen (const char * name)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpen" id="virConnectOpen"></a>Function: virConnectOpen</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpen (const char * name)<br />
</pre><p>This function should be called first to get a connection to the Hypervisor and xen store</p> </pre><p>This function should be called first to get a connection to the Hypervisor and xen store</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpenReadOnly" id="virConnectOpenReadOnly"></a>Function: virConnectOpenReadOnly</h3><pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> virConnectOpenReadOnly (const char * name)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpenReadOnly" id="virConnectOpenReadOnly"></a>Function: virConnectOpenReadOnly</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpenReadOnly (const char * name)<br />
</pre><p>This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</p> </pre><p>This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virDomainCreateLinux" id="virDomainCreateLinux"></a>Function: virDomainCreateLinux</h3><pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> virDomainCreateLinux (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * kernel_path, <br /> const char * initrd_path, <br /> const char * cmdline, <br /> unsigned long memory, <br /> unsigned int flags)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virDomainCreateLinux" id="virDomainCreateLinux"></a>Function: virDomainCreateLinux</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainCreateLinux (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)<br />
</pre><p>Launch a new Linux guest domain, unimplemented yet, API to be defined. This would function requires priviledged access to the hypervisor.</p> </pre><p>Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires priviledged access to the hypervisor.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>kernel_path</tt></i>:</span></td><td>the file path to the kernel image</td></tr><tr><td><span class="term"><i><tt>initrd_path</tt></i>:</span></td><td>an optional file path to an initrd</td></tr><tr><td><span class="term"><i><tt>cmdline</tt></i>:</span></td><td>optional command line parameters for the kernel</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>an optional set of virDomainFlags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainDestroy" id="virDomainDestroy"></a>Function: virDomainDestroy</h3><pre class="programlisting">int virDomainDestroy (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xmlDesc</tt></i>:</span></td><td>an XML description of the domain</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>an optional set of virDomainFlags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainDestroy" id="virDomainDestroy"></a>Function: virDomainDestroy</h3><pre class="programlisting">int virDomainDestroy (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access</p> </pre><p>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainFree" id="virDomainFree"></a>Function: virDomainFree</h3><pre class="programlisting">int virDomainFree (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainFree" id="virDomainFree"></a>Function: virDomainFree</h3><pre class="programlisting">int virDomainFree (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p> </pre><p>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetID" id="virDomainGetID"></a>Function: virDomainGetID</h3><pre class="programlisting">unsigned int virDomainGetID (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetID" id="virDomainGetID"></a>Function: virDomainGetID</h3><pre class="programlisting">unsigned int virDomainGetID (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Get the hypervisor ID number for the domain</p> </pre><p>Get the hypervisor ID number for the domain</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the domain ID number or (unsigned int) -1 in case of error</td></tr></tbody></table></div><h3><a name="virDomainGetInfo" id="virDomainGetInfo"></a>Function: virDomainGetInfo</h3><pre class="programlisting">int virDomainGetInfo (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvir-libvir.html#virDomainInfoPtr">virDomainInfoPtr</a> info)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the domain ID number or (unsigned int) -1 in case of error</td></tr></tbody></table></div><h3><a name="virDomainGetInfo" id="virDomainGetInfo"></a>Function: virDomainGetInfo</h3><pre class="programlisting">int virDomainGetInfo (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a> info)<br />
</pre><p>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.</p> </pre><p>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <a href="libvir-libvir.html#virDomainInfo">virDomainInfo</a> structure allocated by the user</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetMaxMemory" id="virDomainGetMaxMemory"></a>Function: virDomainGetMaxMemory</h3><pre class="programlisting">unsigned long virDomainGetMaxMemory (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virDomainInfo">virDomainInfo</a> structure allocated by the user</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetMaxMemory" id="virDomainGetMaxMemory"></a>Function: virDomainGetMaxMemory</h3><pre class="programlisting">unsigned long virDomainGetMaxMemory (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</p> </pre><p>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the memory size in kilobytes or 0 in case of error.</td></tr></tbody></table></div><h3><a name="virDomainGetName" id="virDomainGetName"></a>Function: virDomainGetName</h3><pre class="programlisting">const char * virDomainGetName (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the memory size in kilobytes or 0 in case of error.</td></tr></tbody></table></div><h3><a name="virDomainGetName" id="virDomainGetName"></a>Function: virDomainGetName</h3><pre class="programlisting">const char * virDomainGetName (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Get the public name for that domain</p> </pre><p>Get the public name for that domain</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.</td></tr></tbody></table></div><h3><a name="virDomainGetOSType" id="virDomainGetOSType"></a>Function: virDomainGetOSType</h3><pre class="programlisting">char * virDomainGetOSType (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.</td></tr></tbody></table></div><h3><a name="virDomainGetOSType" id="virDomainGetOSType"></a>Function: virDomainGetOSType</h3><pre class="programlisting">char * virDomainGetOSType (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Get the type of domain operation system.</p> </pre><p>Get the type of domain operation system.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL in case of error</td></tr></tbody></table></div><h3><a name="virDomainGetXMLDesc" id="virDomainGetXMLDesc"></a>Function: virDomainGetXMLDesc</h3><pre class="programlisting">char * virDomainGetXMLDesc (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL in case of error, the string must be freed by the caller.</td></tr></tbody></table></div><h3><a name="virDomainGetUUID" id="virDomainGetUUID"></a>Function: virDomainGetUUID</h3><pre class="programlisting">int virDomainGetUUID (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned char * uuid)<br />
</pre><p>Provide an XML description of the domain. NOTE: this API is subject to changes.</p> </pre><p>Get the UUID for a domain</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virDomainLookupByID" id="virDomainLookupByID"></a>Function: virDomainLookupByID</h3><pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> virDomainLookupByID (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>uuid</tt></i>:</span></td><td>pointer to a 16 bytes array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div><h3><a name="virDomainGetXMLDesc" id="virDomainGetXMLDesc"></a>Function: virDomainGetXMLDesc</h3><pre class="programlisting">char * virDomainGetXMLDesc (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)<br />
</pre><p>Provide an XML description of the domain. The description may be reused later to relaunch the domain with virDomainCreateLinux().</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virDomainLookupByID" id="virDomainLookupByID"></a>Function: virDomainLookupByID</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainLookupByID (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)<br />
</pre><p>Try to find a domain based on the hypervisor ID number</p> </pre><p>Try to find a domain based on the hypervisor ID number</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>id</tt></i>:</span></td><td>the domain ID number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainLookupByName" id="virDomainLookupByName"></a>Function: virDomainLookupByName</h3><pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> virDomainLookupByName (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>id</tt></i>:</span></td><td>the domain ID number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainLookupByName" id="virDomainLookupByName"></a>Function: virDomainLookupByName</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
</pre><p>Try to lookup a domain on the given hypervisor based on its name.</p> </pre><p>Try to lookup a domain on the given hypervisor based on its name.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainRestore" id="virDomainRestore"></a>Function: virDomainRestore</h3><pre class="programlisting">int virDomainRestore (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainLookupByUUID" id="virDomainLookupByUUID"></a>Function: virDomainLookupByUUID</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainLookupByUUID (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)<br />
</pre><p>Try to lookup a domain on the given hypervisor based on its UUID.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>uuid</tt></i>:</span></td><td>the UUID string for the domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainReboot" id="virDomainReboot"></a>Function: virDomainReboot</h3><pre class="programlisting">int virDomainReboot (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int flags)<br />
</pre><p>Reboot a domain, the domain object is still usable there after but the domain OS is being stopped for a restart. Note that the guest OS may ignore the request.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>extra flags for the reboot operation, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainRestore" id="virDomainRestore"></a>Function: virDomainRestore</h3><pre class="programlisting">int virDomainRestore (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)<br />
</pre><p>This method will restore a domain saved to disk by virDomainSave().</p> </pre><p>This method will restore a domain saved to disk by virDomainSave().</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>path to the</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainResume" id="virDomainResume"></a>Function: virDomainResume</h3><pre class="programlisting">int virDomainResume (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>path to the</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainResume" id="virDomainResume"></a>Function: virDomainResume</h3><pre class="programlisting">int virDomainResume (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access</p> </pre><p>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSave" id="virDomainSave"></a>Function: virDomainSave</h3><pre class="programlisting">int virDomainSave (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSave" id="virDomainSave"></a>Function: virDomainSave</h3><pre class="programlisting">int virDomainSave (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)<br />
</pre><p>This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.</p> </pre><p>This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>path for the output file</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSetMaxMemory" id="virDomainSetMaxMemory"></a>Function: virDomainSetMaxMemory</h3><pre class="programlisting">int virDomainSetMaxMemory (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>path for the output file</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSetMaxMemory" id="virDomainSetMaxMemory"></a>Function: virDomainSetMaxMemory</h3><pre class="programlisting">int virDomainSetMaxMemory (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)<br />
</pre><p>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.</p> </pre><p>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainShutdown" id="virDomainShutdown"></a>Function: virDomainShutdown</h3><pre class="programlisting">int virDomainShutdown (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainShutdown" id="virDomainShutdown"></a>Function: virDomainShutdown</h3><pre class="programlisting">int virDomainShutdown (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. Note that the guest OS may ignore the request. TODO: should we add an option for reboot, knowing it may not be doable in the general case ?</p> </pre><p>Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. Note that the guest OS may ignore the request. TODO: should we add an option for reboot, knowing it may not be doable in the general case ?</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSuspend" id="virDomainSuspend"></a>Function: virDomainSuspend</h3><pre class="programlisting">int virDomainSuspend (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSuspend" id="virDomainSuspend"></a>Function: virDomainSuspend</h3><pre class="programlisting">int virDomainSuspend (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires priviledged access.</p> </pre><p>Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires priviledged access.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virGetVersion" id="virGetVersion"></a>Function: virGetVersion</h3><pre class="programlisting">int virGetVersion (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)<br /> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virGetVersion" id="virGetVersion"></a>Function: virGetVersion</h3><pre class="programlisting">int virGetVersion (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)<br />
</pre><p>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</p> </pre><p>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>libVer</tt></i>:</span></td><td>return value for the library version (OUT)</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>hypervisor type</td></tr><tr><td><span class="term"><i><tt>typeVer</tt></i>:</span></td><td>return value for the version of the hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.</td></tr></tbody></table></div></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a style="font-weight:bold" href="../html/index.html">API Menu</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> <div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>libVer</tt></i>:</span></td><td>return value for the library version (OUT)</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>hypervisor type</td></tr><tr><td><span class="term"><i><tt>typeVer</tt></i>:</span></td><td>return value for the version of the hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.</td></tr></tbody></table></div><h3><a name="virInitialize" id="virInitialize"></a>Function: virInitialize</h3><pre class="programlisting">int virInitialize (void)<br />
</pre><p>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNodeGetInfo" id="virNodeGetInfo"></a>Function: virNodeGetInfo</h3><pre class="programlisting">int virNodeGetInfo (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> info)<br />
</pre><p>Extract hardware information about the node.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> structure allocated by the user</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Module virterror from libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Module virterror from libvirt</h1><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libvirt-libvirt.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libvirt-libvirt.html">libvirt</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The virtualization API</a></th></tr></table><p>Provides the interfaces of the libvirt library to handle errors raised while using the library. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#virError">virError</a><br />struct _virError
</pre><pre class="programlisting">Enum <a href="#virErrorDomain">virErrorDomain</a>
</pre><pre class="programlisting">Enum <a href="#virErrorLevel">virErrorLevel</a>
</pre><pre class="programlisting">Enum <a href="#virErrorNumber">virErrorNumber</a>
</pre><pre class="programlisting">Typedef <a href="libvirt-virterror.html#virError">virError</a> * <a name="virErrorPtr" id="virErrorPtr">virErrorPtr</a>
</pre><pre class="programlisting">int <a href="#virConnCopyLastError">virConnCopyLastError</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)</pre>
<pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> <a href="#virConnGetLastError">virConnGetLastError</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">void <a href="#virConnSetErrorFunc">virConnSetErrorFunc</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> void * userData, <br /> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)</pre>
<pre class="programlisting">int <a href="#virCopyLastError">virCopyLastError</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)</pre>
<pre class="programlisting">void <a href="#virDefaultErrorFunc">virDefaultErrorFunc</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)</pre>
<pre class="programlisting">Function type: <a href="#virErrorFunc">virErrorFunc</a>
void <a href="#virErrorFunc">virErrorFunc</a> (void * userData, <br /> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> error)
</pre>
<pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> <a href="#virGetLastError">virGetLastError</a> (void)</pre>
<pre class="programlisting">void <a href="#virResetError">virResetError</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)</pre>
<pre class="programlisting">void <a href="#virResetLastError">virResetLastError</a> (void)</pre>
<pre class="programlisting">void <a href="#virSetErrorFunc">virSetErrorFunc</a> (void * userData, <br /> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)</pre>
<h2>Description</h2>
<h3><a name="virError" id="virError">Structure virError</a></h3><pre class="programlisting">Structure virError<br />struct _virError {
int code : The error code, a <a href="libvirt-virterror.html#virErrorNumber">virErrorNumber</a>
int domain : What part of the library raised this er
char * message : human-readable informative error messag
<a href="libvirt-virterror.html#virErrorLevel">virErrorLevel</a> level : how consequent is the error
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn : the connection if available
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom : the domain if available
char * str1 : extra string information
char * str2 : extra string information
char * str3 : extra string information
int int1 : extra number information
int int2 : extra number information
}</pre><h3>Enum <a name="virErrorDomain" id="virErrorDomain">virErrorDomain</a></h3><pre class="programlisting">Enum virErrorDomain {
<a name="VIR_FROM_NONE" id="VIR_FROM_NONE">VIR_FROM_NONE</a> = 0
<a name="VIR_FROM_XEN" id="VIR_FROM_XEN">VIR_FROM_XEN</a> = 1 : Error at Xen hypervisor layer
<a name="VIR_FROM_XEND" id="VIR_FROM_XEND">VIR_FROM_XEND</a> = 2 : Error at connection with xend daemon
<a name="VIR_FROM_XENSTORE" id="VIR_FROM_XENSTORE">VIR_FROM_XENSTORE</a> = 3 : Error at connection with xen store
<a name="VIR_FROM_SEXPR" id="VIR_FROM_SEXPR">VIR_FROM_SEXPR</a> = 4 : Error in the S-Epression code
<a name="VIR_FROM_XML" id="VIR_FROM_XML">VIR_FROM_XML</a> = 5 : Error in the XML code
<a name="VIR_FROM_DOM" id="VIR_FROM_DOM">VIR_FROM_DOM</a> = 6 : Error when operating on a domain
}
</pre><h3>Enum <a name="virErrorLevel" id="virErrorLevel">virErrorLevel</a></h3><pre class="programlisting">Enum virErrorLevel {
<a name="VIR_ERR_NONE" id="VIR_ERR_NONE">VIR_ERR_NONE</a> = 0
<a name="VIR_ERR_WARNING" id="VIR_ERR_WARNING">VIR_ERR_WARNING</a> = 1 : A simple warning
<a name="VIR_ERR_ERROR" id="VIR_ERR_ERROR">VIR_ERR_ERROR</a> = 2 : An error
}
</pre><h3>Enum <a name="virErrorNumber" id="virErrorNumber">virErrorNumber</a></h3><pre class="programlisting">Enum virErrorNumber {
<a name="VIR_ERR_OK" id="VIR_ERR_OK">VIR_ERR_OK</a> = 0
<a name="VIR_ERR_INTERNAL_ERROR" id="VIR_ERR_INTERNAL_ERROR">VIR_ERR_INTERNAL_ERROR</a> = 1 : internal error
<a name="VIR_ERR_NO_MEMORY" id="VIR_ERR_NO_MEMORY">VIR_ERR_NO_MEMORY</a> = 2 : memory allocation failure
<a name="VIR_ERR_NO_SUPPORT" id="VIR_ERR_NO_SUPPORT">VIR_ERR_NO_SUPPORT</a> = 3 : no support for this connection
<a name="VIR_ERR_UNKNOWN_HOST" id="VIR_ERR_UNKNOWN_HOST">VIR_ERR_UNKNOWN_HOST</a> = 4 : could not resolve hostname
<a name="VIR_ERR_NO_CONNECT" id="VIR_ERR_NO_CONNECT">VIR_ERR_NO_CONNECT</a> = 5 : can't connect to hypervisor
<a name="VIR_ERR_INVALID_CONN" id="VIR_ERR_INVALID_CONN">VIR_ERR_INVALID_CONN</a> = 6 : invalid connection object
<a name="VIR_ERR_INVALID_DOMAIN" id="VIR_ERR_INVALID_DOMAIN">VIR_ERR_INVALID_DOMAIN</a> = 7 : invalid domain object
<a name="VIR_ERR_INVALID_ARG" id="VIR_ERR_INVALID_ARG">VIR_ERR_INVALID_ARG</a> = 8 : invalid function argument
<a name="VIR_ERR_OPERATION_FAILED" id="VIR_ERR_OPERATION_FAILED">VIR_ERR_OPERATION_FAILED</a> = 9 : a command to hypervisor failed
<a name="VIR_ERR_GET_FAILED" id="VIR_ERR_GET_FAILED">VIR_ERR_GET_FAILED</a> = 10 : a HTTP GET command to failed
<a name="VIR_ERR_POST_FAILED" id="VIR_ERR_POST_FAILED">VIR_ERR_POST_FAILED</a> = 11 : a HTTP POST command to failed
<a name="VIR_ERR_HTTP_ERROR" id="VIR_ERR_HTTP_ERROR">VIR_ERR_HTTP_ERROR</a> = 12 : unexpected HTTP error code
<a name="VIR_ERR_SEXPR_SERIAL" id="VIR_ERR_SEXPR_SERIAL">VIR_ERR_SEXPR_SERIAL</a> = 13 : failure to serialize an S-Expr
<a name="VIR_ERR_NO_XEN" id="VIR_ERR_NO_XEN">VIR_ERR_NO_XEN</a> = 14 : could not open Xen hypervisor control
<a name="VIR_ERR_XEN_CALL" id="VIR_ERR_XEN_CALL">VIR_ERR_XEN_CALL</a> = 15 : failure doing an hypervisor call
<a name="VIR_ERR_OS_TYPE" id="VIR_ERR_OS_TYPE">VIR_ERR_OS_TYPE</a> = 16 : unknown OS type
<a name="VIR_ERR_NO_KERNEL" id="VIR_ERR_NO_KERNEL">VIR_ERR_NO_KERNEL</a> = 17 : missing kernel information
<a name="VIR_ERR_NO_ROOT" id="VIR_ERR_NO_ROOT">VIR_ERR_NO_ROOT</a> = 18 : missing root device information
<a name="VIR_ERR_NO_SOURCE" id="VIR_ERR_NO_SOURCE">VIR_ERR_NO_SOURCE</a> = 19 : missing source device information
<a name="VIR_ERR_NO_TARGET" id="VIR_ERR_NO_TARGET">VIR_ERR_NO_TARGET</a> = 20 : missing target device information
<a name="VIR_ERR_NO_NAME" id="VIR_ERR_NO_NAME">VIR_ERR_NO_NAME</a> = 21 : missing domain name information
<a name="VIR_ERR_NO_OS" id="VIR_ERR_NO_OS">VIR_ERR_NO_OS</a> = 22 : missing domain OS information
<a name="VIR_ERR_NO_DEVICE" id="VIR_ERR_NO_DEVICE">VIR_ERR_NO_DEVICE</a> = 23 : missing domain devices information
<a name="VIR_ERR_NO_XENSTORE" id="VIR_ERR_NO_XENSTORE">VIR_ERR_NO_XENSTORE</a> = 24 : could not open Xen Store control
<a name="VIR_ERR_DRIVER_FULL" id="VIR_ERR_DRIVER_FULL">VIR_ERR_DRIVER_FULL</a> = 25 : too many drivers registered
<a name="VIR_ERR_CALL_FAILED" id="VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a> = 26 : not supported by the drivers
}
</pre><h3><a name="virConnCopyLastError" id="virConnCopyLastError"></a>Function: virConnCopyLastError</h3><pre class="programlisting">int virConnCopyLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br />
</pre><p>Copy the content of the last error caught on that connection One will need to free the result with virResetError()</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no error was found and the error code otherwise and -1 in case of parameter error.</td></tr></tbody></table></div><h3><a name="virConnGetLastError" id="virConnGetLastError"></a>Function: virConnGetLastError</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> virConnGetLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provide a pointer to the last error caught on that connection Simpler but may not be suitable for multithreaded accesses, in which case use virConnCopyLastError()</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the last error or NULL if none occured.</td></tr></tbody></table></div><h3><a name="virConnResetLastError" id="virConnResetLastError"></a>Function: virConnResetLastError</h3><pre class="programlisting">void virConnResetLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Reset the last error caught on that connection</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr></tbody></table></div><h3><a name="virConnSetErrorFunc" id="virConnSetErrorFunc"></a>Function: virConnSetErrorFunc</h3><pre class="programlisting">void virConnSetErrorFunc (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> void * userData, <br /> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)<br />
</pre><p>Set a connection error handling function, if @handler is NULL it will reset to default which is to pass error back to the global library handler.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</td></tr></tbody></table></div><h3><a name="virCopyLastError" id="virCopyLastError"></a>Function: virCopyLastError</h3><pre class="programlisting">int virCopyLastError (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br />
</pre><p>Copy the content of the last error caught at the library level One will need to free the result with virResetError()</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no error was found and the error code otherwise and -1 in case of parameter error.</td></tr></tbody></table></div><h3><a name="virDefaultErrorFunc" id="virDefaultErrorFunc"></a>Function: virDefaultErrorFunc</h3><pre class="programlisting">void virDefaultErrorFunc (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br />
</pre><p>Default routine reporting an error to stderr.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the error.</td></tr></tbody></table></div><h3><a name="virErrorFunc" id="virErrorFunc"></a>Function type: virErrorFunc</h3><pre class="programlisting">Function type: virErrorFunc
void virErrorFunc (void * userData, <br /> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> error)
</pre><p>Signature of a function to use when there is an error raised by the library.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>user provided data for the error callback</td></tr><tr><td><span class="term"><i><tt>error</tt></i>:</span></td><td>the error being raised.</td></tr></tbody></table></div><br />
<h3><a name="virGetLastError" id="virGetLastError"></a>Function: virGetLastError</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> virGetLastError (void)<br />
</pre><p>Provide a pointer to the last error caught at the library level Simpler but may not be suitable for multithreaded accesses, in which case use virCopyLastError()</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the last error or NULL if none occured.</td></tr></tbody></table></div><h3><a name="virResetError" id="virResetError"></a>Function: virResetError</h3><pre class="programlisting">void virResetError (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br />
</pre><p>Reset the error being pointed to</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the <a href="libvirt-virterror.html#virError">virError</a> to clean up</td></tr></tbody></table></div><h3><a name="virResetLastError" id="virResetLastError"></a>Function: virResetLastError</h3><pre class="programlisting">void virResetLastError (void)<br />
</pre><p>Reset the last error caught at the library level.</p>
<h3><a name="virSetErrorFunc" id="virSetErrorFunc"></a>Function: virSetErrorFunc</h3><pre class="programlisting">void virSetErrorFunc (void * userData, <br /> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)<br />
</pre><p>Set a library global error handling function, if @handler is NULL, it will reset to default printing on stderr. The error raised there are those for which no handler at the connection level could caught.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</td></tr></tbody></table></div></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -14,9 +14,9 @@
<p class="p1"></p> <p class="p1"></p>
</div> </div>
<div id="content"> <div id="content">
<h3>what is <span class="style1">libvir?</span></h3> <h3>what is <span class="style1">libvirt?</span></h3>
<p>Libvir is a C toolkit to interract with the virtualization capabilities of <p>Libvirt is a C toolkit to interract with the virtualization capabilities
recent versions of Linux (and other OSes). It is free software available of recent versions of Linux (and other OSes). It is free software available
under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
Lesser General Public License</a>. Virtualization of the Linux Operating Lesser General Public License</a>. Virtualization of the Linux Operating
System means the ability to run multiple instances of Operating Systems System means the ability to run multiple instances of Operating Systems
@ -41,11 +41,20 @@ mechanisms if needed.</p>
<a href="intro.html">Introduction</a> <a href="intro.html">Introduction</a>
</li> </li>
<li> <li>
<a href="architecture.html">libvir architecture</a> <a href="architecture.html">libvirt architecture</a>
</li> </li>
<li> <li>
<a href="downloads.html">Downloads</a> <a href="downloads.html">Downloads</a>
</li> </li>
<li>
<a href="format.html">XML Format</a>
</li>
<li>
<a href="python.html">Binding for Python</a>
</li>
<li>
<a href="errors.html">Handling of errors</a>
</li>
<li> <li>
<a href="FAQ.html">FAQ</a> <a href="FAQ.html">FAQ</a>
</li> </li>
@ -53,7 +62,10 @@ mechanisms if needed.</p>
<a href="bugs.html">Reporting bugs and getting help</a> <a href="bugs.html">Reporting bugs and getting help</a>
</li> </li>
<li> <li>
<a style="font-weight:bold" href="html/index.html">API Menu</a> <a href="html/index.html">API Menu</a>
</li>
<li>
<a href="examples/index.html">C code examples</a>
</li> </li>
<li> <li>
<a href="ChangeLog.html">Recent Changes</a> <a href="ChangeLog.html">Recent Changes</a>
@ -68,6 +80,12 @@ mechanisms if needed.</p>
<li> <li>
<a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a>
</li> </li>
<li>
<a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a>
</li>
<li>
<a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a>
</li>
<li> <li>
<a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a> <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a>
</li> </li>

View File

@ -35,7 +35,7 @@
# #
# Then run the script in the doc subdir, it will create the symbols and # Then run the script in the doc subdir, it will create the symbols and
# word tables and populate them with informations extracted from # word tables and populate them with informations extracted from
# the libvir-api.xml API description, and make then accessible read-only # the libvirt-api.xml API description, and make then accessible read-only
# by nobody@loaclhost the user expected to be Apache's one # by nobody@loaclhost the user expected to be Apache's one
# #
# On the Apache configuration, make sure you have php support enabled # On the Apache configuration, make sure you have php support enabled
@ -116,7 +116,7 @@ TABLES={
# #
# The XML API description file to parse # The XML API description file to parse
# #
API="libvir-api.xml" API="libvirt-api.xml"
DB=None DB=None
######################################################################### #########################################################################

View File

@ -1,30 +1,30 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Introduction</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Introduction</h1><p>Libvir is a C toolkit to interact with the virtualization capabilities of <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Introduction</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Introduction</h1><p>Libvirt is a C toolkit to interact with the virtualization capabilities of
recent versions of Linux (and other OSes), but libvir won't try to provide recent versions of Linux (and other OSes), but libvirt won't try to provide
all possible interfaces for interacting with the virtualization features.</p><p>To avoid ambiguity about the terms used here here are the definitions for all possible interfaces for interacting with the virtualization features.</p><p>To avoid ambiguity about the terms used here here are the definitions for
some of the specific concepts used in libvir documentation:</p><ul><li>a <strong>node</strong> is a single physical machine</li> some of the specific concepts used in libvirt documentation:</p><ul><li>a <strong>node</strong> is a single physical machine</li>
<li>an <strong>hypervisor</strong> is a layer of software allowing to <li>an <strong>hypervisor</strong> is a layer of software allowing to
virtualize a node in a set of virtual machines with possibly different virtualize a node in a set of virtual machines with possibly different
configurations than the node itself</li> configurations than the node itself</li>
<li>a <strong>domain</strong> is an instance of an operating system running <li>a <strong>domain</strong> is an instance of an operating system running
on a virtualized machine provided by the hypervisor</li> on a virtualized machine provided by the hypervisor</li>
</ul><p style="text-align: center"><img alt="Hypervisor and domains running on a node" src="node.gif" /></p><p>Now we can define the goal of libvir: to provide the lowest possible </ul><p style="text-align: center"><img alt="Hypervisor and domains running on a node" src="node.gif" /></p><p>Now we can define the goal of libvirt: to provide the lowest possible
generic and stable layer to manage domains on a node.</p><p>This implies the following:</p><ul><li>the API should not be targetted to a single virtualization environment generic and stable layer to manage domains on a node.</p><p>This implies the following:</p><ul><li>the API should not be targetted to a single virtualization environment
though Xen is the current default, which also means that some very though Xen is the current default, which also means that some very
specific capabilities which are not generic enough may not be provided as specific capabilities which are not generic enough may not be provided as
libvir APIs</li> libvirt APIs</li>
<li>the API should allow to do efficiently and cleanly all the operations <li>the API should allow to do efficiently and cleanly all the operations
needed to manage domains on a node</li> needed to manage domains on a node</li>
<li>the API will not try to provide hight level multi-nodes management <li>the API will not try to provide hight level multi-nodes management
features like load balancing, though they could be implemented on top of features like load balancing, though they could be implemented on top of
libvir</li> libvirt</li>
<li>stability of the API is a big concern, libvir should isolate <li>stability of the API is a big concern, libvirt should isolate
applications from the frequent changes expected at the lower level of the applications from the frequent changes expected at the lower level of the
virtualization framework</li> virtualization framework</li>
</ul><p>So libvir should be a building block for higher level management tools and </ul><p>So libvirt should be a building block for higher level management tools
for applications focusing on virtualization of a single node (the only and for applications focusing on virtualization of a single node (the only
exception being domain migration between node capabilities which may need to exception being domain migration between node capabilities which may need to
be added at the libvir level). Where possible libvir should be extendable to be added at the libvirt level). Where possible libvirt should be extendable
be able to provide the same API for remote nodes, however this is not the to be able to provide the same API for remote nodes, however this is not the
case at the moment, the code currently handle only local node accesses.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> case at the moment, the code currently handle only local node accesses.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,21 +1,21 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content=""> <meta http-equiv="Content-Type" content="">
<title>Libvir the virtualization API</title> <title>Libvirt the virtualization API</title>
</head> </head>
<body bgcolor="#ffffff"> <body bgcolor="#ffffff">
<h1 align="center">Libvir the virtualization API</h1> <h1 align="center">Libvirt the virtualization API</h1>
<h1>Note: this is the flat content of the <a href="index.html">web <h1>Note: this is the flat content of the <a href="index.html">web
site</a></h1> site</a></h1>
<h1 style="text-align: center">libvir</h1> <h1 style="text-align: center">libvirt</h1>
<h3>what is <span class="style1">libvir?</span></h3> <h3>what is <span class="style1">libvirt?</span></h3>
<p>Libvir is a C toolkit to interract with the virtualization capabilities of <p>Libvirt is a C toolkit to interract with the virtualization capabilities
recent versions of Linux (and other OSes). It is free software available of recent versions of Linux (and other OSes). It is free software available
under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
Lesser General Public License</a>. Virtualization of the Linux Operating Lesser General Public License</a>. Virtualization of the Linux Operating
System means the ability to run multiple instances of Operating Systems System means the ability to run multiple instances of Operating Systems
@ -29,10 +29,64 @@ mechanisms if needed.</p>
<h2><a name="News">Releases</a></h2> <h2><a name="News">Releases</a></h2>
<p>Here is the list of official releases, however since it is early on in the <p>Here is the list of official releases, however since it is early on in the
development of libvir, it is preferable when possible to just use the <a development of libvirt, it is preferable when possible to just use the <a
href="downloads.html">CVS version or snapshot</a>, contact the mailing list href="downloads.html">CVS version or snapshot</a>, contact the mailing list
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p> and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p>
<h3>0.1.0: Apr 10 2006</h3>
<ul>
<li>building fixes: --with-xen-distdir option (Ronald Aigner), out of tree
build and pkginfo cflag fix (Daniel Berrange)</li>
<li>enhancement and fixes of the XML description format (David Lutterkort
and Jim Fehlig)</li>
<li>new APIs: for Node information and Reboot</li>
<li>internal code cleanup: refactoring internals into a driver model, more
error handling, structure sharing, thread safety and ref counting</li>
<li>bug fixes: error message (Jim Meyering), error allocation in virsh (Jim
Meyering), virDomainLookupByID (Jim Fehlig), </li>
<li>documentation: updates on architecture, and format, typo fix (Jim
Meyering)</li>
<li>bindings: exception handling in examples (Jim Meyering), perl ones out
of tree (Daniel Berrange)</li>
<li>virsh: more options, create, nodeinfo (Karel Zak), renaming of some
options (Karel Zak), use stderr only for errors (Karel Zak), man page
(Andrew Puch)</li>
</ul>
<h3>0.0.6: Feb 28 2006</h3>
<ul>
<li>add UUID lookup and extract API</li>
<li>add error handling APIs both synchronous and asynchronous</li>
<li>added minimal hook for error handling at the python level, improved the
python bindings</li>
<li>augment the documentation and tests to cover error handling</li>
</ul>
<h3>0.0.5: Feb 23 2006</h3>
<ul>
<li>Added XML description parsing, dependance to libxml2, implemented the
creation API virDomainCreateLinux()</li>
<li>new APIs to lookup and name domain by UUID</li>
<li>fixed the XML dump when using the Xend access</li>
<li>Fixed a few more problem related to the name change</li>
<li>Adding regression tests in python and examples in C</li>
<li>web site improvement, extended the documentation to cover the XML
format and Python API</li>
<li>Added devhelp help for Gnome/Gtk programmers</li>
</ul>
<h3>0.0.4: Feb 10 2006</h3>
<ul>
<li>Fix various bugs introduced in the name change</li>
</ul>
<h3>0.0.3: Feb 9 2006</h3>
<ul>
<li>Switch name from from 'libvir' to libvirt</li>
<li>Starting infrastructure to add code examples</li>
<li>Update of python bindings for completeness</li>
</ul>
<h3>0.0.2: Jan 29 2006</h3> <h3>0.0.2: Jan 29 2006</h3>
<ul> <ul>
<li>Update of the documentation, web site redesign (Diana Fong)</li> <li>Update of the documentation, web site redesign (Diana Fong)</li>
@ -53,12 +107,12 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p>
<h2><a name="Introducti">Introduction</a></h2> <h2><a name="Introducti">Introduction</a></h2>
<p>Libvir is a C toolkit to interact with the virtualization capabilities of <p>Libvirt is a C toolkit to interact with the virtualization capabilities of
recent versions of Linux (and other OSes), but libvir won't try to provide recent versions of Linux (and other OSes), but libvirt won't try to provide
all possible interfaces for interacting with the virtualization features.</p> all possible interfaces for interacting with the virtualization features.</p>
<p>To avoid ambiguity about the terms used here here are the definitions for <p>To avoid ambiguity about the terms used here here are the definitions for
some of the specific concepts used in libvir documentation:</p> some of the specific concepts used in libvirt documentation:</p>
<ul> <ul>
<li>a <strong>node</strong> is a single physical machine</li> <li>a <strong>node</strong> is a single physical machine</li>
<li>an <strong>hypervisor</strong> is a layer of software allowing to <li>an <strong>hypervisor</strong> is a layer of software allowing to
@ -71,7 +125,7 @@ some of the specific concepts used in libvir documentation:</p>
<p style="text-align: center"><img <p style="text-align: center"><img
alt="Hypervisor and domains running on a node" src="node.gif"></p> alt="Hypervisor and domains running on a node" src="node.gif"></p>
<p>Now we can define the goal of libvir: to provide the lowest possible <p>Now we can define the goal of libvirt: to provide the lowest possible
generic and stable layer to manage domains on a node.</p> generic and stable layer to manage domains on a node.</p>
<p>This implies the following:</p> <p>This implies the following:</p>
@ -79,30 +133,30 @@ generic and stable layer to manage domains on a node.</p>
<li>the API should not be targetted to a single virtualization environment <li>the API should not be targetted to a single virtualization environment
though Xen is the current default, which also means that some very though Xen is the current default, which also means that some very
specific capabilities which are not generic enough may not be provided as specific capabilities which are not generic enough may not be provided as
libvir APIs</li> libvirt APIs</li>
<li>the API should allow to do efficiently and cleanly all the operations <li>the API should allow to do efficiently and cleanly all the operations
needed to manage domains on a node</li> needed to manage domains on a node</li>
<li>the API will not try to provide hight level multi-nodes management <li>the API will not try to provide hight level multi-nodes management
features like load balancing, though they could be implemented on top of features like load balancing, though they could be implemented on top of
libvir</li> libvirt</li>
<li>stability of the API is a big concern, libvir should isolate <li>stability of the API is a big concern, libvirt should isolate
applications from the frequent changes expected at the lower level of the applications from the frequent changes expected at the lower level of the
virtualization framework</li> virtualization framework</li>
</ul> </ul>
<p>So libvir should be a building block for higher level management tools and <p>So libvirt should be a building block for higher level management tools
for applications focusing on virtualization of a single node (the only and for applications focusing on virtualization of a single node (the only
exception being domain migration between node capabilities which may need to exception being domain migration between node capabilities which may need to
be added at the libvir level). Where possible libvir should be extendable to be added at the libvirt level). Where possible libvirt should be extendable
be able to provide the same API for remote nodes, however this is not the to be able to provide the same API for remote nodes, however this is not the
case at the moment, the code currently handle only local node accesses.</p> case at the moment, the code currently handle only local node accesses.</p>
<h2><a name="architecture">libvir architecture</a></h2> <h2><a name="architecture">libvirt architecture</a></h2>
<h3>This is Xen specific since this is the only hypervisor supported at the <h3>This is in a large part Xen specific since this is the only hypervisor
moment</h3> supported at the moment</h3>
<p>When running in a Xen environment, programs using libvir have to execute <p>When running in a Xen environment, programs using libvirt have to execute
in "Domain 0", which is the primary Linux OS loaded on the machine. That OS in "Domain 0", which is the primary Linux OS loaded on the machine. That OS
kernel provides most if not all of the actual drivers used by the set of kernel provides most if not all of the actual drivers used by the set of
domains. It also runs the Xen Store, a database of informations shared by the domains. It also runs the Xen Store, a database of informations shared by the
@ -126,7 +180,7 @@ the Xen infrastructure:</p>
<p>The library will usually interract with the Xen daemon for any operation <p>The library will usually interract with the Xen daemon for any operation
changing the state of the system, but for performance and accuracy reasons changing the state of the system, but for performance and accuracy reasons
may talk directly to the hypervisor when gathering state informations at may talk directly to the hypervisor when gathering state informations at
least when possible (i.e. when the running program using libvir has root least when possible (i.e. when the running program using libvirt has root
priviledge access).</p> priviledge access).</p>
<p>If it runs without root access virConnectOpenReadOnly() should be used to <p>If it runs without root access virConnectOpenReadOnly() should be used to
@ -136,31 +190,377 @@ also try to use the RPC to the Xen daemon. In this case use of hypervisor
calls and write to the Xen Store will not be possible, restraining the amount calls and write to the Xen Store will not be possible, restraining the amount
of APIs available and slowing down information gathering about domains.</p> of APIs available and slowing down information gathering about domains.</p>
<h3>Internal architecture</h3>
<p>As the previous section explains, libvirt can communicate using different
channels with the current hypervisor, and should also be able to use
different kind of hypervisor. To simplify the internal design, code, ease
maintainance and simplify the support of other virtualization engine the
internals have been structured as one core component, the libvirt.c module
acting as a front-end for the library API and a set of hypvisor drivers
defining a common set of routines. That way the Xen Daemon accces, the Xen
Store one, the Hypervisor hypercall are all isolated in separate C modules
implementing at least a subset of the common operations defined by the
drivers present in driver.h:</p>
<ul>
<li>xend_internal: implements the driver functions though the Xen
Daemon</li>
<li>xs_internal: implements the subset of the driver availble though the
Xen Store</li>
<li>xen_internal: provide the implementation of the functions possible via
direct hypervisor access</li>
</ul>
<p>Note that a given driver may only implement a subset of those functions,
for example saving a domain state to disk and restoring it is only possible
though the Xen Daemon, on the other hand all interfaces allow to query the
runtime state of a given domain.</p>
<p></p>
<h2><a name="Downloads">Downloads</a></h2> <h2><a name="Downloads">Downloads</a></h2>
<p>The latest versions of libvir can be found on the <a <p>The latest versions of libvirt can be found on the <a
href="ftp://libvir.org/libvir/">libvir.org</a> server ( <a href="ftp://libvirt.org/libvirt/">libvirt.org</a> server ( <a
href="http://libvir.org/sources/">HTTP</a>, <a href="http://libvirt.org/sources/">HTTP</a>, <a
href="ftp://libvir.org/libvir/">FTP</a>). You will find there the released href="ftp://libvirt.org/libvirt/">FTP</a>). You will find there the released
versions as well as <a versions as well as <a
href="http://libvir.org/sources/libvir-cvs-snapshot.tar.gz">snapshot href="http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz">snapshot
tarballs</a> updated from CVS head every hour</p> tarballs</a> updated from CVS head every hour</p>
<p>Anonymous <a href="http://ximbiot.com/cvs/cvshome/docs/">CVS</a> is also <p>Anonymous <a href="http://ximbiot.com/cvs/cvshome/docs/">CVS</a> is also
available, first register onto the server:</p> available, first register onto the server:</p>
<p><code>cvs -d :pserver:anoncvs@libvir.org:2401/data/cvs login</code></p> <p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs login</code></p>
<p>it will request a password, enter <strong>anoncvs</strong>. Then you can <p>it will request a password, enter <strong>anoncvs</strong>. Then you can
checkout the development tree with:</p> checkout the development tree with:</p>
<p><code>cvs -d :pserver:anoncvs@libvir.org:2401/data/cvs co libvir</code></p> <p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co
libvirt</code></p>
<p>Use ./autogen.sh to configure the local checkout, then <code>make</code> <p>Use ./autogen.sh to configure the local checkout, then <code>make</code>
and <code>make install</code>, as usual. All normal cvs commands are now and <code>make install</code>, as usual. All normal cvs commands are now
available except commiting to the base.</p> available except commiting to the base.</p>
<h2><a name="FAQ">FAQ</a></h2> <h2><a name="Format">XML Format</a></h2>
<p>The library use an XML format to describe domains, as input to <a
href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux()</a>
and as the output of <a
href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc()</a>,
the following is an example of the format as returned by the shell command
<code>virsh xmldump fc4</code> , where fc4 was one of the running domains:</p>
<pre>&lt;domain type='xen' <span style="color: #0071FF; background-color: #FFFFFF">id='18'</span>&gt;
&lt;name&gt;fc4&lt;/name&gt;
<span style="color: #00B200; background-color: #FFFFFF">&lt;os&gt;
&lt;type&gt;linux&lt;/type&gt;
&lt;kernel&gt;/boot/vmlinuz-2.6.15-1.43_FC5guest&lt;/kernel&gt;
&lt;initrd&gt;/boot/initrd-2.6.15-1.43_FC5guest.img&lt;/initrd&gt;
&lt;root&gt;/dev/sda1&lt;/root&gt;
&lt;cmdline&gt; ro selinux=0 3&lt;/cmdline&gt;
&lt;/os&gt;</span>
&lt;memory&gt;131072&lt;/memory&gt;
&lt;vcpu&gt;1&lt;/vcpu&gt;
&lt;devices&gt;
<span style="color: #FF0080; background-color: #FFFFFF">&lt;disk type='file'&gt;
&lt;source file='/u/fc4.img'/&gt;
&lt;target dev='sda1'/&gt;
&lt;/disk&gt;</span>
<span style="color: #0000FF; background-color: #FFFFFF">&lt;interface type='bridge'&gt;
&lt;source bridge='xenbr0'/&gt;
&lt;mac address='</span><span style="color: #0000FF; background-color: #FFFFFF"></span><span style="color: #0000FF; background-color: #FFFFFF">aa:00:00:00:00:11'/&gt;
&lt;script path='/etc/xen/scripts/vif-bridge'/&gt;
&lt;/interface&gt;</span>
&lt;/devices&gt;
&lt;/domain&gt;</pre>
<p>The root element must be called <code>domain</code> with no namespace, the
<code>type</code> attribute indicates the kind of hypervisor used, 'xen' is
the default value. The <code>id</code> attribute gives the domain id at
runtime (not however that this may change, for example if the domain is saved
to disk and restored). The domain has a few children whose order is not
significant:</p>
<ul>
<li>name: the domain name, preferably ASCII based</li>
<li>memory: the maximum memory allocated to the domain in kilobytes</li>
<li>vcpu: the number of virtual cpu configured for the domain</li>
<li>os: a block describing the Operating System, its content will be
dependant on the OS type
<ul>
<li>type: indicate the OS type, always linux at this point</li>
<li>kernel: path to the kernel on the Domain 0 filesystem</li>
<li>initrd: an optional path for the init ramdisk on the Domain 0
filesystem</li>
<li>cmdline: optional command line to the kernel</li>
<li>root: the root filesystem from the guest viewpoint, it may be
passed as part of the cmdline content too</li>
</ul>
</li>
<li>devices: a list of <code>disk</code> and <code>interface</code>
descriptions in no special order</li>
</ul>
<p>The format of the devices and their type may grow over time, but the
following should be sufficient for basic use:</p>
<p>A disk device indicates a block device, it can have two values for the
type attribute either 'file' or 'block' corresponding to the 2 options
availble at the Xen layer. It has two mandatory children, and one optional
one in no specific order:</p>
<ul>
<li>source with a file attribute containing the path in Domain 0 to the
file or a dev attribute if using a block device, containing the device
name ('hda5' or '/dev/hda5')</li>
<li>target indicates in a dev attribute the device where it is mapped in
the guest</li>
<li>readonly an optional empty element indicating the device is
read-only</li>
</ul>
<p>An interface element describes a network device mapped on the guest, it
also has a type whose value is currently 'bridge', it also have a number of
children in no specific order:</p>
<ul>
<li>source: indicating the bridge name</li>
<li>mac: the optional mac address provided in the address attribute</li>
<li>ip: the optional IP address provided in the address attribute</li>
<li>script: the script used to bridge the interfcae in the Domain 0</li>
<li>target: and optional target indicating the device name.</li>
</ul>
<p>Life cycle actions for the domain can also be expressed in the XML format,
they drive what should be happening if the domain crashes, is rebooted or is
poweroff. There is various actions possible when this happen:</p>
<ul>
<li>destroy: The domain is cleaned up (that's the default normal processing
in Xen)</li>
<li>restart: A new domain is started in place of the old one with the same
configuration parameters</li>
<li>preserve: The domain will remain in memory until it is destroyed
manually, it won't be running but allows for post-mortem debugging</li>
<li>rename-restart: a variant of the previous one but where the old domain
is renamed before being saved to allow a restart</li>
</ul>
<p>The following could be used for a Xen production system:</p>
<pre>&lt;domain&gt;
...
&lt;on_reboot&gt;restart&lt;/on_reboot&gt;
&lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
&lt;on_crash&gt;rename-restart&lt;/on_crash&gt;
...
&lt;/domain&gt;</pre>
<p>While the format may be extended in various ways as support for more
hypervisor types and features are added, it is expected that this core subset
will remain functional in spite of the evolution of the library.</p>
<h2><a name="Python" id="Python">Binding for Python</a></h2>
<p>Libvirt comes with direct support for the Python language (just make sure
you installed the libvirt-python package if not compiling from sources). Also
note that Daniel Berrange provides <a
href="http://hg.berrange.com/libraries/sys-virt">bindings for Perl</a>
too.</p>
<p>The Python binding should be complete and are mostly automatically
generated from the formal description of the API in xml. The bindings are
articulated around 2 classes <code>virConnect</code> and virDomain mapping to
the C types. Functions in the C API taking either type as argument then
becomes methods for the classes, their name is just stripped from the
virConnect or virDomain(Get) prefix and the first letter gets converted to
lower case, for example the C functions:</p>
<p><code>int <a
href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
(virConnectPtr conn);</code></p>
<p><code>int <a
href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
(virDomainPtr domain, unsigned long memory);</code></p>
<p>become</p>
<p><code>virConn::numOfDomains(self)</code></p>
<p><code>virDomain::setMaxMemory(self, memory)</code></p>
<p>This process is fully automated, you can get a summary of the conversion
in the file libvirtclass.txt present in the python dir or in the docs.There
is a couple of function who don't map directly to their C counterparts due to
specificities in their argument conversions:</p>
<ul>
<li><code><a
href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a></code>
is replaced by <code>virDomain::listDomainsID(self)</code> which returns
a list of the integer ID for the currently running domains</li>
<li><code><a
href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a></code>
is replaced by <code>virDomain::info()</code> which returns a list of
<ol>
<li>state: one of the state values (virDomainState)</li>
<li>maxMemory: the maximum memory used by the domain</li>
<li>memory: the current amount of memory used by the domain</li>
<li>nbVirtCPU: the number of virtual CPU</li>
<li>cpuTime: the time used by the domain in nanoseconds</li>
</ol>
</li>
</ul>
<p>So let's look at a simple example inspired from the <code>basic.py</code>
test found in <code>python/tests/</code> in the source tree:</p>
<pre>import <span style="color: #0071FF; background-color: #FFFFFF">libvirt</span>
import sys
conn = <span style="color: #0071FF; background-color: #FFFFFF">libvirt</span>.openReadOnly(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
try:
dom0 = conn.<span style="color: #007F00; background-color: #FFFFFF">lookupByName</span>("Domain-0")
except:
print 'Failed to find the main domain'
sys.exit(1)
print "Domain 0: id %d running %s" % (dom0.<span style="color: #FF0080; background-color: #FFFFFF">ID</span>(), dom0.<span style="color: #FF0080; background-color: #FFFFFF">OSType</span>())
print dom0.<span style="color: #FF0080; background-color: #FFFFFF">info</span>()</pre>
<p>There is not much to comment about it, it really is a straight mapping
from the C API, the only points to notice are:</p>
<ul>
<li>the import of the module called <code><span
style="color: #0071FF; background-color: #FFFFFF">libvirt</span></code></li>
<li>getting a connection to the hypervisor, in that case using the
openReadOnly function allows the code to execute as a normal user.</li>
<li>getting an object representing the Domain 0 using <span
style="color: #007F00; background-color: #FFFFFF">lookupByName</span></li>
<li>if the domain is not found a libvirtError exception will be raised</li>
<li>extracting and printing some informations about the domain using
various <span
style="color: #E50073; background-color: #FFFFFF">methods</span>
associated to the virDomain class.</li>
</ul>
<h2><a name="Errors" id="Errors">Handling of errors</a></h2>
<p>The main goals of libvirt when it comes to error handling are:</p>
<ul>
<li>provide as much detail as possible</li>
<li>provide the informations as soon as possible</li>
<li>dont force the library user into one style of error handling</li>
</ul>
<p>As result the library provide both synchronous, callback based and
asynchronous error reporting. When an error happens in the library code the
error is logged, allowing to retrieve it later and if the user registered an
error callback it will be called synchronously. Once the call to libvirt ends
the error can be detected by the return value and the full information for
the last logged error can be retrieved.</p>
<p>To avoid as much as prossible troubles with a global variable in a
multithreaded environment, libvirt will associate when possible the errors to
the current connection they are related to, that way the error is stored in a
dynamic structure which can be made thread specific. Error callback can be
set specifically to a connection with</p>
<p>So error handling in the code is the following:</p>
<ol>
<li>if the error can be associated to a connection for example when failing
to look up a domain
<ol>
<li>if there is a callback associated to the connection set with <a
href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a>,
call it with the error informations</li>
<li>otherwise if there is a global callback set with <a
href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a>,
call it with the error information</li>
<li>otherwise call <a
href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
on stderr</li>
<li>save the error in the connection for later retrieval with <a
href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a></li>
</ol>
</li>
<li>otherwise like when failing to create an hypervisor connection:
<ol>
<li>if there is a global callback set with <a
href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a>,
call it with the error information</li>
<li>otherwise call <a
href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
on stderr</li>
<li>save the error in the connection for later retrieval with <a
href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a></li>
</ol>
</li>
</ol>
<p>In all cases the error informations are provided as a <a
href="html/libvirt-virterror.html#virErrorPtr">virErrorPtr</a> pointer to
read-only structure <a
href="html/libvirt-virterror.html#virError">virError</a> containing the
following fields:</p>
<ul>
<li>code: an error number from the <a
href="html/libvirt-virterror.html#virErrorNumber">virErrorNumber</a>
enum</li>
<li>domain: an enum indicating which part of libvirt raised the error see
<a
href="html/libvirt-virterror.html#virErrorDomain">virErrorDomain</a></li>
<li>level: the error level, usually VIR_ERR_ERROR, though there is room for
warnings like VIR_ERR_WARNING</li>
<li>message: the full human-readable formatted string of the error</li>
<li>conn: if available a pointer to the <a
href="html/libvirt-libvirt.html#virConnectPtr">virConnectPtr</a>
connection to the hypervisor where this happened</li>
<li>dom: if available a pointer to the <a
href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain
targetted in the operation</li>
</ul>
<p>and then extra raw informations about the error which may be initialized
to 0 or NULL if unused</p>
<ul>
<li>str1, str2, str3: string informations, usually str1 is the error
message format</li>
<li>int1, int2: integer informations</li>
</ul>
<p>So usually, setting up specific error handling with libvirt consist of
registering an handler with with <a
href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a> or
with <a
href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a>,
chech the value of the code value, take appropriate action, if needed let
libvirt print the error on stderr by calling <a
href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>.
For asynchronous error handing, set such a function doing nothing to avoid
the error being reported on stderr, and call virConnGetLastError or
virGetLastError when an API call returned an error value. It can be a good
idea to use <a
href="html/libvirt-virterror.html#virResetLastError">virResetError</a> or <a
href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a>
once an error has been processed fully.</p>
<p>At the python level, there only a global reporting callback function at
this point, see the error.py example about it:</p>
<pre>def handler(ctxt, err):
global errno
#print "handler(%s, %s)" % (ctxt, err)
errno = err
libvirt.registerErrorHandler(handler, 'context') </pre>
<p>the second argument to the registerErrorHandler function is passed as the
fist argument of the callback like in the C version. The error is a tuple
containing the same field as a virError in C, but cast to Python.</p>
<h2><a name="FAQ" id="FAQ">FAQ</a></h2>
<p>Table of Contents:</p> <p>Table of Contents:</p>
<ul> <ul>
@ -172,15 +572,15 @@ available except commiting to the base.</p>
<h3><a name="License">License</a>(s)</h3> <h3><a name="License">License</a>(s)</h3>
<ol> <ol>
<li><em>Licensing Terms for libvir</em> <li><em>Licensing Terms for libvirt</em>
<p>libvir is released under the <a <p>libvirt is released under the <a
href="http://www.opensource.org/licenses/lgpl-license.html">GNU Lesser href="http://www.opensource.org/licenses/lgpl-license.html">GNU Lesser
General Public License</a>, see the file COPYING.LIB in the distribution General Public License</a>, see the file COPYING.LIB in the distribution
for the precise wording. The only library that libvir depends upon is the for the precise wording. The only library that libvirt depends upon is
Xen store access library which is also licenced under the LGPL.</p> the Xen store access library which is also licenced under the LGPL.</p>
</li> </li>
<li><em>Can I embed libvir in a proprietary application ?</em> <li><em>Can I embed libvirt in a proprietary application ?</em>
<p>Yes. The LGPL allows you to embed libvir into a proprietary <p>Yes. The LGPL allows you to embed libvirt into a proprietary
application. It would be graceful to send-back bug fixes and improvements application. It would be graceful to send-back bug fixes and improvements
as patches for possible incorporation in the main development tree. It as patches for possible incorporation in the main development tree. It
will decrease your maintainance costs anyway if you do so.</p> will decrease your maintainance costs anyway if you do so.</p>
@ -189,19 +589,19 @@ available except commiting to the base.</p>
<h3><a name="Installati">Installation</a></h3> <h3><a name="Installati">Installation</a></h3>
<ol> <ol>
<li><em>Where can I get libvir</em> ? <li><em>Where can I get libvirt</em> ?
<p>The original distribution comes from <a <p>The original distribution comes from <a
href="ftp://libvir.org/libvir/">ftp://libvir.org/libvir/</a>.</p> href="ftp://libvirt.org/libvirt/">ftp://libvirt.org/libvirt/</a>.</p>
</li> </li>
<li><em>I can't install the libvir/libvir-devel RPM packages due to failed <li><em>I can't install the libvirt/libvirt-devel RPM packages due to
dependencies</em> failed dependencies</em>
<p>The most generic solution is to re-fetch the latest src.rpm , and <p>The most generic solution is to re-fetch the latest src.rpm , and
rebuild it locally with</p> rebuild it locally with</p>
<p><code>rpm --rebuild libvir-xxx.src.rpm</code>.</p> <p><code>rpm --rebuild libvirt-xxx.src.rpm</code>.</p>
<p>If everything goes well it will generate two binary rpm packages (one <p>If everything goes well it will generate two binary rpm packages (one
providing the shared libs and virsh, and the other one, the -devel providing the shared libs and virsh, and the other one, the -devel
package, providing includes, static libraries and scripts needed to build package, providing includes, static libraries and scripts needed to build
applications with libvir that you can install locally.</p> applications with libvirt that you can install locally.</p>
<p>One can also rebuild the RPMs from a tarball:</p> <p>One can also rebuild the RPMs from a tarball:</p>
<p><code>rpmbuild -ta libdir-xxx.tar.gz</code></p> <p><code>rpmbuild -ta libdir-xxx.tar.gz</code></p>
<p>Or from a configured tree with:</p> <p>Or from a configured tree with:</p>
@ -210,7 +610,7 @@ available except commiting to the base.</p>
<li><em>Failure to use the API for non-root users</em> <li><em>Failure to use the API for non-root users</em>
<p>Large parts of the API may only be accessible with root priviledges, <p>Large parts of the API may only be accessible with root priviledges,
however the read only access to the xenstore data doesnot have to be however the read only access to the xenstore data doesnot have to be
forbidden to user, at least for monitoring purposes. If "virsh dinfo" forbidden to user, at least for monitoring purposes. If "virsh dominfo"
fails to run as an user, change the mode of the xenstore read-only socket fails to run as an user, change the mode of the xenstore read-only socket
with:</p> with:</p>
<p><code>chmod 666 /var/run/xenstored/socket_ro</code></p> <p><code>chmod 666 /var/run/xenstored/socket_ro</code></p>
@ -227,10 +627,10 @@ available except commiting to the base.</p>
<h3><a name="Compilatio">Compilation</a></h3> <h3><a name="Compilatio">Compilation</a></h3>
<ol> <ol>
<li><em>What is the process to compile libvir ?</em> <li><em>What is the process to compile libvirt ?</em>
<p>As most UNIX libraries libvir follows the "standard":</p> <p>As most UNIX libraries libvirt follows the "standard":</p>
<p><code>gunzip -c libvir-xxx.tar.gz | tar xvf -</code></p> <p><code>gunzip -c libvirt-xxx.tar.gz | tar xvf -</code></p>
<p><code>cd libvir-xxxx</code></p> <p><code>cd libvirt-xxxx</code></p>
<p><code>./configure --help</code></p> <p><code>./configure --help</code></p>
<p>to see the options, then the compilation/installation proper</p> <p>to see the options, then the compilation/installation proper</p>
<p><code>./configure [possible options]</code></p> <p><code>./configure [possible options]</code></p>
@ -239,8 +639,8 @@ available except commiting to the base.</p>
<p>At that point you may have to rerun ldconfig or a similar utility to <p>At that point you may have to rerun ldconfig or a similar utility to
update your list of installed shared libs.</p> update your list of installed shared libs.</p>
</li> </li>
<li><em>What other libraries are needed to compile/install libvir ?</em> <li><em>What other libraries are needed to compile/install libvirt ?</em>
<p>Libvir requires libxenstore, which is usually provided by the xen <p>Libvirt requires libxenstore, which is usually provided by the xen
packages as well as the public headers to compile against libxenstore.</p> packages as well as the public headers to compile against libxenstore.</p>
</li> </li>
<li><em>I use the CVS version and there is no configure script</em> <li><em>I use the CVS version and there is no configure script</em>
@ -253,18 +653,18 @@ available except commiting to the base.</p>
<h3><a name="Developer">Developer</a> corner</h3> <h3><a name="Developer">Developer</a> corner</h3>
<ol> <ol>
<li><em>Troubles compiling or linking programs using libvir</em> <li><em>Troubles compiling or linking programs using libvirt</em>
<p>To simplify the process of reusing the library, libvir comes with <p>To simplify the process of reusing the library, libvirt comes with
pkgconfig support, which can be used directly from autoconf support or pkgconfig support, which can be used directly from autoconf support or
via the pkg-config command line tool, like:</p> via the pkg-config command line tool, like:</p>
<p><code>pkg-config libvir --libs</code></p> <p><code>pkg-config libvirt --libs</code></p>
</li> </li>
</ol> </ol>
<h2><a name="Reporting">Reporting bugs and getting help</a></h2> <h2><a name="Reporting">Reporting bugs and getting help</a></h2>
<p>There is a mailing-list <a <p>There is a mailing-list <a
href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a> for libvir, href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a> for libvirt,
with an <a href="https://www.redhat.com/archives/libvir-list/">on-line with an <a href="https://www.redhat.com/archives/libvir-list/">on-line
archive</a>. Please subscribe to this list before posting by visiting the <a archive</a>. Please subscribe to this list before posting by visiting the <a
href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a> href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a>
@ -273,7 +673,7 @@ attachments are really appreciated and will be discussed on the mailing list.
If possible generate the patches by using cvs diff -u in a CVS checkout.</p> If possible generate the patches by using cvs diff -u in a CVS checkout.</p>
<p>We expect to use <a href="https://bugzilla.redhat.com/">Red Hat <p>We expect to use <a href="https://bugzilla.redhat.com/">Red Hat
Bugzilla</a> to track bugs for libvir, though there isn't a libvir software Bugzilla</a> to track bugs for libvirt, though there isn't a libvirt software
module defined yet, in the meantime use the mailing-list, thanks !.</p> module defined yet, in the meantime use the mailing-list, thanks !.</p>
</body> </body>
</html> </html>

View File

@ -22,10 +22,12 @@
<exports symbol='VIR_DOMAIN_RESTART' type='enum'/> <exports symbol='VIR_DOMAIN_RESTART' type='enum'/>
<exports symbol='VIR_DOMAIN_RUNNING' type='enum'/> <exports symbol='VIR_DOMAIN_RUNNING' type='enum'/>
<exports symbol='VIR_DOMAIN_NOSTATE' type='enum'/> <exports symbol='VIR_DOMAIN_NOSTATE' type='enum'/>
<exports symbol='virNodeInfoPtr' type='typedef'/>
<exports symbol='virDomainInfoPtr' type='typedef'/> <exports symbol='virDomainInfoPtr' type='typedef'/>
<exports symbol='virDomainKernelPtr' type='typedef'/> <exports symbol='virDomainKernelPtr' type='typedef'/>
<exports symbol='virConnectPtr' type='typedef'/> <exports symbol='virConnectPtr' type='typedef'/>
<exports symbol='virDomainKernel' type='typedef'/> <exports symbol='virDomainKernel' type='typedef'/>
<exports symbol='virNodeInfo' type='typedef'/>
<exports symbol='virDomainState' type='typedef'/> <exports symbol='virDomainState' type='typedef'/>
<exports symbol='virDeviceMode' type='typedef'/> <exports symbol='virDeviceMode' type='typedef'/>
<exports symbol='virDomain' type='typedef'/> <exports symbol='virDomain' type='typedef'/>
@ -36,6 +38,7 @@
<exports symbol='virDomainInfo' type='typedef'/> <exports symbol='virDomainInfo' type='typedef'/>
<exports symbol='_virDomainInfo' type='struct'/> <exports symbol='_virDomainInfo' type='struct'/>
<exports symbol='_virDomainKernel' type='struct'/> <exports symbol='_virDomainKernel' type='struct'/>
<exports symbol='_virNodeInfo' type='struct'/>
<exports symbol='virDomainGetInfo' type='function'/> <exports symbol='virDomainGetInfo' type='function'/>
<exports symbol='virDomainShutdown' type='function'/> <exports symbol='virDomainShutdown' type='function'/>
<exports symbol='virGetVersion' type='function'/> <exports symbol='virGetVersion' type='function'/>
@ -44,8 +47,11 @@
<exports symbol='virConnectGetType' type='function'/> <exports symbol='virConnectGetType' type='function'/>
<exports symbol='virDomainSave' type='function'/> <exports symbol='virDomainSave' type='function'/>
<exports symbol='virConnectListDomains' type='function'/> <exports symbol='virConnectListDomains' type='function'/>
<exports symbol='virDomainLookupByUUID' type='function'/>
<exports symbol='virDomainLookupByID' type='function'/> <exports symbol='virDomainLookupByID' type='function'/>
<exports symbol='virDomainGetOSType' type='function'/> <exports symbol='virDomainGetOSType' type='function'/>
<exports symbol='virNodeGetInfo' type='function'/>
<exports symbol='virDomainGetUUID' type='function'/>
<exports symbol='virConnectNumOfDomains' type='function'/> <exports symbol='virConnectNumOfDomains' type='function'/>
<exports symbol='virDomainSetMaxMemory' type='function'/> <exports symbol='virDomainSetMaxMemory' type='function'/>
<exports symbol='virDomainGetMaxMemory' type='function'/> <exports symbol='virDomainGetMaxMemory' type='function'/>
@ -54,6 +60,8 @@
<exports symbol='virConnectOpen' type='function'/> <exports symbol='virConnectOpen' type='function'/>
<exports symbol='virDomainSuspend' type='function'/> <exports symbol='virDomainSuspend' type='function'/>
<exports symbol='virConnectClose' type='function'/> <exports symbol='virConnectClose' type='function'/>
<exports symbol='virDomainReboot' type='function'/>
<exports symbol='virInitialize' type='function'/>
<exports symbol='virDomainGetID' type='function'/> <exports symbol='virDomainGetID' type='function'/>
<exports symbol='virDomainResume' type='function'/> <exports symbol='virDomainResume' type='function'/>
<exports symbol='virDomainCreateLinux' type='function'/> <exports symbol='virDomainCreateLinux' type='function'/>
@ -62,6 +70,65 @@
<exports symbol='virDomainGetName' type='function'/> <exports symbol='virDomainGetName' type='function'/>
<exports symbol='virConnectOpenReadOnly' type='function'/> <exports symbol='virConnectOpenReadOnly' type='function'/>
</file> </file>
<file name='virterror'>
<summary>error handling interfaces for the libvirt library</summary>
<description>Provides the interfaces of the libvirt library to handle errors raised while using the library. </description>
<author>Daniel Veillard &lt;veillard@redhat.com&gt; </author>
<exports symbol='VIR_ERR_CALL_FAILED' type='enum'/>
<exports symbol='VIR_ERR_WARNING' type='enum'/>
<exports symbol='VIR_ERR_NO_XEN' type='enum'/>
<exports symbol='VIR_ERR_INVALID_ARG' type='enum'/>
<exports symbol='VIR_ERR_ERROR' type='enum'/>
<exports symbol='VIR_ERR_NO_DEVICE' type='enum'/>
<exports symbol='VIR_ERR_NO_MEMORY' type='enum'/>
<exports symbol='VIR_FROM_SEXPR' type='enum'/>
<exports symbol='VIR_FROM_NONE' type='enum'/>
<exports symbol='VIR_ERR_HTTP_ERROR' type='enum'/>
<exports symbol='VIR_ERR_NO_XENSTORE' type='enum'/>
<exports symbol='VIR_FROM_DOM' type='enum'/>
<exports symbol='VIR_ERR_INVALID_DOMAIN' type='enum'/>
<exports symbol='VIR_FROM_XML' type='enum'/>
<exports symbol='VIR_ERR_NO_KERNEL' type='enum'/>
<exports symbol='VIR_ERR_POST_FAILED' type='enum'/>
<exports symbol='VIR_ERR_OS_TYPE' type='enum'/>
<exports symbol='VIR_ERR_INVALID_CONN' type='enum'/>
<exports symbol='VIR_ERR_NONE' type='enum'/>
<exports symbol='VIR_ERR_OK' type='enum'/>
<exports symbol='VIR_ERR_NO_NAME' type='enum'/>
<exports symbol='VIR_ERR_NO_ROOT' type='enum'/>
<exports symbol='VIR_ERR_OPERATION_FAILED' type='enum'/>
<exports symbol='VIR_ERR_GET_FAILED' type='enum'/>
<exports symbol='VIR_ERR_DRIVER_FULL' type='enum'/>
<exports symbol='VIR_ERR_SEXPR_SERIAL' type='enum'/>
<exports symbol='VIR_ERR_NO_SOURCE' type='enum'/>
<exports symbol='VIR_ERR_NO_TARGET' type='enum'/>
<exports symbol='VIR_ERR_INTERNAL_ERROR' type='enum'/>
<exports symbol='VIR_ERR_NO_SUPPORT' type='enum'/>
<exports symbol='VIR_FROM_XEND' type='enum'/>
<exports symbol='VIR_FROM_XENSTORE' type='enum'/>
<exports symbol='VIR_FROM_XEN' type='enum'/>
<exports symbol='VIR_ERR_XEN_CALL' type='enum'/>
<exports symbol='VIR_ERR_UNKNOWN_HOST' type='enum'/>
<exports symbol='VIR_ERR_NO_CONNECT' type='enum'/>
<exports symbol='VIR_ERR_NO_OS' type='enum'/>
<exports symbol='virErrorPtr' type='typedef'/>
<exports symbol='virErrorLevel' type='typedef'/>
<exports symbol='virErrorDomain' type='typedef'/>
<exports symbol='virErrorNumber' type='typedef'/>
<exports symbol='virError' type='typedef'/>
<exports symbol='_virError' type='struct'/>
<exports symbol='virCopyLastError' type='function'/>
<exports symbol='virConnSetErrorFunc' type='function'/>
<exports symbol='virResetLastError' type='function'/>
<exports symbol='virErrorFunc' type='function'/>
<exports symbol='virResetError' type='function'/>
<exports symbol='virConnGetLastError' type='function'/>
<exports symbol='virDefaultErrorFunc' type='function'/>
<exports symbol='virGetLastError' type='function'/>
<exports symbol='virSetErrorFunc' type='function'/>
<exports symbol='virConnCopyLastError' type='function'/>
<exports symbol='virConnResetLastError' type='function'/>
</file>
</files> </files>
<symbols> <symbols>
<macro name='LIBVIR_VERSION_NUMBER' file='libvirt'> <macro name='LIBVIR_VERSION_NUMBER' file='libvirt'>
@ -83,6 +150,43 @@
<enum name='VIR_DOMAIN_RUNNING' file='libvirt' value='1' type='virDomainState' info='the domain is running'/> <enum name='VIR_DOMAIN_RUNNING' file='libvirt' value='1' type='virDomainState' info='the domain is running'/>
<enum name='VIR_DOMAIN_SHUTDOWN' file='libvirt' value='4' type='virDomainState' info='the domain is being shut down'/> <enum name='VIR_DOMAIN_SHUTDOWN' file='libvirt' value='4' type='virDomainState' info='the domain is being shut down'/>
<enum name='VIR_DOMAIN_SHUTOFF' file='libvirt' value='5' type='virDomainState' info='the domain is shut off'/> <enum name='VIR_DOMAIN_SHUTOFF' file='libvirt' value='5' type='virDomainState' info='the domain is shut off'/>
<enum name='VIR_ERR_CALL_FAILED' file='virterror' value='26' type='virErrorNumber' info=' not supported by the drivers'/>
<enum name='VIR_ERR_DRIVER_FULL' file='virterror' value='25' type='virErrorNumber' info='too many drivers registered'/>
<enum name='VIR_ERR_ERROR' file='virterror' value='2' type='virErrorLevel' info=' An error'/>
<enum name='VIR_ERR_GET_FAILED' file='virterror' value='10' type='virErrorNumber' info='a HTTP GET command to failed'/>
<enum name='VIR_ERR_HTTP_ERROR' file='virterror' value='12' type='virErrorNumber' info='unexpected HTTP error code'/>
<enum name='VIR_ERR_INTERNAL_ERROR' file='virterror' value='1' type='virErrorNumber' info='internal error'/>
<enum name='VIR_ERR_INVALID_ARG' file='virterror' value='8' type='virErrorNumber' info='invalid function argument'/>
<enum name='VIR_ERR_INVALID_CONN' file='virterror' value='6' type='virErrorNumber' info='invalid connection object'/>
<enum name='VIR_ERR_INVALID_DOMAIN' file='virterror' value='7' type='virErrorNumber' info='invalid domain object'/>
<enum name='VIR_ERR_NONE' file='virterror' value='0' type='virErrorLevel'/>
<enum name='VIR_ERR_NO_CONNECT' file='virterror' value='5' type='virErrorNumber' info='can&apos;t connect to hypervisor'/>
<enum name='VIR_ERR_NO_DEVICE' file='virterror' value='23' type='virErrorNumber' info='missing domain devices information'/>
<enum name='VIR_ERR_NO_KERNEL' file='virterror' value='17' type='virErrorNumber' info='missing kernel information'/>
<enum name='VIR_ERR_NO_MEMORY' file='virterror' value='2' type='virErrorNumber' info='memory allocation failure'/>
<enum name='VIR_ERR_NO_NAME' file='virterror' value='21' type='virErrorNumber' info='missing domain name information'/>
<enum name='VIR_ERR_NO_OS' file='virterror' value='22' type='virErrorNumber' info='missing domain OS information'/>
<enum name='VIR_ERR_NO_ROOT' file='virterror' value='18' type='virErrorNumber' info='missing root device information'/>
<enum name='VIR_ERR_NO_SOURCE' file='virterror' value='19' type='virErrorNumber' info='missing source device information'/>
<enum name='VIR_ERR_NO_SUPPORT' file='virterror' value='3' type='virErrorNumber' info='no support for this connection'/>
<enum name='VIR_ERR_NO_TARGET' file='virterror' value='20' type='virErrorNumber' info='missing target device information'/>
<enum name='VIR_ERR_NO_XEN' file='virterror' value='14' type='virErrorNumber' info='could not open Xen hypervisor control'/>
<enum name='VIR_ERR_NO_XENSTORE' file='virterror' value='24' type='virErrorNumber' info='could not open Xen Store control'/>
<enum name='VIR_ERR_OK' file='virterror' value='0' type='virErrorNumber'/>
<enum name='VIR_ERR_OPERATION_FAILED' file='virterror' value='9' type='virErrorNumber' info='a command to hypervisor failed'/>
<enum name='VIR_ERR_OS_TYPE' file='virterror' value='16' type='virErrorNumber' info='unknown OS type'/>
<enum name='VIR_ERR_POST_FAILED' file='virterror' value='11' type='virErrorNumber' info='a HTTP POST command to failed'/>
<enum name='VIR_ERR_SEXPR_SERIAL' file='virterror' value='13' type='virErrorNumber' info='failure to serialize an S-Expr'/>
<enum name='VIR_ERR_UNKNOWN_HOST' file='virterror' value='4' type='virErrorNumber' info='could not resolve hostname'/>
<enum name='VIR_ERR_WARNING' file='virterror' value='1' type='virErrorLevel' info='A simple warning'/>
<enum name='VIR_ERR_XEN_CALL' file='virterror' value='15' type='virErrorNumber' info='failure doing an hypervisor call'/>
<enum name='VIR_FROM_DOM' file='virterror' value='6' type='virErrorDomain' info=' Error when operating on a domain'/>
<enum name='VIR_FROM_NONE' file='virterror' value='0' type='virErrorDomain'/>
<enum name='VIR_FROM_SEXPR' file='virterror' value='4' type='virErrorDomain' info='Error in the S-Epression code'/>
<enum name='VIR_FROM_XEN' file='virterror' value='1' type='virErrorDomain' info='Error at Xen hypervisor layer'/>
<enum name='VIR_FROM_XEND' file='virterror' value='2' type='virErrorDomain' info='Error at connection with xend daemon'/>
<enum name='VIR_FROM_XENSTORE' file='virterror' value='3' type='virErrorDomain' info='Error at connection with xen store'/>
<enum name='VIR_FROM_XML' file='virterror' value='5' type='virErrorDomain' info='Error in the XML code'/>
<struct name='virConnect' file='libvirt' type='struct _virConnect'/> <struct name='virConnect' file='libvirt' type='struct _virConnect'/>
<typedef name='virConnectPtr' file='libvirt' type='virConnect *'> <typedef name='virConnectPtr' file='libvirt' type='virConnect *'>
<info>a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.</info> <info>a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.</info>
@ -94,14 +198,8 @@
<field name='state' type='unsigned char' info=' the running state, one of virDomainFlags'/> <field name='state' type='unsigned char' info=' the running state, one of virDomainFlags'/>
<field name='maxMem' type='unsigned long' info=' the maximum memory in KBytes allowed'/> <field name='maxMem' type='unsigned long' info=' the maximum memory in KBytes allowed'/>
<field name='memory' type='unsigned long' info=' the memory in KBytes used by the domain'/> <field name='memory' type='unsigned long' info=' the memory in KBytes used by the domain'/>
<field name='nrVirtCpu' type='unsigned short' info='* Informations below are only available to clients with a connection <field name='nrVirtCpu' type='unsigned short' info=' the number of virtual CPUs for the domain'/>
* with full access to the hypervisor <field name='cpuTime' type='unsigned long long' info=' the CPU time used in nanoseconds'/>
*'/>
<field name='cpuTime' type='unsigned long long' info='* TODO:
* - check what can be extracted publicly from xenstore
* and what&apos;s private limited to the hypervisor call.
* - add padding to this structure for ABI long term protection
*'/>
</struct> </struct>
<typedef name='virDomainInfoPtr' file='libvirt' type='virDomainInfo *'> <typedef name='virDomainInfoPtr' file='libvirt' type='virDomainInfo *'>
<info>a virDomainInfoPtr is a pointer to a virDomainInfo structure.</info> <info>a virDomainInfoPtr is a pointer to a virDomainInfo structure.</info>
@ -120,6 +218,59 @@
</typedef> </typedef>
<typedef name='virDomainRestart' file='libvirt' type='enum'/> <typedef name='virDomainRestart' file='libvirt' type='enum'/>
<typedef name='virDomainState' file='libvirt' type='enum'/> <typedef name='virDomainState' file='libvirt' type='enum'/>
<struct name='virError' file='virterror' type='struct _virError'>
<field name='code' type='int' info=' The error code, a virErrorNumber'/>
<field name='domain' type='int' info=' What part of the library raised this error'/>
<field name='message' type='char *' info=' human-readable informative error message'/>
<field name='level' type='virErrorLevel' info=' how consequent is the error'/>
<field name='conn' type='virConnectPtr' info=' the connection if available'/>
<field name='dom' type='virDomainPtr' info=' the domain if available'/>
<field name='str1' type='char *' info=' extra string information'/>
<field name='str2' type='char *' info=' extra string information'/>
<field name='str3' type='char *' info=' extra string information'/>
<field name='int1' type='int' info=' extra number information'/>
<field name='int2' type='int' info=' extra number information'/>
</struct>
<typedef name='virErrorDomain' file='virterror' type='enum'/>
<typedef name='virErrorLevel' file='virterror' type='enum'/>
<typedef name='virErrorNumber' file='virterror' type='enum'/>
<typedef name='virErrorPtr' file='virterror' type='virError *'/>
<struct name='virNodeInfo' file='libvirt' type='struct _virNodeInfo'>
<field name='model' type='charmodel[32]' info=' string indicating the CPU model'/>
<field name='memory' type='unsigned long' info=' memory size in kilobytes'/>
<field name='cpus' type='unsigned int' info=' the number of active CPUs'/>
<field name='mhz' type='unsigned int' info=' expected CPU frequency'/>
<field name='nodes' type='unsigned int' info=' the number of NUMA cell, 1 for uniform mem access'/>
<field name='sockets' type='unsigned int' info=' number of CPU socket per node'/>
<field name='cores' type='unsigned int' info=' number of core per socket'/>
<field name='threads' type='unsigned int' info=' number of threads per core'/>
</struct>
<typedef name='virNodeInfoPtr' file='libvirt' type='virNodeInfo *'>
<info>a virNodeInfoPtr is a pointer to a virNodeInfo structure.</info>
</typedef>
<function name='virConnCopyLastError' file='virterror' module='virterror'>
<info>Copy the content of the last error caught on that connection One will need to free the result with virResetError()</info>
<return type='int' info='0 if no error was found and the error code otherwise and -1 in case of parameter error.'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='to' type='virErrorPtr' info='target to receive the copy'/>
</function>
<function name='virConnGetLastError' file='virterror' module='virterror'>
<info>Provide a pointer to the last error caught on that connection Simpler but may not be suitable for multithreaded accesses, in which case use virConnCopyLastError()</info>
<return type='virErrorPtr' info='a pointer to the last error or NULL if none occured.'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
</function>
<function name='virConnResetLastError' file='virterror' module='virterror'>
<info>Reset the last error caught on that connection</info>
<return type='void'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
</function>
<function name='virConnSetErrorFunc' file='virterror' module='virterror'>
<info>Set a connection error handling function, if @handler is NULL it will reset to default which is to pass error back to the global library handler.</info>
<return type='void'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='userData' type='void *' info='pointer to the user data provided in the handler callback'/>
<arg name='handler' type='virErrorFunc' info='the function to get called in case of error or NULL'/>
</function>
<function name='virConnectClose' file='libvirt' module='libvirt'> <function name='virConnectClose' file='libvirt' module='libvirt'>
<info>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</info> <info>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</info>
<return type='int' info='0 in case of success or -1 in case of error.'/> <return type='int' info='0 in case of success or -1 in case of error.'/>
@ -158,14 +309,21 @@
<return type='virConnectPtr' info='a pointer to the hypervisor connection or NULL in case of error'/> <return type='virConnectPtr' info='a pointer to the hypervisor connection or NULL in case of error'/>
<arg name='name' type='const char *' info='optional argument currently unused, pass NULL'/> <arg name='name' type='const char *' info='optional argument currently unused, pass NULL'/>
</function> </function>
<function name='virCopyLastError' file='virterror' module='virterror'>
<info>Copy the content of the last error caught at the library level One will need to free the result with virResetError()</info>
<return type='int' info='0 if no error was found and the error code otherwise and -1 in case of parameter error.'/>
<arg name='to' type='virErrorPtr' info='target to receive the copy'/>
</function>
<function name='virDefaultErrorFunc' file='virterror' module='virterror'>
<info>Default routine reporting an error to stderr.</info>
<return type='void'/>
<arg name='err' type='virErrorPtr' info='pointer to the error.'/>
</function>
<function name='virDomainCreateLinux' file='libvirt' module='libvirt'> <function name='virDomainCreateLinux' file='libvirt' module='libvirt'>
<info>Launch a new Linux guest domain, unimplemented yet, API to be defined. This would function requires priviledged access to the hypervisor.</info> <info>Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires priviledged access to the hypervisor.</info>
<return type='virDomainPtr' info='a new domain object or NULL in case of failure'/> <return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='kernel_path' type='const char *' info='the file path to the kernel image'/> <arg name='xmlDesc' type='const char *' info='an XML description of the domain'/>
<arg name='initrd_path' type='const char *' info='an optional file path to an initrd'/>
<arg name='cmdline' type='const char *' info='optional command line parameters for the kernel'/>
<arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
<arg name='flags' type='unsigned int' info='an optional set of virDomainFlags'/> <arg name='flags' type='unsigned int' info='an optional set of virDomainFlags'/>
</function> </function>
<function name='virDomainDestroy' file='libvirt' module='libvirt'> <function name='virDomainDestroy' file='libvirt' module='libvirt'>
@ -201,11 +359,17 @@
</function> </function>
<function name='virDomainGetOSType' file='libvirt' module='libvirt'> <function name='virDomainGetOSType' file='libvirt' module='libvirt'>
<info>Get the type of domain operation system.</info> <info>Get the type of domain operation system.</info>
<return type='char *' info='the new string or NULL in case of error'/> <return type='char *' info='the new string or NULL in case of error, the string must be freed by the caller.'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
</function> </function>
<function name='virDomainGetXMLDesc' file='libvirt' module='xml'> <function name='virDomainGetUUID' file='libvirt' module='libvirt'>
<info>Provide an XML description of the domain. NOTE: this API is subject to changes.</info> <info>Get the UUID for a domain</info>
<return type='int' info='-1 in case of error, 0 in case of success'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='uuid' type='unsigned char *' info='pointer to a 16 bytes array'/>
</function>
<function name='virDomainGetXMLDesc' file='libvirt' module='libvirt'>
<info>Provide an XML description of the domain. The description may be reused later to relaunch the domain with virDomainCreateLinux().</info>
<return type='char *' info='a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.'/> <return type='char *' info='a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='flags' type='int' info='and OR&apos;ed set of extraction flags, not used yet'/> <arg name='flags' type='int' info='and OR&apos;ed set of extraction flags, not used yet'/>
@ -222,6 +386,18 @@
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='name' type='const char *' info='name for the domain'/> <arg name='name' type='const char *' info='name for the domain'/>
</function> </function>
<function name='virDomainLookupByUUID' file='libvirt' module='libvirt'>
<info>Try to lookup a domain on the given hypervisor based on its UUID.</info>
<return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='uuid' type='const unsigned char *' info='the UUID string for the domain'/>
</function>
<function name='virDomainReboot' file='libvirt' module='libvirt'>
<info>Reboot a domain, the domain object is still usable there after but the domain OS is being stopped for a restart. Note that the guest OS may ignore the request.</info>
<return type='int' info='0 in case of success and -1 in case of failure.'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='flags' type='unsigned int' info='extra flags for the reboot operation, not used yet'/>
</function>
<function name='virDomainRestore' file='libvirt' module='libvirt'> <function name='virDomainRestore' file='libvirt' module='libvirt'>
<info>This method will restore a domain saved to disk by virDomainSave().</info> <info>This method will restore a domain saved to disk by virDomainSave().</info>
<return type='int' info='0 in case of success and -1 in case of failure.'/> <return type='int' info='0 in case of success and -1 in case of failure.'/>
@ -255,6 +431,16 @@
<return type='int' info='0 in case of success and -1 in case of failure.'/> <return type='int' info='0 in case of success and -1 in case of failure.'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
</function> </function>
<functype name='virErrorFunc' file='virterror' module='virterror'>
<info>Signature of a function to use when there is an error raised by the library.</info>
<return type='void'/>
<arg name='userData' type='void *' info='user provided data for the error callback'/>
<arg name='error' type='virErrorPtr' info='the error being raised.'/>
</functype>
<function name='virGetLastError' file='virterror' module='virterror'>
<info>Provide a pointer to the last error caught at the library level Simpler but may not be suitable for multithreaded accesses, in which case use virCopyLastError()</info>
<return type='virErrorPtr' info='a pointer to the last error or NULL if none occured.'/>
</function>
<function name='virGetVersion' file='libvirt' module='libvirt'> <function name='virGetVersion' file='libvirt' module='libvirt'>
<info>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, &quot;Xen&quot; is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</info> <info>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, &quot;Xen&quot; is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</info>
<return type='int' info='-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.'/> <return type='int' info='-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.'/>
@ -262,5 +448,30 @@
<arg name='type' type='const char *' info='hypervisor type'/> <arg name='type' type='const char *' info='hypervisor type'/>
<arg name='typeVer' type='unsigned long *' info='return value for the version of the hypervisor (OUT)'/> <arg name='typeVer' type='unsigned long *' info='return value for the version of the hypervisor (OUT)'/>
</function> </function>
<function name='virInitialize' file='libvirt' module='libvirt'>
<info>Initialize the library. It&apos;s better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</info>
<return type='int' info='0 in case of success, -1 in case of error'/>
</function>
<function name='virNodeGetInfo' file='libvirt' module='libvirt'>
<info>Extract hardware information about the node.</info>
<return type='int' info='0 in case of success and -1 in case of failure.'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='info' type='virNodeInfoPtr' info='pointer to a virNodeInfo structure allocated by the user'/>
</function>
<function name='virResetError' file='virterror' module='virterror'>
<info>Reset the error being pointed to</info>
<return type='void'/>
<arg name='err' type='virErrorPtr' info='pointer to the virError to clean up'/>
</function>
<function name='virResetLastError' file='virterror' module='virterror'>
<info>Reset the last error caught at the library level.</info>
<return type='void'/>
</function>
<function name='virSetErrorFunc' file='virterror' module='virterror'>
<info>Set a library global error handling function, if @handler is NULL, it will reset to default printing on stderr. The error raised there are those for which no handler at the connection level could caught.</info>
<return type='void'/>
<arg name='userData' type='void *' info='pointer to the user data provided in the handler callback'/>
<arg name='handler' type='virErrorFunc' info='the function to get called in case of error or NULL'/>
</function>
</symbols> </symbols>
</api> </api>

File diff suppressed because it is too large Load Diff

View File

@ -38,7 +38,7 @@ img
#pageHeader #pageHeader
{ {
position: absolute; position: absolute;
background: url(libvirHeader.png) center no-repeat; background: url(libvirtHeader.png) center no-repeat;
top: 30px; top: 30px;
height: 76px; height: 76px;
width: 766px; width: 766px;
@ -70,7 +70,7 @@ img
{ {
font-size: 11px; font-size: 11px;
height: 300px; height: 300px;
background: url(libvirLogo.png) center no-repeat; background: url(libvirtLogo.png) center no-repeat;
margin: 0; margin: 0;
width: 766px; width: 766px;
} }

View File

@ -1,127 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<api name='libxen'>
<files>
<file name='libxen'>
<exports symbol='XEN_DOMAIN_NONE' type='enum'/>
<exports symbol='xenDomain' type='typedef'/>
<exports symbol='xenDomainFlags' type='typedef'/>
<exports symbol='xenConnectPtr' type='typedef'/>
<exports symbol='xenDomainPtr' type='typedef'/>
<exports symbol='xenConnect' type='typedef'/>
<exports symbol='xenDomainResume' type='function'/>
<exports symbol='xenDomainLookupByID' type='function'/>
<exports symbol='xenConnectOpenReadOnly' type='function'/>
<exports symbol='xenDomainGetName' type='function'/>
<exports symbol='xenDomainGetMaxMemory' type='function'/>
<exports symbol='xenDomainGetID' type='function'/>
<exports symbol='xenConnectOpen' type='function'/>
<exports symbol='xenDomainSetMaxMemory' type='function'/>
<exports symbol='xenDomainDestroy' type='function'/>
<exports symbol='xenDomainSuspend' type='function'/>
<exports symbol='xenConnectClose' type='function'/>
<exports symbol='xenDomainCreateLinux' type='function'/>
<exports symbol='xenDomainLookupByName' type='function'/>
<exports symbol='xenConnectGetVersion' type='function'/>
</file>
<file name='internal'>
<exports symbol='ATTRIBUTE_UNUSED' type='macro'/>
<exports symbol='TODO' type='macro'/>
</file>
</files>
<symbols>
<macro name='ATTRIBUTE_UNUSED' file='internal'>
<info>Macro to flag conciously unused parameters to functions</info>
</macro>
<macro name='TODO' file='internal'>
<info>macro to flag unimplemented blocks</info>
</macro>
<enum name='XEN_DOMAIN_NONE' file='libxen' value='0' type='xenDomainFlags'/>
<struct name='xenConnect' file='libxen' type='struct _xenConnect'/>
<typedef name='xenConnectPtr' file='libxen' type='xenConnect *'>
<info>a xenConnectPtr is pointer to a xenConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.</info>
</typedef>
<struct name='xenDomain' file='libxen' type='struct _xenDomain'/>
<typedef name='xenDomainFlags' file='libxen' type='enum'/>
<typedef name='xenDomainPtr' file='libxen' type='xenDomain *'>
<info>a xenDomainPtr is pointer to a xenDomain private structure, this is the type used to reference a Xen domain in the API.</info>
</typedef>
<function name='xenConnectClose' file='libxen' module='libxen'>
<info>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</info>
<return type='int' info='0 in case of success or -1 in case of error.'/>
<arg name='conn' type='xenConnectPtr' info='pointer to the hypervisor connection'/>
</function>
<function name='xenConnectGetVersion' file='libxen' module='libxen'>
<info>Get the version level of the Hypervisor running.</info>
<return type='unsigned long' info='-1 in case of error or major * 10,000 + minor * 100 + rev otherwise'/>
<arg name='conn' type='xenConnectPtr' info='pointer to the hypervisor connection'/>
</function>
<function name='xenConnectOpen' file='libxen' module='libxen'>
<info>This function should be called first to get a connection to the Hypervisor and xen store</info>
<return type='xenConnectPtr' info='a pointer to the hypervisor connection or NULL in case of error'/>
<arg name='name' type='const char *' info='optional argument currently unused, pass NULL'/>
</function>
<function name='xenConnectOpenReadOnly' file='libxen' module='libxen'>
<info>This function should be called first to get a read-only connection to the xen store. The set of APIs usable are then restricted.</info>
<return type='xenConnectPtr' info='a pointer to the hypervisor connection or NULL in case of error'/>
<arg name='name' type='const char *' info='optional argument currently unused, pass NULL'/>
</function>
<function name='xenDomainCreateLinux' file='libxen' module='libxen'>
<info>Launch a new Linux guest domain</info>
<return type='xenDomainPtr' info='a new domain object or NULL in case of failure'/>
<arg name='conn' type='xenConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='kernel_path' type='const char *' info='the file path to the kernel image'/>
<arg name='initrd_path' type='const char *' info='an optional file path to an initrd'/>
<arg name='cmdline' type='const char *' info='optional command line parameters for the kernel'/>
<arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
<arg name='flags' type='unsigned int' info='an optional set of xenDomainFlags'/>
</function>
<function name='xenDomainDestroy' file='libxen' module='libxen'>
<info>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor.</info>
<return type='int' info='0 in case of success and -1 in case of failure.'/>
<arg name='domain' type='xenDomainPtr' info='a domain object'/>
</function>
<function name='xenDomainGetID' file='libxen' module='libxen'>
<info>Get the hypervisor ID number for the domain</info>
<return type='unsigned int' info='the domain ID number or (unsigned int) -1 in case of error'/>
<arg name='domain' type='xenDomainPtr' info='a domain object'/>
</function>
<function name='xenDomainGetMaxMemory' file='libxen' module='libxen'>
<info>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</info>
<return type='unsigned long' info='the memory size in kilobytes or 0 in case of error.'/>
<arg name='domain' type='xenDomainPtr' info='a domain object or NULL'/>
</function>
<function name='xenDomainGetName' file='libxen' module='libxen'>
<info>Get the public name for that domain</info>
<return type='const char *' info='a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.'/>
<arg name='domain' type='xenDomainPtr' info='a domain object'/>
</function>
<function name='xenDomainLookupByID' file='libxen' module='libxen'>
<info>Try to find a domain based on the hypervisor ID number</info>
<return type='xenDomainPtr' info='a new domain object or NULL in case of failure'/>
<arg name='conn' type='xenConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='id' type='int' info='the domain ID number'/>
</function>
<function name='xenDomainLookupByName' file='libxen' module='libxen'>
<info>Try to lookup a domain on the given hypervisor</info>
<return type='xenDomainPtr' info='a new domain object or NULL in case of failure'/>
<arg name='conn' type='xenConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='name' type='const char *' info='name for the domain'/>
</function>
<function name='xenDomainResume' file='libxen' module='libxen'>
<info>Resume an suspended domain, the process is restarted from the state where it was frozen by calling xenSuspendDomain().</info>
<return type='int' info='0 in case of success and -1 in case of failure.'/>
<arg name='domain' type='xenDomainPtr' info='a domain object'/>
</function>
<function name='xenDomainSetMaxMemory' file='libxen' module='libxen'>
<info>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs.</info>
<return type='int' info='0 in case of success and -1 in case of failure.'/>
<arg name='domain' type='xenDomainPtr' info='a domain object or NULL'/>
<arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
</function>
<function name='xenDomainSuspend' file='libxen' module='libxen'>
<info>Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use xenDomainResume() to reactivate the domain.</info>
<return type='int' info='0 in case of success and -1 in case of failure.'/>
<arg name='domain' type='xenDomainPtr' info='a domain object'/>
</function>
</symbols>
</api>

View File

@ -1,741 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<apirefs name='libxen'>
<references>
<reference name='ATTRIBUTE_UNUSED' href='html/libxen-internal.html#ATTRIBUTE_UNUSED'/>
<reference name='TODO' href='html/libxen-internal.html#TODO'/>
<reference name='XEN_DOMAIN_NONE' href='html/libxen-libxen.html#XEN_DOMAIN_NONE'/>
<reference name='xenConnect' href='html/libxen-libxen.html#xenConnect'/>
<reference name='xenConnectClose' href='html/libxen-libxen.html#xenConnectClose'/>
<reference name='xenConnectGetVersion' href='html/libxen-libxen.html#xenConnectGetVersion'/>
<reference name='xenConnectOpen' href='html/libxen-libxen.html#xenConnectOpen'/>
<reference name='xenConnectOpenReadOnly' href='html/libxen-libxen.html#xenConnectOpenReadOnly'/>
<reference name='xenConnectPtr' href='html/libxen-libxen.html#xenConnectPtr'/>
<reference name='xenDomain' href='html/libxen-libxen.html#xenDomain'/>
<reference name='xenDomainCreateLinux' href='html/libxen-libxen.html#xenDomainCreateLinux'/>
<reference name='xenDomainDestroy' href='html/libxen-libxen.html#xenDomainDestroy'/>
<reference name='xenDomainFlags' href='html/libxen-libxen.html#xenDomainFlags'/>
<reference name='xenDomainGetID' href='html/libxen-libxen.html#xenDomainGetID'/>
<reference name='xenDomainGetMaxMemory' href='html/libxen-libxen.html#xenDomainGetMaxMemory'/>
<reference name='xenDomainGetName' href='html/libxen-libxen.html#xenDomainGetName'/>
<reference name='xenDomainLookupByID' href='html/libxen-libxen.html#xenDomainLookupByID'/>
<reference name='xenDomainLookupByName' href='html/libxen-libxen.html#xenDomainLookupByName'/>
<reference name='xenDomainPtr' href='html/libxen-libxen.html#xenDomainPtr'/>
<reference name='xenDomainResume' href='html/libxen-libxen.html#xenDomainResume'/>
<reference name='xenDomainSetMaxMemory' href='html/libxen-libxen.html#xenDomainSetMaxMemory'/>
<reference name='xenDomainSuspend' href='html/libxen-libxen.html#xenDomainSuspend'/>
</references>
<alpha>
<letter name='A'>
<ref name='ATTRIBUTE_UNUSED'/>
</letter>
<letter name='T'>
<ref name='TODO'/>
</letter>
<letter name='X'>
<ref name='XEN_DOMAIN_NONE'/>
</letter>
<letter name='x'>
<ref name='xenConnect'/>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenConnectPtr'/>
<ref name='xenDomain'/>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainFlags'/>
<ref name='xenDomainGetID'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainGetName'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
<ref name='xenDomainPtr'/>
<ref name='xenDomainResume'/>
<ref name='xenDomainSetMaxMemory'/>
<ref name='xenDomainSuspend'/>
</letter>
</alpha>
<constructors>
<type name='unsigned int'>
<ref name='xenDomainGetID'/>
</type>
<type name='unsigned long'>
<ref name='xenConnectGetVersion'/>
<ref name='xenDomainGetMaxMemory'/>
</type>
<type name='xenConnectPtr'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</type>
<type name='xenDomainPtr'>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
</type>
</constructors>
<functions>
<type name='unsigned int'>
<ref name='xenDomainCreateLinux'/>
</type>
<type name='unsigned long'>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainSetMaxMemory'/>
</type>
<type name='xenConnectPtr'>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
</type>
<type name='xenDomainPtr'>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainGetID'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainGetName'/>
<ref name='xenDomainResume'/>
<ref name='xenDomainSetMaxMemory'/>
<ref name='xenDomainSuspend'/>
</type>
</functions>
<files>
<file name='libxen'>
<ref name='XEN_DOMAIN_NONE'/>
<ref name='xenConnect'/>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenConnectPtr'/>
<ref name='xenDomain'/>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainFlags'/>
<ref name='xenDomainGetID'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainGetName'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
<ref name='xenDomainPtr'/>
<ref name='xenDomainResume'/>
<ref name='xenDomainSetMaxMemory'/>
<ref name='xenDomainSuspend'/>
</file>
<file name='internal'>
<ref name='ATTRIBUTE_UNUSED'/>
<ref name='TODO'/>
</file>
</files>
<index>
<chunk name='chunk0'>
<letter name='A'>
<word name='APIs'>
<ref name='xenConnectOpenReadOnly'/>
</word>
</letter>
<letter name='C'>
<word name='CPU'>
<ref name='xenDomainSuspend'/>
</word>
</letter>
<letter name='D'>
<word name='Destroy'>
<ref name='xenDomainDestroy'/>
</word>
<word name='Domain0'>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='Dynamically'>
<ref name='xenDomainSetMaxMemory'/>
</word>
</letter>
<letter name='G'>
<word name='Get'>
<ref name='xenConnectGetVersion'/>
<ref name='xenDomainGetID'/>
<ref name='xenDomainGetName'/>
</word>
</letter>
<letter name='H'>
<word name='Hypervisor'>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenConnectOpen'/>
</word>
</letter>
<letter name='L'>
<word name='Launch'>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='Linux'>
<ref name='xenDomainCreateLinux'/>
</word>
</letter>
<letter name='M'>
<word name='Macro'>
<ref name='ATTRIBUTE_UNUSED'/>
</word>
</letter>
<letter name='N'>
<word name='NULL'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainGetName'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
</letter>
<letter name='R'>
<word name='Resume'>
<ref name='xenDomainResume'/>
</word>
<word name='Retrieve'>
<ref name='xenDomainGetMaxMemory'/>
</word>
</letter>
<letter name='S'>
<word name='Suspends'>
<ref name='xenDomainSuspend'/>
</word>
</letter>
<letter name='T'>
<word name='This'>
<ref name='xenConnectClose'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='Try'>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
</word>
</letter>
<letter name='U'>
<word name='Use'>
<ref name='xenDomainSuspend'/>
</word>
</letter>
<letter name='a'>
<word name='access'>
<ref name='xenDomainSuspend'/>
</word>
<word name='active'>
<ref name='xenDomainSuspend'/>
</word>
<word name='all'>
<ref name='xenDomainDestroy'/>
</word>
<word name='allocated'>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='already'>
<ref name='xenDomainDestroy'/>
</word>
<word name='amount'>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='application'>
<ref name='xenConnectClose'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='are'>
<ref name='xenConnectClose'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainDestroy'/>
</word>
<word name='argument'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
</letter>
<letter name='b'>
<word name='back'>
<ref name='xenDomainDestroy'/>
</word>
<word name='based'>
<ref name='xenDomainLookupByID'/>
</word>
<word name='blocks'>
<ref name='TODO'/>
</word>
<word name='but'>
<ref name='xenDomainSuspend'/>
</word>
</letter>
<letter name='c'>
<word name='called'>
<ref name='xenConnectClose'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='calling'>
<ref name='xenDomainResume'/>
</word>
<word name='case'>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainGetID'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
<ref name='xenDomainResume'/>
<ref name='xenDomainSetMaxMemory'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='change'>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='closes'>
<ref name='xenConnectClose'/>
</word>
<word name='command'>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='conciously'>
<ref name='ATTRIBUTE_UNUSED'/>
</word>
<word name='connection'>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
</word>
<word name='currently'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
</letter>
<letter name='d'>
<word name='deallocated'>
<ref name='xenDomainGetName'/>
</word>
<word name='down'>
<ref name='xenDomainDestroy'/>
</word>
</letter>
<letter name='e'>
<word name='error'>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainGetID'/>
<ref name='xenDomainGetMaxMemory'/>
</word>
<word name='especially'>
<ref name='xenConnectClose'/>
</word>
</letter>
<letter name='f'>
<word name='failure'>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
<ref name='xenDomainResume'/>
<ref name='xenDomainSetMaxMemory'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='file'>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='find'>
<ref name='xenDomainLookupByID'/>
</word>
<word name='first'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='flag'>
<ref name='ATTRIBUTE_UNUSED'/>
<ref name='TODO'/>
</word>
<word name='for'>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainGetID'/>
<ref name='xenDomainGetName'/>
<ref name='xenDomainLookupByName'/>
</word>
<word name='from'>
<ref name='xenDomainResume'/>
</word>
<word name='frozen'>
<ref name='xenDomainResume'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='function'>
<ref name='xenConnectClose'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='functions'>
<ref name='ATTRIBUTE_UNUSED'/>
</word>
<word name='further'>
<ref name='xenConnectClose'/>
<ref name='xenDomainSuspend'/>
</word>
</letter>
<letter name='g'>
<word name='get'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainGetMaxMemory'/>
</word>
<word name='given'>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainLookupByName'/>
</word>
<word name='guest'>
<ref name='xenDomainCreateLinux'/>
</word>
</letter>
<letter name='h'>
<word name='hypervisor'>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainGetID'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
<ref name='xenDomainSuspend'/>
</word>
</letter>
<letter name='i'>
<word name='image'>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='initrd'>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='instance'>
<ref name='xenDomainDestroy'/>
</word>
<word name='int'>
<ref name='xenDomainGetID'/>
</word>
<word name='interaction'>
<ref name='xenConnectClose'/>
</word>
<word name='its'>
<ref name='xenDomainGetName'/>
</word>
</letter>
<letter name='k'>
<word name='kernel'>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='kilobytes'>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
</letter>
<letter name='l'>
<word name='level'>
<ref name='xenConnectGetVersion'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='lifetime'>
<ref name='xenDomainGetName'/>
</word>
<word name='line'>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='lookup'>
<ref name='xenDomainLookupByName'/>
</word>
</letter>
<letter name='m'>
<word name='macro'>
<ref name='TODO'/>
</word>
<word name='major'>
<ref name='xenConnectGetVersion'/>
</word>
<word name='maximum'>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='memory'>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='minor'>
<ref name='xenConnectGetVersion'/>
</word>
<word name='monitoring'>
<ref name='xenConnectClose'/>
</word>
</letter>
<letter name='n'>
<word name='name'>
<ref name='xenDomainGetName'/>
<ref name='xenDomainLookupByName'/>
</word>
<word name='need'>
<ref name='xenConnectClose'/>
<ref name='xenDomainGetName'/>
</word>
<word name='needed'>
<ref name='xenConnectClose'/>
</word>
<word name='new'>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
</word>
<word name='not'>
<ref name='xenConnectClose'/>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainGetName'/>
</word>
<word name='number'>
<ref name='xenDomainGetID'/>
<ref name='xenDomainLookupByID'/>
</word>
</letter>
<letter name='o'>
<word name='object'>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainGetID'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainGetName'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
<ref name='xenDomainResume'/>
<ref name='xenDomainSetMaxMemory'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='optional'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='otherwise'>
<ref name='xenConnectGetVersion'/>
</word>
</letter>
<letter name='p'>
<word name='parameters'>
<ref name='ATTRIBUTE_UNUSED'/>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='pass'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='path'>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='physical'>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='pointer'>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainGetName'/>
<ref name='xenDomainLookupByID'/>
<ref name='xenDomainLookupByName'/>
</word>
<word name='process'>
<ref name='xenDomainResume'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='public'>
<ref name='xenDomainGetName'/>
</word>
</letter>
</chunk>
<chunk name='chunk1'>
<letter name='r'>
<word name='reactivate'>
<ref name='xenDomainSuspend'/>
</word>
<word name='read-only'>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='reserved'>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='resources'>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='restarted'>
<ref name='xenDomainResume'/>
</word>
<word name='restricted'>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='rev'>
<ref name='xenConnectGetVersion'/>
</word>
<word name='running'>
<ref name='xenConnectClose'/>
<ref name='xenConnectGetVersion'/>
<ref name='xenDomainDestroy'/>
</word>
<word name='runs'>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
</letter>
<letter name='s'>
<word name='same'>
<ref name='xenDomainGetName'/>
</word>
<word name='set'>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='should'>
<ref name='xenConnectClose'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='shutdown'>
<ref name='xenDomainDestroy'/>
</word>
<word name='size'>
<ref name='xenDomainCreateLinux'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='state'>
<ref name='xenDomainResume'/>
</word>
<word name='stay'>
<ref name='xenDomainSuspend'/>
</word>
<word name='store'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='string'>
<ref name='xenDomainGetName'/>
</word>
<word name='success'>
<ref name='xenConnectClose'/>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainResume'/>
<ref name='xenDomainSetMaxMemory'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='suspended'>
<ref name='xenDomainResume'/>
</word>
</letter>
<letter name='t'>
<word name='that'>
<ref name='xenDomainGetName'/>
</word>
<word name='then'>
<ref name='xenConnectOpenReadOnly'/>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='there'>
<ref name='xenConnectClose'/>
</word>
<word name='this'>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
</letter>
<letter name='u'>
<word name='unimplemented'>
<ref name='TODO'/>
</word>
<word name='unsigned'>
<ref name='xenDomainGetID'/>
</word>
<word name='unused'>
<ref name='ATTRIBUTE_UNUSED'/>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='usable'>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='used'>
<ref name='xenDomainDestroy'/>
<ref name='xenDomainSuspend'/>
</word>
</letter>
<letter name='v'>
<word name='version'>
<ref name='xenConnectGetVersion'/>
</word>
</letter>
<letter name='w'>
<word name='was'>
<ref name='xenDomainResume'/>
</word>
<word name='where'>
<ref name='xenDomainGetMaxMemory'/>
<ref name='xenDomainResume'/>
<ref name='xenDomainSetMaxMemory'/>
</word>
<word name='which'>
<ref name='xenConnectClose'/>
</word>
<word name='will'>
<ref name='xenDomainGetName'/>
<ref name='xenDomainSuspend'/>
</word>
<word name='with'>
<ref name='xenConnectClose'/>
</word>
<word name='without'>
<ref name='xenDomainSuspend'/>
</word>
</letter>
<letter name='x'>
<word name='xen'>
<ref name='xenConnectOpen'/>
<ref name='xenConnectOpenReadOnly'/>
</word>
<word name='xenDomainFlags'>
<ref name='xenDomainCreateLinux'/>
</word>
<word name='xenDomainResume'>
<ref name='xenDomainSuspend'/>
</word>
<word name='xenSuspendDomain'>
<ref name='xenDomainResume'/>
</word>
</letter>
</chunk>
<chunks>
<chunk name='chunk0' start='A' end='p'/>
<chunk name='chunk1' start='r' end='x'/>
</chunks>
</index>
</apirefs>

View File

@ -1,8 +1,42 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Releases</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Releases</h1><p>Here is the list of official releases, however since it is early on in the <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Releases</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Releases</h1><p>Here is the list of official releases, however since it is early on in the
development of libvir, it is preferable when possible to just use the <a href="downloads.html">CVS version or snapshot</a>, contact the mailing list development of libvirt, it is preferable when possible to just use the <a href="downloads.html">CVS version or snapshot</a>, contact the mailing list
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3>0.0.2: Jan 29 2006</h3><ul><li>Update of the documentation, web site redesign (Diana Fong)</li> and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3>0.1.0: Apr 10 2006</h3><ul><li>building fixes: --with-xen-distdir option (Ronald Aigner), out of tree
build and pkginfo cflag fix (Daniel Berrange)</li>
<li>enhancement and fixes of the XML description format (David Lutterkort
and Jim Fehlig)</li>
<li>new APIs: for Node information and Reboot</li>
<li>internal code cleanup: refactoring internals into a driver model, more
error handling, structure sharing, thread safety and ref counting</li>
<li>bug fixes: error message (Jim Meyering), error allocation in virsh (Jim
Meyering), virDomainLookupByID (Jim Fehlig), </li>
<li>documentation: updates on architecture, and format, typo fix (Jim
Meyering)</li>
<li>bindings: exception handling in examples (Jim Meyering), perl ones out
of tree (Daniel Berrange)</li>
<li>virsh: more options, create, nodeinfo (Karel Zak), renaming of some
options (Karel Zak), use stderr only for errors (Karel Zak), man page
(Andrew Puch)</li>
</ul><h3>0.0.6: Feb 28 2006</h3><ul><li>add UUID lookup and extract API</li>
<li>add error handling APIs both synchronous and asynchronous</li>
<li>added minimal hook for error handling at the python level, improved the
python bindings</li>
<li>augment the documentation and tests to cover error handling</li>
</ul><h3>0.0.5: Feb 23 2006</h3><ul><li>Added XML description parsing, dependance to libxml2, implemented the
creation API virDomainCreateLinux()</li>
<li>new APIs to lookup and name domain by UUID</li>
<li>fixed the XML dump when using the Xend access</li>
<li>Fixed a few more problem related to the name change</li>
<li>Adding regression tests in python and examples in C</li>
<li>web site improvement, extended the documentation to cover the XML
format and Python API</li>
<li>Added devhelp help for Gnome/Gtk programmers</li>
</ul><h3>0.0.4: Feb 10 2006</h3><ul><li>Fix various bugs introduced in the name change</li>
</ul><h3>0.0.3: Feb 9 2006</h3><ul><li>Switch name from from 'libvir' to libvirt</li>
<li>Starting infrastructure to add code examples</li>
<li>Update of python bindings for completeness</li>
</ul><h3>0.0.2: Jan 29 2006</h3><ul><li>Update of the documentation, web site redesign (Diana Fong)</li>
<li>integration of HTTP xend RPC based on libxend by Anthony Liquori for <li>integration of HTTP xend RPC based on libxend by Anthony Liquori for
most operations</li> most operations</li>
<li>Adding Save and Restore APIs</li> <li>Adding Save and Restore APIs</li>
@ -12,4 +46,4 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3
</ul><h3>0.0.1: Dec 19 2005</h3><ul><li>First release</li> </ul><h3>0.0.1: Dec 19 2005</h3><ul><li>First release</li>
<li>Basic management of existing Xen domains</li> <li>Basic management of existing Xen domains</li>
<li>Minimal autogenerated Python bindings</li> <li>Minimal autogenerated Python bindings</li>
</ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html> </ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

53
docs/python.html Normal file
View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Binding for Python</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Binding for Python</h1><p>Libvirt comes with direct support for the Python language (just make sure
you installed the libvirt-python package if not compiling from sources). Also
note that Daniel Berrange provides <a href="http://hg.berrange.com/libraries/sys-virt">bindings for Perl</a>
too.</p><p>The Python binding should be complete and are mostly automatically
generated from the formal description of the API in xml. The bindings are
articulated around 2 classes <code>virConnect</code> and virDomain mapping to
the C types. Functions in the C API taking either type as argument then
becomes methods for the classes, their name is just stripped from the
virConnect or virDomain(Get) prefix and the first letter gets converted to
lower case, for example the C functions:</p><p><code>int <a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
(virConnectPtr conn);</code></p><p><code>int <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
(virDomainPtr domain, unsigned long memory);</code></p><p>become</p><p><code>virConn::numOfDomains(self)</code></p><p><code>virDomain::setMaxMemory(self, memory)</code></p><p>This process is fully automated, you can get a summary of the conversion
in the file libvirtclass.txt present in the python dir or in the docs.There
is a couple of function who don't map directly to their C counterparts due to
specificities in their argument conversions:</p><ul><li><code><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a></code>
is replaced by <code>virDomain::listDomainsID(self)</code> which returns
a list of the integer ID for the currently running domains</li>
<li><code><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a></code>
is replaced by <code>virDomain::info()</code> which returns a list of
<ol><li>state: one of the state values (virDomainState)</li>
<li>maxMemory: the maximum memory used by the domain</li>
<li>memory: the current amount of memory used by the domain</li>
<li>nbVirtCPU: the number of virtual CPU</li>
<li>cpuTime: the time used by the domain in nanoseconds</li>
</ol></li>
</ul><p>So let's look at a simple example inspired from the <code>basic.py</code>
test found in <code>python/tests/</code> in the source tree:</p><pre>import <span style="color: #0071FF; background-color: #FFFFFF">libvirt</span>
import sys
conn = <span style="color: #0071FF; background-color: #FFFFFF">libvirt</span>.openReadOnly(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
try:
dom0 = conn.<span style="color: #007F00; background-color: #FFFFFF">lookupByName</span>("Domain-0")
except:
print 'Failed to find the main domain'
sys.exit(1)
print "Domain 0: id %d running %s" % (dom0.<span style="color: #FF0080; background-color: #FFFFFF">ID</span>(), dom0.<span style="color: #FF0080; background-color: #FFFFFF">OSType</span>())
print dom0.<span style="color: #FF0080; background-color: #FFFFFF">info</span>()</pre><p>There is not much to comment about it, it really is a straight mapping
from the C API, the only points to notice are:</p><ul><li>the import of the module called <code><span style="color: #0071FF; background-color: #FFFFFF">libvirt</span></code></li>
<li>getting a connection to the hypervisor, in that case using the
openReadOnly function allows the code to execute as a normal user.</li>
<li>getting an object representing the Domain 0 using <span style="color: #007F00; background-color: #FFFFFF">lookupByName</span></li>
<li>if the domain is not found a libvirtError exception will be raised</li>
<li>extracting and printing some informations about the domain using
various <span style="color: #E50073; background-color: #FFFFFF">methods</span>
associated to the virDomain class.</li>
</ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Binding for Python</a></li><li><a href="errors.html">Handling of errors</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="html/index.html">API Menu</a></li><li><a href="examples/index.html">C code examples</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="libvir.css" /> <link rel="stylesheet" type="text/css" href="libvirt.css" />
<link rel="SHORTCUT ICON" href="/32favicon.png" /> <link rel="SHORTCUT ICON" href="/32favicon.png" />
<title>Search the documentation on Libvir.org</title> <title>Search the documentation on Libvir.org</title>
</head> </head>
@ -28,7 +28,7 @@
$scope = "any"; $scope = "any";
?> ?>
<p> The search service indexes the libvir APIs and documentation as well as the libvir-list@redhat.com mailing-list archives. To use it simply provide a set of keywords: <p> The search service indexes the libvirt APIs and documentation as well as the libvir-list@redhat.com mailing-list archives. To use it simply provide a set of keywords:
<p> <p>
<form action="<?php echo "$PHP_SELF", "?query=", rawurlencode($query) ?>" <form action="<?php echo "$PHP_SELF", "?query=", rawurlencode($query) ?>"
enctype="application/x-www-form-urlencoded" method="GET"> enctype="application/x-www-form-urlencoded" method="GET">
@ -91,7 +91,7 @@
$result = NULL; $result = NULL;
$j = 0; $j = 0;
if ($word) { if ($word) {
$result = mysql_query ("SELECT wordsArchive.relevance, wordsArchive.name, 'xml-list', archives.resource, archives.title FROM wordsArchive, archives WHERE LCASE(wordsArchive.name) LIKE LCASE('$word') and wordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75"); $result = mysql_query ("SELECT wordsArchive.relevance, wordsArchive.name, 'libvir-list', archives.resource, archives.title FROM wordsArchive, archives WHERE LCASE(wordsArchive.name) LIKE LCASE('$word') and wordsArchive.ID = archives.ID ORDER BY relevance DESC LIMIT 75");
if ($result) { if ($result) {
$j = mysql_num_rows($result); $j = mysql_num_rows($result);
if ($j == 0) if ($j == 0)
@ -135,7 +135,7 @@
} else { } else {
$id = $name; $id = $name;
$m = strtolower($module); $m = strtolower($module);
$url = "html/libvir-$module.html#$id"; $url = "html/libvirt-$module.html#$id";
$results[$name] = array($relevance,$type, $results[$name] = array($relevance,$type,
$module, $desc, $name, $url); $module, $desc, $name, $url);
} }
@ -180,7 +180,7 @@
$id = $name; $id = $name;
$m = strtolower($module); $m = strtolower($module);
$u = str_replace( $u = str_replace(
"http://mail.gnome.org/archives/xml/", "", $url); "http://www.redhat.com/archives/libvir-list/", "", $url);
$results[$url] = array($relevance,$type, $results[$url] = array($relevance,$type,
$u, $desc, $name, $url); $u, $desc, $name, $url);
} }
@ -207,7 +207,7 @@
} else { } else {
$id = $name; $id = $name;
$m = strtolower($module); $m = strtolower($module);
$url = "html/libvir-$module.html#$id"; $url = "html/libvirt-$module.html#$id";
$results[$name] = array($relevance,$type, $results[$name] = array($relevance,$type,
$module, $desc, $name, $url); $module, $desc, $name, $url);
} }
@ -258,7 +258,7 @@
<a href="intro.html">Introduction</a> <a href="intro.html">Introduction</a>
</li> </li>
<li> <li>
<a href="architecture.html">libvir architecture</a> <a href="architecture.html">libvirt architecture</a>
</li> </li>
<li> <li>
<a href="downloads.html">Downloads</a> <a href="downloads.html">Downloads</a>

View File

@ -9,104 +9,6 @@
<!-- <!--
- returns the filename associated to an ID in the original file - returns the filename associated to an ID in the original file
--> -->
<xsl:template name="tocfilename">
<xsl:param name="name" select="string(@href)"/>
<xsl:choose>
<xsl:when test="$name = '#Introducti'">
<xsl:text>intro.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Documentat'">
<xsl:text>docs.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Reporting'">
<xsl:text>bugs.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#help'">
<xsl:text>help.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Help'">
<xsl:text>help.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Downloads'">
<xsl:text>downloads.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#News'">
<xsl:text>news.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Contributi'">
<xsl:text>contribs.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#xsltproc'">
<xsl:text>xsltproc2.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#API'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#XSLT'">
<xsl:text>XSLT.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#XML'">
<xsl:text>XMLinfo.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Validation'">
<xsl:text>xmldtd.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#tree'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#library'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#interface'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Example'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Entities'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#architecture'">
<xsl:text>architecture.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Namespaces'">
<xsl:text>namespaces.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#DOM'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Catalog'">
<xsl:text>catalog.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Upgrading'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Encodings'">
<xsl:text>encoding.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#IO'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Memory'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Thread'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#FAQ'">
<xsl:text>FAQ.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Python'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = ''">
<xsl:text>unknown.html</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="filename"> <xsl:template name="filename">
<xsl:param name="name" select="string(@href)"/> <xsl:param name="name" select="string(@href)"/>
<xsl:choose> <xsl:choose>
@ -125,6 +27,9 @@
<xsl:when test="$name = '#Help'"> <xsl:when test="$name = '#Help'">
<xsl:text>help.html</xsl:text> <xsl:text>help.html</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$name = '#Errors'">
<xsl:text>errors.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Downloads'"> <xsl:when test="$name = '#Downloads'">
<xsl:text>downloads.html</xsl:text> <xsl:text>downloads.html</xsl:text>
</xsl:when> </xsl:when>
@ -134,69 +39,18 @@
<xsl:when test="$name = '#Contributi'"> <xsl:when test="$name = '#Contributi'">
<xsl:text>contribs.html</xsl:text> <xsl:text>contribs.html</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$name = '#xsltproc'"> <xsl:when test="$name = '#Format'">
<xsl:text>xsltproc2.html</xsl:text> <xsl:text>format.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#API'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#XSLT'">
<xsl:text>XSLT.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#XML'">
<xsl:text>XMLinfo.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Validation'">
<xsl:text>xmldtd.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#tree'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#library'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#interface'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Example'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Entities'">
<xsl:text></xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$name = '#architecture'"> <xsl:when test="$name = '#architecture'">
<xsl:text>architecture.html</xsl:text> <xsl:text>architecture.html</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$name = '#Namespaces'"> <xsl:when test="$name = '#Python'">
<xsl:text>namespaces.html</xsl:text> <xsl:text>python.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#DOM'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Catalog'">
<xsl:text>catalog.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#Upgrading'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Encodings'">
<xsl:text>encoding.html</xsl:text>
</xsl:when>
<xsl:when test="$name = '#IO'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Memory'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = '#Thread'">
<xsl:text></xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$name = '#FAQ'"> <xsl:when test="$name = '#FAQ'">
<xsl:text>FAQ.html</xsl:text> <xsl:text>FAQ.html</xsl:text>
</xsl:when> </xsl:when>
<xsl:when test="$name = '#Python'">
<xsl:text></xsl:text>
</xsl:when>
<xsl:when test="$name = ''"> <xsl:when test="$name = ''">
<xsl:text>unknown.html</xsl:text> <xsl:text>unknown.html</xsl:text>
</xsl:when> </xsl:when>
@ -221,7 +75,7 @@
<li>Home</li> <li>Home</li>
<xsl:for-each select="/html/body/h2"> <xsl:for-each select="/html/body/h2">
<xsl:variable name="filename"> <xsl:variable name="filename">
<xsl:call-template name="tocfilename"> <xsl:call-template name="filename">
<xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/> <xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
@ -239,8 +93,8 @@
</li> </li>
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>
<li><a style="font-weight:bold" <li><a href="{$href_base}html/index.html">API Menu</a></li>
href="{$href_base}html/index.html">API Menu</a></li> <li><a href="{$href_base}examples/index.html">C code examples</a></li>
<li><a href="{$href_base}ChangeLog.html">Recent Changes</a></li> <li><a href="{$href_base}ChangeLog.html">Recent Changes</a></li>
</ul> </ul>
@ -249,8 +103,10 @@
<h3 class="links"><span>related links</span></h3> <h3 class="links"><span>related links</span></h3>
<ul> <ul>
<li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li> <li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li>
<li> <a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li>
<li> <a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li>
<li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li> <li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li>
<li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"> <li><form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">
<input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /> <input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" />
</form></li> </form></li>
<li><a href="http://xmlsoft.org/"> <img src="{$href_base}Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li> <li><a href="http://xmlsoft.org/"> <img src="{$href_base}Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li>
@ -267,7 +123,7 @@
<li><a href="{$href_base}index.html">Home</a></li> <li><a href="{$href_base}index.html">Home</a></li>
<xsl:for-each select="/html/body/h2"> <xsl:for-each select="/html/body/h2">
<xsl:variable name="filename"> <xsl:variable name="filename">
<xsl:call-template name="tocfilename"> <xsl:call-template name="filename">
<xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/> <xsl:with-param name="name" select="concat('#', string(a[1]/@name))"/>
</xsl:call-template> </xsl:call-template>
</xsl:variable> </xsl:variable>
@ -285,8 +141,8 @@
</li> </li>
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>
<li><a style="font-weight:bold" <li><a href="{$href_base}html/index.html">API Menu</a></li>
href="{$href_base}html/index.html">API Menu</a></li> <li><a href="{$href_base}examples/index.html">C code examples</a></li>
<li><a href="{$href_base}ChangeLog.html">Recent Changes</a></li> <li><a href="{$href_base}ChangeLog.html">Recent Changes</a></li>
</ul> </ul>
@ -295,8 +151,10 @@
<h3 class="links2"><span>related links</span></h3> <h3 class="links2"><span>related links</span></h3>
<ul> <ul>
<li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li> <li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li>
<li> <a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li>
<li> <a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li>
<li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li> <li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li>
<li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"> <li><form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">
<input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /> <input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" />
</form></li> </form></li>
<li><a href="http://xmlsoft.org/"> <img src="{$href_base}Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li> <li><a href="http://xmlsoft.org/"> <img src="{$href_base}Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li>
@ -311,7 +169,7 @@
--> -->
<xsl:template name="develtoc"> <xsl:template name="develtoc">
<div class="left"> <div class="left">
<form action="search.php" <form action="{$href_base}search.php"
enctype="application/x-www-form-urlencoded" method="get"> enctype="application/x-www-form-urlencoded" method="get">
<input name="query" type="text" size="20" value=""/> <input name="query" type="text" size="20" value=""/>
<input name="submit" type="submit" value="Search ..."/> <input name="submit" type="submit" value="Search ..."/>
@ -334,6 +192,8 @@
<h2 class="box_title">related links</h2> <h2 class="box_title">related links</h2>
</div> </div>
<p><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></p> <p><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></p>
<p> <a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></p>
<p> <a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></p>
<p><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></p> <p><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></p>
<a href="http://xmlsoft.org/"><img src="{$href_base}Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo"/></a> <a href="http://xmlsoft.org/"><img src="{$href_base}Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo"/></a>
</div> </div>
@ -360,8 +220,10 @@
<h3 class="links2"><span>related links</span></h3> <h3 class="links2"><span>related links</span></h3>
<ul> <ul>
<li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li> <li> <a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li>
<li> <a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li>
<li> <a href="http://hg.berrange.com/libraries/sys-virt">Perl bindings</a></li>
<li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li> <li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li>
<li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"> <li><form action="{$href_base}search.php" enctype="application/x-www-form-urlencoded" method="get">
<input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /> <input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" />
</form></li> </form></li>
<li><a href="http://xmlsoft.org/"> <img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li> <li><a href="http://xmlsoft.org/"> <img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li>

View File

@ -2,7 +2,8 @@
virincdir = $(includedir)/libvirt virincdir = $(includedir)/libvirt
virinc_HEADERS = libvirt.h virinc_HEADERS = libvirt.h \
virterror.h
install-exec-hook: install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(virincdir) $(mkinstalldirs) $(DESTDIR)$(virincdir)

View File

@ -91,7 +91,8 @@ typedef enum {
/** /**
* virDomainInfoPtr: * virDomainInfoPtr:
* *
* a virDomainInfo is a structure filled by virDomainGetInfo() * a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
* runtime informations for a given active Domain
*/ */
typedef struct _virDomainInfo virDomainInfo; typedef struct _virDomainInfo virDomainInfo;
@ -101,19 +102,7 @@ struct _virDomainInfo {
unsigned long maxMem; /* the maximum memory in KBytes allowed */ unsigned long maxMem; /* the maximum memory in KBytes allowed */
unsigned long memory; /* the memory in KBytes used by the domain */ unsigned long memory; /* the memory in KBytes used by the domain */
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */ unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
/*
* Informations below are only available to clients with a connection
* with full access to the hypervisor
*/
unsigned long long cpuTime; /* the CPU time used in nanoseconds */ unsigned long long cpuTime; /* the CPU time used in nanoseconds */
/*
* TODO:
* - check what can be extracted publicly from xenstore
* and what's private limited to the hypervisor call.
* - add padding to this structure for ABI long term protection
*/
}; };
/** /**
@ -158,6 +147,34 @@ typedef enum {
VIR_DOMAIN_NONE = 0 VIR_DOMAIN_NONE = 0
} virDomainCreateFlags; } virDomainCreateFlags;
/**
* virNodeInfoPtr:
*
* a virNodeInfo is a structure filled by virNodeGetInfo() and providing
* the informations for the Node.
*/
typedef struct _virNodeInfo virNodeInfo;
struct _virNodeInfo {
char model[32]; /* string indicating the CPU model */
unsigned long memory;/* memory size in kilobytes */
unsigned int cpus; /* the number of active CPUs */
unsigned int mhz; /* expected CPU frequency */
unsigned int nodes; /* the number of NUMA cell, 1 for uniform mem access */
unsigned int sockets;/* number of CPU socket per node */
unsigned int cores; /* number of core per socket */
unsigned int threads;/* number of threads per core */
};
/**
* virNodeInfoPtr:
*
* a virNodeInfoPtr is a pointer to a virNodeInfo structure.
*/
typedef virNodeInfo *virNodeInfoPtr;
/* library versionning */ /* library versionning */
/** /**
@ -167,7 +184,7 @@ typedef enum {
* version * 1,000,000 + minor * 1000 + micro * version * 1,000,000 + minor * 1000 + micro
*/ */
#define LIBVIR_VERSION_NUMBER 3 #define LIBVIR_VERSION_NUMBER 1000
int virGetVersion (unsigned long *libVer, int virGetVersion (unsigned long *libVer,
const char *type, const char *type,
@ -176,12 +193,16 @@ int virGetVersion (unsigned long *libVer,
/* /*
* Connection and disconnections to the Hypervisor * Connection and disconnections to the Hypervisor
*/ */
int virInitialize (void);
virConnectPtr virConnectOpen (const char *name); virConnectPtr virConnectOpen (const char *name);
virConnectPtr virConnectOpenReadOnly (const char *name); virConnectPtr virConnectOpenReadOnly (const char *name);
int virConnectClose (virConnectPtr conn); int virConnectClose (virConnectPtr conn);
const char * virConnectGetType (virConnectPtr conn); const char * virConnectGetType (virConnectPtr conn);
int virConnectGetVersion (virConnectPtr conn, int virConnectGetVersion (virConnectPtr conn,
unsigned long *hvVer); unsigned long *hvVer);
int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info);
/* /*
* Gather list of running domains * Gather list of running domains
@ -200,16 +221,17 @@ int virConnectNumOfDomains (virConnectPtr conn);
* Domain creation and destruction * Domain creation and destruction
*/ */
virDomainPtr virDomainCreateLinux (virConnectPtr conn, virDomainPtr virDomainCreateLinux (virConnectPtr conn,
const char *kernel_path, const char *xmlDesc,
const char *initrd_path,
const char *cmdline,
unsigned long memory,
unsigned int flags); unsigned int flags);
virDomainPtr virDomainLookupByName (virConnectPtr conn, virDomainPtr virDomainLookupByName (virConnectPtr conn,
const char *name); const char *name);
virDomainPtr virDomainLookupByID (virConnectPtr conn, virDomainPtr virDomainLookupByID (virConnectPtr conn,
int id); int id);
virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
const unsigned char *uuid);
int virDomainShutdown (virDomainPtr domain); int virDomainShutdown (virDomainPtr domain);
int virDomainReboot (virDomainPtr domain,
unsigned int flags);
int virDomainDestroy (virDomainPtr domain); int virDomainDestroy (virDomainPtr domain);
int virDomainFree (virDomainPtr domain); int virDomainFree (virDomainPtr domain);
@ -238,6 +260,8 @@ int virDomainGetInfo (virDomainPtr domain,
*/ */
const char * virDomainGetName (virDomainPtr domain); const char * virDomainGetName (virDomainPtr domain);
unsigned int virDomainGetID (virDomainPtr domain); unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
char * virDomainGetOSType (virDomainPtr domain); char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain); unsigned long virDomainGetMaxMemory (virDomainPtr domain);
int virDomainSetMaxMemory (virDomainPtr domain, int virDomainSetMaxMemory (virDomainPtr domain,
@ -245,7 +269,8 @@ int virDomainSetMaxMemory (virDomainPtr domain,
/* /*
* XML domain description * XML domain description
*/ */
char * virDomainGetXMLDesc (virDomainPtr domain, int flags); char * virDomainGetXMLDesc (virDomainPtr domain,
int flags);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -91,7 +91,8 @@ typedef enum {
/** /**
* virDomainInfoPtr: * virDomainInfoPtr:
* *
* a virDomainInfo is a structure filled by virDomainGetInfo() * a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
* runtime informations for a given active Domain
*/ */
typedef struct _virDomainInfo virDomainInfo; typedef struct _virDomainInfo virDomainInfo;
@ -101,19 +102,7 @@ struct _virDomainInfo {
unsigned long maxMem; /* the maximum memory in KBytes allowed */ unsigned long maxMem; /* the maximum memory in KBytes allowed */
unsigned long memory; /* the memory in KBytes used by the domain */ unsigned long memory; /* the memory in KBytes used by the domain */
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */ unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
/*
* Informations below are only available to clients with a connection
* with full access to the hypervisor
*/
unsigned long long cpuTime; /* the CPU time used in nanoseconds */ unsigned long long cpuTime; /* the CPU time used in nanoseconds */
/*
* TODO:
* - check what can be extracted publicly from xenstore
* and what's private limited to the hypervisor call.
* - add padding to this structure for ABI long term protection
*/
}; };
/** /**
@ -158,6 +147,34 @@ typedef enum {
VIR_DOMAIN_NONE = 0 VIR_DOMAIN_NONE = 0
} virDomainCreateFlags; } virDomainCreateFlags;
/**
* virNodeInfoPtr:
*
* a virNodeInfo is a structure filled by virNodeGetInfo() and providing
* the informations for the Node.
*/
typedef struct _virNodeInfo virNodeInfo;
struct _virNodeInfo {
char model[32]; /* string indicating the CPU model */
unsigned long memory;/* memory size in kilobytes */
unsigned int cpus; /* the number of active CPUs */
unsigned int mhz; /* expected CPU frequency */
unsigned int nodes; /* the number of NUMA cell, 1 for uniform mem access */
unsigned int sockets;/* number of CPU socket per node */
unsigned int cores; /* number of core per socket */
unsigned int threads;/* number of threads per core */
};
/**
* virNodeInfoPtr:
*
* a virNodeInfoPtr is a pointer to a virNodeInfo structure.
*/
typedef virNodeInfo *virNodeInfoPtr;
/* library versionning */ /* library versionning */
/** /**
@ -167,7 +184,7 @@ typedef enum {
* version * 1,000,000 + minor * 1000 + micro * version * 1,000,000 + minor * 1000 + micro
*/ */
#define LIBVIR_VERSION_NUMBER @LIBVIR_VERSION_NUMBER@ #define LIBVIR_VERSION_NUMBER @LIBVIRT_VERSION_NUMBER@
int virGetVersion (unsigned long *libVer, int virGetVersion (unsigned long *libVer,
const char *type, const char *type,
@ -176,12 +193,16 @@ int virGetVersion (unsigned long *libVer,
/* /*
* Connection and disconnections to the Hypervisor * Connection and disconnections to the Hypervisor
*/ */
int virInitialize (void);
virConnectPtr virConnectOpen (const char *name); virConnectPtr virConnectOpen (const char *name);
virConnectPtr virConnectOpenReadOnly (const char *name); virConnectPtr virConnectOpenReadOnly (const char *name);
int virConnectClose (virConnectPtr conn); int virConnectClose (virConnectPtr conn);
const char * virConnectGetType (virConnectPtr conn); const char * virConnectGetType (virConnectPtr conn);
int virConnectGetVersion (virConnectPtr conn, int virConnectGetVersion (virConnectPtr conn,
unsigned long *hvVer); unsigned long *hvVer);
int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info);
/* /*
* Gather list of running domains * Gather list of running domains
@ -200,16 +221,17 @@ int virConnectNumOfDomains (virConnectPtr conn);
* Domain creation and destruction * Domain creation and destruction
*/ */
virDomainPtr virDomainCreateLinux (virConnectPtr conn, virDomainPtr virDomainCreateLinux (virConnectPtr conn,
const char *kernel_path, const char *xmlDesc,
const char *initrd_path,
const char *cmdline,
unsigned long memory,
unsigned int flags); unsigned int flags);
virDomainPtr virDomainLookupByName (virConnectPtr conn, virDomainPtr virDomainLookupByName (virConnectPtr conn,
const char *name); const char *name);
virDomainPtr virDomainLookupByID (virConnectPtr conn, virDomainPtr virDomainLookupByID (virConnectPtr conn,
int id); int id);
virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
const unsigned char *uuid);
int virDomainShutdown (virDomainPtr domain); int virDomainShutdown (virDomainPtr domain);
int virDomainReboot (virDomainPtr domain,
unsigned int flags);
int virDomainDestroy (virDomainPtr domain); int virDomainDestroy (virDomainPtr domain);
int virDomainFree (virDomainPtr domain); int virDomainFree (virDomainPtr domain);
@ -238,6 +260,8 @@ int virDomainGetInfo (virDomainPtr domain,
*/ */
const char * virDomainGetName (virDomainPtr domain); const char * virDomainGetName (virDomainPtr domain);
unsigned int virDomainGetID (virDomainPtr domain); unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
char * virDomainGetOSType (virDomainPtr domain); char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain); unsigned long virDomainGetMaxMemory (virDomainPtr domain);
int virDomainSetMaxMemory (virDomainPtr domain, int virDomainSetMaxMemory (virDomainPtr domain,
@ -245,7 +269,8 @@ int virDomainSetMaxMemory (virDomainPtr domain,
/* /*
* XML domain description * XML domain description
*/ */
char * virDomainGetXMLDesc (virDomainPtr domain, int flags); char * virDomainGetXMLDesc (virDomainPtr domain,
int flags);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -2,7 +2,8 @@
virincdir = $(includedir)/libvirt virincdir = $(includedir)/libvirt
virinc_HEADERS = libvirt.h virinc_HEADERS = libvirt.h \
virterror.h
install-exec-hook: install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(virincdir) $(mkinstalldirs) $(DESTDIR)$(virincdir)

View File

@ -91,7 +91,8 @@ typedef enum {
/** /**
* virDomainInfoPtr: * virDomainInfoPtr:
* *
* a virDomainInfo is a structure filled by virDomainGetInfo() * a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
* runtime informations for a given active Domain
*/ */
typedef struct _virDomainInfo virDomainInfo; typedef struct _virDomainInfo virDomainInfo;
@ -101,19 +102,7 @@ struct _virDomainInfo {
unsigned long maxMem; /* the maximum memory in KBytes allowed */ unsigned long maxMem; /* the maximum memory in KBytes allowed */
unsigned long memory; /* the memory in KBytes used by the domain */ unsigned long memory; /* the memory in KBytes used by the domain */
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */ unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
/*
* Informations below are only available to clients with a connection
* with full access to the hypervisor
*/
unsigned long long cpuTime; /* the CPU time used in nanoseconds */ unsigned long long cpuTime; /* the CPU time used in nanoseconds */
/*
* TODO:
* - check what can be extracted publicly from xenstore
* and what's private limited to the hypervisor call.
* - add padding to this structure for ABI long term protection
*/
}; };
/** /**
@ -158,6 +147,34 @@ typedef enum {
VIR_DOMAIN_NONE = 0 VIR_DOMAIN_NONE = 0
} virDomainCreateFlags; } virDomainCreateFlags;
/**
* virNodeInfoPtr:
*
* a virNodeInfo is a structure filled by virNodeGetInfo() and providing
* the informations for the Node.
*/
typedef struct _virNodeInfo virNodeInfo;
struct _virNodeInfo {
char model[32]; /* string indicating the CPU model */
unsigned long memory;/* memory size in kilobytes */
unsigned int cpus; /* the number of active CPUs */
unsigned int mhz; /* expected CPU frequency */
unsigned int nodes; /* the number of NUMA cell, 1 for uniform mem access */
unsigned int sockets;/* number of CPU socket per node */
unsigned int cores; /* number of core per socket */
unsigned int threads;/* number of threads per core */
};
/**
* virNodeInfoPtr:
*
* a virNodeInfoPtr is a pointer to a virNodeInfo structure.
*/
typedef virNodeInfo *virNodeInfoPtr;
/* library versionning */ /* library versionning */
/** /**
@ -167,7 +184,7 @@ typedef enum {
* version * 1,000,000 + minor * 1000 + micro * version * 1,000,000 + minor * 1000 + micro
*/ */
#define LIBVIR_VERSION_NUMBER 3 #define LIBVIR_VERSION_NUMBER 1000
int virGetVersion (unsigned long *libVer, int virGetVersion (unsigned long *libVer,
const char *type, const char *type,
@ -176,12 +193,16 @@ int virGetVersion (unsigned long *libVer,
/* /*
* Connection and disconnections to the Hypervisor * Connection and disconnections to the Hypervisor
*/ */
int virInitialize (void);
virConnectPtr virConnectOpen (const char *name); virConnectPtr virConnectOpen (const char *name);
virConnectPtr virConnectOpenReadOnly (const char *name); virConnectPtr virConnectOpenReadOnly (const char *name);
int virConnectClose (virConnectPtr conn); int virConnectClose (virConnectPtr conn);
const char * virConnectGetType (virConnectPtr conn); const char * virConnectGetType (virConnectPtr conn);
int virConnectGetVersion (virConnectPtr conn, int virConnectGetVersion (virConnectPtr conn,
unsigned long *hvVer); unsigned long *hvVer);
int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info);
/* /*
* Gather list of running domains * Gather list of running domains
@ -200,16 +221,17 @@ int virConnectNumOfDomains (virConnectPtr conn);
* Domain creation and destruction * Domain creation and destruction
*/ */
virDomainPtr virDomainCreateLinux (virConnectPtr conn, virDomainPtr virDomainCreateLinux (virConnectPtr conn,
const char *kernel_path, const char *xmlDesc,
const char *initrd_path,
const char *cmdline,
unsigned long memory,
unsigned int flags); unsigned int flags);
virDomainPtr virDomainLookupByName (virConnectPtr conn, virDomainPtr virDomainLookupByName (virConnectPtr conn,
const char *name); const char *name);
virDomainPtr virDomainLookupByID (virConnectPtr conn, virDomainPtr virDomainLookupByID (virConnectPtr conn,
int id); int id);
virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
const unsigned char *uuid);
int virDomainShutdown (virDomainPtr domain); int virDomainShutdown (virDomainPtr domain);
int virDomainReboot (virDomainPtr domain,
unsigned int flags);
int virDomainDestroy (virDomainPtr domain); int virDomainDestroy (virDomainPtr domain);
int virDomainFree (virDomainPtr domain); int virDomainFree (virDomainPtr domain);
@ -238,6 +260,8 @@ int virDomainGetInfo (virDomainPtr domain,
*/ */
const char * virDomainGetName (virDomainPtr domain); const char * virDomainGetName (virDomainPtr domain);
unsigned int virDomainGetID (virDomainPtr domain); unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
char * virDomainGetOSType (virDomainPtr domain); char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain); unsigned long virDomainGetMaxMemory (virDomainPtr domain);
int virDomainSetMaxMemory (virDomainPtr domain, int virDomainSetMaxMemory (virDomainPtr domain,
@ -245,7 +269,8 @@ int virDomainSetMaxMemory (virDomainPtr domain,
/* /*
* XML domain description * XML domain description
*/ */
char * virDomainGetXMLDesc (virDomainPtr domain, int flags); char * virDomainGetXMLDesc (virDomainPtr domain,
int flags);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -91,7 +91,8 @@ typedef enum {
/** /**
* virDomainInfoPtr: * virDomainInfoPtr:
* *
* a virDomainInfo is a structure filled by virDomainGetInfo() * a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
* runtime informations for a given active Domain
*/ */
typedef struct _virDomainInfo virDomainInfo; typedef struct _virDomainInfo virDomainInfo;
@ -101,19 +102,7 @@ struct _virDomainInfo {
unsigned long maxMem; /* the maximum memory in KBytes allowed */ unsigned long maxMem; /* the maximum memory in KBytes allowed */
unsigned long memory; /* the memory in KBytes used by the domain */ unsigned long memory; /* the memory in KBytes used by the domain */
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */ unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
/*
* Informations below are only available to clients with a connection
* with full access to the hypervisor
*/
unsigned long long cpuTime; /* the CPU time used in nanoseconds */ unsigned long long cpuTime; /* the CPU time used in nanoseconds */
/*
* TODO:
* - check what can be extracted publicly from xenstore
* and what's private limited to the hypervisor call.
* - add padding to this structure for ABI long term protection
*/
}; };
/** /**
@ -158,6 +147,34 @@ typedef enum {
VIR_DOMAIN_NONE = 0 VIR_DOMAIN_NONE = 0
} virDomainCreateFlags; } virDomainCreateFlags;
/**
* virNodeInfoPtr:
*
* a virNodeInfo is a structure filled by virNodeGetInfo() and providing
* the informations for the Node.
*/
typedef struct _virNodeInfo virNodeInfo;
struct _virNodeInfo {
char model[32]; /* string indicating the CPU model */
unsigned long memory;/* memory size in kilobytes */
unsigned int cpus; /* the number of active CPUs */
unsigned int mhz; /* expected CPU frequency */
unsigned int nodes; /* the number of NUMA cell, 1 for uniform mem access */
unsigned int sockets;/* number of CPU socket per node */
unsigned int cores; /* number of core per socket */
unsigned int threads;/* number of threads per core */
};
/**
* virNodeInfoPtr:
*
* a virNodeInfoPtr is a pointer to a virNodeInfo structure.
*/
typedef virNodeInfo *virNodeInfoPtr;
/* library versionning */ /* library versionning */
/** /**
@ -167,7 +184,7 @@ typedef enum {
* version * 1,000,000 + minor * 1000 + micro * version * 1,000,000 + minor * 1000 + micro
*/ */
#define LIBVIR_VERSION_NUMBER @LIBVIR_VERSION_NUMBER@ #define LIBVIR_VERSION_NUMBER @LIBVIRT_VERSION_NUMBER@
int virGetVersion (unsigned long *libVer, int virGetVersion (unsigned long *libVer,
const char *type, const char *type,
@ -176,12 +193,16 @@ int virGetVersion (unsigned long *libVer,
/* /*
* Connection and disconnections to the Hypervisor * Connection and disconnections to the Hypervisor
*/ */
int virInitialize (void);
virConnectPtr virConnectOpen (const char *name); virConnectPtr virConnectOpen (const char *name);
virConnectPtr virConnectOpenReadOnly (const char *name); virConnectPtr virConnectOpenReadOnly (const char *name);
int virConnectClose (virConnectPtr conn); int virConnectClose (virConnectPtr conn);
const char * virConnectGetType (virConnectPtr conn); const char * virConnectGetType (virConnectPtr conn);
int virConnectGetVersion (virConnectPtr conn, int virConnectGetVersion (virConnectPtr conn,
unsigned long *hvVer); unsigned long *hvVer);
int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info);
/* /*
* Gather list of running domains * Gather list of running domains
@ -200,16 +221,17 @@ int virConnectNumOfDomains (virConnectPtr conn);
* Domain creation and destruction * Domain creation and destruction
*/ */
virDomainPtr virDomainCreateLinux (virConnectPtr conn, virDomainPtr virDomainCreateLinux (virConnectPtr conn,
const char *kernel_path, const char *xmlDesc,
const char *initrd_path,
const char *cmdline,
unsigned long memory,
unsigned int flags); unsigned int flags);
virDomainPtr virDomainLookupByName (virConnectPtr conn, virDomainPtr virDomainLookupByName (virConnectPtr conn,
const char *name); const char *name);
virDomainPtr virDomainLookupByID (virConnectPtr conn, virDomainPtr virDomainLookupByID (virConnectPtr conn,
int id); int id);
virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
const unsigned char *uuid);
int virDomainShutdown (virDomainPtr domain); int virDomainShutdown (virDomainPtr domain);
int virDomainReboot (virDomainPtr domain,
unsigned int flags);
int virDomainDestroy (virDomainPtr domain); int virDomainDestroy (virDomainPtr domain);
int virDomainFree (virDomainPtr domain); int virDomainFree (virDomainPtr domain);
@ -238,6 +260,8 @@ int virDomainGetInfo (virDomainPtr domain,
*/ */
const char * virDomainGetName (virDomainPtr domain); const char * virDomainGetName (virDomainPtr domain);
unsigned int virDomainGetID (virDomainPtr domain); unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
char * virDomainGetOSType (virDomainPtr domain); char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain); unsigned long virDomainGetMaxMemory (virDomainPtr domain);
int virDomainSetMaxMemory (virDomainPtr domain, int virDomainSetMaxMemory (virDomainPtr domain,
@ -245,7 +269,8 @@ int virDomainSetMaxMemory (virDomainPtr domain,
/* /*
* XML domain description * XML domain description
*/ */
char * virDomainGetXMLDesc (virDomainPtr domain, int flags); char * virDomainGetXMLDesc (virDomainPtr domain,
int flags);
#ifdef __cplusplus #ifdef __cplusplus
} }

142
include/libvirt/virterror.h Normal file
View File

@ -0,0 +1,142 @@
/*
* virterror.h:
* Summary: error handling interfaces for the libvirt library
* Description: Provides the interfaces of the libvirt library to handle
* errors raised while using the library.
*
* Copy: Copyright (C) 2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Author: Daniel Veillard <veillard@redhat.com>
*/
#ifndef __VIR_VIRERR_H__
#define __VIR_VIRERR_H__
#include "libvirt.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* virErrorLevel:
*
* Indicates the level of an error
*/
typedef enum {
VIR_ERR_NONE = 0,
VIR_ERR_WARNING = 1, /* A simple warning */
VIR_ERR_ERROR = 2 /* An error */
} virErrorLevel;
/**
* virErrorDomain:
*
* Indicates where an error may have come from
*/
typedef enum {
VIR_FROM_NONE = 0,
VIR_FROM_XEN, /* Error at Xen hypervisor layer */
VIR_FROM_XEND, /* Error at connection with xend daemon */
VIR_FROM_XENSTORE, /* Error at connection with xen store */
VIR_FROM_SEXPR, /* Error in the S-Epression code */
VIR_FROM_XML, /* Error in the XML code */
VIR_FROM_DOM, /* Error when operating on a domain */
} virErrorDomain;
/**
* virError:
*
* A libvirt Error instance.
*/
typedef struct _virError virError;
typedef virError *virErrorPtr;
struct _virError {
int code; /* The error code, a virErrorNumber */
int domain; /* What part of the library raised this error */
char *message;/* human-readable informative error message */
virErrorLevel level;/* how consequent is the error */
virConnectPtr conn; /* the connection if available */
virDomainPtr dom; /* the domain if available */
char *str1; /* extra string information */
char *str2; /* extra string information */
char *str3; /* extra string information */
int int1; /* extra number information */
int int2; /* extra number information */
};
/**
* virErrorNumber:
*
* The full list of errors the library can generate
*/
typedef enum {
VIR_ERR_OK = 0,
VIR_ERR_INTERNAL_ERROR, /* internal error */
VIR_ERR_NO_MEMORY, /* memory allocation failure */
VIR_ERR_NO_SUPPORT, /* no support for this connection */
VIR_ERR_UNKNOWN_HOST,/* could not resolve hostname */
VIR_ERR_NO_CONNECT, /* can't connect to hypervisor */
VIR_ERR_INVALID_CONN,/* invalid connection object */
VIR_ERR_INVALID_DOMAIN,/* invalid domain object */
VIR_ERR_INVALID_ARG,/* invalid function argument */
VIR_ERR_OPERATION_FAILED,/* a command to hypervisor failed */
VIR_ERR_GET_FAILED,/* a HTTP GET command to failed */
VIR_ERR_POST_FAILED,/* a HTTP POST command to failed */
VIR_ERR_HTTP_ERROR,/* unexpected HTTP error code */
VIR_ERR_SEXPR_SERIAL,/* failure to serialize an S-Expr */
VIR_ERR_NO_XEN,/* could not open Xen hypervisor control */
VIR_ERR_XEN_CALL,/* failure doing an hypervisor call */
VIR_ERR_OS_TYPE, /* unknown OS type */
VIR_ERR_NO_KERNEL, /* missing kernel information */
VIR_ERR_NO_ROOT, /* missing root device information */
VIR_ERR_NO_SOURCE, /* missing source device information */
VIR_ERR_NO_TARGET, /* missing target device information */
VIR_ERR_NO_NAME, /* missing domain name information */
VIR_ERR_NO_OS, /* missing domain OS information */
VIR_ERR_NO_DEVICE, /* missing domain devices information */
VIR_ERR_NO_XENSTORE,/* could not open Xen Store control */
VIR_ERR_DRIVER_FULL, /* too many drivers registered */
VIR_ERR_CALL_FAILED /* not supported by the drivers */
} virErrorNumber;
/**
* virErrorFunc:
* @userData: user provided data for the error callback
* @error: the error being raised.
*
* Signature of a function to use when there is an error raised by the library.
*/
typedef void (*virErrorFunc) (void *userData, virErrorPtr error);
/*
* Errors can be handled as asynchronous callbacks or after the routine
* failed. They can also be handled globally at the library level, or
* at the connection level (which then has priority
*/
virErrorPtr virGetLastError (void);
void virResetLastError (void);
void virResetError (virErrorPtr err);
virErrorPtr virConnGetLastError (virConnectPtr conn);
void virConnResetLastError (virConnectPtr conn);
int virCopyLastError (virErrorPtr to);
void virDefaultErrorFunc (virErrorPtr err);
void virSetErrorFunc (void *userData,
virErrorFunc handler);
void virConnSetErrorFunc (virConnectPtr conn,
void *userData,
virErrorFunc handler);
int virConnCopyLastError (virConnectPtr conn,
virErrorPtr to);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_VIRERR_H__ */

142
include/virterror.h Normal file
View File

@ -0,0 +1,142 @@
/*
* virterror.h:
* Summary: error handling interfaces for the libvirt library
* Description: Provides the interfaces of the libvirt library to handle
* errors raised while using the library.
*
* Copy: Copyright (C) 2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Author: Daniel Veillard <veillard@redhat.com>
*/
#ifndef __VIR_VIRERR_H__
#define __VIR_VIRERR_H__
#include "libvirt.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* virErrorLevel:
*
* Indicates the level of an error
*/
typedef enum {
VIR_ERR_NONE = 0,
VIR_ERR_WARNING = 1, /* A simple warning */
VIR_ERR_ERROR = 2 /* An error */
} virErrorLevel;
/**
* virErrorDomain:
*
* Indicates where an error may have come from
*/
typedef enum {
VIR_FROM_NONE = 0,
VIR_FROM_XEN, /* Error at Xen hypervisor layer */
VIR_FROM_XEND, /* Error at connection with xend daemon */
VIR_FROM_XENSTORE, /* Error at connection with xen store */
VIR_FROM_SEXPR, /* Error in the S-Epression code */
VIR_FROM_XML, /* Error in the XML code */
VIR_FROM_DOM, /* Error when operating on a domain */
} virErrorDomain;
/**
* virError:
*
* A libvirt Error instance.
*/
typedef struct _virError virError;
typedef virError *virErrorPtr;
struct _virError {
int code; /* The error code, a virErrorNumber */
int domain; /* What part of the library raised this error */
char *message;/* human-readable informative error message */
virErrorLevel level;/* how consequent is the error */
virConnectPtr conn; /* the connection if available */
virDomainPtr dom; /* the domain if available */
char *str1; /* extra string information */
char *str2; /* extra string information */
char *str3; /* extra string information */
int int1; /* extra number information */
int int2; /* extra number information */
};
/**
* virErrorNumber:
*
* The full list of errors the library can generate
*/
typedef enum {
VIR_ERR_OK = 0,
VIR_ERR_INTERNAL_ERROR, /* internal error */
VIR_ERR_NO_MEMORY, /* memory allocation failure */
VIR_ERR_NO_SUPPORT, /* no support for this connection */
VIR_ERR_UNKNOWN_HOST,/* could not resolve hostname */
VIR_ERR_NO_CONNECT, /* can't connect to hypervisor */
VIR_ERR_INVALID_CONN,/* invalid connection object */
VIR_ERR_INVALID_DOMAIN,/* invalid domain object */
VIR_ERR_INVALID_ARG,/* invalid function argument */
VIR_ERR_OPERATION_FAILED,/* a command to hypervisor failed */
VIR_ERR_GET_FAILED,/* a HTTP GET command to failed */
VIR_ERR_POST_FAILED,/* a HTTP POST command to failed */
VIR_ERR_HTTP_ERROR,/* unexpected HTTP error code */
VIR_ERR_SEXPR_SERIAL,/* failure to serialize an S-Expr */
VIR_ERR_NO_XEN,/* could not open Xen hypervisor control */
VIR_ERR_XEN_CALL,/* failure doing an hypervisor call */
VIR_ERR_OS_TYPE, /* unknown OS type */
VIR_ERR_NO_KERNEL, /* missing kernel information */
VIR_ERR_NO_ROOT, /* missing root device information */
VIR_ERR_NO_SOURCE, /* missing source device information */
VIR_ERR_NO_TARGET, /* missing target device information */
VIR_ERR_NO_NAME, /* missing domain name information */
VIR_ERR_NO_OS, /* missing domain OS information */
VIR_ERR_NO_DEVICE, /* missing domain devices information */
VIR_ERR_NO_XENSTORE,/* could not open Xen Store control */
VIR_ERR_DRIVER_FULL, /* too many drivers registered */
VIR_ERR_CALL_FAILED /* not supported by the drivers */
} virErrorNumber;
/**
* virErrorFunc:
* @userData: user provided data for the error callback
* @error: the error being raised.
*
* Signature of a function to use when there is an error raised by the library.
*/
typedef void (*virErrorFunc) (void *userData, virErrorPtr error);
/*
* Errors can be handled as asynchronous callbacks or after the routine
* failed. They can also be handled globally at the library level, or
* at the connection level (which then has priority
*/
virErrorPtr virGetLastError (void);
void virResetLastError (void);
void virResetError (virErrorPtr err);
virErrorPtr virConnGetLastError (virConnectPtr conn);
void virConnResetLastError (virConnectPtr conn);
int virCopyLastError (virErrorPtr to);
void virDefaultErrorFunc (virErrorPtr err);
void virSetErrorFunc (void *userData,
virErrorFunc handler);
void virConnSetErrorFunc (virConnectPtr conn,
void *userData,
virErrorFunc handler);
int virConnCopyLastError (virConnectPtr conn,
virErrorPtr to);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_VIRERR_H__ */

View File

@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@
libdir=@libdir@ libdir=@libdir@
includedir=@includedir@ includedir=@includedir@
Name: libvir Name: libvirt
Version: @VERSION@ Version: @VERSION@
Description: libvir library Description: libvirt library
Requires: Requires:
Libs: -L${libdir} -lvir @LIBS@ Libs: -L${libdir} -lvirt @LIBS@
Cflags: Cflags: -I${includedir}

View File

@ -9,6 +9,10 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root
URL: http://libvir.org/ URL: http://libvir.org/
BuildRequires: xen python python-devel BuildRequires: xen python python-devel
Requires: xen Requires: xen
Requires: libxml2
Requires: readline
BuildRequires: libxml2-devel
BuildRequires: readline-devel
Obsoletes: libvir Obsoletes: libvir
ExclusiveArch: i386 x86_64 ExclusiveArch: i386 x86_64
@ -49,6 +53,7 @@ make
rm -fr %{buildroot} rm -fr %{buildroot}
%makeinstall %makeinstall
(cd docs/examples ; make clean ; rm -rf .deps)
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/python*/site-packages/*.la
@ -67,6 +72,7 @@ rm -fr %{buildroot}
%defattr(-, root, root) %defattr(-, root, root)
%doc AUTHORS ChangeLog NEWS README COPYING.LIB TODO %doc AUTHORS ChangeLog NEWS README COPYING.LIB TODO
%doc %{_mandir}/man1/virsh.1*
%{_bindir}/virsh %{_bindir}/virsh
%{_libdir}/lib*.so.* %{_libdir}/lib*.so.*
@ -76,8 +82,13 @@ rm -fr %{buildroot}
%{_libdir}/lib*.so %{_libdir}/lib*.so
%{_includedir}/libvirt/*.h %{_includedir}/libvirt/*.h
%{_libdir}/pkgconfig/libvirt.pc %{_libdir}/pkgconfig/libvirt.pc
%doc %{_datadir}/gtk-doc/html/libvirt/*.devhelp
%doc %{_datadir}/gtk-doc/html/libvirt/*.html
%doc %{_datadir}/gtk-doc/html/libvirt/*.png
%doc %{_datadir}/gtk-doc/html/libvirt/*.css
%doc docs/*.html docs/html docs/*.gif %doc docs/*.html docs/html docs/*.gif
%doc docs/examples
%doc docs/libvirt-api.xml %doc docs/libvirt-api.xml
%files python %files python
@ -86,10 +97,33 @@ rm -fr %{buildroot}
%doc AUTHORS NEWS README COPYING.LIB %doc AUTHORS NEWS README COPYING.LIB
%{_libdir}/python*/site-packages/libvirt.py* %{_libdir}/python*/site-packages/libvirt.py*
%{_libdir}/python*/site-packages/libvirtmod* %{_libdir}/python*/site-packages/libvirtmod*
%doc python/tests/*.py
%doc python/TODO %doc python/TODO
%doc python/libvirtclass.txt %doc python/libvirtclass.txt
%changelog %changelog
* Mon Apr 10 2006 Daniel Veillard <veillard@redhat.com> 0.1.0-1
- various fixes
- new APIs: for Node information and Reboot
- virsh improvements and extensions
- documentation updates and man page
- enhancement and fixes of the XML description format
* Tue Feb 28 2006 Daniel Veillard <veillard@redhat.com> 0.0.6-1
- added error handling APIs
- small bug fixes
- improve python bindings
- augment documentation and regression tests
* Thu Feb 23 2006 Daniel Veillard <veillard@redhat.com> 0.0.5-1
- new domain creation API
- new UUID based APIs
- more tests, documentation, devhelp
- bug fixes
* Fri Feb 10 2006 Daniel Veillard <veillard@redhat.com> 0.0.4-1
- fixes some problems in 0.0.3 due to the change of names
* Wed Feb 8 2006 Daniel Veillard <veillard@redhat.com> 0.0.3-1 * Wed Feb 8 2006 Daniel Veillard <veillard@redhat.com> 0.0.3-1
- changed library name to libvirt from libvir, complete and test the python - changed library name to libvirt from libvir, complete and test the python
bindings bindings

View File

@ -1,12 +1,14 @@
# Makefile for libvirt python library # Makefile for libvirt python library
SUBDIRS= . tests
INCLUDES = \ INCLUDES = \
-I$(PYTHON_INCLUDES) \ -I$(PYTHON_INCLUDES) \
-I$(top_srcdir)/include \ -I$(top_srcdir)/include \
-I$(top_builddir)/include \ -I$(top_builddir)/include \
-I$(top_builddir)/$(subdir) -I$(top_builddir)/$(subdir)
DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIR_VERSION) DOCS_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)
DOCS = ${srcdir}/TODO DOCS = ${srcdir}/TODO
@ -16,6 +18,7 @@ EXTRA_DIST = \
generator.py \ generator.py \
libvirt_wrap.h \ libvirt_wrap.h \
libvirt.py \ libvirt.py \
libvir.py \
libvirt-python-api.xml \ libvirt-python-api.xml \
$(DOCS) $(DOCS)
@ -31,6 +34,8 @@ python_LTLIBRARIES = libvirtmod.la
libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h libvirtmod_la_SOURCES = libvir.c types.c libvirt-py.c libvirt-py.h
libvirtmod_la_LIBADD = $(mylibs) libvirtmod_la_LIBADD = $(mylibs)
libvirt.py: $(srcdir)/libvir.py libvirtclass.py
cat $(srcdir)/libvir.py libvirtclass.py > libvirt.py
install-data-local: install-data-local:
$(mkinstalldirs) $(DESTDIR)$(pythondir) $(mkinstalldirs) $(DESTDIR)$(pythondir)
@ -45,7 +50,8 @@ GENERATED= libvirt.py \
libvirt-export.c \ libvirt-export.c \
libvirtclass.txt \ libvirtclass.txt \
libvirt-py.c \ libvirt-py.c \
libvirt-py.h libvirt-py.h \
libvirtclass.py
CLEANFILES= $(GENERATED) gen_prog libvirt.py CLEANFILES= $(GENERATED) gen_prog libvirt.py
@ -60,3 +66,8 @@ $(libvirtmod_la_OBJECTS): $(GENERATED)
else else
all: all:
endif endif
dummy:
tests test: all dummy
-@(cd tests && $(MAKE) MAKEFLAGS+=--silent tests)

View File

@ -203,7 +203,9 @@ def enum(type, name, value):
####################################################################### #######################################################################
functions_failed = [] functions_failed = []
functions_skipped = [] functions_skipped = [
"virConnectListDomains"
]
skipped_modules = { skipped_modules = {
} }
@ -249,7 +251,7 @@ foreign_encoding_args = (
####################################################################### #######################################################################
# #
# This part writes the C <-> Python stubs libxml2-py.[ch] and # This part writes the C <-> Python stubs libvirt2-py.[ch] and
# the table libxml2-export.c to add when registrering the Python module # the table libxml2-export.c to add when registrering the Python module
# #
####################################################################### #######################################################################
@ -259,6 +261,9 @@ foreign_encoding_args = (
skip_impl = ( skip_impl = (
'virConnectListDomainsID', 'virConnectListDomainsID',
'virDomainGetInfo', 'virDomainGetInfo',
'virNodeGetInfo',
'virDomainGetUUID',
'virDomainLookupByUUID',
) )
def skip_function(name): def skip_function(name):
@ -558,6 +563,9 @@ def nameFixup(name, classe, type, file):
elif name[0:9] == "virDomain": elif name[0:9] == "virDomain":
func = name[9:] func = name[9:]
func = string.lower(func[0:1]) + func[1:] func = string.lower(func[0:1]) + func[1:]
elif name[0:7] == "virNode":
func = name[7:]
func = string.lower(func[0:1]) + func[1:]
elif name[0:10] == "virConnect": elif name[0:10] == "virConnect":
func = name[10:] func = name[10:]
func = string.lower(func[0:1]) + func[1:] func = string.lower(func[0:1]) + func[1:]
@ -568,6 +576,8 @@ def nameFixup(name, classe, type, file):
func = name func = name
if func == "iD": if func == "iD":
func = "ID" func = "ID"
if func == "uUID":
func = "UUID"
if func == "oSType": if func == "oSType":
func = "OSType" func = "OSType"
if func == "xMLDesc": if func == "xMLDesc":
@ -685,17 +695,7 @@ def buildWrappers():
info = (0, func, name, ret, args, file) info = (0, func, name, ret, args, file)
function_classes['None'].append(info) function_classes['None'].append(info)
classes = open("libvirt.py", "w") classes = open("libvirtclass.py", "w")
classes.write("""#!/usr/bin/python -u
#
# Those are the autogenerated Python bindings for libvirt.
# Check python/generator.py in the source distribution of libvirt
# to find out more about the generation process
#
""")
classes.write("import libvirtmod\n")
classes.write("import types\n\n")
txt = open("libvirtclass.txt", "w") txt = open("libvirtclass.txt", "w")
txt.write(" Generated Classes for libvir-python\n\n") txt.write(" Generated Classes for libvir-python\n\n")
@ -748,7 +748,12 @@ def buildWrappers():
# Raise an exception # Raise an exception
# #
if functions_noexcept.has_key(name): if functions_noexcept.has_key(name):
classes.write(" if ret is None:return None\n"); classes.write(" if ret is None:return None\n");
else:
classes.write(
" if ret is None:raise libvirtError('%s() failed')\n" %
(name))
classes.write(" return "); classes.write(" return ");
classes.write(classes_type[ret[0]][1] % ("ret")); classes.write(classes_type[ret[0]][1] % ("ret"));
classes.write("\n"); classes.write("\n");
@ -861,6 +866,10 @@ def buildWrappers():
if functions_noexcept.has_key(name): if functions_noexcept.has_key(name):
classes.write( classes.write(
" if ret is None:return None\n"); " if ret is None:return None\n");
else:
classes.write(
" if ret is None:raise libvirtError('%s() failed')\n" %
(name))
# #
# generate the returned class wrapper for the object # generate the returned class wrapper for the object

View File

@ -11,11 +11,108 @@
#include <Python.h> #include <Python.h>
#include <libvirt.h> #include <libvirt.h>
#include <virterror.h>
#include "libvirt_wrap.h" #include "libvirt_wrap.h"
#include "libvirt-py.h" #include "libvirt-py.h"
void initlibvirmod(void); void initlibvirmod(void);
PyObject *libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args);
/************************************************************************
* *
* Global error handler at the Python level *
* *
************************************************************************/
static PyObject *libvirt_virPythonErrorFuncHandler = NULL;
static PyObject *libvirt_virPythonErrorFuncCtxt = NULL;
static void
libvirt_virErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, virErrorPtr err)
{
PyObject *list, *info;
PyObject *result;
#ifdef DEBUG_ERROR
printf("libvirt_virErrorFuncHandler(%p, %s, ...) called\n", ctx, msg);
#endif
if ((err == NULL) || (err->code == VIR_ERR_OK))
return;
if ((libvirt_virPythonErrorFuncHandler == NULL) ||
(libvirt_virPythonErrorFuncHandler == Py_None)) {
virDefaultErrorFunc(err);
} else {
list = PyTuple_New(2);
info = PyTuple_New(9);
PyTuple_SetItem(list, 0, libvirt_virPythonErrorFuncCtxt);
PyTuple_SetItem(list, 1, info);
Py_XINCREF(libvirt_virPythonErrorFuncCtxt);
PyTuple_SetItem(info, 0, PyInt_FromLong((long) err->code));
PyTuple_SetItem(info, 1, PyInt_FromLong((long) err->domain));
PyTuple_SetItem(info, 2, libvirt_charPtrWrap(err->message));
PyTuple_SetItem(info, 3, PyInt_FromLong((long) err->level));
PyTuple_SetItem(info, 4, libvirt_charPtrWrap(err->str1));
PyTuple_SetItem(info, 5, libvirt_charPtrWrap(err->str2));
PyTuple_SetItem(info, 6, libvirt_charPtrWrap(err->str3));
PyTuple_SetItem(info, 7, PyInt_FromLong((long) err->int1));
PyTuple_SetItem(info, 8, PyInt_FromLong((long) err->int2));
/* TODO pass conn and dom if available */
result = PyEval_CallObject(libvirt_virPythonErrorFuncHandler, list);
Py_XDECREF(list);
Py_XDECREF(result);
}
}
static PyObject *
libvirt_virRegisterErrorHandler(ATTRIBUTE_UNUSED PyObject * self,
PyObject * args)
{
PyObject *py_retval;
PyObject *pyobj_f;
PyObject *pyobj_ctx;
if (!PyArg_ParseTuple
(args, (char *) "OO:xmlRegisterErrorHandler", &pyobj_f,
&pyobj_ctx))
return (NULL);
#ifdef DEBUG_ERROR
printf("libvirt_virRegisterErrorHandler(%p, %p) called\n", pyobj_ctx,
pyobj_f);
#endif
virSetErrorFunc(NULL, libvirt_virErrorFuncHandler);
if (libvirt_virPythonErrorFuncHandler != NULL) {
Py_XDECREF(libvirt_virPythonErrorFuncHandler);
}
if (libvirt_virPythonErrorFuncCtxt != NULL) {
Py_XDECREF(libvirt_virPythonErrorFuncCtxt);
}
if ((pyobj_f == Py_None) && (pyobj_ctx == Py_None)) {
libvirt_virPythonErrorFuncHandler = NULL;
libvirt_virPythonErrorFuncCtxt = NULL;
} else {
Py_XINCREF(pyobj_ctx);
Py_XINCREF(pyobj_f);
/* TODO: check f is a function ! */
libvirt_virPythonErrorFuncHandler = pyobj_f;
libvirt_virPythonErrorFuncCtxt = pyobj_ctx;
}
py_retval = libvirt_intWrap(1);
return (py_retval);
}
/************************************************************************
* *
* Wrappers for functions where generator fails *
* *
************************************************************************/
static PyObject * static PyObject *
libvirt_virDomainFree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) { libvirt_virDomainFree(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval; PyObject *py_retval;
@ -100,6 +197,82 @@ libvirt_virDomainGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
return(py_retval); return(py_retval);
} }
static PyObject *
libvirt_virNodeGetInfo(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
int c_retval;
virConnectPtr conn;
PyObject *pyobj_conn;
virNodeInfo info;
if (!PyArg_ParseTuple(args, (char *)"O:virDomainGetInfo", &pyobj_conn))
return(NULL);
conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
c_retval = virNodeGetInfo(conn, &info);
if (c_retval < 0) {
Py_INCREF(Py_None);
return(Py_None);
}
py_retval = PyList_New(8);
PyList_SetItem(py_retval, 0, libvirt_constcharPtrWrap(&info.model[0]));
PyList_SetItem(py_retval, 1, libvirt_longWrap((long) info.memory >> 10));
PyList_SetItem(py_retval, 2, libvirt_intWrap((int) info.cpus));
PyList_SetItem(py_retval, 3, libvirt_intWrap((int) info.mhz));
PyList_SetItem(py_retval, 4, libvirt_intWrap((int) info.nodes));
PyList_SetItem(py_retval, 5, libvirt_intWrap((int) info.sockets));
PyList_SetItem(py_retval, 6, libvirt_intWrap((int) info.cores));
PyList_SetItem(py_retval, 7, libvirt_intWrap((int) info.threads));
return(py_retval);
}
PyObject *
libvirt_virDomainGetUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
unsigned char uuid[16];
virDomainPtr domain;
PyObject *pyobj_domain;
if (!PyArg_ParseTuple(args, (char *)"O:virDomainGetUUID", &pyobj_domain))
return(NULL);
domain = (virDomainPtr) PyvirDomain_Get(pyobj_domain);
if (domain == NULL) {
Py_INCREF(Py_None);
return(Py_None);
}
if (virDomainGetUUID(domain, &uuid[0]) < 0) {
Py_INCREF(Py_None);
return(Py_None);
}
py_retval = PyString_FromStringAndSize((char *) &uuid[0], 16);
return(py_retval);
}
PyObject *
libvirt_virDomainLookupByUUID(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
PyObject *py_retval;
virDomainPtr c_retval;
virConnectPtr conn;
PyObject *pyobj_conn;
unsigned char * uuid;
int len;
if (!PyArg_ParseTuple(args, (char *)"Oz#:virDomainLookupByUUID", &pyobj_conn, &uuid, &len))
return(NULL);
conn = (virConnectPtr) PyvirConnect_Get(pyobj_conn);
if ((uuid == NULL) || (len != 16)) {
Py_INCREF(Py_None);
return(Py_None);
}
c_retval = virDomainLookupByUUID(conn, uuid);
py_retval = libvirt_virDomainPtrWrap((virDomainPtr) c_retval);
return(py_retval);
}
/************************************************************************ /************************************************************************
* * * *
* The registration stuff * * The registration stuff *
@ -111,17 +284,23 @@ static PyMethodDef libvirtMethods[] = {
{(char *) "virConnectClose", libvirt_virConnectClose, METH_VARARGS, NULL}, {(char *) "virConnectClose", libvirt_virConnectClose, METH_VARARGS, NULL},
{(char *) "virConnectListDomainsID", libvirt_virConnectListDomainsID, METH_VARARGS, NULL}, {(char *) "virConnectListDomainsID", libvirt_virConnectListDomainsID, METH_VARARGS, NULL},
{(char *) "virDomainGetInfo", libvirt_virDomainGetInfo, METH_VARARGS, NULL}, {(char *) "virDomainGetInfo", libvirt_virDomainGetInfo, METH_VARARGS, NULL},
{(char *) "virNodeGetInfo", libvirt_virNodeGetInfo, METH_VARARGS, NULL},
{(char *) "virDomainGetUUID", libvirt_virDomainGetUUID, METH_VARARGS, NULL},
{(char *) "virDomainLookupByUUID", libvirt_virDomainLookupByUUID, METH_VARARGS, NULL},
{(char *) "virRegisterErrorHandler", libvirt_virRegisterErrorHandler, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL} {NULL, NULL, 0, NULL}
}; };
void void
initlibvirmod(void) initlibvirtmod(void)
{ {
static int initialized = 0; static int initialized = 0;
if (initialized != 0) if (initialized != 0)
return; return;
virInitialize();
/* intialize the python extension module */ /* intialize the python extension module */
Py_InitModule((char *) "libvirtmod", libvirtMethods); Py_InitModule((char *) "libvirtmod", libvirtMethods);

30
python/libvir.py Normal file
View File

@ -0,0 +1,30 @@
#!/usr/bin/python -u
#
# Those are the autogenerated Python bindings for libvirt.
# Check python/generator.py in the source distribution of libvir
# to find out more about the generation process
#
import libvirtmod
import types
# The root of all libxml2 errors.
class libvirtError(Exception):
pass
#
# register the libvirt global error handler
#
def registerErrorHandler(f, ctx):
"""Register a Python written function to for error reporting.
The function is called back as f(ctx, error), with error
being a list of informations about the error being raised.
Returns 1 in case of success."""
return libvirtmod.virRegisterErrorHandler(f,ctx)
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
#
# Everything before this line comes from libvir.py
# Everything after this line is automatically generated
#
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

View File

@ -6,10 +6,26 @@
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/> <arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<return type='int *' info="the list of ID or None in case of error"/> <return type='int *' info="the list of ID or None in case of error"/>
</function> </function>
<function name='virDomainGetInfo' file='libvir' module='libvir'> <function name='virDomainLookupByUUID' file='python'>
<info>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.</info> <info>Try to lookup a domain on the given hypervisor based on its UUID.</info>
<return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='uuid' type='const unsigned char *' info='the UUID string for the domain, must be 16 bytes'/>
</function>
<function name='virDomainGetInfo' file='python'>
<info>Extract informations about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.</info>
<return type='int *' info='the list of informations or None in case of error'/> <return type='int *' info='the list of informations or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/> <arg name='domain' type='virDomainPtr' info='a domain object'/>
</function> </function>
<function name='virNodeGetInfo' file='python'>
<info>Extract hardware informations about the Node.</info>
<return type='int *' info='the list of informations or None in case of error'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
</function>
<function name='virDomainGetUUID' file='python'>
<info>Extract the UUID unique Identifier of a domain.</info>
<return type='char *' info='the 16 bytes string or None in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
</function>
</symbols> </symbols>
</api> </api>

View File

@ -8,6 +8,7 @@
#include <Python.h> #include <Python.h>
#include <libvirt.h> #include <libvirt.h>
#include <virterror.h>
#ifdef __GNUC__ #ifdef __GNUC__
#ifdef ATTRIBUTE_UNUSED #ifdef ATTRIBUTE_UNUSED

34
python/tests/Makefile.am Normal file
View File

@ -0,0 +1,34 @@
EXAMPLE_DIR = $(datadir)/doc/libvirt-python-$(LIBVIRT_VERSION)/examples
PYTESTS= \
basic.py \
create.py \
uuid.py \
error.py \
node.py
EXTRA_DIST = $(PYTESTS)
if WITH_PYTHON
tests: $(PYTESTS)
@echo "## running Python regression tests"
-@(PYTHONPATH="..:../.libs:../src/.libs:$(srcdir)/../src:$$PYTHONPATH";\
export PYTHONPATH; \
LD_LIBRARY_PATH="$(top_builddir)/src/.libs:$$LD_LIBRARY_PATH" ; \
export LD_LIBRARY_PATH; \
for test in $(PYTESTS) ; \
do log=`$(PYTHON) $(srcdir)/$$test` ; \
if [ "`echo $$log | grep OK`" = "" ] ; then \
echo "-- $$test" ; echo "$$log" ; fi ; done)
else
tests:
endif
clean:
rm -f *.pyc core
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(EXAMPLE_DIR)
-(for test in $(PYTESTS); \
do @INSTALL@ -m 0644 $(srcdir)/$$test $(DESTDIR)$(EXAMPLE_DIR) ; done)

31
python/tests/basic.py Executable file
View File

@ -0,0 +1,31 @@
#!/usr/bin/python -u
import libvirt
import sys
import os
if not os.access("/proc/xen", os.R_OK):
print 'System is not running a Xen kernel'
sys.exit(1)
conn = libvirt.openReadOnly(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
# print conn
try:
dom0 = conn.lookupByName("Domain-0")
except:
print 'Failed to find the main domain'
sys.exit(1)
# print dom0
print "Domain 0: id %d running %s" % (dom0.ID(), dom0.OSType())
print dom0.info()
del dom0
del conn
print "OK"
sys.exit(0)

146
python/tests/create.py Executable file
View File

@ -0,0 +1,146 @@
#!/usr/bin/python -u
import libvirt
import sys
import os
import time
if not os.access("/proc/xen", os.R_OK):
print 'System is not running a Xen kernel'
sys.exit(1)
#
# Try to provide default OS images paths here, of course non standard
#
osroots = [
"/u/fc4-2.img",
"/u/fc4.img",
"/xen/fc4.img",
]
okay = 1
osroot = None
for root in osroots:
if os.access(root, os.R_OK):
osroot = root
break
if osroot == None:
print "Could not find a guest OS root, edit to add the path in osroots"
sys.exit(1)
kernel=open("/proc/version").read().split()
kernelOv = kernel[2]
if kernelOv.find('hypervisor'):
kernelU = "/boot/vmlinuz-" + kernelOv.replace('hypervisor', 'guest')
initrdU = "/boot/initrd-" + kernelOv.replace('hypervisor', 'guest') + ".img"
elif kernelOv.find('xen0'):
kernelU = "/boot/vmlinuz-" + kernelOv.replace('xen0', 'xenU')
initrdU = "/boot/initrd-" + kernelOv.replace('xen0', 'xenU') + ".img"
if not os.access(kernelU, os.R_OK):
print "Did not found the guest kernel %s" % (kernelU)
sys.exit(1)
kernelU = "<kernel>" + kernelU + "</kernel>"
if not os.access(initrdU, os.R_OK):
print "Did not found the guest initrd %s" % (initrdU)
initrdU = ""
else:
initrdU = "<initrd>" + initrdU + "</initrd>"
conn = libvirt.openReadOnly(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
xmldesc="""<domain type='xen'>
<name>test</name>
<os>
<type>linux</type>
""" + kernelU + initrdU + """
<cmdline> root=/dev/sda1 ro selinux=0 3</cmdline>
</os>
<memory>131072</memory>
<vcpu>1</vcpu>
<devices>
<disk type='file'>
<source file='%s'/>
<target dev='sda1'/>
</disk>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='aa:00:00:00:00:12'/>
<script path='/etc/xen/scripts/vif-bridge'/>
</interface>
</devices>
</domain>
""" % (osroot)
dom = conn.createLinux(xmldesc, 0)
if dom == None:
print 'Failed to create a test domain'
sys.exit(1)
# print dom
print "Domain: id %d running %s" % (dom.ID(), dom.OSType())
print "Suspending test domain for 5 seconds"
if dom.suspend() != 0:
print 'Failed to suspend domain test'
dom.destroy()
del dom
del conn
sys.exit(1)
infos = dom.info()
time.sleep(5)
infos2 = dom.info()
if infos[4] != infos2[4]:
print 'Suspended domain test got CPU cycles'
okay = 0
print "resuming test domain for 10 seconds"
if dom.resume() != 0:
print 'Failed to resume domain test'
dom.destroy()
del dom
del conn
sys.exit(1)
time.sleep(10)
print "shutdown of test domain"
if dom.shutdown() != 0:
okay = 0
print 'Failed to shutdown domain test'
i = 0
while i < 30:
time.sleep(1)
i = i + 1
try:
t = dom.info()[4]
except:
okay = 0
t = -1
break;
if t == 0:
break
if t != 0:
print 'Shutdown failed destroying domain test'
okay = 0
dom.destroy()
del dom
del conn
if okay == 1:
print "OK"
sys.exit(0)

42
python/tests/error.py Executable file
View File

@ -0,0 +1,42 @@
#!/usr/bin/python -u
#
# Tests global error handlers at the python level.
#
import libvirt
import sys
import os
errno = None
def handler(ctxt, err):
global errno
#print "handler(%s, %s)" % (ctxt, err)
errno = err
libvirt.registerErrorHandler(handler, 'context')
conn = libvirt.openReadOnly(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
try:
dom0 = conn.lookupByName("Does_not_exist")
print 'strange found a Does_not_exist domain'
sys.exit(1)
except:
pass
del conn
if errno == None:
print 'failed to get an error'
elif errno[0] == libvirt.VIR_ERR_NO_CONNECT or \
errno[0] == libvirt.VIR_ERR_INVALID_DOMAIN or \
errno[0] == libvirt.VIR_ERR_GET_FAILED:
print "OK"
else:
print 'got unexpected error:', errno
sys.exit(0)

34
python/tests/node.py Executable file
View File

@ -0,0 +1,34 @@
#!/usr/bin/python -u
import libvirt
import sys
import os
if not os.access("/proc/xen", os.R_OK):
print 'System is not running a Xen kernel'
sys.exit(1)
conn = libvirt.openReadOnly(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
try:
(model, memory, cpus, mhz, nodes, socket, cores, threads) = conn.getInfo()
except:
print 'Failed to extract the current node informations'
sys.exit(1)
print "Xen running on %d %s processors at %d MHz, %d MBytes of memory" % (
cpus, model, mhz, memory)
if cpus > nodes * socket * cores * threads:
print "Erroneous CPU informations"
sys.exit(1)
if cpus < nodes * socket * cores * threads:
print "Strange, running in degrated mode, some CPU are not available"
del conn
print "OK"
sys.exit(0)

41
python/tests/uuid.py Executable file
View File

@ -0,0 +1,41 @@
#!/usr/bin/python -u
import libvirt
import sys
import os
if not os.access("/proc/xen", os.R_OK):
print 'System is not running a Xen kernel'
sys.exit(1)
conn = libvirt.openReadOnly(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
ids = conn.listDomainsID()
if ids == None or len(ids) == 0:
print 'Failed to list running domains'
sys.exit(1)
id = ids[-1]
try:
dom = conn.lookupByID(id)
except:
print 'Failed to find the domain %d'
sys.exit(1)
name0 = dom.name()
uuid = dom.UUID()
print "Using domain %s" % (name0)
try:
dom2 = conn.lookupByUUID(uuid)
except:
print 'Failed to lookup domain %d based on its UUID'
sys.exit(1)
if dom2.name() != name0:
print 'lookup of %s based on UUID brings a different domain %s' % (
name0, dom2.name())
print "OK"
sys.exit(0)

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_builddir)/include -I@srcdir@/include INCLUDES = -I$(top_builddir)/include -I@top_srcdir@/include @LIBXML_CFLAGS@
DEPS = libvirt.la DEPS = libvirt.la
LDADDS = @STATIC_BINARIES@ libvirt.la LDADDS = @STATIC_BINARIES@ libvirt.la
VIRSH_LIBS = @VIRSH_LIBS@ VIRSH_LIBS = @VIRSH_LIBS@
@ -8,16 +8,19 @@ VIRSH_LIBS = @VIRSH_LIBS@
EXTRA_DIST = libvirt_sym.version EXTRA_DIST = libvirt_sym.version
lib_LTLIBRARIES = libvirt.la lib_LTLIBRARIES = libvirt.la
libvirt_la_LIBADD = libvirt_la_LIBADD = @LIBXML_LIBS@
libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \ libvirt_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libvirt_sym.version \
-version-info @LIBVIR_VERSION_INFO@ -version-info @LIBVIRT_VERSION_INFO@
libvirt_la_SOURCES = \ libvirt_la_SOURCES = \
libvirt.c internal.h \ libvirt.c internal.h \
hash.c hash.h \ hash.c hash.h \
xml.c \ xml.c xml.h \
xen_internal.c xen_internal.h \ xen_internal.c xen_internal.h \
xs_internal.c xs_internal.h \
xend_internal.c xend_internal.h \ xend_internal.c xend_internal.h \
sexpr.c sexpr.h sexpr.c sexpr.h \
virterror.c \
driver.h
bin_PROGRAMS=virsh bin_PROGRAMS=virsh

144
src/driver.h Normal file
View File

@ -0,0 +1,144 @@
/*
* driver.h: description of the set of interfaces provided by a
* entry point to the virtualization engine
*/
#ifndef __VIR_DRIVER_H__
#define __VIR_DRIVER_H__
#include "libvirt.h"
#include "virterror.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum {
VIR_DRV_OPEN_QUIET = 1,
VIR_DRV_OPEN_RO = 2
} virDrvOpenFlag;
typedef int
(*virDrvInit) (void);
typedef int
(*virDrvOpen) (virConnectPtr conn,
const char *name,
int flags);
typedef int
(*virDrvClose) (virConnectPtr conn);
typedef const char *
(*virDrvGetType) (virConnectPtr conn);
typedef int
(*virDrvGetVersion) (virConnectPtr conn,
unsigned long *hvVer);
typedef int
(*virDrvNodeGetInfo) (virConnectPtr conn,
virNodeInfoPtr info);
typedef int
(*virDrvListDomains) (virConnectPtr conn,
int *ids,
int maxids);
typedef int
(*virDrvNumOfDomains) (virConnectPtr conn);
typedef virDomainPtr
(*virDrvDomainCreateLinux) (virConnectPtr conn,
const char *xmlDesc,
unsigned int flags);
typedef virDomainPtr
(*virDrvDomainLookupByID) (virConnectPtr conn,
int id);
typedef virDomainPtr
(*virDrvDomainLookupByUUID) (virConnectPtr conn,
const unsigned char *uuid);
typedef virDomainPtr
(*virDrvDomainLookupByName) (virConnectPtr conn,
const char *name);
typedef int
(*virDrvDomainSuspend) (virDomainPtr domain);
typedef int
(*virDrvDomainResume) (virDomainPtr domain);
typedef int
(*virDrvDomainShutdown) (virDomainPtr domain);
typedef int
(*virDrvDomainReboot) (virDomainPtr domain,
unsigned int flags);
typedef int
(*virDrvDomainDestroy) (virDomainPtr domain);
typedef int
(*virDrvDomainFree) (virDomainPtr domain);
typedef const char *
(*virDrvDomainGetName) (virDomainPtr domain);
typedef int
(*virDrvDomainGetID) (virDomainPtr domain);
typedef int
(*virDrvDomainGetUUID) (virDomainPtr domain,
unsigned char *uuid);
typedef char *
(*virDrvDomainGetOSType) (virDomainPtr domain);
typedef unsigned long
(*virDrvDomainGetMaxMemory) (virDomainPtr domain);
typedef int
(*virDrvDomainSetMaxMemory) (virDomainPtr domain,
unsigned long memory);
typedef int
(*virDrvDomainGetInfo) (virDomainPtr domain,
virDomainInfoPtr info);
typedef int
(*virDrvDomainSave) (virDomainPtr domain,
const char *to);
typedef int
(*virDrvDomainRestore) (virConnectPtr conn,
const char *from);
typedef struct _virDriver virDriver;
typedef virDriver *virDriverPtr;
/**
* _virDriver:
*
* Structure associated to a virtualization driver, defining the various
* entry points for it.
*/
struct _virDriver {
const char *name;
virDrvInit init;
virDrvOpen open;
virDrvClose close;
virDrvGetType type;
virDrvGetVersion version;
virDrvNodeGetInfo nodeGetInfo;
virDrvListDomains listDomains;
virDrvNumOfDomains numOfDomains;
virDrvDomainCreateLinux domainCreateLinux;
virDrvDomainLookupByID domainLookupByID;
virDrvDomainLookupByUUID domainLookupByUUID;
virDrvDomainLookupByName domainLookupByName;
virDrvDomainSuspend domainSuspend;
virDrvDomainResume domainResume;
virDrvDomainShutdown domainShutdown;
virDrvDomainReboot domainReboot;
virDrvDomainDestroy domainDestroy;
virDrvDomainFree domainFree;
virDrvDomainGetName domainGetName;
virDrvDomainGetID domainGetID;
virDrvDomainGetUUID domainGetUUID;
virDrvDomainGetOSType domainGetOSType;
virDrvDomainGetMaxMemory domainGetMaxMemory;
virDrvDomainSetMaxMemory domainSetMaxMemory;
virDrvDomainGetInfo domainGetInfo;
virDrvDomainSave domainSave;
virDrvDomainRestore domainRestore;
};
/*
* Registration
* TODO: also need ways to (des)activate a given driver
* lookup based on the URI given in a virConnectOpen(ReadOnly)
*/
int virRegisterDriver(virDriverPtr);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __VIR_DRIVER_H__ */

View File

@ -1,5 +1,5 @@
/* /*
* hash.c: chained hash tables * hash.c: chained hash tables for domain and domain/connection deallocations
* *
* Reference: Your favorite introductory book on algorithms * Reference: Your favorite introductory book on algorithms
* *
@ -15,12 +15,13 @@
* CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
* *
* Author: breese@users.sourceforge.net * Author: breese@users.sourceforge.net
* Daniel Veillard <veillard@redhat.com>
*/ */
#define IN_LIBXML
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <libxml/threads.h>
#include "internal.h"
#include "hash.h" #include "hash.h"
#define MAX_HASH_LEN 8 #define MAX_HASH_LEN 8
@ -53,15 +54,17 @@ struct _virHashTable {
* Calculate the hash key * Calculate the hash key
*/ */
static unsigned long static unsigned long
virHashComputeKey(virHashTablePtr table, const char *name) { virHashComputeKey(virHashTablePtr table, const char *name)
{
unsigned long value = 0L; unsigned long value = 0L;
char ch; char ch;
if (name != NULL) { if (name != NULL) {
value += 30 * (*name); value += 30 * (*name);
while ((ch = *name++) != 0) { while ((ch = *name++) != 0) {
value = value ^ ((value << 5) + (value >> 3) + (unsigned long)ch); value =
} value ^ ((value << 5) + (value >> 3) + (unsigned long) ch);
}
} }
return (value % table->size); return (value % table->size);
} }
@ -75,24 +78,25 @@ virHashComputeKey(virHashTablePtr table, const char *name) {
* Returns the newly created object, or NULL if an error occured. * Returns the newly created object, or NULL if an error occured.
*/ */
virHashTablePtr virHashTablePtr
virHashCreate(int size) { virHashCreate(int size)
{
virHashTablePtr table; virHashTablePtr table;
if (size <= 0) if (size <= 0)
size = 256; size = 256;
table = malloc(sizeof(virHashTable)); table = malloc(sizeof(virHashTable));
if (table) { if (table) {
table->size = size; table->size = size;
table->nbElems = 0; table->nbElems = 0;
table->table = malloc(size * sizeof(virHashEntry)); table->table = malloc(size * sizeof(virHashEntry));
if (table->table) { if (table->table) {
memset(table->table, 0, size * sizeof(virHashEntry)); memset(table->table, 0, size * sizeof(virHashEntry));
return(table); return (table);
} }
free(table); free(table);
} }
return(NULL); return (NULL);
} }
/** /**
@ -105,84 +109,87 @@ virHashCreate(int size) {
* Returns 0 in case of success, -1 in case of failure * Returns 0 in case of success, -1 in case of failure
*/ */
static int static int
virHashGrow(virHashTablePtr table, int size) { virHashGrow(virHashTablePtr table, int size)
{
unsigned long key; unsigned long key;
int oldsize, i; int oldsize, i;
virHashEntryPtr iter, next; virHashEntryPtr iter, next;
struct _virHashEntry *oldtable; struct _virHashEntry *oldtable;
#ifdef DEBUG_GROW #ifdef DEBUG_GROW
unsigned long nbElem = 0; unsigned long nbElem = 0;
#endif #endif
if (table == NULL) if (table == NULL)
return(-1); return (-1);
if (size < 8) if (size < 8)
return(-1); return (-1);
if (size > 8 * 2048) if (size > 8 * 2048)
return(-1); return (-1);
oldsize = table->size; oldsize = table->size;
oldtable = table->table; oldtable = table->table;
if (oldtable == NULL) if (oldtable == NULL)
return(-1); return (-1);
table->table = malloc(size * sizeof(virHashEntry)); table->table = malloc(size * sizeof(virHashEntry));
if (table->table == NULL) { if (table->table == NULL) {
table->table = oldtable; table->table = oldtable;
return(-1); return (-1);
} }
memset(table->table, 0, size * sizeof(virHashEntry)); memset(table->table, 0, size * sizeof(virHashEntry));
table->size = size; table->size = size;
/* If the two loops are merged, there would be situations where /* If the two loops are merged, there would be situations where
a new entry needs to allocated and data copied into it from * a new entry needs to allocated and data copied into it from
the main table. So instead, we run through the array twice, first * the main table. So instead, we run through the array twice, first
copying all the elements in the main array (where we can't get * copying all the elements in the main array (where we can't get
conflicts) and then the rest, so we only free (and don't allocate) * conflicts) and then the rest, so we only free (and don't allocate)
*/ */
for (i = 0; i < oldsize; i++) { for (i = 0; i < oldsize; i++) {
if (oldtable[i].valid == 0) if (oldtable[i].valid == 0)
continue; continue;
key = virHashComputeKey(table, oldtable[i].name); key = virHashComputeKey(table, oldtable[i].name);
memcpy(&(table->table[key]), &(oldtable[i]), sizeof(virHashEntry)); memcpy(&(table->table[key]), &(oldtable[i]), sizeof(virHashEntry));
table->table[key].next = NULL; table->table[key].next = NULL;
} }
for (i = 0; i < oldsize; i++) { for (i = 0; i < oldsize; i++) {
iter = oldtable[i].next; iter = oldtable[i].next;
while (iter) { while (iter) {
next = iter->next; next = iter->next;
/* /*
* put back the entry in the new table * put back the entry in the new table
*/ */
key = virHashComputeKey(table, iter->name); key = virHashComputeKey(table, iter->name);
if (table->table[key].valid == 0) { if (table->table[key].valid == 0) {
memcpy(&(table->table[key]), iter, sizeof(virHashEntry)); memcpy(&(table->table[key]), iter, sizeof(virHashEntry));
table->table[key].next = NULL; table->table[key].next = NULL;
free(iter); free(iter);
} else { } else {
iter->next = table->table[key].next; iter->next = table->table[key].next;
table->table[key].next = iter; table->table[key].next = iter;
} }
#ifdef DEBUG_GROW #ifdef DEBUG_GROW
nbElem++; nbElem++;
#endif #endif
iter = next; iter = next;
} }
} }
free(oldtable); free(oldtable);
#ifdef DEBUG_GROW #ifdef DEBUG_GROW
xmlGenericError(xmlGenericErrorContext, xmlGenericError(xmlGenericErrorContext,
"virHashGrow : from %d to %d, %d elems\n", oldsize, size, nbElem); "virHashGrow : from %d to %d, %d elems\n", oldsize,
size, nbElem);
#endif #endif
return(0); return (0);
} }
/** /**
@ -194,7 +201,8 @@ virHashGrow(virHashTablePtr table, int size) {
* deallocated with @f if provided. * deallocated with @f if provided.
*/ */
void void
virHashFree(virHashTablePtr table, virHashDeallocator f) { virHashFree(virHashTablePtr table, virHashDeallocator f)
{
int i; int i;
virHashEntryPtr iter; virHashEntryPtr iter;
virHashEntryPtr next; virHashEntryPtr next;
@ -202,30 +210,30 @@ virHashFree(virHashTablePtr table, virHashDeallocator f) {
int nbElems; int nbElems;
if (table == NULL) if (table == NULL)
return; return;
if (table->table) { if (table->table) {
nbElems = table->nbElems; nbElems = table->nbElems;
for(i = 0; (i < table->size) && (nbElems > 0); i++) { for (i = 0; (i < table->size) && (nbElems > 0); i++) {
iter = &(table->table[i]); iter = &(table->table[i]);
if (iter->valid == 0) if (iter->valid == 0)
continue; continue;
inside_table = 1; inside_table = 1;
while (iter) { while (iter) {
next = iter->next; next = iter->next;
if ((f != NULL) && (iter->payload != NULL)) if ((f != NULL) && (iter->payload != NULL))
f(iter->payload, iter->name); f(iter->payload, iter->name);
if (iter->name) if (iter->name)
free(iter->name); free(iter->name);
iter->payload = NULL; iter->payload = NULL;
if (!inside_table) if (!inside_table)
free(iter); free(iter);
nbElems--; nbElems--;
inside_table = 0; inside_table = 0;
iter = next; iter = next;
} }
inside_table = 0; inside_table = 0;
} }
free(table->table); free(table->table);
} }
free(table); free(table);
} }
@ -242,38 +250,38 @@ virHashFree(virHashTablePtr table, virHashDeallocator f) {
* Returns 0 the addition succeeded and -1 in case of error. * Returns 0 the addition succeeded and -1 in case of error.
*/ */
int int
virHashAddEntry(virHashTablePtr table, const char *name, virHashAddEntry(virHashTablePtr table, const char *name, void *userdata)
void *userdata) { {
unsigned long key, len = 0; unsigned long key, len = 0;
virHashEntryPtr entry; virHashEntryPtr entry;
virHashEntryPtr insert; virHashEntryPtr insert;
if ((table == NULL) || (name == NULL)) if ((table == NULL) || (name == NULL))
return(-1); return (-1);
/* /*
* Check for duplicate and insertion location. * Check for duplicate and insertion location.
*/ */
key = virHashComputeKey(table, name); key = virHashComputeKey(table, name);
if (table->table[key].valid == 0) { if (table->table[key].valid == 0) {
insert = NULL; insert = NULL;
} else { } else {
for (insert = &(table->table[key]); insert->next != NULL; for (insert = &(table->table[key]); insert->next != NULL;
insert = insert->next) { insert = insert->next) {
if (!strcmp(insert->name, name)) if (!strcmp(insert->name, name))
return(-1); return (-1);
len++; len++;
} }
if (!strcmp(insert->name, name)) if (!strcmp(insert->name, name))
return(-1); return (-1);
} }
if (insert == NULL) { if (insert == NULL) {
entry = &(table->table[key]); entry = &(table->table[key]);
} else { } else {
entry = malloc(sizeof(virHashEntry)); entry = malloc(sizeof(virHashEntry));
if (entry == NULL) if (entry == NULL)
return(-1); return (-1);
} }
entry->name = strdup(name); entry->name = strdup(name);
@ -282,15 +290,15 @@ virHashAddEntry(virHashTablePtr table, const char *name,
entry->valid = 1; entry->valid = 1;
if (insert != NULL) if (insert != NULL)
insert->next = entry; insert->next = entry;
table->nbElems++; table->nbElems++;
if (len > MAX_HASH_LEN) if (len > MAX_HASH_LEN)
virHashGrow(table, MAX_HASH_LEN * table->size); virHashGrow(table, MAX_HASH_LEN * table->size);
return(0); return (0);
} }
/** /**
@ -308,44 +316,45 @@ virHashAddEntry(virHashTablePtr table, const char *name,
*/ */
int int
virHashUpdateEntry(virHashTablePtr table, const char *name, virHashUpdateEntry(virHashTablePtr table, const char *name,
void *userdata, virHashDeallocator f) { void *userdata, virHashDeallocator f)
{
unsigned long key; unsigned long key;
virHashEntryPtr entry; virHashEntryPtr entry;
virHashEntryPtr insert; virHashEntryPtr insert;
if ((table == NULL) || name == NULL) if ((table == NULL) || name == NULL)
return(-1); return (-1);
/* /*
* Check for duplicate and insertion location. * Check for duplicate and insertion location.
*/ */
key = virHashComputeKey(table, name); key = virHashComputeKey(table, name);
if (table->table[key].valid == 0) { if (table->table[key].valid == 0) {
insert = NULL; insert = NULL;
} else { } else {
for (insert = &(table->table[key]); insert->next != NULL; for (insert = &(table->table[key]); insert->next != NULL;
insert = insert->next) { insert = insert->next) {
if (!strcmp(insert->name, name)) { if (!strcmp(insert->name, name)) {
if (f) if (f)
f(insert->payload, insert->name); f(insert->payload, insert->name);
insert->payload = userdata; insert->payload = userdata;
return(0); return (0);
} }
} }
if (!strcmp(insert->name, name)) { if (!strcmp(insert->name, name)) {
if (f) if (f)
f(insert->payload, insert->name); f(insert->payload, insert->name);
insert->payload = userdata; insert->payload = userdata;
return(0); return (0);
} }
} }
if (insert == NULL) { if (insert == NULL) {
entry = &(table->table[key]); entry = &(table->table[key]);
} else { } else {
entry = malloc(sizeof(virHashEntry)); entry = malloc(sizeof(virHashEntry));
if (entry == NULL) if (entry == NULL)
return(-1); return (-1);
} }
entry->name = strdup(name); entry->name = strdup(name);
@ -356,9 +365,9 @@ virHashUpdateEntry(virHashTablePtr table, const char *name,
if (insert != NULL) { if (insert != NULL) {
insert->next = entry; insert->next = entry;
} }
return(0); return (0);
} }
/** /**
@ -371,22 +380,23 @@ virHashUpdateEntry(virHashTablePtr table, const char *name,
* Returns the a pointer to the userdata * Returns the a pointer to the userdata
*/ */
void * void *
virHashLookup(virHashTablePtr table, const char *name) { virHashLookup(virHashTablePtr table, const char *name)
{
unsigned long key; unsigned long key;
virHashEntryPtr entry; virHashEntryPtr entry;
if (table == NULL) if (table == NULL)
return(NULL); return (NULL);
if (name == NULL) if (name == NULL)
return(NULL); return (NULL);
key = virHashComputeKey(table, name); key = virHashComputeKey(table, name);
if (table->table[key].valid == 0) if (table->table[key].valid == 0)
return(NULL); return (NULL);
for (entry = &(table->table[key]); entry != NULL; entry = entry->next) { for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
if (!strcmp(entry->name, name)) if (!strcmp(entry->name, name))
return(entry->payload); return (entry->payload);
} }
return(NULL); return (NULL);
} }
/** /**
@ -399,10 +409,11 @@ virHashLookup(virHashTablePtr table, const char *name) {
* -1 in case of error * -1 in case of error
*/ */
int int
virHashSize(virHashTablePtr table) { virHashSize(virHashTablePtr table)
{
if (table == NULL) if (table == NULL)
return(-1); return (-1);
return(table->nbElems); return (table->nbElems);
} }
/** /**
@ -419,43 +430,296 @@ virHashSize(virHashTablePtr table) {
*/ */
int int
virHashRemoveEntry(virHashTablePtr table, const char *name, virHashRemoveEntry(virHashTablePtr table, const char *name,
virHashDeallocator f) { virHashDeallocator f)
{
unsigned long key; unsigned long key;
virHashEntryPtr entry; virHashEntryPtr entry;
virHashEntryPtr prev = NULL; virHashEntryPtr prev = NULL;
if (table == NULL || name == NULL) if (table == NULL || name == NULL)
return(-1); return (-1);
key = virHashComputeKey(table, name); key = virHashComputeKey(table, name);
if (table->table[key].valid == 0) { if (table->table[key].valid == 0) {
return(-1); return (-1);
} else { } else {
for (entry = &(table->table[key]); entry != NULL; entry = entry->next) { for (entry = &(table->table[key]); entry != NULL;
entry = entry->next) {
if (!strcmp(entry->name, name)) { if (!strcmp(entry->name, name)) {
if ((f != NULL) && (entry->payload != NULL)) if ((f != NULL) && (entry->payload != NULL))
f(entry->payload, entry->name); f(entry->payload, entry->name);
entry->payload = NULL; entry->payload = NULL;
if(entry->name) if (entry->name)
free(entry->name); free(entry->name);
if(prev) { if (prev) {
prev->next = entry->next; prev->next = entry->next;
free(entry); free(entry);
} else { } else {
if (entry->next == NULL) { if (entry->next == NULL) {
entry->valid = 0; entry->valid = 0;
} else { } else {
entry = entry->next; entry = entry->next;
memcpy(&(table->table[key]), entry, sizeof(virHashEntry)); memcpy(&(table->table[key]), entry,
free(entry); sizeof(virHashEntry));
} free(entry);
} }
}
table->nbElems--; table->nbElems--;
return(0); return (0);
} }
prev = entry; prev = entry;
} }
return(-1); return (-1);
} }
} }
/************************************************************************
* *
* Domain and Connections allocations *
* *
************************************************************************/
/**
* virHashError:
* @conn: the connection if available
* @error: the error noumber
* @info: extra information string
*
* Handle an error at the connection level
*/
static void
virHashError(virConnectPtr conn, virErrorNumber error, const char *info)
{
const char *errmsg;
if (error == VIR_ERR_OK)
return;
errmsg = __virErrorMsg(error, info);
__virRaiseError(conn, NULL, VIR_FROM_NONE, error, VIR_ERR_ERROR,
errmsg, info, NULL, 0, 0, errmsg, info);
}
/**
* virDomainFreeName:
* @domain: a domain object
*
* Destroy the domain object, this is just used by the domain hash callback.
*
* Returns 0 in case of success and -1 in case of failure.
*/
static int
virDomainFreeName(virDomainPtr domain, const char *name ATTRIBUTE_UNUSED)
{
return (virDomainFree(domain));
}
/**
* virGetConnect:
*
* Allocates a new hypervisor connection structure
*
* Returns a new pointer or NULL in case of error.
*/
virConnectPtr
virGetConnect(void) {
virConnectPtr ret;
ret = (virConnectPtr) malloc(sizeof(virConnect));
if (ret == NULL) {
virHashError(NULL, VIR_ERR_NO_MEMORY, "Allocating connection");
goto failed;
}
memset(ret, 0, sizeof(virConnect));
ret->magic = VIR_CONNECT_MAGIC;
ret->nb_drivers = 0;
ret->domains = virHashCreate(20);
if (ret->domains == NULL)
goto failed;
ret->domains_mux = xmlNewMutex();
if (ret->domains_mux == NULL)
goto failed;
ret->uses = 1;
return(ret);
failed:
if (ret != NULL) {
if (ret->domains != NULL)
virHashFree(ret->domains, (virHashDeallocator) virDomainFreeName);
if (ret->domains_mux != NULL)
xmlFreeMutex(ret->domains_mux);
free(ret);
}
return(NULL);
}
/**
* virFreeConnect:
* @conn: the hypervisor connection
*
* Release the connection. if the use count drops to zero, the structure is
* actually freed.
*
* Returns the reference count or -1 in case of failure.
*/
int
virFreeConnect(virConnectPtr conn) {
int ret;
if ((!VIR_IS_CONNECT(conn)) || (conn->domains_mux == NULL)) {
virHashError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return(-1);
}
xmlMutexLock(conn->domains_mux);
conn->uses--;
ret = conn->uses;
if (ret > 0) {
xmlMutexUnlock(conn->domains_mux);
return(ret);
}
if (conn->domains != NULL)
virHashFree(conn->domains, (virHashDeallocator) virDomainFreeName);
if (conn->domains_mux != NULL)
xmlFreeMutex(conn->domains_mux);
free(conn);
return(0);
}
/**
* virGetDomain:
* @conn: the hypervisor connection
* @name: pointer to the domain name or NULL
* @uuid: pointer to the uuid or NULL
*
* Lookup if the domain is already registered for that connection,
* if yes return a new pointer to it, if no allocate a new structure,
* and register it in the table. In any case a corresponding call to
* virFreeDomain() is needed to not leak data.
*
* Returns a pointer to the domain, or NULL in case of failure
*/
virDomainPtr
virGetDomain(virConnectPtr conn, const char *name, const char *uuid) {
virDomainPtr ret = NULL;
if ((!VIR_IS_CONNECT(conn)) || ((name == NULL) && (uuid == NULL)) ||
(conn->domains_mux == NULL)) {
virHashError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return(NULL);
}
xmlMutexLock(conn->domains_mux);
/* TODO search by UUID first as they are better differenciators */
ret = (virDomainPtr) virHashLookup(conn->domains, name);
if (ret != NULL) {
/* TODO check the UUID */
goto done;
}
/*
* not found, allocate a new one
*/
ret = (virDomainPtr) malloc(sizeof(virDomain));
if (ret == NULL) {
virHashError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
goto error;
}
memset(ret, 0, sizeof(virDomain));
ret->name = strdup(name);
if (ret->name == NULL) {
virHashError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
goto error;
}
ret->magic = VIR_DOMAIN_MAGIC;
ret->conn = conn;
if (uuid != NULL)
memcpy(&(ret->uuid[0]), uuid, 16);
if (virHashAddEntry(conn->domains, name, ret) < 0) {
virHashError(conn, VIR_ERR_INTERNAL_ERROR,
"Failed to add domain to connectio hash table");
goto error;
}
conn->uses++;
done:
ret->uses++;
xmlMutexUnlock(conn->domains_mux);
return(ret);
error:
xmlMutexUnlock(conn->domains_mux);
if (ret != NULL) {
if (ret->name != NULL)
free(ret->name );
free(ret);
}
return(NULL);
}
/**
* virFreeDomain:
* @conn: the hypervisor connection
* @domain: the domain to release
*
* Release the given domain, if the reference count drops to zero, then
* the domain is really freed.
*
* Returns the reference count or -1 in case of failure.
*/
int
virFreeDomain(virConnectPtr conn, virDomainPtr domain) {
int ret = 0;
if ((!VIR_IS_CONNECT(conn)) || (!VIR_IS_CONNECTED_DOMAIN(domain)) ||
(domain->conn != conn) || (conn->domains_mux == NULL)) {
virHashError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return(-1);
}
xmlMutexLock(conn->domains_mux);
/*
* decrement the count for the domain
*/
domain->uses--;
ret = domain->uses;
if (ret > 0)
goto done;
/* TODO search by UUID first as they are better differenciators */
if (virHashRemoveEntry(conn->domains, domain->name, NULL) < 0) {
virHashError(conn, VIR_ERR_INTERNAL_ERROR,
"domain missing from connection hash table");
goto done;
}
domain->magic = -1;
domain->handle = -1;
if (domain->path != NULL)
free(domain->path);
if (domain->name)
free(domain->name);
free(domain);
/*
* decrement the count for the connection
*/
conn->uses--;
if (conn->uses > 0)
goto done;
if (conn->domains != NULL)
virHashFree(conn->domains, (virHashDeallocator) virDomainFreeName);
if (conn->domains_mux != NULL)
xmlFreeMutex(conn->domains_mux);
free(conn);
return(0);
done:
xmlMutexUnlock(conn->domains_mux);
return(ret);
}

View File

@ -1,11 +1,12 @@
/* /*
* Summary: Chained hash tables * Summary: Chained hash tables and domain/connections handling
* Description: This module implements the hash table support used in * Description: This module implements the hash table and allocation and
* various places in the library. * deallocation of domains and connections
* *
* Copy: Copyright (C) 2005 Red Hat, Inc. * Copy: Copyright (C) 2005 Red Hat, Inc.
* *
* Author: Bjorn Reese <bjorn.reese@systematic.dk> * Author: Bjorn Reese <bjorn.reese@systematic.dk>
* Daniel Veillard <veillard@redhat.com>
*/ */
#ifndef __VIR_HASH_H__ #ifndef __VIR_HASH_H__
@ -24,6 +25,7 @@ typedef virHashTable *virHashTablePtr;
/* /*
* function types: * function types:
*/ */
/** /**
* virHashDeallocator: * virHashDeallocator:
* @payload: the data in the hash * @payload: the data in the hash
@ -31,41 +33,36 @@ typedef virHashTable *virHashTablePtr;
* *
* Callback to free data from a hash. * Callback to free data from a hash.
*/ */
typedef void (*virHashDeallocator)(void *payload, char *name); typedef void (*virHashDeallocator) (void *payload, char *name);
/* /*
* Constructor and destructor. * Constructor and destructor.
*/ */
virHashTablePtr virHashCreate (int size); virHashTablePtr virHashCreate(int size);
void void virHashFree(virHashTablePtr table, virHashDeallocator f);
virHashFree (virHashTablePtr table, int virHashSize(virHashTablePtr table);
virHashDeallocator f);
int virHashSize (virHashTablePtr table);
/* /*
* Add a new entry to the hash table. * Add a new entry to the hash table.
*/ */
int virHashAddEntry (virHashTablePtr table, int virHashAddEntry(virHashTablePtr table,
const char *name, const char *name, void *userdata);
void *userdata); int virHashUpdateEntry(virHashTablePtr table,
int virHashUpdateEntry(virHashTablePtr table, const char *name,
const char *name, void *userdata, virHashDeallocator f);
void *userdata,
virHashDeallocator f);
/* /*
* Remove an entry from the hash table. * Remove an entry from the hash table.
*/ */
int virHashRemoveEntry(virHashTablePtr table, int virHashRemoveEntry(virHashTablePtr table,
const char *name, const char *name, virHashDeallocator f);
virHashDeallocator f);
/* /*
* Retrieve the userdata. * Retrieve the userdata.
*/ */
void * virHashLookup (virHashTablePtr table, void *virHashLookup(virHashTablePtr table, const char *name);
const char *name);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* ! __VIR_HASH_H__ */ #endif /* ! __VIR_HASH_H__ */

View File

@ -10,9 +10,12 @@
#include <sys/un.h> #include <sys/un.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>
#include <libxml/threads.h>
#include "hash.h" #include "hash.h"
#include "libvirt.h" #include "libvirt.h"
#include "virterror.h"
#include "driver.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -34,6 +37,19 @@ extern "C" {
#define ATTRIBUTE_UNUSED #define ATTRIBUTE_UNUSED
#endif #endif
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes
are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
# define __format__ format
# define __printf__ printf
# endif
#endif
/** /**
* TODO: * TODO:
* *
@ -63,6 +79,8 @@ extern "C" {
#define VIR_IS_DOMAIN(obj) ((obj) && (obj)->magic==VIR_DOMAIN_MAGIC) #define VIR_IS_DOMAIN(obj) ((obj) && (obj)->magic==VIR_DOMAIN_MAGIC)
#define VIR_IS_CONNECTED_DOMAIN(obj) (VIR_IS_DOMAIN(obj) && VIR_IS_CONNECT((obj)->conn)) #define VIR_IS_CONNECTED_DOMAIN(obj) (VIR_IS_DOMAIN(obj) && VIR_IS_CONNECT((obj)->conn))
#define MAX_DRIVERS 5
/* /*
* Flags for Xen connections * Flags for Xen connections
*/ */
@ -74,56 +92,99 @@ extern "C" {
* Internal structure associated to a connection * Internal structure associated to a connection
*/ */
struct _virConnect { struct _virConnect {
unsigned int magic; /* specific value to check */ unsigned int magic; /* specific value to check */
int handle; /* internal handle used for hypercall */
struct xs_handle *xshandle; /* handle to talk to the xenstore */ int uses; /* reference count */
/* the list of available drivers for that connection */
virDriverPtr drivers[MAX_DRIVERS];
int nb_drivers;
/* extra data needed by drivers */
int handle; /* internal handle used for hypercall */
struct xs_handle *xshandle; /* handle to talk to the xenstore */
/* connection to xend */ /* connection to xend */
int type; /* PF_UNIX or PF_INET */ int type; /* PF_UNIX or PF_INET */
int len; /* lenght of addr */ int len; /* lenght of addr */
struct sockaddr *addr; /* type of address used */ struct sockaddr *addr; /* type of address used */
struct sockaddr_un addr_un; /* the unix address */ struct sockaddr_un addr_un; /* the unix address */
struct sockaddr_in addr_in; /* the inet address */ struct sockaddr_in addr_in; /* the inet address */
virHashTablePtr domains; /* hash table for known domains */ /* error stuff */
int flags; /* a set of connection flags */ virError err; /* the last error */
virErrorFunc handler; /* associated handlet */
void *userData; /* the user data */
/* misc */
xmlMutexPtr domains_mux;/* a mutex to protect the domain hash table */
virHashTablePtr domains;/* hash table for known domains */
int flags; /* a set of connection flags */
}; };
/** /**
* virDomainFlags: * virDomainFlags:
* *
* a set of special flag values associated to the domain * a set of special flag values associated to the domain
*/ */
enum { enum {
DOMAIN_IS_SHUTDOWN = (1 << 0) /* the domain is being shutdown */ DOMAIN_IS_SHUTDOWN = (1 << 0) /* the domain is being shutdown */
} virDomainFlags; } virDomainFlags;
/** /**
* _virDomain: * _virDomain:
* *
* Internal structure associated to a domain * Internal structure associated to a domain
*/ */
struct _virDomain { struct _virDomain {
unsigned int magic; /* specific value to check */ unsigned int magic; /* specific value to check */
virConnectPtr conn; /* pointer back to the connection */ int uses; /* reference count */
char *name; /* the domain external name */ virConnectPtr conn; /* pointer back to the connection */
char *path; /* the domain internal path */ char *name; /* the domain external name */
int handle; /* internal handle for the dmonain ID */ char *path; /* the domain internal path */
int flags; /* extra flags */ int handle; /* internal handle for the domnain ID */
unsigned char uuid[16]; /* the domain unique identifier */ int flags; /* extra flags */
unsigned char uuid[16]; /* the domain unique identifier */
}; };
/* /*
* Internal routines * Internal routines
*/ */
char * virDomainGetVM (virDomainPtr domain); char *virDomainGetVM(virDomainPtr domain);
char * virDomainGetVMInfo (virDomainPtr domain, char *virDomainGetVMInfo(virDomainPtr domain,
const char *vm, const char *vm, const char *name);
const char *name);
/************************************************************************
* *
* API for error handling *
* *
************************************************************************/
void __virRaiseError(virConnectPtr conn,
virDomainPtr dom,
int domain,
int code,
virErrorLevel level,
const char *str1,
const char *str2,
const char *str3,
int int1, int int2, const char *msg, ...);
const char *__virErrorMsg(virErrorNumber error, const char *info);
/************************************************************************
* *
* API for domain/connections (de)allocations *
* *
************************************************************************/
virConnectPtr virGetConnect (void);
int virFreeConnect (virConnectPtr conn);
virDomainPtr virGetDomain (virConnectPtr conn,
const char *name,
const char *uuid);
int virFreeDomain (virConnectPtr conn,
virDomainPtr domain);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __VIR_INTERNAL_H__ */
#endif /* __VIR_INTERNAL_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
{ {
global: global:
virInitialize;
virConnectClose; virConnectClose;
virConnectGetType; virConnectGetType;
virConnectGetVersion; virConnectGetVersion;
@ -11,6 +12,7 @@
virDomainDestroy; virDomainDestroy;
virDomainFree; virDomainFree;
virDomainGetID; virDomainGetID;
virDomainGetUUID;
virDomainGetInfo; virDomainGetInfo;
virDomainGetMaxMemory; virDomainGetMaxMemory;
virDomainGetName; virDomainGetName;
@ -18,12 +20,26 @@
virDomainGetXMLDesc; virDomainGetXMLDesc;
virDomainLookupByID; virDomainLookupByID;
virDomainLookupByName; virDomainLookupByName;
virDomainLookupByUUID;
virDomainRestore; virDomainRestore;
virDomainResume; virDomainResume;
virDomainSave; virDomainSave;
virDomainSetMaxMemory; virDomainSetMaxMemory;
virDomainShutdown; virDomainShutdown;
virDomainReboot;
virDomainSuspend; virDomainSuspend;
virGetVersion; virGetVersion;
virCopyLastError;
virConnSetErrorFunc;
virResetLastError;
virErrorFunc;
virResetError;
virConnGetLastError;
virGetLastError;
virSetErrorFunc;
virConnCopyLastError;
virConnResetLastError;
virDefaultErrorFunc;
virNodeGetInfo;
local: *; local: *;
}; };

View File

@ -13,6 +13,7 @@
#define _GNU_SOURCE #define _GNU_SOURCE
#include "sexpr.h" #include "sexpr.h"
#include "internal.h"
#include <malloc.h> #include <malloc.h>
#include <string.h> #include <string.h>
@ -20,6 +21,27 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
/**
* virSexprError:
* @conn: the connection if available
* @error: the error noumber
* @info: extra information string
*
* Handle an error in the S-Expression code
*/
static void
virSexprError(virErrorNumber error, const char *info)
{
const char *errmsg;
if (error == VIR_ERR_OK)
return;
errmsg = __virErrorMsg(error, info);
__virRaiseError(NULL, NULL, VIR_FROM_SEXPR, error, VIR_ERR_ERROR,
errmsg, info, NULL, 0, 0, errmsg, info);
}
/** /**
* sexpr_new: * sexpr_new:
* *
@ -34,7 +56,8 @@ sexpr_new(void)
ret = (struct sexpr *) malloc(sizeof(*ret)); ret = (struct sexpr *) malloc(sizeof(*ret));
if (ret == NULL) { if (ret == NULL) {
return(NULL); virSexprError(VIR_ERR_NO_MEMORY, "failed to allocate a node");
return (NULL);
} }
ret->kind = SEXPR_NIL; ret->kind = SEXPR_NIL;
return ret; return ret;
@ -171,11 +194,11 @@ struct sexpr *
sexpr_append(struct sexpr *lst, struct sexpr *value) sexpr_append(struct sexpr *lst, struct sexpr *value)
{ {
if (lst == NULL) if (lst == NULL)
return(NULL); return (NULL);
if (value == NULL) if (value == NULL)
return(lst); return (lst);
append(lst, value); append(lst, value);
return(lst); return (lst);
} }
/** /**
@ -197,33 +220,34 @@ sexpr2string(struct sexpr * sexpr, char *buffer, size_t n_buffer)
size_t ret = 0, tmp; size_t ret = 0, tmp;
if ((sexpr == NULL) || (buffer == NULL) || (n_buffer <= 0)) if ((sexpr == NULL) || (buffer == NULL) || (n_buffer <= 0))
return(0); return (0);
switch (sexpr->kind) { switch (sexpr->kind) {
case SEXPR_CONS: case SEXPR_CONS:
tmp = snprintf(buffer + ret, n_buffer - ret, "("); tmp = snprintf(buffer + ret, n_buffer - ret, "(");
if (tmp == 0) if (tmp == 0)
return(0); goto error;
ret += tmp; ret += tmp;
tmp = sexpr2string(sexpr->car, buffer + ret, n_buffer - ret); tmp = sexpr2string(sexpr->car, buffer + ret, n_buffer - ret);
if (tmp == 0) if (tmp == 0)
return(0); goto error;
ret += tmp; ret += tmp;
while (sexpr->cdr->kind != SEXPR_NIL) { while (sexpr->cdr->kind != SEXPR_NIL) {
sexpr = sexpr->cdr; sexpr = sexpr->cdr;
tmp = snprintf(buffer + ret, n_buffer - ret, " "); tmp = snprintf(buffer + ret, n_buffer - ret, " ");
if (tmp == 0) if (tmp == 0)
return(0); goto error;
ret += tmp; ret += tmp;
tmp = sexpr2string(sexpr->car, buffer + ret, n_buffer - ret); tmp =
if (tmp == 0) sexpr2string(sexpr->car, buffer + ret, n_buffer - ret);
return(0); if (tmp == 0)
ret += tmp; goto error;
ret += tmp;
} }
tmp = snprintf(buffer + ret, n_buffer - ret, ")"); tmp = snprintf(buffer + ret, n_buffer - ret, ")");
if (tmp == 0) if (tmp == 0)
return(0); goto error;
ret += tmp; ret += tmp;
break; break;
case SEXPR_VALUE: case SEXPR_VALUE:
if (strchr(sexpr->value, ' ')) if (strchr(sexpr->value, ' '))
@ -232,17 +256,21 @@ sexpr2string(struct sexpr * sexpr, char *buffer, size_t n_buffer)
else else
tmp = snprintf(buffer + ret, n_buffer - ret, "%s", tmp = snprintf(buffer + ret, n_buffer - ret, "%s",
sexpr->value); sexpr->value);
if (tmp == 0) if (tmp == 0)
return(0); goto error;
ret += tmp; ret += tmp;
break; break;
case SEXPR_NIL: case SEXPR_NIL:
break; break;
default: default:
return(0); goto error;
} }
return(ret); return (ret);
error:
buffer[n_buffer - 1] = 0;
virSexprError(VIR_ERR_SEXPR_SERIAL, buffer);
return (0);
} }
#define IS_SPACE(c) ((c == 0x20) || (c == 0x9) || (c == 0xD) || (c == 0xA)) #define IS_SPACE(c) ((c == 0x20) || (c == 0x9) || (c == 0xD) || (c == 0xA))
@ -252,7 +280,7 @@ trim(const char *string)
{ {
while (IS_SPACE(*string)) while (IS_SPACE(*string))
string++; string++;
return(string); return (string);
} }
/** /**
@ -319,6 +347,10 @@ _string2sexpr(const char *buffer, size_t * end)
} }
ret->value = strndup(start, ptr - start); ret->value = strndup(start, ptr - start);
if (ret->value == NULL) {
virSexprError(VIR_ERR_NO_MEMORY,
"failed to copy a string");
}
if (*ptr == '\'') if (*ptr == '\'')
ptr++; ptr++;
@ -330,14 +362,24 @@ _string2sexpr(const char *buffer, size_t * end)
} }
ret->value = strndup(start, ptr - start); ret->value = strndup(start, ptr - start);
if (ret->value == NULL) {
virSexprError(VIR_ERR_NO_MEMORY,
"failed to copy a string");
}
} }
ret->kind = SEXPR_VALUE; ret->kind = SEXPR_VALUE;
if (ret->value == NULL)
goto error;
} }
*end = ptr - buffer; *end = ptr - buffer;
return ret; return ret;
error:
sexpr_free(ret);
return (NULL);
} }
/** /**
@ -377,7 +419,7 @@ sexpr_lookup(struct sexpr *sexpr, const char *node)
char buffer[4096], *ptr, *token; char buffer[4096], *ptr, *token;
if ((node == NULL) || (sexpr == NULL)) if ((node == NULL) || (sexpr == NULL))
return(NULL); return (NULL);
snprintf(buffer, sizeof(buffer), "%s", node); snprintf(buffer, sizeof(buffer), "%s", node);
@ -399,7 +441,7 @@ sexpr_lookup(struct sexpr *sexpr, const char *node)
continue; continue;
sexpr = sexpr->cdr; sexpr = sexpr->cdr;
for (i=sexpr; i->kind != SEXPR_NIL; i=i->cdr) { for (i = sexpr; i->kind != SEXPR_NIL; i = i->cdr) {
if (i->kind != SEXPR_CONS || if (i->kind != SEXPR_CONS ||
i->car->kind != SEXPR_CONS || i->car->kind != SEXPR_CONS ||
i->car->car->kind != SEXPR_VALUE) { i->car->car->kind != SEXPR_VALUE) {

View File

@ -33,24 +33,17 @@ struct sexpr {
}; };
/* conversion to/from strings */ /* conversion to/from strings */
size_t sexpr2string (struct sexpr *sexpr, size_t sexpr2string(struct sexpr *sexpr, char *buffer, size_t n_buffer);
char *buffer, struct sexpr *string2sexpr(const char *buffer);
size_t n_buffer);
struct sexpr * string2sexpr (const char *buffer);
/* constructors and destructors */ /* constructors and destructors */
struct sexpr * sexpr_nil (void); struct sexpr *sexpr_nil(void);
struct sexpr * sexpr_string (const char *str, struct sexpr *sexpr_string(const char *str, ssize_t len);
ssize_t len); struct sexpr *sexpr_cons(struct sexpr *car, struct sexpr *cdr);
struct sexpr * sexpr_cons (struct sexpr *car, struct sexpr *sexpr_append(struct sexpr *lst, struct sexpr *item);
struct sexpr *cdr); void sexpr_free(struct sexpr *sexpr);
struct sexpr * sexpr_append (struct sexpr *lst,
struct sexpr *item);
void sexpr_free (struct sexpr *sexpr);
/* lookup in S-Expressions */ /* lookup in S-Expressions */
const char * sexpr_node (struct sexpr *sexpr, const char *sexpr_node(struct sexpr *sexpr, const char *node);
const char *node); struct sexpr *sexpr_lookup(struct sexpr *sexpr, const char *node);
struct sexpr * sexpr_lookup (struct sexpr *sexpr,
const char *node);
#endif #endif

File diff suppressed because it is too large Load Diff

508
src/virterror.c Normal file
View File

@ -0,0 +1,508 @@
/*
* virterror.c: implements error handling and reporting code for libvirt
*
* Copy: Copyright (C) 2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Author: Daniel Veillard <veillard@redhat.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "libvirt.h"
#include "virterror.h"
#include "internal.h"
static virError lastErr = /* the last error */
{ 0, 0, NULL, VIR_ERR_NONE, NULL, NULL, NULL, NULL, NULL, 0, 0 };
static virErrorFunc virErrorHandler = NULL; /* global error handlet */
static void *virUserData = NULL; /* associated data */
/*
* Macro used to format the message as a string in __virRaiseError
* and borrowed from libxml2.
*/
#define VIR_GET_VAR_STR(msg, str) { \
int size, prev_size = -1; \
int chars; \
char *larger; \
va_list ap; \
\
str = (char *) malloc(150); \
if (str != NULL) { \
\
size = 150; \
\
while (1) { \
va_start(ap, msg); \
chars = vsnprintf(str, size, msg, ap); \
va_end(ap); \
if ((chars > -1) && (chars < size)) { \
if (prev_size == chars) { \
break; \
} else { \
prev_size = chars; \
} \
} \
if (chars > -1) \
size += chars + 1; \
else \
size += 100; \
if ((larger = (char *) realloc(str, size)) == NULL) { \
break; \
} \
str = larger; \
}} \
}
/*
* virGetLastError:
*
* Provide a pointer to the last error caught at the library level
* Simpler but may not be suitable for multithreaded accesses, in which
* case use virCopyLastError()
*
* Returns a pointer to the last error or NULL if none occured.
*/
virErrorPtr
virGetLastError(void)
{
if (lastErr.code == VIR_ERR_OK)
return (NULL);
return (&lastErr);
}
/*
* virCopyLastError:
* @to: target to receive the copy
*
* Copy the content of the last error caught at the library level
* One will need to free the result with virResetError()
*
* Returns 0 if no error was found and the error code otherwise and -1 in case
* of parameter error.
*/
int
virCopyLastError(virErrorPtr to)
{
if (to == NULL)
return (-1);
if (lastErr.code == VIR_ERR_OK)
return (0);
memcpy(to, &lastErr, sizeof(virError));
return (lastErr.code);
}
/**
* virResetError:
* @err: pointer to the virError to clean up
*
* Reset the error being pointed to
*/
void
virResetError(virErrorPtr err)
{
if (err == NULL)
return;
if (err->message != NULL)
free(err->message);
if (err->str1 != NULL)
free(err->str1);
if (err->str2 != NULL)
free(err->str2);
if (err->str3 != NULL)
free(err->str3);
memset(err, 0, sizeof(virError));
}
/**
* virResetLastError:
*
* Reset the last error caught at the library level.
*/
void
virResetLastError(void)
{
virResetError(&lastErr);
}
/**
* virConnGetLastError:
* @conn: pointer to the hypervisor connection
*
* Provide a pointer to the last error caught on that connection
* Simpler but may not be suitable for multithreaded accesses, in which
* case use virConnCopyLastError()
*
* Returns a pointer to the last error or NULL if none occured.
*/
virErrorPtr
virConnGetLastError(virConnectPtr conn)
{
if (conn == NULL)
return (NULL);
return (&conn->err);
}
/**
* virConnCopyLastError:
* @conn: pointer to the hypervisor connection
* @to: target to receive the copy
*
* Copy the content of the last error caught on that connection
* One will need to free the result with virResetError()
*
* Returns 0 if no error was found and the error code otherwise and -1 in case
* of parameter error.
*/
int
virConnCopyLastError(virConnectPtr conn, virErrorPtr to)
{
if (conn == NULL)
return (-1);
if (to == NULL)
return (-1);
if (conn->err.code == VIR_ERR_OK)
return (0);
memcpy(to, &conn->err, sizeof(virError));
return (conn->err.code);
}
/**
* virConnResetLastError:
* @conn: pointer to the hypervisor connection
*
* Reset the last error caught on that connection
*/
void
virConnResetLastError(virConnectPtr conn)
{
if (conn == NULL)
return;
virResetError(&conn->err);
}
/**
* virSetErrorFunc:
* @userData: pointer to the user data provided in the handler callback
* @handler: the function to get called in case of error or NULL
*
* Set a library global error handling function, if @handler is NULL,
* it will reset to default printing on stderr. The error raised there
* are those for which no handler at the connection level could caught.
*/
void
virSetErrorFunc(void *userData, virErrorFunc handler)
{
virErrorHandler = handler;
virUserData = userData;
}
/**
* virConnSetErrorFunc:
* @conn: pointer to the hypervisor connection
* @userData: pointer to the user data provided in the handler callback
* @handler: the function to get called in case of error or NULL
*
* Set a connection error handling function, if @handler is NULL
* it will reset to default which is to pass error back to the global
* library handler.
*/
void
virConnSetErrorFunc(virConnectPtr conn, void *userData,
virErrorFunc handler)
{
if (conn == NULL)
return;
conn->handler = handler;
conn->userData = userData;
}
/**
* virDefaultErrorFunc:
* @err: pointer to the error.
*
* Default routine reporting an error to stderr.
*/
void
virDefaultErrorFunc(virErrorPtr err)
{
const char *lvl = "", *dom = "", *domain = "";
int len;
if ((err == NULL) || (err->code == VIR_ERR_OK))
return;
switch (err->level) {
case VIR_ERR_NONE:
lvl = "";
break;
case VIR_ERR_WARNING:
lvl = "warning";
break;
case VIR_ERR_ERROR:
lvl = "error";
break;
}
switch (err->domain) {
case VIR_FROM_NONE:
dom = "";
break;
case VIR_FROM_XEN:
dom = "Xen ";
break;
case VIR_FROM_XEND:
dom = "Xen Daemon ";
break;
case VIR_FROM_XENSTORE:
dom = "Xen Store ";
break;
case VIR_FROM_DOM:
dom = "Domain ";
break;
}
if ((err->dom != NULL) && (err->code != VIR_ERR_INVALID_DOMAIN)) {
domain = err->dom->name;
}
len = strlen(err->message);
if ((len == 0) || (err->message[len - 1] != '\n'))
fprintf(stderr, "libvir: %s%s %s: %s\n",
dom, lvl, domain, err->message);
else
fprintf(stderr, "libvir: %s%s %s: %s",
dom, lvl, domain, err->message);
}
/**
* __virRaiseError:
* @conn: the connection to the hypervisor if available
* @dom: the domain if available
* @domain: the virErrorDomain indicating where it's coming from
* @code: the virErrorNumber code for the error
* @level: the virErrorLevel for the error
* @str1: extra string info
* @str2: extra string info
* @str3: extra string info
* @int1: extra int info
* @int2: extra int info
* @msg: the message to display/transmit
* @...: extra parameters for the message display
*
* Internal routine called when an error is detected. It will raise it
* immediately if a callback is found and store it for later handling.
*/
void
__virRaiseError(virConnectPtr conn, virDomainPtr dom,
int domain, int code, virErrorLevel level,
const char *str1, const char *str2, const char *str3,
int int1, int int2, const char *msg, ...)
{
virErrorPtr to = &lastErr;
void *userData = virUserData;
virErrorFunc handler = virErrorHandler;
char *str;
if (code == VIR_ERR_OK)
return;
/*
* try to find the best place to save and report the error
*/
if (conn != NULL) {
to = &conn->err;
if (conn->handler != NULL) {
handler = conn->handler;
userData = conn->userData;
}
}
/*
* formats the message
*/
if (msg == NULL) {
str = strdup("No error message provided");
} else {
VIR_GET_VAR_STR(msg, str);
}
/*
* Save the information about the error
*/
virResetError(to);
to->conn = conn;
to->dom = dom;
to->domain = domain;
to->code = code;
to->message = str;
to->level = level;
if (str1 != NULL)
to->str1 = strdup(str1);
if (str2 != NULL)
to->str2 = strdup(str2);
if (str3 != NULL)
to->str3 = strdup(str3);
to->int1 = int1;
to->int2 = int2;
/*
* now, report it
*/
if (handler != NULL) {
handler(userData, to);
} else {
virDefaultErrorFunc(to);
}
}
/**
* __virErrorMsg:
* @error: the virErrorNumber
* @info: usually the first paprameter string
*
* Internal routine to get the message associated to an error raised
* from the library
*
* Returns the constant string associated to @error
*/
const char *
__virErrorMsg(virErrorNumber error, const char *info)
{
const char *errmsg = NULL;
switch (error) {
case VIR_ERR_OK:
return (NULL);
case VIR_ERR_INTERNAL_ERROR:
if (info != NULL)
errmsg = "internal error %s";
else
errmsg = "internal error";
break;
case VIR_ERR_NO_MEMORY:
errmsg = "out of memory";
break;
case VIR_ERR_NO_SUPPORT:
errmsg = "no support for hypervisor %s";
break;
case VIR_ERR_NO_CONNECT:
if (info == NULL)
errmsg = "could not connect to hypervisor";
else
errmsg = "could not connect to %s";
break;
case VIR_ERR_INVALID_CONN:
errmsg = "invalid connection pointer in";
break;
case VIR_ERR_INVALID_DOMAIN:
errmsg = "invalid domain pointer in";
break;
case VIR_ERR_INVALID_ARG:
errmsg = "invalid domain pointer in";
break;
case VIR_ERR_OPERATION_FAILED:
if (info != NULL)
errmsg = "operation failed: %s";
else
errmsg = "operation failed";
break;
case VIR_ERR_GET_FAILED:
if (info != NULL)
errmsg = "GET operation failed: %s";
else
errmsg = "GET operation failed";
break;
case VIR_ERR_POST_FAILED:
if (info != NULL)
errmsg = "POST operation failed: %s";
else
errmsg = "POST operation failed";
break;
case VIR_ERR_HTTP_ERROR:
errmsg = "got unknown HTTP error code %d";
break;
case VIR_ERR_UNKNOWN_HOST:
errmsg = "unknown host %s";
break;
case VIR_ERR_SEXPR_SERIAL:
if (info != NULL)
errmsg = "failed to serialize S-Expr: %s";
else
errmsg = "failed to serialize S-Expr";
break;
case VIR_ERR_NO_XEN:
if (info == NULL)
errmsg = "could not use Xen hypervisor entry";
else
errmsg = "could not use Xen hypervisor entry %s";
break;
case VIR_ERR_NO_XENSTORE:
if (info == NULL)
errmsg = "could not connect to Xen Store";
else
errmsg = "could not connect to Xen Store %s";
break;
case VIR_ERR_XEN_CALL:
errmsg = "failed Xen syscall %s %d";
break;
case VIR_ERR_OS_TYPE:
if (info == NULL)
errmsg = "unknown OS type";
else
errmsg = "unknown OS type %s";
break;
case VIR_ERR_NO_KERNEL:
errmsg = "missing kernel informations";
break;
case VIR_ERR_NO_ROOT:
if (info == NULL)
errmsg = "missing root device informations";
else
errmsg = "missing root device informations in %s";
break;
case VIR_ERR_NO_SOURCE:
if (info == NULL)
errmsg = "missing source informations for device";
else
errmsg = "missing source informations for device %s";
break;
case VIR_ERR_NO_TARGET:
if (info == NULL)
errmsg = "missing target informations for device";
else
errmsg = "missing target informations for device %s";
break;
case VIR_ERR_NO_NAME:
if (info == NULL)
errmsg = "missing domain name informations";
else
errmsg = "missing domain name informations in %s";
break;
case VIR_ERR_NO_OS:
if (info == NULL)
errmsg = "missing operating system informations";
else
errmsg = "missing operating system informations for %s";
break;
case VIR_ERR_NO_DEVICE:
if (info == NULL)
errmsg = "missing devices informations";
else
errmsg = "missing devices informations for %s";
break;
case VIR_ERR_DRIVER_FULL:
if (info == NULL)
errmsg = "too many drivers registered";
else
errmsg = "too many drivers registered in %s";
break;
case VIR_ERR_CALL_FAILED:
if (info == NULL)
errmsg = "library call failed, possibly not supported";
else
errmsg = "library call %s failed, possibly not supported";
break;
}
return (errmsg);
}

View File

@ -10,6 +10,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
/* required for uint8_t, uint32_t, etc ... */
#include <stdint.h> #include <stdint.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
@ -18,13 +19,15 @@
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <stdint.h>
/* required for dom0_getdomaininfo_t */
#include <xen/dom0_ops.h> #include <xen/dom0_ops.h>
#include <xen/version.h> #include <xen/version.h>
#include <xen/xen.h> #include <xen/xen.h>
#ifndef __LINUX_PUBLIC_PRIVCMD_H__ #ifndef __LINUX_PUBLIC_PRIVCMD_H__
typedef struct hypercall_struct typedef struct hypercall_struct {
{
unsigned long op; unsigned long op;
unsigned long arg[5]; unsigned long arg[5];
} hypercall_t; } hypercall_t;
@ -32,45 +35,124 @@ typedef struct hypercall_struct
#include "internal.h" #include "internal.h"
#include "driver.h"
#include "xen_internal.h" #include "xen_internal.h"
#define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd" #define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd"
static virDriver xenHypervisorDriver = {
"Xen",
NULL, /* init */
xenHypervisorOpen, /* open */
xenHypervisorClose, /* close */
NULL, /* type */
xenHypervisorGetVersion, /* version */
NULL, /* nodeGetInfo */
NULL, /* listDomains */
NULL, /* numOfDomains */
NULL, /* domainCreateLinux */
NULL, /* domainLookupByID */
NULL, /* domainLookupByUUID */
NULL, /* domainLookupByName */
xenHypervisorPauseDomain, /* domainSuspend */
xenHypervisorResumeDomain, /* domainResume */
NULL, /* domainShutdown */
NULL, /* domainReboot */
xenHypervisorDestroyDomain, /* domainDestroy */
NULL, /* domainFree */
NULL, /* domainGetName */
NULL, /* domainGetID */
NULL, /* domainGetUUID */
NULL, /* domainGetOSType */
NULL, /* domainGetMaxMemory */
xenHypervisorSetMaxMemory, /* domainSetMaxMemory */
xenHypervisorGetDomainInfo, /* domainGetInfo */
NULL, /* domainSave */
NULL /* domainRestore */
};
/**
* xenHypervisorRegister:
*
* Registers the xenHypervisor driver
*/
void xenHypervisorRegister(void)
{
virRegisterDriver(&xenHypervisorDriver);
}
/**
* virXenError:
* @conn: the connection if available
* @error: the error number
* @info: extra information string
*
* Handle an error at the xend daemon interface
*/
static void
virXenError(virErrorNumber error, const char *info, int value)
{
const char *errmsg;
if (error == VIR_ERR_OK)
return;
errmsg = __virErrorMsg(error, info);
__virRaiseError(NULL, NULL, VIR_FROM_XEN, error, VIR_ERR_ERROR,
errmsg, info, NULL, value, 0, errmsg, info, value);
}
/** /**
* xenHypervisorOpen: * xenHypervisorOpen:
* @conn: pointer to the connection block
* @name: URL for the target, NULL for local
* @flags: combination of virDrvOpenFlag(s)
* *
* Connects to the Xen hypervisor. * Connects to the Xen hypervisor.
* *
* Returns the handle or -1 in case of error. * Returns 0 or -1 in case of error.
*/ */
int xenHypervisorOpen(void) { int
xenHypervisorOpen(virConnectPtr conn, const char *name, int flags)
{
int ret; int ret;
ret = open(XEN_HYPERVISOR_SOCKET, O_RDWR); if ((name != NULL) && (strcmp(name, "xen")))
if (ret < 0)
return(-1); return(-1);
return(ret); conn->handle = -1;
ret = open(XEN_HYPERVISOR_SOCKET, O_RDWR);
if (ret < 0) {
if (!(flags & VIR_DRV_OPEN_QUIET))
virXenError(VIR_ERR_NO_XEN, XEN_HYPERVISOR_SOCKET, 0);
return (-1);
}
conn->handle = ret;
return (ret);
} }
/** /**
* xenHypervisorClose: * xenHypervisorClose:
* @handle: the handle to the Xen hypervisor * @conn: pointer to the connection block
* *
* Close the connection to the Xen hypervisor. * Close the connection to the Xen hypervisor.
* *
* Returns 0 in case of success or -1 in case of error. * Returns 0 in case of success or -1 in case of error.
*/ */
int xenHypervisorClose(int handle) { int
xenHypervisorClose(virConnectPtr conn)
{
int ret; int ret;
if (handle < 0) if ((conn == NULL) || (conn->handle < 0))
return(-1); return (-1);
ret = close(handle); ret = close(conn->handle);
if (ret < 0) if (ret < 0)
return(-1); return (-1);
return(0); return (0);
} }
/** /**
@ -83,64 +165,76 @@ int xenHypervisorClose(int handle) {
* Returns 0 in case of success and -1 in case of error. * Returns 0 in case of success and -1 in case of error.
*/ */
static int static int
xenHypervisorDoOp(int handle, dom0_op_t *op) { xenHypervisorDoOp(int handle, dom0_op_t * op)
{
int ret; int ret;
unsigned int cmd; unsigned int cmd;
hypercall_t hc; hypercall_t hc;
op->interface_version = DOM0_INTERFACE_VERSION; op->interface_version = DOM0_INTERFACE_VERSION;
hc.op = __HYPERVISOR_dom0_op; hc.op = __HYPERVISOR_dom0_op;
hc.arg[0] = (unsigned long)op; hc.arg[0] = (unsigned long) op;
if (mlock(op, sizeof(dom0_op_t)) < 0) if (mlock(op, sizeof(dom0_op_t)) < 0) {
return(-1); virXenError(VIR_ERR_XEN_CALL, " locking", sizeof(dom0_op_t));
return (-1);
}
cmd = _IOC(_IOC_NONE, 'P', 0, sizeof(hc)); cmd = _IOC(_IOC_NONE, 'P', 0, sizeof(hc));
ret = ioctl(handle, cmd, (unsigned long) &hc); ret = ioctl(handle, cmd, (unsigned long) &hc);
if (ret < 0) {
virXenError(VIR_ERR_XEN_CALL, " ioctl ", cmd);
}
if (munlock(op, sizeof(dom0_op_t)) < 0) if (munlock(op, sizeof(dom0_op_t)) < 0) {
virXenError(VIR_ERR_XEN_CALL, " releasing", sizeof(dom0_op_t));
ret = -1; ret = -1;
}
if (ret < 0) if (ret < 0)
return(-1); return (-1);
return(0); return (0);
} }
/** /**
* xenHypervisorGetVersion: * xenHypervisorGetVersion:
* @handle: the handle to the Xen hypervisor * @conn: pointer to the connection block
* @hvVer: where to store the version
* *
* Call the hypervisor to extracts his own internal API version * Call the hypervisor to extracts his own internal API version
* *
* Returns the hypervisor running version or 0 in case of error. * Returns 0 in case of success, -1 in case of error
*/ */
unsigned long int
xenHypervisorGetVersion(int handle) { xenHypervisorGetVersion(virConnectPtr conn, unsigned long *hvVer)
{
int ret; int ret;
unsigned int cmd; unsigned int cmd;
hypercall_t hc; hypercall_t hc;
if ((conn == NULL) || (conn->handle < 0) || (hvVer == NULL))
return (-1);
*hvVer = 0;
hc.op = __HYPERVISOR_xen_version; hc.op = __HYPERVISOR_xen_version;
hc.arg[0] = (unsigned long) XENVER_version; hc.arg[0] = (unsigned long) XENVER_version;
hc.arg[1] = 0; hc.arg[1] = 0;
cmd = _IOC(_IOC_NONE, 'P', 0, sizeof(hc)); cmd = _IOC(_IOC_NONE, 'P', 0, sizeof(hc));
ret = ioctl(handle, cmd, (unsigned long) &hc); ret = ioctl(conn->handle, cmd, (unsigned long) &hc);
if (ret < 0) if (ret < 0) {
return(0); virXenError(VIR_ERR_XEN_CALL, " getting version ", XENVER_version);
/* return (-1);
* use unsigned long in case the version grows behind expectations }
* allowed by int *hvVer = (ret >> 16) * 1000000 + (ret & 0xFFFF) * 1000;
*/ return(0);
return((unsigned long) ret);
} }
/** /**
* xenHypervisorGetDomainInfo: * xenHypervisorGetDomainInfo:
* @handle: the handle to the Xen hypervisor * @domain: pointer to the domain block
* @domain: the domain ID
* @info: the place where informations should be stored * @info: the place where informations should be stored
* *
* Do an hypervisor call to get the related set of domain informations. * Do an hypervisor call to get the related set of domain informations.
@ -148,111 +242,162 @@ xenHypervisorGetVersion(int handle) {
* Returns 0 in case of success, -1 in case of error. * Returns 0 in case of success, -1 in case of error.
*/ */
int int
xenHypervisorGetDomainInfo(int handle, int domain, dom0_getdomaininfo_t *info) { xenHypervisorGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
{
dom0_op_t op; dom0_op_t op;
dom0_getdomaininfo_t dominfo;
int ret; int ret;
if (info == NULL) if ((domain == NULL) || (domain->conn == NULL) ||
return(-1); (domain->conn->handle < 0) || (info == NULL))
return (-1);
memset(info, 0, sizeof(dom0_getdomaininfo_t)); memset(info, 0, sizeof(virDomainInfo));
memset(&dominfo, 0, sizeof(dom0_getdomaininfo_t));
if (mlock(info, sizeof(dom0_getdomaininfo_t)) < 0) if (mlock(info, sizeof(dom0_getdomaininfo_t)) < 0) {
return(-1); virXenError(VIR_ERR_XEN_CALL, " locking",
sizeof(dom0_getdomaininfo_t));
return (-1);
}
op.cmd = DOM0_GETDOMAININFOLIST; op.cmd = DOM0_GETDOMAININFOLIST;
op.u.getdomaininfolist.first_domain = (domid_t) domain; op.u.getdomaininfolist.first_domain = (domid_t) domain->handle;
op.u.getdomaininfolist.max_domains = 1; op.u.getdomaininfolist.max_domains = 1;
op.u.getdomaininfolist.buffer = info; op.u.getdomaininfolist.buffer = &dominfo;
op.u.getdomaininfolist.num_domains = 1; op.u.getdomaininfolist.num_domains = 1;
info->domain = domain; dominfo.domain = domain->handle;
ret = xenHypervisorDoOp(handle, &op); ret = xenHypervisorDoOp(domain->conn->handle, &op);
if (munlock(info, sizeof(dom0_getdomaininfo_t)) < 0) if (munlock(info, sizeof(dom0_getdomaininfo_t)) < 0) {
virXenError(VIR_ERR_XEN_CALL, " release",
sizeof(dom0_getdomaininfo_t));
ret = -1; ret = -1;
}
if (ret < 0) if (ret < 0)
return(-1); return (-1);
return(0);
switch (dominfo.flags & 0xFF) {
case DOMFLAGS_DYING:
info->state = VIR_DOMAIN_SHUTDOWN;
break;
case DOMFLAGS_SHUTDOWN:
info->state = VIR_DOMAIN_SHUTOFF;
break;
case DOMFLAGS_PAUSED:
info->state = VIR_DOMAIN_PAUSED;
break;
case DOMFLAGS_BLOCKED:
info->state = VIR_DOMAIN_BLOCKED;
break;
case DOMFLAGS_RUNNING:
info->state = VIR_DOMAIN_RUNNING;
break;
default:
info->state = VIR_DOMAIN_NONE;
}
/*
* the API brings back the cpu time in nanoseconds,
* convert to microseconds, same thing convert to
* kilobytes from page counts
*/
info->cpuTime = dominfo.cpu_time;
info->memory = dominfo.tot_pages * 4;
info->maxMem = dominfo.max_pages * 4;
info->nrVirtCpu = dominfo.nr_online_vcpus;
return (0);
} }
/** /**
* xenHypervisorPauseDomain: * xenHypervisorPauseDomain:
* @handle: the handle to the Xen hypervisor * @domain: pointer to the domain block
* @domain: the domain ID
* *
* Do an hypervisor call to pause the given domain * Do an hypervisor call to pause the given domain
* *
* Returns 0 in case of success, -1 in case of error. * Returns 0 in case of success, -1 in case of error.
*/ */
int int
xenHypervisorPauseDomain(int handle, int domain) { xenHypervisorPauseDomain(virDomainPtr domain)
{
dom0_op_t op; dom0_op_t op;
int ret; int ret;
op.cmd = DOM0_PAUSEDOMAIN; if ((domain == NULL) || (domain->conn == NULL) ||
op.u.pausedomain.domain = (domid_t) domain; (domain->conn->handle < 0))
return (-1);
ret = xenHypervisorDoOp(handle, &op); op.cmd = DOM0_PAUSEDOMAIN;
op.u.pausedomain.domain = (domid_t) domain->handle;
ret = xenHypervisorDoOp(domain->conn->handle, &op);
if (ret < 0) if (ret < 0)
return(-1); return (-1);
return(0); return (0);
} }
/** /**
* xenHypervisorResumeDomain: * xenHypervisorResumeDomain:
* @handle: the handle to the Xen hypervisor * @domain: pointer to the domain block
* @domain: the domain ID
* *
* Do an hypervisor call to resume the given domain * Do an hypervisor call to resume the given domain
* *
* Returns 0 in case of success, -1 in case of error. * Returns 0 in case of success, -1 in case of error.
*/ */
int int
xenHypervisorResumeDomain(int handle, int domain) { xenHypervisorResumeDomain(virDomainPtr domain)
{
dom0_op_t op; dom0_op_t op;
int ret; int ret;
op.cmd = DOM0_UNPAUSEDOMAIN; if ((domain == NULL) || (domain->conn == NULL) ||
op.u.unpausedomain.domain = (domid_t) domain; (domain->conn->handle < 0))
return (-1);
ret = xenHypervisorDoOp(handle, &op); op.cmd = DOM0_UNPAUSEDOMAIN;
op.u.unpausedomain.domain = (domid_t) domain->handle;
ret = xenHypervisorDoOp(domain->conn->handle, &op);
if (ret < 0) if (ret < 0)
return(-1); return (-1);
return(0); return (0);
} }
/** /**
* xenHypervisorDestroyDomain: * xenHypervisorDestroyDomain:
* @handle: the handle to the Xen hypervisor * @domain: pointer to the domain block
* @domain: the domain ID
* *
* Do an hypervisor call to destroy the given domain * Do an hypervisor call to destroy the given domain
* *
* Returns 0 in case of success, -1 in case of error. * Returns 0 in case of success, -1 in case of error.
*/ */
int int
xenHypervisorDestroyDomain(int handle, int domain) { xenHypervisorDestroyDomain(virDomainPtr domain)
{
dom0_op_t op; dom0_op_t op;
int ret; int ret;
op.cmd = DOM0_DESTROYDOMAIN; if ((domain == NULL) || (domain->conn == NULL) ||
op.u.destroydomain.domain = (domid_t) domain; (domain->conn->handle < 0))
return (-1);
ret = xenHypervisorDoOp(handle, &op); op.cmd = DOM0_DESTROYDOMAIN;
op.u.destroydomain.domain = (domid_t) domain->handle;
ret = xenHypervisorDoOp(domain->conn->handle, &op);
if (ret < 0) if (ret < 0)
return(-1); return (-1);
return(0); return (0);
} }
/** /**
* xenHypervisorSetMaxMemory: * xenHypervisorSetMaxMemory:
* @handle: the handle to the Xen hypervisor * @domain: pointer to the domain block
* @domain: the domain ID
* @memory: the max memory size in kilobytes. * @memory: the max memory size in kilobytes.
* *
* Do an hypervisor call to change the maximum amount of memory used * Do an hypervisor call to change the maximum amount of memory used
@ -260,17 +405,22 @@ xenHypervisorDestroyDomain(int handle, int domain) {
* Returns 0 in case of success, -1 in case of error. * Returns 0 in case of success, -1 in case of error.
*/ */
int int
xenHypervisorSetMaxMemory(int handle, int domain, unsigned long memory) { xenHypervisorSetMaxMemory(virDomainPtr domain, unsigned long memory)
{
dom0_op_t op; dom0_op_t op;
int ret; int ret;
if ((domain == NULL) || (domain->conn == NULL) ||
(domain->conn->handle < 0))
return (-1);
op.cmd = DOM0_SETDOMAINMAXMEM; op.cmd = DOM0_SETDOMAINMAXMEM;
op.u.setdomainmaxmem.domain = (domid_t) domain; op.u.setdomainmaxmem.domain = (domid_t) domain->handle;
op.u.setdomainmaxmem.max_memkb = memory; op.u.setdomainmaxmem.max_memkb = memory;
ret = xenHypervisorDoOp(handle, &op); ret = xenHypervisorDoOp(domain->conn->handle, &op);
if (ret < 0) if (ret < 0)
return(-1); return (-1);
return(0); return (0);
} }

View File

@ -11,32 +11,29 @@
#ifndef __VIR_XEN_INTERNAL_H__ #ifndef __VIR_XEN_INTERNAL_H__
#define __VIR_XEN_INTERNAL_H__ #define __VIR_XEN_INTERNAL_H__
/* required for uint8_t, uint32_t, etc ... */ /* required for dom0_getdomaininfo_t and DOM0_INTERFACE_VERSION */
#include <stdint.h>
/* required for dom0_getdomaininfo_t */
#include <xen/dom0_ops.h> #include <xen/dom0_ops.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
int xenHypervisorOpen (void); void xenHypervisorRegister (void);
int xenHypervisorClose (int handle); int xenHypervisorOpen (virConnectPtr conn,
unsigned long xenHypervisorGetVersion (int handle); const char *name,
int xenHypervisorDestroyDomain (int handle, int flags);
int domain); int xenHypervisorClose (virConnectPtr conn);
int xenHypervisorResumeDomain (int handle, int xenHypervisorGetVersion (virConnectPtr conn,
int domain); unsigned long *hvVer);
int xenHypervisorPauseDomain (int handle, int xenHypervisorDestroyDomain (virDomainPtr domain);
int domain); int xenHypervisorResumeDomain (virDomainPtr domain);
int xenHypervisorGetDomainInfo (int handle, int xenHypervisorPauseDomain (virDomainPtr domain);
int domain, int xenHypervisorGetDomainInfo (virDomainPtr domain,
dom0_getdomaininfo_t *info); virDomainInfoPtr info);
int xenHypervisorSetMaxMemory (int handle, int xenHypervisorSetMaxMemory (virDomainPtr domain,
int domain, unsigned long memory);
unsigned long memory);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif /* __VIR_XEN_INTERNAL_H__ */ #endif /* __VIR_XEN_INTERNAL_H__ */

File diff suppressed because it is too large Load Diff

View File

@ -1,9 +1,10 @@
/* /*
* libxend/xend.h -- Xend library * libxend/xend.h -- Xend library
* *
* Copyright (C) 2005 * Copyright (C) 2005,2006
* *
* Anthony Liguori <aliguori@us.ibm.com> * Anthony Liguori <aliguori@us.ibm.com>
* Daniel Veillard <veillard@redhat.com>
* *
* This file is subject to the terms and conditions of the GNU Lesser General * This file is subject to the terms and conditions of the GNU Lesser General
* Public License. See the file COPYING in the main directory of this archive * Public License. See the file COPYING in the main directory of this archive
@ -31,432 +32,417 @@ extern "C" {
/** /**
This structure represents a virtual block device. This structure represents a virtual block device.
*/ */
struct xend_device_vbd struct xend_device_vbd {
{
/** /**
The domain ID of the backend. The domain ID of the backend.
Required. Required.
*/ */
int backend; int backend;
/** /**
A URI representing the device. This is typically in the form A URI representing the device. This is typically in the form
file:/path/to/image or phy:/dev/device file:/path/to/image or phy:/dev/device
Required. Required.
*/ */
const char *uname; const char *uname;
/** /**
The name (or number) of the device to expose to the frontend. The name (or number) of the device to expose to the frontend.
Required. Required.
*/ */
const char *dev; const char *dev;
/** /**
A flag specifying the permissions to expose the device with. A flag specifying the permissions to expose the device with.
Required. Required.
*/ */
virDeviceMode mode; virDeviceMode mode;
}; };
/** /**
This structure represents a range of PIO to enable for a guest. This structure represents a range of PIO to enable for a guest.
*/ */
struct xend_device_ioport struct xend_device_ioport {
{
/** /**
The beginning address of an ioport range to enable. The beginning address of an ioport range to enable.
Required. Required.
*/ */
uint16_t from; uint16_t from;
/** /**
The ending address of an ioport range to enable. The ending address of an ioport range to enable.
Required. Required.
*/ */
uint16_t to; uint16_t to;
}; };
/** /**
This structure represents a virtual network interface configuration. This structure represents a virtual network interface configuration.
*/ */
struct xend_device_vif struct xend_device_vif {
{
/** /**
A string representing the domain that will serve as the backend for A string representing the domain that will serve as the backend for
this device. this device.
Required. Required.
*/ */
int backend; int backend;
/** /**
The name of the bridge device to pass to the network script. The name of the bridge device to pass to the network script.
Optional. Optional.
*/ */
const char *bridge; const char *bridge;
/** /**
The ip address to configure the virtal network device with. The ip address to configure the virtal network device with.
Optional. Optional.
*/ */
const char *ip; const char *ip;
/** /**
The mac address to use for the virtual network device. The mac address to use for the virtual network device.
Required. Required.
*/ */
uint8_t mac[6]; uint8_t mac[6];
/** /**
The path to the network script that is to be used for initializing The path to the network script that is to be used for initializing
the network device. the network device.
Optional. Optional.
*/ */
const char *script; const char *script;
/** /**
The name of the vif. The primary use for this is to allow the user The name of the vif. The primary use for this is to allow the user
to operate on vifs by name. to operate on vifs by name.
Optional. Optional.
*/ */
const char *vifname; const char *vifname;
}; };
struct xend_domain_live struct xend_domain_live {
{
/** /**
true is domain is currently scheduled. true is domain is currently scheduled.
*/ */
bool running; bool running;
/** /**
true is domain has crashed. true is domain has crashed.
*/ */
bool crashed; bool crashed;
/** /**
true if domain has been shutdown. true if domain has been shutdown.
*/ */
bool poweroff; bool poweroff;
/** /**
true if domain has requested a reboot. true if domain has requested a reboot.
*/ */
bool reboot; bool reboot;
/** /**
true if domain has requested a suspend. true if domain has requested a suspend.
*/ */
bool suspend; bool suspend;
/** /**
true if domain is blocked on IO true if domain is blocked on IO
*/ */
bool blocked; bool blocked;
/** /**
true if domain has been destroyed but resources are not true if domain has been destroyed but resources are not
fully deallocated. fully deallocated.
*/ */
bool dying; bool dying;
/** /**
true if domain is paused. true if domain is paused.
*/ */
bool paused; bool paused;
/** /**
the amount of time the domain has been running (in seconds) the amount of time the domain has been running (in seconds)
*/ */
double cpu_time; double cpu_time;
/** /**
the wall clock time since the domain was created (in seconds) the wall clock time since the domain was created (in seconds)
*/ */
double up_time; double up_time;
/** /**
the time (in seconds since epoch) the domain was created the time (in seconds since epoch) the domain was created
*/ */
double start_time; double start_time;
/** /**
the number of enabled VCPUs the number of enabled VCPUs
*/ */
int online_vcpus; int online_vcpus;
/** /**
the total number of available VCPUs the total number of available VCPUs
*/ */
int vcpu_avail; int vcpu_avail;
/** /**
the domain id number the domain id number
*/ */
int id; int id;
}; };
/** /**
This structure represents the configuration of a domain. It's primary This structure represents the configuration of a domain. It's primary
purpose (currently) is for domain creation. purpose (currently) is for domain creation.
*/ */
struct xend_domain struct xend_domain {
{
/** /**
The name of the domain. The name of the domain.
Required. Required.
*/ */
const char *name; const char *name;
/** /**
The amount of memory to assign to the domain before creation. The amount of memory to assign to the domain before creation.
Required. Required.
*/ */
uint64_t memory; uint64_t memory;
/** /**
The maximum amount of memory that can be given to the domain The maximum amount of memory that can be given to the domain
while it's running. Please note that a domain can increase its while it's running. Please note that a domain can increase its
memory on its own while running up to this value. memory on its own while running up to this value.
Required. Required.
*/ */
uint64_t max_memory; uint64_t max_memory;
/** /**
The uuid to use to identify the domain. This is compatible with The uuid to use to identify the domain. This is compatible with
libuuid's uuid_t and should be able to be used interchangably. libuuid's uuid_t and should be able to be used interchangably.
Optional. Optional.
*/ */
unsigned char *uuid; unsigned char *uuid;
/** /**
The ssidref to assign to the domain. The ssidref to assign to the domain.
Optional. Optional.
*/ */
int ssidref; int ssidref;
/** /**
The action to perform when the domain powers off. The action to perform when the domain powers off.
Optional. Optional.
*/ */
virDomainRestart on_poweroff; virDomainRestart on_poweroff;
/** /**
The action to perform when the domain reboots. The action to perform when the domain reboots.
Optional. Optional.
*/ */
virDomainRestart on_reboot; virDomainRestart on_reboot;
/** /**
The action to perform when the domain crashes. The action to perform when the domain crashes.
Optional. Optional.
*/ */
virDomainRestart on_crash; virDomainRestart on_crash;
/** /**
The number of VCPUs to assign to the domain. The number of VCPUs to assign to the domain.
Required. Required.
*/ */
int vcpus; int vcpus;
/* FIXME cpus */ /* FIXME cpus */
virDomainKernel image; virDomainKernel image;
/** /**
The number of VBDs pointed to be vbds. The number of VBDs pointed to be vbds.
Optional. Optional.
*/ */
size_t n_vbds; size_t n_vbds;
struct xend_device_vbd *vbds; struct xend_device_vbd *vbds;
/** /**
The number of IO port ranges pointed to by ioports. The number of IO port ranges pointed to by ioports.
Optional. Optional.
*/ */
size_t n_ioports; size_t n_ioports;
struct xend_device_ioport *ioports; struct xend_device_ioport *ioports;
/** /**
The number of VIFs pointed to be vifs. The number of VIFs pointed to be vifs.
Optional. Optional.
*/ */
size_t n_vifs; size_t n_vifs;
struct xend_device_vif *vifs; struct xend_device_vif *vifs;
/** /**
A pointer to run-time information about the domain. A pointer to run-time information about the domain.
Only set by xen_get_domain(). Only set by xen_get_domain().
*/ */
struct xend_domain_live *live; struct xend_domain_live *live;
}; };
enum xend_node_system enum xend_node_system {
{ XEND_SYSTEM_LINUX = 1,
XEND_SYSTEM_LINUX = 1, };
};
struct xend_node struct xend_node {
{
/** /**
An enumeration value specifying the host system. An enumeration value specifying the host system.
*/ */
enum xend_node_system system; enum xend_node_system system;
/** /**
The DNS host name. The DNS host name.
*/ */
const char *host; const char *host;
/** /**
The dom0 kernel release string. The dom0 kernel release string.
*/ */
const char *release; const char *release;
/** /**
The result of uname -v. The result of uname -v.
*/ */
const char *version; const char *version;
/** /**
The machine type. The machine type.
*/ */
const char *machine; const char *machine;
/** /**
The number of physical cpus. The number of physical cpus.
*/ */
int nr_cpus; int nr_cpus;
/** /**
The number of NUMA nodes. The number of NUMA nodes.
*/ */
int nr_nodes; int nr_nodes;
/** /**
The number of sockets per NUMA node. The number of sockets per NUMA node.
*/ */
int sockets_per_node; int sockets_per_node;
/** /**
The number of cores per NUMA socket. The number of cores per NUMA socket.
*/ */
int cores_per_socket; int cores_per_socket;
/** /**
The number of hyperthreads per core. The number of hyperthreads per core.
*/ */
int threads_per_core; int threads_per_core;
/** /**
The clock rating (in megahertz) of each core. The clock rating (in megahertz) of each core.
*/ */
int cpu_mhz; int cpu_mhz;
/** /**
I honestly don't know what this is. I honestly don't know what this is.
*/ */
const char *hw_caps; const char *hw_caps;
/** /**
The total memory (in bytes). The total memory (in bytes).
*/ */
uint64_t total_memory; uint64_t total_memory;
/** /**
The free memory (in bytes). The free memory (in bytes).
*/ */
uint64_t free_memory; uint64_t free_memory;
/** /**
The Xen major version number. The Xen major version number.
*/ */
int xen_major; int xen_major;
/** /**
The Xen minor version number. The Xen minor version number.
*/ */
int xen_minor; int xen_minor;
/** /**
The Xen extra version number. The Xen extra version number.
*/ */
int xen_extra; int xen_extra;
/** /**
A string descirbing the Xen platform. A string descirbing the Xen platform.
*/ */
const char *xen_caps; const char *xen_caps;
/** /**
Dunno. Dunno.
*/ */
const char *platform_params; const char *platform_params;
/** /**
The build changeset. The build changeset.
*/ */
const char *xen_changeset; const char *xen_changeset;
/** /**
The compiler version. The compiler version.
*/ */
const char *cc_compiler; const char *cc_compiler;
/** /**
The user that compiled this binary. The user that compiled this binary.
*/ */
const char *cc_compile_by; const char *cc_compile_by;
/** /**
The system this binary was built on. The system this binary was built on.
*/ */
const char *cc_compile_domain; const char *cc_compile_domain;
/** /**
The date that this binary was built on. The date that this binary was built on.
*/ */
const char *cc_compile_date; const char *cc_compile_date;
}; };
/**
* \brief Setup the connection to the local Xend instance
* \return 0 in case of success, -1 in case of error
*
* This method creates a new Xend instance preferrably trying
* to connect with the domain socket but if necessary using
* TCP (only on localhost though).
*
* This function may not fail if Xend is not running.
*
* Make sure to call xend_cleanup().
*/
int xend_setup(virConnectPtr conn);
/** /**
* \brief Setup the connection to a xend instance via TCP * \brief Setup the connection to a xend instance via TCP
@ -468,9 +454,9 @@ int xend_setup(virConnectPtr conn);
* *
* This function may not fail if Xend is not running. * This function may not fail if Xend is not running.
* *
* Make sure to call xend_cleanup(). * Make sure to call xenDaemonClose().
*/ */
int xend_setup_tcp(virConnectPtr xend, const char *host, int port); int xenDaemonOpen_tcp(virConnectPtr xend, const char *host, int port);
/** /**
* \brief Setup the connection to xend instance via a Unix domain socket * \brief Setup the connection to xend instance via a Unix domain socket
@ -481,19 +467,10 @@ int xend_setup_tcp(virConnectPtr xend, const char *host, int port);
* *
* This function may not fail if Xend is not running. * This function may not fail if Xend is not running.
* *
* Make sure to call xend_cleanup(). * Make sure to call xenDaemonClose().
*/ */
int xend_setup_unix(virConnectPtr xend, const char *path); int xenDaemonOpen_unix(virConnectPtr xend, const char *path);
/**
* \brief Delete a previously allocated Xend instance
* \param xend The xend instance
*
* This method should be called when a connection to xend instance
* initialized with xend_setup[_{tcp, unix}] is no longer needed
* to free the associated resources.
*/
void xend_cleanup(virConnectPtr xend);
/** /**
* \brief Blocks until a domain's devices are initialized * \brief Blocks until a domain's devices are initialized
@ -507,32 +484,10 @@ void xend_cleanup(virConnectPtr xend);
* invalid filename, the error won't occur until after this function * invalid filename, the error won't occur until after this function
* returns. * returns.
*/ */
int xend_wait_for_devices(virConnectPtr xend, const char *name); int xend_wait_for_devices(virConnectPtr xend, const char *name);
/** /**
* \brief Pause a domain * \brief Rename a domain
* \param xend A xend instance
* \param name The domain's name
* \return 0 for success; -1 (with errno) on error
*
* This method will make sure that Xen does not schedule the domain
* anymore until after xend_unpause() has been called.
*/
int xend_pause(virConnectPtr xend, const char *name);
/**
* \brief Unpause a domain
* \param xend A xend instance
* \param name The domain's name
* \return 0 for success; -1 (with errno) on error
*
* This method will allow a paused domain (the result of xen_pause())
* to be scheduled in the future.
*/
int xend_unpause(virConnectPtr xend, const char *name);
/**
* \brief Unpause a domain
* \param xend A xend instance * \param xend A xend instance
* \param oldname The domain's name * \param oldname The domain's name
* \param name The new name * \param name The new name
@ -540,7 +495,8 @@ int xend_unpause(virConnectPtr xend, const char *name);
* *
* This method allows a domain to have its name changed after creation. * This method allows a domain to have its name changed after creation.
*/ */
int xend_rename(virConnectPtr xend, const char *oldname, const char *name); int xend_rename(virConnectPtr xend, const char *oldname,
const char *name);
/** /**
* \brief Sends a SYSRQ to a domain * \brief Sends a SYSRQ to a domain
@ -551,68 +507,7 @@ int xend_rename(virConnectPtr xend, const char *oldname, const char *name);
* *
* This method simulates the pressing of a SYSRQ sequence. * This method simulates the pressing of a SYSRQ sequence.
*/ */
int xend_sysrq(virConnectPtr xend, const char *name, const char *key); int xend_sysrq(virConnectPtr xend, const char *name, const char *key);
/**
* \brief Request a domain to reboot
* \param xend A xend instance
* \param name The domain's name
* \return 0 for success; -1 (with errno) on error
*
* This method *requests* that a domain reboot itself. This is only
* a request and the domain may ignore it. It will return immediately
* after queuing the request.
*/
int xend_reboot(virConnectPtr xend, const char *name);
/**
* \brief Request a domain to shutdown
* \param xend A xend instance
* \param name The domain's name
* \return 0 for success; -1 (with errno) on error
*
* This method *requests* that a domain shutdown itself. This is only
* a request and the domain may ignore it. It will return immediately
* after queuing the request.
*/
int xend_shutdown(virConnectPtr xend, const char *name);
/**
* \brief Destroy a domain
* \param xend A xend instance
* \param name The domain's name
* \return 0 for success; -1 (with errno) on error
*
* This method will immediately destroy a domain. If you call this
* function while a domain is running, you risk corrupting its devices.
* After calling this function, the domain's status will change to
* dying and will go away completely once all of the resources have been
* unmapped (usually from the backend devices).
*/
int xend_destroy(virConnectPtr xend, const char *name);
/**
* \brief Save a domain to the disk
* \param xend A xend instance
* \param name The domain's name
* \param filename The filename to save to
* \return 0 for success; -1 (with errno) on error
*
* This method will suspend a domain and save its memory contents to
* a file on disk. Use xend_restore() to restore a domain after
* saving.
*/
int xend_save(virConnectPtr xend, const char *name, const char *filename);
/**
* \brief Restore a domain from the disk
* \param xend A xend instance
* \param filename The filename to restore from
* \return 0 for success; -1 (with errno) on error
*
* This method will restore a domain saved to disk by xend_save().
*/
int xend_restore(virConnectPtr xend, const char *filename);
/** /**
* \brief Obtain a list of currently running domains * \brief Obtain a list of currently running domains
@ -622,33 +517,19 @@ int xend_restore(virConnectPtr xend, const char *filename);
* This method will return an array of names of currently running * This method will return an array of names of currently running
* domains. The memory should be released will a call to free(). * domains. The memory should be released will a call to free().
*/ */
char **xend_get_domains(virConnectPtr xend); char **xenDaemonListDomains(virConnectPtr xend);
/** /**
* \brief Create a new domain * \brief Create a new domain
* \param xend A xend instance * \param xend A xend instance
* \param info A struct xen_domain instance describing the domain * \param sexpr An S-Expr defining the domain
* \return 0 for success; -1 (with errno) on error * \return 0 for success; -1 (with errno) on error
* *
* This method will create a domain based the passed in description. The * This method will create a domain based the passed in description. The
* domain will be paused after creation and must be unpaused with * domain will be paused after creation and must be unpaused with
* xend_unpause() to begin execution. * xenDaemonResumeDomain() to begin execution.
*/ */
int xend_create(virConnectPtr xend, const struct xend_domain *info); int xenDaemonDomainCreateLinux(virConnectPtr xend, const char *sexpr);
/**
* \brief Set the maximum memory for a domain
* \param xend A xend instance
* \param name The name of the domain
* \param value The maximum memory in bytes
* \return 0 for success; -1 (with errno) on error
*
* This method will set the maximum amount of memory that can be allocated to
* a domain. Please note that a domain is able to allocate up to this amount
* on its own (although under normal circumstances, memory allocation for a
* domain is only done through xend_set_memory()).
*/
int xend_set_max_memory(virConnectPtr xend, const char *name, uint64_t value);
/** /**
* \brief Set the memory allocation for a domain * \brief Set the memory allocation for a domain
@ -666,107 +547,21 @@ int xend_set_max_memory(virConnectPtr xend, const char *name, uint64_t value);
* There is no safe guard for allocations that are too small so be careful * There is no safe guard for allocations that are too small so be careful
* when using this function to reduce a domain's memory usage. * when using this function to reduce a domain's memory usage.
*/ */
int xend_set_memory(virConnectPtr xend, const char *name, uint64_t value); int xend_set_memory(virConnectPtr xend, const char *name,
uint64_t value);
/**
* \brief Create a virtual block device
* \param xend A xend instance
* \param name The name of the domain
* \param vbd A virtual block device description
* \return 0 on success; -1 (with errno) on error
*
* This method creates and attachs a block device to a domain. A successful
* return value does not indicate that the device successfully attached,
* rather, one should use xend_wait_for_devices() to block until the device
* has been successfully attached.
*/
int xend_vbd_create(virConnectPtr xend,
const char *name,
const struct xend_device_vbd *vbd);
/**
* \brief Destroy a virtual block device
* \param xend A xend instance
* \param name The name of the domain
* \param vbd A virtual block device description
* \return 0 on success; -1 (with errno) on error
*
* This method detachs a block device from a given domain. A successful return
* value does not indicate that the device successfully detached, rather, one
* should use xend_wait_for_devices() to block until the device has been
* successfully detached.
*/
int xend_vbd_destroy(virConnectPtr xend,
const char *name,
const struct xend_device_vbd *vbd);
/**
* \brief Create a virtual network device
* \param xend A xend instance
* \param name The name of the domain
* \param vif A virtual network device description
* \return 0 on success; -1 (with errno) on error
*
* This method creates and attachs a network device to a domain. A successful
* return value does not indicate that the device successfully attached,
* rather, one should use xend_wait_for_devices() to network until the device
* has been successfully attached.
*/
int xend_vif_create(virConnectPtr xend,
const char *name,
const struct xend_device_vif *vif);
/**
* \brief Destroy a virtual network device
* \param xend A xend instance
* \param name The name of the domain
* \param vif A virtual network device description
* \return 0 on success; -1 (with errno) on error
*
* This method detachs a network device from a given domain. A successful
* return value does not indicate that the device successfully detached,
* rather, one should use xend_wait_for_devices() to network until the device
* has been successfully detached.
*/
int xend_vif_destroy(virConnectPtr xend,
const char *name,
const struct xend_device_vif *vif);
/**
* \brief Lookup information about a domain
* \param xend A xend instance
* \param name The name of the domain
* \return domain info on success; NULL (with errno) on error
*
* This method looks up information about a domain and returns
* it in the form of a struct xend_domain. This should be
* free()'d when no longer needed.
*/
struct xend_domain *xend_get_domain(virConnectPtr xend,
const char *name);
/** /**
* \brief Lookup the id of a domain * \brief Lookup the id of a domain
* \param xend A xend instance * \param xend A xend instance
* \param name The name of the domain * \param name The name of the domain
* \param uuid pointer to store a copy of the uuid
* \return the id number on success; -1 (with errno) on error * \return the id number on success; -1 (with errno) on error
* *
* This method looks up the id of a domain * This method looks up the ids of a domain
*/ */
int xend_get_domain_id(virConnectPtr xend, int xenDaemonDomainLookupByName_ids(virConnectPtr xend,
const char *name); const char *name, unsigned char *uuid);
/**
* \brief Get status informations for a domain
* \param domain A xend domain
* \param info An information block provided by the user
* \return 0 in case of success, -1 in case of error
*
* This method looks up information about a domain and update the
* information block provided.
*/
int xend_get_domain_info(virDomainPtr domain,
virDomainInfoPtr info);
/** /**
* \brief Lookup information about the host machine * \brief Lookup information about the host machine
@ -776,7 +571,7 @@ int xend_get_domain_info(virDomainPtr domain,
* This method returns information about the physical host * This method returns information about the physical host
* machine running Xen. * machine running Xen.
*/ */
struct xend_node *xend_get_node(virConnectPtr xend); struct xend_node *xend_get_node(virConnectPtr xend);
/** /**
* \brief Shutdown physical host machine * \brief Shutdown physical host machine
@ -785,7 +580,7 @@ struct xend_node *xend_get_node(virConnectPtr xend);
* *
* This method shuts down the physical machine running Xen. * This method shuts down the physical machine running Xen.
*/ */
int xend_node_shutdown(virConnectPtr xend); int xend_node_shutdown(virConnectPtr xend);
/** /**
* \brief Restarts physical host machine * \brief Restarts physical host machine
@ -794,7 +589,7 @@ int xend_node_shutdown(virConnectPtr xend);
* *
* This method restarts the physical machine running Xen. * This method restarts the physical machine running Xen.
*/ */
int xend_node_restart(virConnectPtr xend); int xend_node_restart(virConnectPtr xend);
/** /**
* \brief Return hypervisor debugging messages * \brief Return hypervisor debugging messages
@ -806,9 +601,7 @@ int xend_node_restart(virConnectPtr xend);
* This function will place the debugging messages from the * This function will place the debugging messages from the
* hypervisor into a buffer with a null terminator. * hypervisor into a buffer with a null terminator.
*/ */
int xend_dmesg(virConnectPtr xend, int xend_dmesg(virConnectPtr xend, char *buffer, size_t n_buffer);
char *buffer,
size_t n_buffer);
/** /**
* \brief Clear the hypervisor debugging messages * \brief Clear the hypervisor debugging messages
@ -818,7 +611,7 @@ int xend_dmesg(virConnectPtr xend,
* This function will clear the debugging message ring queue * This function will clear the debugging message ring queue
* in the hypervisor. * in the hypervisor.
*/ */
int xend_dmesg_clear(virConnectPtr xend); int xend_dmesg_clear(virConnectPtr xend);
/** /**
* \brief Obtain the Xend log messages * \brief Obtain the Xend log messages
@ -830,12 +623,26 @@ int xend_dmesg_clear(virConnectPtr xend);
* This function will place the Xend debugging messages into * This function will place the Xend debugging messages into
* a buffer with a null terminator. * a buffer with a null terminator.
*/ */
int xend_log(virConnectPtr xend, int xend_log(virConnectPtr xend, char *buffer, size_t n_buffer);
char *buffer,
size_t n_buffer); /* refactored ones */
void xenDaemonRegister(void);
int xenDaemonOpen(virConnectPtr conn, const char *name, int flags);
int xenDaemonClose(virConnectPtr conn);
int xenDaemonDomainSuspend(virDomainPtr domain);
int xenDaemonDomainResume(virDomainPtr domain);
int xenDaemonDomainShutdown(virDomainPtr domain);
int xenDaemonDomainReboot(virDomainPtr domain, unsigned int flags);
int xenDaemonDomainDestroy(virDomainPtr domain);
int xenDaemonDomainSave(virDomainPtr domain, const char *filename);
int xenDaemonDomainRestore(virConnectPtr conn, const char *filename);
int xenDaemonDomainSetMaxMemory(virDomainPtr domain, unsigned long memory);
int xenDaemonDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info);
char *xenDaemonDomainDumpXML(virDomainPtr domain);
virDomainPtr xenDaemonDomainLookupByName(virConnectPtr conn, const char *domname);
unsigned long xenDaemonDomainGetMaxMemory(virDomainPtr domain);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif

800
src/xml.c

File diff suppressed because it is too large Load Diff

34
src/xml.h Normal file
View File

@ -0,0 +1,34 @@
/*
* internal.h: internal definitions just used by code from the library
*/
#ifndef __VIR_XML_H__
#define __VIR_XML_H__
#include "libvirt.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* virBuffer:
*
* A buffer structure.
*/
typedef struct _virBuffer virBuffer;
typedef virBuffer *virBufferPtr;
struct _virBuffer {
char *content; /* The buffer content UTF8 */
unsigned int use; /* The buffer size used */
unsigned int size; /* The buffer size */
};
int virBufferAdd(virBufferPtr buf, const char *str, int len);
int virBufferVSprintf(virBufferPtr buf, const char *format, ...);
char *virDomainParseXMLDesc(const char *xmldesc, char **name);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __VIR_XML_H__ */

608
src/xmlrpc.c Normal file
View File

@ -0,0 +1,608 @@
/*
* xmlrpc.c: XML-RPC protocol handler for libvir library
*
* Copyright (C) 2006 IBM, Corp.
*
* See COPYING.LIB for the License of this software
*
* Anthony Liguori <aliguori@us.ibm.com>
*/
#include "xmlrpc.h"
#include <libxml/nanohttp.h>
#include <string.h>
#include <errno.h>
/* TODO
1) Lots of error checking
2) xmlRpcValueToSexpr
*/
#define TODO do { } while (0)
static xmlNodePtr xmlFirstElement(xmlNodePtr node);
static xmlNodePtr xmlNextElement(xmlNodePtr node);
struct _xmlRpcContext
{
char *uri;
int faultCode;
char *faultMessage;
};
static xmlRpcValuePtr xmlRpcValueNew(xmlRpcValueType type)
{
xmlRpcValuePtr ret = malloc(sizeof(*ret));
if (ret)
ret->kind = type;
return ret;
}
static char *xmlGetText(xmlNodePtr node)
{
for (node = node->children; node; node = node->next)
if (node->type == XML_TEXT_NODE)
return strdup((const char *)node->content);
return NULL;
}
static xmlNodePtr xmlFirstElement(xmlNodePtr node)
{
for (node = node->children; node; node = node->next)
if (node->type == XML_ELEMENT_NODE)
break;
return node;
}
static xmlNodePtr xmlNextElement(xmlNodePtr node)
{
for (node = node->next; node; node = node->next)
if (node->type == XML_ELEMENT_NODE)
break;
return node;
}
static xmlRpcValuePtr xmlRpcValueUnmarshalDateTime(xmlNodePtr node)
{
/* we don't need this */
TODO;
return NULL;
}
static xmlRpcValuePtr xmlRpcValueUnmarshalString(xmlNodePtr node)
{
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_STRING);
ret->value.string = xmlGetText(node);
return ret;
}
static xmlRpcValuePtr xmlRpcValueUnmarshalBase64(xmlNodePtr node)
{
/* we don't need this */
TODO;
return NULL;
}
static xmlRpcValuePtr xmlRpcValueUnmarshalInteger(xmlNodePtr node)
{
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_INTEGER);
char *value = xmlGetText(node);
ret->value.integer = atoi(value);
free(value);
return ret;
}
static xmlRpcValuePtr xmlRpcValueUnmarshalBoolean(xmlNodePtr node)
{
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_BOOLEAN);
char *value = xmlGetText(node);
if (atoi(value))
ret->value.boolean = true;
else
ret->value.boolean = false;
free(value);
return ret;
}
static xmlRpcValuePtr xmlRpcValueUnmarshalDouble(xmlNodePtr node)
{
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_DOUBLE);
char *value = xmlGetText(node);
ret->value.real = atof(value);
free(value);
return ret;
}
static xmlRpcValuePtr xmlRpcValueUnmarshalArray(xmlNodePtr node)
{
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_ARRAY);
xmlNodePtr cur;
int n_elements = 0;
for (cur = xmlFirstElement(node); cur; cur = xmlNextElement(cur))
n_elements += 1;
ret->value.array.elements = malloc(n_elements * sizeof(xmlRpcValue));
n_elements = 0;
for (cur = xmlFirstElement(node); cur; cur = xmlNextElement(cur)) {
ret->value.array.elements[n_elements] = xmlRpcValueUnmarshal(cur);
n_elements += 1;
}
ret->value.array.n_elements = n_elements;
return ret;
}
static xmlRpcValueDictElementPtr xmlRpcValueUnmarshalDictElement(xmlNodePtr node)
{
xmlRpcValueDictElementPtr ret = malloc(sizeof(*ret));
xmlNodePtr cur;
memset(ret, 0, sizeof(*ret));
for (cur = xmlFirstElement(node); cur; cur = xmlNextElement(cur)) {
if (xmlStrEqual(cur->name, BAD_CAST "name")) {
ret->name = xmlGetText(cur);
} else if (xmlStrEqual(cur->name, BAD_CAST "value")) {
ret->value = xmlRpcValueUnmarshal(cur);
} else {
/* What? */
}
}
ret->next = NULL;
return ret;
}
static xmlRpcValuePtr xmlRpcValueUnmarshalDict(xmlNodePtr node)
{
xmlRpcValueDictElementPtr root = NULL, *elem = &root;
xmlRpcValuePtr ret = xmlRpcValueNew(XML_RPC_STRUCT);
xmlNodePtr cur;
for (cur = xmlFirstElement(node); cur; cur = xmlNextElement(cur)) {
*elem = xmlRpcValueUnmarshalDictElement(cur);
elem = &(*elem)->next;
}
ret->value.dict.root = root;
return ret;
}
xmlRpcValuePtr xmlRpcValueUnmarshal(xmlNodePtr node)
{
xmlNodePtr n;
xmlRpcValuePtr ret;
if (xmlStrEqual(node->name, BAD_CAST "value")) {
n = xmlFirstElement(node);
if (n == NULL) {
ret = xmlRpcValueUnmarshalString(node);
} else {
ret = xmlRpcValueUnmarshal(n);
}
} else if (xmlStrEqual(node->name, BAD_CAST "dateTime.iso8601")) {
ret = xmlRpcValueUnmarshalDateTime(node);
} else if (xmlStrEqual(node->name, BAD_CAST "string")) {
ret = xmlRpcValueUnmarshalString(node);
} else if (xmlStrEqual(node->name, BAD_CAST "base64")) {
ret = xmlRpcValueUnmarshalBase64(node);
} else if (xmlStrEqual(node->name, BAD_CAST "i4") ||
xmlStrEqual(node->name, BAD_CAST "int")) {
ret = xmlRpcValueUnmarshalInteger(node);
} else if (xmlStrEqual(node->name, BAD_CAST "boolean")) {
ret = xmlRpcValueUnmarshalBoolean(node);
} else if (xmlStrEqual(node->name, BAD_CAST "double")) {
ret = xmlRpcValueUnmarshalDouble(node);
} else if (xmlStrEqual(node->name, BAD_CAST "array")) {
ret = xmlRpcValueUnmarshal(xmlFirstElement(node));
} else if (xmlStrEqual(node->name, BAD_CAST "data")) {
ret = xmlRpcValueUnmarshalArray(node);
} else if (xmlStrEqual(node->name, BAD_CAST "struct")) {
ret = xmlRpcValueUnmarshalDict(node);
} else if (xmlStrEqual(node->name, BAD_CAST "nil")) {
ret = xmlRpcValueNew(XML_RPC_NIL);
} else {
/* bug */
}
return ret;
}
void xmlRpcValueFree(xmlRpcValuePtr value)
{
int i;
xmlRpcValueDictElementPtr cur, next;
if (value == NULL)
return;
switch (value->kind) {
case XML_RPC_ARRAY:
for (i = 0; i < value->value.array.n_elements; i++)
xmlRpcValueFree(value->value.array.elements[i]);
free(value->value.array.elements);
break;
case XML_RPC_STRUCT:
next = value->value.dict.root;
while (next) {
cur = next;
next = next->next;
free(cur->name);
xmlRpcValueFree(cur->value);
free(cur);
}
break;
case XML_RPC_STRING:
free(value->value.string);
break;
default:
break;
}
free(value);
}
void xmlRpcValueMarshal(xmlRpcValuePtr value, virBufferPtr buf, int indent)
{
int i;
xmlRpcValueDictElement *elem;
virBufferVSprintf(buf, "%*s<value>", indent, "");
switch (value->kind) {
case XML_RPC_ARRAY:
virBufferVSprintf(buf, "<array><data>\n", indent, "");
for (i = 0; i < value->value.array.n_elements; i++)
xmlRpcValueMarshal(value->value.array.elements[i], buf, indent+2);
virBufferVSprintf(buf, "%*s</data></array>", indent, "");
break;
case XML_RPC_STRUCT:
virBufferVSprintf(buf, "<struct>\n", indent, "");
indent += 2;
for (elem = value->value.dict.root; elem; elem = elem->next) {
virBufferVSprintf(buf, "%*s<member>\n", indent, "");
virBufferVSprintf(buf, "%*s<name>%s</name>\n",
indent + 2, "", elem->name);
xmlRpcValueMarshal(elem->value, buf, indent + 2);
virBufferVSprintf(buf, "%*s</member>\n", indent, "");
}
indent -= 2;
virBufferVSprintf(buf, "%*s</struct>", indent, "");
break;
case XML_RPC_INTEGER:
virBufferVSprintf(buf, "<int>%d</int>", value->value.integer);
break;
case XML_RPC_DOUBLE:
virBufferVSprintf(buf, "<double>%f</double>", value->value.real);
break;
case XML_RPC_BOOLEAN:
if (value->value.boolean)
i = 1;
else
i = 0;
virBufferVSprintf(buf, "<boolean>%d</boolean>", i);
break;
case XML_RPC_DATE_TIME:
/* FIXME */
TODO;
break;
case XML_RPC_BASE64:
/* FIXME */
TODO;
break;
case XML_RPC_STRING:
virBufferVSprintf(buf, "<string>%s</string>", value->value.string);
break;
case XML_RPC_NIL:
virBufferVSprintf(buf, "<nil> </nil>");
break;
}
virBufferVSprintf(buf, "</value>\n");
}
virBufferPtr xmlRpcMarshalRequest(const char *request,
int argc, xmlRpcValuePtr *argv)
{
virBufferPtr buf;
int i;
buf = malloc(sizeof(*buf));
buf->size = 1024;
buf->content = malloc(buf->size);
buf->use = 0;
virBufferVSprintf(buf,
"<?xml version=\"1.0\"?>\n"
"<methodCall>\n"
" <methodName>%s</methodName>\n"
" <params>\n",
request);
for (i = 0; i < argc; i++) {
virBufferVSprintf(buf,
" <param>\n");
xmlRpcValueMarshal(argv[i], buf, 6);
virBufferVSprintf(buf,
" </param>\n");
}
virBufferVSprintf(buf,
" </params>\n"
"</methodCall>\n");
return buf;
}
xmlRpcValuePtr xmlRpcUnmarshalResponse(xmlNodePtr node, bool *is_fault)
{
if (!xmlStrEqual(node->name, BAD_CAST "methodResponse"))
return NULL;
node = xmlFirstElement(node);
if (xmlStrEqual(node->name, BAD_CAST "params")) {
node = xmlFirstElement(node);
if (!xmlStrEqual(node->name, BAD_CAST "param"))
return NULL;
*is_fault = false;
return xmlRpcValueUnmarshal(xmlFirstElement(node));
} else if (xmlStrEqual(node->name, BAD_CAST "fault")) {
*is_fault = true;
return xmlRpcValueUnmarshal(xmlFirstElement(node));
} else
return NULL;
}
static char *xmlRpcCallRaw(const char *url, const char *request)
{
void *cxt;
char *contentType = "text/xml";
int len, ret, serrno;
char *response = NULL;
cxt = xmlNanoHTTPMethod(url,
"POST",
request,
&contentType,
NULL,
strlen(request));
if (cxt == NULL)
goto error;
if (contentType && strcmp(contentType, "text/xml") != 0) {
errno = EINVAL;
goto error;
}
len = xmlNanoHTTPContentLength(cxt);
response = malloc(len + 1);
if (response == NULL)
goto error;
ret = xmlNanoHTTPRead(cxt, response, len);
if (ret != len) {
errno = EINVAL;
free(response);
response = NULL;
}
response[len] = 0;
error:
serrno = errno;
if (cxt) {
xmlNanoHTTPClose(cxt);
free(contentType);
}
errno = serrno;
return response;
}
static char **xmlRpcStringArray(xmlRpcValuePtr value)
{
char **ret, *ptr;
int i;
size_t size = 0;
if (value->kind != XML_RPC_ARRAY)
return NULL;
size = sizeof(char *) * (value->value.array.n_elements + 1);
for (i = 0; i < value->value.array.n_elements; i++)
if (value->value.array.elements[i]->kind == XML_RPC_STRING)
size += strlen(value->value.array.elements[i]->value.string) + 1;
ptr = malloc(size);
ret = (char **)ptr;
ptr += sizeof(char *) * (value->value.array.n_elements + 1);
for (i = 0; i < value->value.array.n_elements; i++) {
if (value->value.array.elements[i]->kind == XML_RPC_STRING) {
char *s = value->value.array.elements[i]->value.string;
strcpy(ptr, s);
ret[i] = ptr;
ptr += strlen(s) + 1;
} else
ret[i] = "";
}
ret[i] = NULL;
return ret;
}
int xmlRpcCall(xmlRpcContextPtr context, const char *method,
const char *retfmt, const char *fmt, ...)
{
va_list ap;
const char *ptr;
int argc;
xmlRpcValuePtr *argv;
virBufferPtr buf;
int i;
char *ret;
xmlDocPtr xml;
xmlNodePtr node;
bool fault;
xmlRpcValuePtr value;
void *retval;
argc = strlen(fmt);
argv = malloc(sizeof(*argv) * argc);
va_start(ap, fmt);
if (retfmt && *retfmt)
retval = va_arg(ap, void *);
i = 0;
for (ptr = fmt; *ptr; ptr++) {
switch (*ptr) {
case 'i':
argv[i] = xmlRpcValueNew(XML_RPC_INTEGER);
argv[i]->value.integer = va_arg(ap, int32_t);
break;
case 'f':
argv[i] = xmlRpcValueNew(XML_RPC_DOUBLE);
argv[i]->value.real = va_arg(ap, double);
break;
case 'b':
argv[i] = xmlRpcValueNew(XML_RPC_BOOLEAN);
argv[i]->value.boolean = va_arg(ap, int);
break;
case 's':
argv[i] = xmlRpcValueNew(XML_RPC_STRING);
argv[i]->value.string = strdup(va_arg(ap, const char *));
break;
default:
return -1;
}
i++;
}
va_end(ap);
buf = xmlRpcMarshalRequest(method, argc, argv);
for (i = 0; i < argc; i++)
xmlRpcValueFree(argv[i]);
free(argv);
ret = xmlRpcCallRaw(context->uri, buf->content);
free(buf->content);
free(buf);
xml = xmlReadDoc((const xmlChar *)ret, "response.xml", NULL,
XML_PARSE_NOENT | XML_PARSE_NONET |
XML_PARSE_NOERROR | XML_PARSE_NOWARNING);
free(ret);
if (xml == NULL) {
errno = EINVAL;
return -1;
}
node = xmlDocGetRootElement(xml);
value = xmlRpcUnmarshalResponse(node, &fault);
if (!fault) {
switch (*retfmt) {
case 'i':
if (value->kind == XML_RPC_INTEGER)
*(int32_t *)retval = value->value.integer;
break;
case 'b':
if (value->kind == XML_RPC_BOOLEAN)
*(bool *)retval = value->value.boolean;
break;
case 'f':
if (value->kind == XML_RPC_DOUBLE)
*(double *)retval = value->value.real;
break;
case 's':
if (value->kind == XML_RPC_STRING)
*(char **)retval = strdup(value->value.string);
break;
case 'S':
*(char ***)retval = xmlRpcStringArray(value);
break;
case 'V':
*(xmlRpcValuePtr *)retval = value;
value = NULL;
break;
default:
printf("not supported yet\n");
break;
}
}
xmlFreeDoc(xml);
if (fault) { /* FIXME we need generic dict routines */
context->faultCode = value->value.dict.root->value->value.integer;
context->faultMessage = strdup(value->value.dict.root->next->value->value.string);
xmlRpcValueFree(value);
errno = EFAULT;
return -1;
}
xmlRpcValueFree(value);
return 0;
}
xmlRpcContextPtr xmlRpcContextNew(const char *uri)
{
xmlRpcContextPtr ret = malloc(sizeof(*ret));
if (ret) {
ret->uri = strdup(uri);
ret->faultMessage = NULL;
}
return ret;
}
void xmlRpcContextFree(xmlRpcContextPtr context)
{
if (context) {
if (context->uri)
free(context->uri);
if (context->faultMessage)
free(context->faultMessage);
free(context);
}
}
int xmlRpcContextFaultCode(xmlRpcContextPtr context)
{
return context->faultCode;
}
const char *xmlRpcContextFaultMessage(xmlRpcContextPtr context)
{
return context->faultMessage;
}

110
src/xmlrpc.h Normal file
View File

@ -0,0 +1,110 @@
/*
* xmlrpc.c: XML-RPC protocol handler for libvir library
*
* Copyright (C) 2006 IBM, Corp.
*
* See COPYING.LIB for the License of this software
*
* Anthony Liguori <aliguori@us.ibm.com>
*/
#ifndef _VIR_XML_RPC_H_
#define _VIR_XML_RPC_H_
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <stdbool.h>
#include <stdint.h>
#include <time.h>
#include "xml.h"
typedef enum _xmlRpcValueType xmlRpcValueType;
typedef struct _xmlRpcValueArray xmlRpcValueArray;
typedef struct _xmlRpcValueDictElement xmlRpcValueDictElement;
typedef struct _xmlRpcValueDict xmlRpcValueDict;
typedef struct _xmlRpcValueBase64 xmlRpcValueBase64;
typedef struct _xmlRpcValue xmlRpcValue;
typedef struct _xmlRpcContext xmlRpcContext;
typedef xmlRpcValueArray *xmlRpcValueArrayPtr;
typedef xmlRpcValueDictElement *xmlRpcValueDictElementPtr;
typedef xmlRpcValueDict *xmlRpcValueDictPtr;
typedef xmlRpcValueBase64 *xmlRpcValueBase64Ptr;
typedef xmlRpcValue *xmlRpcValuePtr;
typedef xmlRpcContext *xmlRpcContextPtr;
enum _xmlRpcValueType {
XML_RPC_ARRAY,
XML_RPC_STRUCT,
XML_RPC_INTEGER,
XML_RPC_DOUBLE,
XML_RPC_BOOLEAN,
XML_RPC_DATE_TIME,
XML_RPC_BASE64,
XML_RPC_STRING,
XML_RPC_NIL,
};
struct _xmlRpcValueArray {
int n_elements;
xmlRpcValuePtr *elements;
};
struct _xmlRpcValueDictElement {
char *name;
xmlRpcValuePtr value;
xmlRpcValueDictElementPtr next;
};
struct _xmlRpcValueDict {
xmlRpcValueDictElementPtr root;
};
struct _xmlRpcValueBase64 {
void *data;
size_t n_data;
};
struct _xmlRpcValue {
xmlRpcValueType kind;
union {
char *string;
xmlRpcValueArray array;
xmlRpcValueDict dict;
int32_t integer;
double real;
bool boolean;
time_t dateTime;
xmlRpcValueBase64 base64;
} value;
};
struct _xmlRpcContext;
virBufferPtr xmlRpcMarshalRequest(const char *request,
int argc, xmlRpcValuePtr *argv);
xmlRpcValuePtr xmlRpcUnmarshalResponse(xmlNodePtr node, bool *is_fault);
void xmlRpcValueMarshal(xmlRpcValuePtr value, virBufferPtr buf, int indent);
xmlRpcValuePtr xmlRpcValueUnmarshal(xmlNodePtr node);
void xmlRpcValueFree(xmlRpcValuePtr value);
int xmlRpcCall(xmlRpcContextPtr context, const char *method,
const char *retval, const char *fmt, ...);
xmlRpcContextPtr xmlRpcContextNew(const char *uri);
void xmlRpcContextFree(xmlRpcContextPtr context);
int xmlRpcContextFaultCode(xmlRpcContextPtr context);
const char *xmlRpcContextFaultMessage(xmlRpcContextPtr context);
#endif

628
src/xs_internal.c Normal file
View File

@ -0,0 +1,628 @@
/*
* xs_internal.c: access to Xen Store
*
* Copyright (C) 2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Daniel Veillard <veillard@redhat.com>
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <stdint.h>
#include <xen/dom0_ops.h>
#include <xen/version.h>
#include <xen/xen.h>
#include <xs.h>
#include "internal.h"
#include "driver.h"
#include "xs_internal.h"
#define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd"
static virDriver xenStoreDriver = {
"XenStore",
NULL, /* init */
xenStoreOpen, /* open */
xenStoreClose, /* close */
NULL, /* type */
NULL, /* version */
NULL, /* nodeGetInfo */
xenStoreListDomains, /* listDomains */
NULL, /* numOfDomains */
NULL, /* domainCreateLinux */
NULL, /* domainLookupByID */
NULL, /* domainLookupByUUID */
NULL, /* domainLookupByName */
NULL, /* domainSuspend */
NULL, /* domainResume */
xenStoreDomainShutdown, /* domainShutdown */
xenStoreDomainReboot, /* domainReboot */
NULL, /* domainDestroy */
NULL, /* domainFree */
NULL, /* domainGetName */
NULL, /* domainGetID */
NULL, /* domainGetUUID */
NULL, /* domainGetOSType */
xenStoreDomainGetMaxMemory, /* domainGetMaxMemory */
xenStoreDomainSetMaxMemory, /* domainSetMaxMemory */
xenStoreGetDomainInfo, /* domainGetInfo */
NULL, /* domainSave */
NULL /* domainRestore */
};
/**
* xenStoreRegister:
*
* Registers the xenStore driver
*/
void xenStoreRegister(void)
{
virRegisterDriver(&xenStoreDriver);
}
/**
* virXenStoreError:
* @conn: the connection if available
* @error: the error number
* @info: extra information string
*
* Handle an error at the xend store interface
*/
static void
virXenStoreError(virConnectPtr conn, virErrorNumber error, const char *info)
{
const char *errmsg;
if (error == VIR_ERR_OK)
return;
errmsg = __virErrorMsg(error, info);
__virRaiseError(conn, NULL, VIR_FROM_XENSTORE, error, VIR_ERR_ERROR,
errmsg, info, NULL, 0, 0, errmsg, info);
}
/************************************************************************
* *
* Helper internal APIs *
* *
************************************************************************/
/**
* virConnectDoStoreList:
* @conn: pointer to the hypervisor connection
* @path: the absolute path of the directory in the store to list
* @nb: OUT pointer to the number of items found
*
* Internal API querying the Xenstore for a list
*
* Returns a string which must be freed by the caller or NULL in case of error
*/
static char **
virConnectDoStoreList(virConnectPtr conn, const char *path,
unsigned int *nb)
{
if ((conn == NULL) || (conn->xshandle == NULL) || (path == NULL) ||
(nb == NULL))
return (NULL);
return xs_directory(conn->xshandle, 0, path, nb);
}
/**
* virDomainDoStoreQuery:
* @domain: a domain object
* @path: the relative path of the data in the store to retrieve
*
* Internal API querying the Xenstore for a string value.
*
* Returns a string which must be freed by the caller or NULL in case of error
*/
static char *
virDomainDoStoreQuery(virDomainPtr domain, const char *path)
{
char s[256];
unsigned int len = 0;
if (!VIR_IS_CONNECTED_DOMAIN(domain))
return (NULL);
if (domain->conn->xshandle == NULL)
return (NULL);
snprintf(s, 255, "/local/domain/%d/%s", domain->handle, path);
s[255] = 0;
return xs_read(domain->conn->xshandle, 0, &s[0], &len);
}
/**
* virDomainDoStoreWrite:
* @domain: a domain object
* @path: the relative path of the data in the store to retrieve
*
* Internal API setting up a string value in the Xenstore
* Requires write access to the XenStore
*
* Returns 0 in case of success, -1 in case of failure
*/
static int
virDomainDoStoreWrite(virDomainPtr domain, const char *path,
const char *value)
{
char s[256];
int ret = -1;
if (!VIR_IS_CONNECTED_DOMAIN(domain))
return (-1);
if (domain->conn->xshandle == NULL)
return (-1);
if (domain->conn->flags & VIR_CONNECT_RO)
return (-1);
snprintf(s, 255, "/local/domain/%d/%s", domain->handle, path);
s[255] = 0;
if (xs_write(domain->conn->xshandle, 0, &s[0], value, strlen(value)))
ret = 0;
return (ret);
}
/**
* virDomainGetVM:
* @domain: a domain object
*
* Internal API extracting a xenstore vm path.
*
* Returns the new string or NULL in case of error
*/
char *
virDomainGetVM(virDomainPtr domain)
{
char *vm;
char query[200];
unsigned int len;
if (!VIR_IS_CONNECTED_DOMAIN(domain))
return (NULL);
if (domain->conn->xshandle == NULL)
return (NULL);
snprintf(query, 199, "/local/domain/%d/vm", virDomainGetID(domain));
query[199] = 0;
vm = xs_read(domain->conn->xshandle, 0, &query[0], &len);
return (vm);
}
/**
* virDomainGetVMInfo:
* @domain: a domain object
* @vm: the xenstore vm path
* @name: the value's path
*
* Internal API extracting one information the device used
* by the domain from xensttore
*
* Returns the new string or NULL in case of error
*/
char *
virDomainGetVMInfo(virDomainPtr domain, const char *vm, const char *name)
{
char s[256];
char *ret = NULL;
unsigned int len = 0;
if (!VIR_IS_CONNECTED_DOMAIN(domain))
return (NULL);
if (domain->conn->xshandle == NULL)
return (NULL);
snprintf(s, 255, "%s/%s", vm, name);
s[255] = 0;
ret = xs_read(domain->conn->xshandle, 0, &s[0], &len);
return (ret);
}
/**
* virConnectCheckStoreID:
* @conn: pointer to the hypervisor connection
* @id: the id number as returned from Xenstore
*
* the xenstore sometimes list non-running domains, double check
* from the hypervisor if we have direct access
*
* Returns -1 if the check failed, 0 if successful or not possible to check
*/
static int
virConnectCheckStoreID(virConnectPtr conn, int id)
{
if (conn->handle >= 0) {
TODO
/*
dom0_getdomaininfo_t dominfo;
int tmp;
dominfo.domain = id;
tmp = xenHypervisorGetDomainInfo(conn->handle, id, &dominfo);
if (tmp < 0)
return (-1);
*/
}
return (0);
}
/************************************************************************
* *
* Canonical internal APIs *
* *
************************************************************************/
/**
* xenStoreOpen:
* @conn: pointer to the connection block
* @name: URL for the target, NULL for local
* @flags: combination of virDrvOpenFlag(s)
*
* Connects to the Xen hypervisor.
*
* Returns 0 or -1 in case of error.
*/
int
xenStoreOpen(virConnectPtr conn, const char *name, int flags)
{
if ((name != NULL) && (strcmp(name, "xen")))
return(-1);
if (flags & VIR_DRV_OPEN_RO)
conn->xshandle = xs_daemon_open_readonly();
else
conn->xshandle = xs_daemon_open();
if (conn->xshandle == NULL) {
if (!(flags & VIR_DRV_OPEN_QUIET))
virXenStoreError(conn, VIR_ERR_NO_XEN,
"failed to connect to Xen Store");
return (-1);
}
return (0);
}
/**
* xenStoreClose:
* @conn: pointer to the connection block
*
* Close the connection to the Xen hypervisor.
*
* Returns 0 in case of success or -1 in case of error.
*/
int
xenStoreClose(virConnectPtr conn)
{
if (conn == NULL) {
virXenStoreError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return(-1);
}
if (conn->xshandle == NULL)
return(-1);
xs_daemon_close(conn->xshandle);
return (0);
}
/**
* xenStoreGetDomainInfo:
* @domain: pointer to the domain block
* @info: the place where informations should be stored
*
* Do an hypervisor call to get the related set of domain informations.
*
* Returns 0 in case of success, -1 in case of error.
*/
int
xenStoreGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
{
char *tmp, **tmp2;
unsigned int nb_vcpus;
char request[200];
if ((domain == NULL) || (domain->conn == NULL) || (info == NULL)) {
virXenStoreError(domain ? domain->conn : NULL, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
if (domain->conn->xshandle == NULL)
return(-1);
tmp = virDomainDoStoreQuery(domain, "running");
if (tmp != NULL) {
if (tmp[0] == '1')
info->state = VIR_DOMAIN_RUNNING;
free(tmp);
} else {
info->state = VIR_DOMAIN_NONE;
}
tmp = virDomainDoStoreQuery(domain, "memory/target");
if (tmp != NULL) {
info->memory = atol(tmp);
info->maxMem = atol(tmp);
free(tmp);
} else {
info->memory = 0;
info->maxMem = 0;
}
#if 0
/* doesn't seems to work */
tmp = virDomainDoStoreQuery(domain, "cpu_time");
if (tmp != NULL) {
info->cpuTime = atol(tmp);
free(tmp);
} else {
info->cpuTime = 0;
}
#endif
snprintf(request, 199, "/local/domain/%d/cpu", domain->handle);
request[199] = 0;
tmp2 = virConnectDoStoreList(domain->conn, request, &nb_vcpus);
if (tmp2 != NULL) {
info->nrVirtCpu = nb_vcpus;
free(tmp2);
}
return (0);
}
/**
* xenStoreDomainSetMaxMemory:
* @domain: pointer to the domain block
* @memory: the max memory size in kilobytes.
*
* Change the maximum amount of memory allowed in the xen store
*
* Returns 0 in case of success, -1 in case of error.
*/
int
xenStoreDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
{
int ret;
char value[20];
if ((domain == NULL) || (domain->conn == NULL) || (memory < 4096)) {
virXenStoreError(domain ? domain->conn : NULL, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
snprintf(value, 19, "%lu", memory);
value[19] = 0;
ret = virDomainDoStoreWrite(domain, "memory/target", &value[0]);
if (ret < 0)
return (-1);
return (0);
}
/**
* xenStoreDomainGetMaxMemory:
* @domain: pointer to the domain block
*
* Ask the xenstore for the maximum memory allowed for a domain
*
* Returns the memory size in kilobytes or 0 in case of error.
*/
unsigned long
xenStoreDomainGetMaxMemory(virDomainPtr domain)
{
char *tmp;
unsigned long ret = 0;
tmp = virDomainDoStoreQuery(domain, "memory/target");
if (tmp != NULL) {
ret = (unsigned long) atol(tmp);
free(tmp);
}
return(ret);
}
/**
* xenStoreNumOfDomains:
* @conn: pointer to the hypervisor connection
*
* Provides the number of active domains.
*
* Returns the number of domain found or -1 in case of error
*/
int
xenStoreNumOfDomains(virConnectPtr conn)
{
unsigned int num;
char **idlist;
int ret = -1;
if ((conn == NULL) || (conn->xshandle == NULL)) {
virXenStoreError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return(-1);
}
idlist = xs_directory(conn->xshandle, 0, "/local/domain", &num);
if (idlist) {
free(idlist);
ret = num;
}
return(ret);
}
/**
* xenStoreListDomains:
* @conn: pointer to the hypervisor connection
* @ids: array to collect the list of IDs of active domains
* @maxids: size of @ids
*
* Collect the list of active domains, and store their ID in @maxids
*
* Returns the number of domain found or -1 in case of error
*/
int
xenStoreListDomains(virConnectPtr conn, int *ids, int maxids)
{
char **idlist = NULL, *endptr;
unsigned int num, i;
int ret;
long id;
if ((conn == NULL) || (ids == NULL)) {
virXenStoreError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return(-1);
}
if (conn->xshandle == NULL)
return(-1);
idlist = xs_directory(conn->xshandle, 0, "/local/domain", &num);
if (idlist == NULL)
return(-1);
for (ret = 0, i = 0; (i < num) && (ret < maxids); i++) {
id = strtol(idlist[i], &endptr, 10);
if ((endptr == idlist[i]) || (*endptr != 0)) {
ret = -1;
break;
}
if (virConnectCheckStoreID(conn, (int) id) < 0)
continue;
ids[ret++] = (int) id;
}
return(ret);
}
/**
* xenStoreDomainLookupByName:
* @conn: A xend instance
* @name: The name of the domain
*
* Try to lookup a domain on the Xen Store based on its name.
*
* Returns a new domain object or NULL in case of failure
*/
virDomainPtr
xenStoreDomainLookupByName(virConnectPtr conn, const char *name)
{
virDomainPtr ret = NULL;
unsigned int num, i, len;
long id = -1;
char **idlist = NULL, *endptr;
char prop[200], *tmp, *path = NULL;
int found = 0;
struct xend_domain *xenddomain = NULL;
if ((conn == NULL) || (name == NULL)) {
virXenStoreError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return(NULL);
}
if (conn->xshandle == NULL)
return(NULL);
idlist = xs_directory(conn->xshandle, 0, "/local/domain", &num);
if (idlist == NULL)
goto done;
for (i = 0; i < num; i++) {
id = strtol(idlist[i], &endptr, 10);
if ((endptr == idlist[i]) || (*endptr != 0)) {
goto done;
}
if (virConnectCheckStoreID(conn, (int) id) < 0)
continue;
snprintf(prop, 199, "/local/domain/%s/name", idlist[i]);
prop[199] = 0;
tmp = xs_read(conn->xshandle, 0, prop, &len);
if (tmp != NULL) {
found = !strcmp(name, tmp);
free(tmp);
if (found)
break;
}
}
path = xs_get_domain_path(conn->xshandle, (unsigned int) id);
if (!found)
return(NULL);
ret = virGetDomain(conn, name, NULL);
if (ret == NULL) {
virXenStoreError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
if (path != NULL)
free(path);
goto done;
}
ret->handle = id;
ret->path = path;
done:
if (xenddomain != NULL)
free(xenddomain);
if (idlist != NULL)
free(idlist);
return(ret);
}
/**
* xenStoreDomainShutdown:
* @domain: pointer to the Domain block
*
* Shutdown the domain, the OS is requested to properly shutdown
* and the domain may ignore it. It will return immediately
* after queuing the request.
*
* Returns 0 in case of success, -1 in case of error.
*/
int
xenStoreDomainShutdown(virDomainPtr domain)
{
if ((domain == NULL) || (domain->conn == NULL)) {
virXenStoreError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
/*
* this is very hackish, the domU kernel probes for a special
* node in the xenstore and launch the shutdown command if found.
*/
return(virDomainDoStoreWrite(domain, "control/shutdown", "halt"));
}
/**
* xenStoreDomainReboot:
* @domain: pointer to the Domain block
* @flags: extra flags for the reboot operation, not used yet
*
* Reboot the domain, the OS is requested to properly shutdown
* and reboot but the domain may ignore it. It will return immediately
* after queuing the request.
*
* Returns 0 in case of success, -1 in case of error.
*/
int
xenStoreDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED)
{
if ((domain == NULL) || (domain->conn == NULL)) {
virXenStoreError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
/*
* this is very hackish, the domU kernel probes for a special
* node in the xenstore and launch the shutdown command if found.
*/
return(virDomainDoStoreWrite(domain, "control/shutdown", "reboot"));
}

41
src/xs_internal.h Normal file
View File

@ -0,0 +1,41 @@
/*
* xs_internal.h: internal API for access to XenStore
*
* Copyright (C) 2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Daniel Veillard <veillard@redhat.com>
*/
#ifndef __VIR_XS_INTERNAL_H__
#define __VIR_XS_INTERNAL_H__
#ifdef __cplusplus
extern "C" {
#endif
void xenStoreRegister (void);
int xenStoreOpen (virConnectPtr conn,
const char *name,
int flags);
int xenStoreClose (virConnectPtr conn);
int xenStoreGetDomainInfo (virDomainPtr domain,
virDomainInfoPtr info);
int xenStoreNumOfDomains (virConnectPtr conn);
int xenStoreListDomains (virConnectPtr conn,
int *ids,
int maxids);
virDomainPtr xenStoreDomainLookupByName(virConnectPtr conn,
const char *name);
unsigned long xenStoreGetMaxMemory (virDomainPtr domain);
int xenStoreDomainSetMaxMemory(virDomainPtr domain,
unsigned long memory);
unsigned long xenStoreDomainGetMaxMemory(virDomainPtr domain);
int xenStoreDomainShutdown (virDomainPtr domain);
int xenStoreDomainReboot (virDomainPtr domain,
unsigned int flags);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_XS_INTERNAL_H__ */

355
virsh.1 Normal file
View File

@ -0,0 +1,355 @@
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "VIRSH.POD.1 1"
.TH VIRSH.POD.1 1 "2006-04-06" "perl v5.8.6" "User Contributed Perl Documentation"
.SH "NAME"
virsh \- management user interface
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
virsh <subcommand> [args]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
The \fBvirsh\fR program is the main interface for managing virsh guest
domains. The program can be used to create, pause, and shutdown
domains. It can also be used to list current domains. Libvirt is a C toolkit to interract with the virtualization capabilities of recent versions of Linux (and other OSes). It is free software available under the \s-1GNU\s0 Lesser General Public License. Virtualization of the Linux Operating System means the ability to run multiple instances of Operating Systems concurently on a single hardware system where the basic resources are driven by a Linux instance. The library aim at providing long term stable C \s-1API\s0 initially for the Xen paravirtualization but should be able to integrate other virtualization mechanisms if needed.
.PP
The basic structure of every virsh command is almost always:
.PP
.Vb 1
\& virsh <subcommand> <domain-id> [OPTIONS]
.Ve
.PP
Where \fIsubcommand\fR is one of the sub commands listed below, \fIdomain-id\fR
is the numeric domain id, or the domain name (which will be internally
translated to domain id), and \fI\s-1OPTIONS\s0\fR are sub command specific
options. There are a few exceptions to this rule in the cases where
the sub command in question acts on all domains, the entire machine,
or directly on the xen hypervisor. Those exceptions will be clear for
each of those sub commands.
.SH "NOTES"
.IX Header "NOTES"
All \fBvirsh\fR opperations rely upon the libvirt library.
For any virsh commands to run xend/qemu, or what ever virtual library that libvirt suports. For this reason you should start xend/qemu as a service when your system first boots using xen/qemu.
.PP
Most \fBvirsh\fR commands require root privledges to run due to the
communications channels used to talk to the hypervisor. Running as
non root will return an error.
.PP
Most \fBvirsh\fR commands act asynchronously, so just because the \fBvirsh\fR
command returned, doesn't mean the action is complete. This is
important, as many operations on domains, like create and shutdown,
can take considerable time (30 seconds or more) to bring the machine
into a fully compliant state. If you want to know when one of these
actions has finished you must poll through virsh list periodically.
.SH "DOMAIN SUBCOMMANDS"
.IX Header "DOMAIN SUBCOMMANDS"
The following sub commands manipulate domains directly, as stated
previously most commands take domain-id as the first parameter.
.IP "\fBconnect\fR optional \fI\-\-readonly\fR" 4
.IX Item "connect optional --readonly"
Connect to local hypervisor. This is build-in command after shell start up.
.Sp
The \fI\-\-readonly\fR option read-only connection
.IP "\fBcreate\fR \fI\s-1FILE\s0\fR" 4
.IX Item "create FILE"
Create a domain from an \s-1XML\s0 <file> an easy way to create one if you have a pre-existing xen guest created via \fBxm\fR create <\s-1XMLFILE\s0>.
.Sp
\&\fBExample\fR
.Sp
virsh dumpxml <domain\-name or id> to a file.
.IP "\fBdinfo\fR \fIdomain-name or id\fR" 4
.IX Item "dinfo domain-name or id"
Returns basic information about the domain.
.IP "\fBdumpxml\fR \fIdomain-name or id\fR" 4
.IX Item "dumpxml domain-name or id"
Ouput the domain informations as an \s-1XML\s0 dump to stdout, this format can be used by the create sub command.
.IP "\fBdestroy\fR \fIdomain-name or id\fR" 4
.IX Item "destroy domain-name or id"
Immediately terminate the domain domain\-id. This doesn't give the domain
\&\s-1OS\s0 any chance to react, and it the equivalent of ripping the power
cord out on a physical machine. In most cases you will want to use
the \fBshutdown\fR command instead.
.IP "\fBdomid\fR \fIdomain-name\fR" 4
.IX Item "domid domain-name"
Converts a domain name to a domain id using xend's internal mapping.
.IP "\fBdominfo\fR \fIdomain-name or id\fR" 4
.IX Item "dominfo domain-name or id"
Returns basic information about the domain.
.IP "\fBdomname\fR \fIdomain-id\fR" 4
.IX Item "domname domain-id"
convert a domain Id to domain name
.IP "\fBdomstate\fR \fIdomain-name or id\fR" 4
.IX Item "domstate domain-name or id"
Returns state about a running domain.
.IP "\fBhelp\fR optional \fIsubcommand\fR" 4
.IX Item "help optional subcommand"
Displays the short help message (i.e. common commands).
.Sp
\&\fBhelp\fR \fIsubcommand\fR will print out a detailed help message on that sub command
.IP "\fBlist\fR" 4
.IX Item "list"
Prints information about one or more domains. If no domains are
specified it prints out information about all domains.
.Sp
An example format for the list is as follows:
.Sp
\&\fBvirsh\fR list
Id Name State
.Sp
\&\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
.Sp
.Vb 2
\& 0 Domain-0 running
\& 2 fedora paused
.Ve
.Sp
Name is the name of the domain. \s-1ID\s0 the domain numeric id.
State is the run state (see below).
.RS 4
.Sp
.RS 4
\&\fB\s-1STATES\s0\fR
.Sp
The State field lists 6 states for a Xen Domain, and which ones the
current Domain is in.
=back
.RE
.IP "\fBr \- running\fR" 4
.IX Item "r - running"
The domain is currently running on a \s-1CPU\s0
.IP "\fBb \- blocked\fR" 4
.IX Item "b - blocked"
The domain is blocked, and not running or runable. This can be caused
because the domain is waiting on \s-1IO\s0 (a traditional wait state) or has
gone to sleep because there was nothing else for it to do.
.IP "\fBp \- paused\fR" 4
.IX Item "p - paused"
The domain has been paused, usually occurring through the administrator
running \fBxm pause\fR. When in a paused state the domain will still
consume allocated resources like memory, but will not be eligible for
scheduling by the Xen hypervisor.
.IP "\fBs \- shutdown\fR" 4
.IX Item "s - shutdown"
\&\s-1FIXME:\s0 Why would you ever see this state?
.IP "\fBc \- crashed\fR" 4
.IX Item "c - crashed"
The domain has crashed, which is always a violent ending. Usually
this state can only occur if the domain has been configured not to
restart on crash. See xmdomain.cfg for more info.
.IP "\fBd \- dying\fR" 4
.IX Item "d - dying"
The domain is in process of dying, but hasn't completely shutdown or
crashed.
.Sp
\&\s-1FIXME:\s0 Is this right?
.RE
.RS 4
.RE
.IP "\fBnodeinfo\fR \fIdomain-name or id\fR" 4
.IX Item "nodeinfo domain-name or id"
Returns basic information about the node.
.IP "\fBquit\fR" 4
.IX Item "quit"
quit this interactive terminal
.IP "\fBreboot\fR \fIdomain-id\fR" 4
.IX Item "reboot domain-id"
Reboot a domain. This acts just as if the domain had the \fBreboot\fR
command run from the console. The command returns as soon as it has
executed the reboot action, which may be significantly before the
domain actually reboots.
.Sp
For xen vm the behavior of what happens to a domain when it reboots is set by the
\&\fIon_reboot\fR parameter of the xmdomain.cfg file when the domain was
created.
.IP "\fBrestore\fR \fIstate-file\fR" 4
.IX Item "restore state-file"
Restores a domain from an \fBvirsh save\fR state file. See \fIsave\fR for more info.
.IP "\fBsave\fR \fIdomain-id\fR \fIstate-file\fR" 4
.IX Item "save domain-id state-file"
Saves a running domain to a state file so that it can be restored
later. Once saved, the domain will no longer be running on the
system, thus the memory allocated for the domain will be free for
other domains to use. \fBvirsh restore\fR restores from this state file.
.Sp
This is roughly equivalent to doing a hibernate on a running computer,
with all the same limitations. Open network connections may be
severed upon restore, as \s-1TCP\s0 timeouts may have expired.
.IP "\fBshutdown\fR \fIdomain-id\fR" 4
.IX Item "shutdown domain-id"
Gracefully shuts down a domain. This coordinates with the domain \s-1OS\s0
to perform graceful shutdown, so there is no guaruntee that it will
succeed, and may take a variable length of time depending on what
services must be shutdown in the domain.
.Sp
For a xen guest vm the behavior of what happens to a domain when it reboots is set by the
\&\fIon_shutdown\fR parameter of the xmdomain.cfg file when the domain was
created.
.IP "\fBresume\fR \fIdomain-id\fR" 4
.IX Item "resume domain-id"
Moves a domain out of the paused state. This will allow a previously
paused domain to now be eligible for scheduling by the the under lying hypervisor.
.IP "\fBversion\fR" 4
.IX Item "version"
Will print out the major version info about what this built from.
.RS 4
.Sp
.RS 4
\&\fBvirsh\fR version
.Sp
Compiled against library: libvir 0.0.6
.Sp
Using library: libvir 0.0.6
.Sp
Using \s-1API:\s0 Xen 3.0.0
.Sp
Running hypervisor: Xen 3.0.0
.RE
.RE
.RS 4
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fIxm\fR\|(1), \fIxmdomain.cfg\fR\|(5), \fIxentop\fR\|(1) , <http://www.libvirt.org<sol>>
.SH "AUTHOR"
.IX Header "AUTHOR"
.Vb 2
\& Andrew Puch <apuch @ redhat.com>
\& Daniel Veillard <veillard @ redhat.com>
.Ve
.Sp
.Vb 3
\& Based on the xm man paged by
\& Sean Dague <sean at dague dot net>
\& Daniel Stekloff <dsteklof at us dot ibm dot com>
.Ve
.SH "BUGS"
.IX Header "BUGS"
Can be seen on the RedHat buzilla page under the libvirt
<https://bugzilla.redhat.com/>