1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-08-15 01:50:16 +03:00

Compare commits

..

46 Commits

Author SHA1 Message Date
6d1ef709cc * NEWS configure.in doc//* include/libvirt/libvirt.h
include/libvirt/libvirt.h.in: preparing release of 0.1.4,
  regenerated docs, fixed a few things
* src/proxy_internal.c src/test.c src/xend_internal.c:
  a few trivial fixes
Daniel
2006-08-16 17:58:23 +00:00
9425a3e617 Added setvcpus, setmem, setmaxme commands to virsh 2006-08-16 17:30:33 +00:00
5c2831b30b Hook up more test driver methods. Allow HV config to be loaded from extenral XML definition 2006-08-16 16:36:39 +00:00
64d25e8de5 Re-factored sexpr_uuid into virParseUUID 2006-08-16 16:33:55 +00:00
bfd5060347 Make drivers be 'quiet' when opening RW connection. Removed duplicated RO checks 2006-08-16 16:29:46 +00:00
b084f43f71 * include/libvirt/virterror.h src/libvirt.c src/virterror.c: enforce
blocking operations with side effect on read-only connections. Adds
  a new error code and message.
Daniel
2006-08-16 16:14:53 +00:00
075337182c Added <features> tag to XML for enable CPU/system features like PAE, ACPI 2006-08-15 17:01:42 +00:00
86a22bd660 Updated notes about HVM devices / boot details 2006-08-14 15:53:52 +00:00
e1ec9651a2 Fixup handling of HVM boot preference, and include HVM cdrom/floppy in main device list 2006-08-11 14:40:04 +00:00
f87c6d4734 * configure.in: updated python detection code from latest libxml2 one
* docs//*: rebuilt the docs
Daniel
2006-08-11 11:57:52 +00:00
d42014f108 * src/xml.c: markmc pointed out that using number(xpath) could lead
to NaN and following comparison would be wrong in a couple of places
  if the element looked at was missing.
Daniel
2006-08-10 14:26:35 +00:00
098e0a4bdc Hook up virDomainGetXMLDesc to driver backends. Added implementation of virDomainGetXMLDesc driver for the setuid proxy 2006-08-09 15:21:16 +00:00
0342994a8d * src/driver.h src/libvirt.c src/proxy_internal.c src/test.c
src/xen_internal.c src/xend_internal.c src/xend_internal.h
  src/xml.c src/xs_internal.c: cleanups, force the new vCPU
  and affinity entry point to go though the driver framework,
  and fix a few warning showing up in my pedantic environment.
Daniel
2006-08-08 22:22:55 +00:00
3c43212307 Pull info about serial console TTY and VNC port from xenstore into domain XML 2006-08-08 20:14:40 +00:00
56e0d5b33d * TODO: updated with new items
Daniel
2006-08-07 20:55:03 +00:00
4dfbf940a4 Fix corrupt XML when boot device is a cdrom 2006-08-07 19:56:37 +00:00
a9fd476848 Added a port='...' attribute to <graphics> tag for VNC displays. Initially hardcoded to domid+5900 2006-08-07 19:53:41 +00:00
345c959db9 * include/libvirt/libvirt.h.in: previous change to libvirt.h should
have gone on .in too
Daniel
2006-08-07 17:37:42 +00:00
f7e0594f87 Added vcpuinfo vcpupin commands to virsh. Fixed off by one bug in virDomainVcpuPin method 2006-08-07 14:35:20 +00:00
d7815361f8 * python/generator.py: fix the generator when handling long integers
Dan Berrange reported problems due to this when using
  virDomainSetMemory bindings
Daniel
2006-08-04 13:36:07 +00:00
7a8a63380f * include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/libvirt.c src/libvirt_sym.version src/xen_internal.c
  src/xen_internal.h src/xend_internal.c src/xend_internal.h:
  applied patch from Michel Ponceau and Philippe Berthault for
  virtual CPU and affinity support plus a bit of cleanup.
Daniel
2006-08-04 10:41:05 +00:00
417e06a40e * libvirt.spec.in: xen is now built for ia64, c.f. RH#199685
Daniel
2006-08-01 15:13:27 +00:00
6e7ec1f704 * src/virterror.c: Hugh Brock pointed out that error message
for bad argument were wrong and incomplete, this should fix it and
  a few other problems in error reporting
Daniel
2006-07-28 15:10:18 +00:00
56c02f2016 Mon Jul 24 14:34:15 IST 2006 Mark McLoughlin <markmc@redhat.com>
* libvirt.spec.in: sync changes from fedora CVS
2006-07-24 14:32:03 +00:00
c3415fbd3a * proxy/Makefile.am src/xen_internal.c src/xend_internal.c: cleanup
code when compiled for the proxy, changed the command line macro and
  remove warnings.
Daniel
2006-07-20 13:59:23 +00:00
53161d7cb2 Bulk replace 'informations' with 'information' 2006-07-19 22:24:37 +00:00
16e2cc5174 * src/xml.c: applied patch from Peter Vetere to pass down the
UUID from the XML description if present when creating the domain.
Daniel
2006-07-13 22:27:31 +00:00
0798941a85 * configure.in libvirt.spec.in docs/* NEWS: preparing release of
libvirt-0.1.3
* src/xend_internal.c: uninitialized var and disable TCP slow start
Daniel
2006-07-11 16:57:03 +00:00
0cf5ee2325 * docs/format.html docs/libvir.html docs/news.html: updated the XML
format documentation to cover the new HVM domains.
Daniel
2006-07-10 13:13:39 +00:00
3d90a9c86d * src/xend_internal.c src/xml.c: patches from Jim Fehlig for HVM
guests, plus XML format changes and merge from Mark McLoughlin
Daniel
2006-07-10 11:21:24 +00:00
3ffac4a188 Re-wrote xenDomainLookupByID to use more efficient XenD access 2006-07-07 18:58:35 +00:00
4d56d3c638 Wed Jul 5 17:11:32 IST 2006 Mark McLoughlin <markmc@redhat.com>
* xml.c: allow a <domain> to not have any <disk> devices - e.g.
	when using an NFS root.
2006-07-07 14:36:27 +00:00
e2bd543163 * src/xend_internal.c: fixed xenDaemonOpen() to try both unix and
http accesses by default and to use the provided URI otherwise,
  applied Jim Fehlig patch working around xend connection close bug
* autogen.sh: fixed package name
Daniel
2006-07-06 09:29:34 +00:00
5004bee519 unleash the hush puppies 2006-07-05 21:52:52 +00:00
1addb9b1c0 Wed Jul 5 17:11:32 IST 2006 Mark McLoughlin <markmc@redhat.com>
* xml.c: make the entire <os> node optional if a bootloader
        is specified. If we pass an image config to xend, the
        bootloader gets ignored anyway.
2006-07-05 17:08:40 +00:00
48030121a1 Wed Jul 5 16:51:45 IST 2006 Mark McLoughlin <markmc@redhat.com>
* xml.c: only set bootloader flag when we actually get
        a bootloader
2006-07-05 16:49:35 +00:00
4fcc208fa4 * libvirt.spec.in proxy/Makefile.am: do the chown at the rpm packaging
level, to allow build as non-root
* src/xml.c: fix bug #197583 raised by markmc
Daniel
2006-07-04 12:46:14 +00:00
567b42ce6a * NEWS docs/* configure.in libvirt.spec.in include/libvirt/libvirt.h:
preparing release of 0.1.2
* src/proxy_internal.c: don't warn on open if using http and not the
  proxy.
Daniel
2006-07-03 15:48:49 +00:00
c74976f139 * libvirt.spec.in proxy/Makefile.am src/proxy_internal.c
src/xen_internal.c: fixing the proxy installation, integrate in
  the spec file and fix a few bugs in the proxy, seems to behave
  correctly now.
* docs/apibuild.py docs/*: fixing the doc and API generator
Daniel
2006-07-03 13:45:55 +00:00
5995e2428c * proxy/libvirt_proxy.c src/proxy_internal.[ch] src/xend_internal.[ch]:
finished the last entry point missing for the proxy code.
Daniel
2006-07-03 11:12:12 +00:00
f14093e509 * proxy/libvirt_proxy.c src/proxy_internal.c: more bug fixes,
virsh starts to work normally over the proxy. Still one entry
  point missing but it's minor.
Daniel
2006-06-30 16:23:16 +00:00
ec48593fdc * proxy/libvirt_proxy.c src/proxy_internal.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xend_internal.h:
  implemented id based lookup and other cleanups, virsh starts to
  work, but still some TODOs
Daniel
2006-06-29 23:53:31 +00:00
337211e731 * src/proxy_internal.c src/proxy_internal.h src/driver.h src/libvirt.c
src/Makefile.am: moved proxy/proxy.h and proxy/proxy_client.c as
  proxy_internal.[ch] and integrated them as a new driver.
* proxy/Makefile.am proxy/libvirt_proxy.c src/xen_internal.c
  src/xen_internal.h src/xend_internal.c: various related cleanups.
Daniel
2006-06-29 22:12:47 +00:00
c386d9747b * proxy/libvirt_proxy.c proxy/proxy.h proxy/proxy_client.c: more
progresses on the proxy implementation.
* src/xend_internal.c src/xend_internal.h: exported one routine
Daniel
2006-06-29 14:44:37 +00:00
27b7a8be52 * configure.in Makefile.am proxy/Makefile.am proxy/libvirt_proxy.c
proxy/proxy.h proxy/proxy_client.c src/internal.h src/xen_internal.c
  src/xend_internal.c: started working on a proxy to access xend
  for unpriviledged users to avoid opening xend HTTP service to
  serve those read-only operations.
Daniel
2006-06-28 18:19:13 +00:00
b62cdc1405 * configure.in libvirt.spec.in docs/examples/* include/Makefile.am
include/libvirt/virterror.h python/generator.py python/libvir.c
  python/libvirt_wrap.h src/driver.h src/internal.h src/test.h
  src/virsh.c src/virterror.c src/xend_internal.c src/xend_internal.h
  src/xml.c src/xml.h: moved the includes from include/ to
  include/libvirt to reflect the installed include tree. This
  avoid using "" in the includes themselves.
Daniel
2006-06-26 15:02:18 +00:00
76 changed files with 7182 additions and 2018 deletions

View File

@ -17,6 +17,5 @@ libtool
ltconfig
ltmain.sh
update.log
libxen.pc
libxen.spec
libvirt.pc
libvirt.spec

309
ChangeLog
View File

@ -1,3 +1,312 @@
Wed Aug 16 19:07:52 CEST 2006 Daniel Veillard <veillard@redhat.com>
* NEWS configure.in doc//* include/libvirt/libvirt.h
include/libvirt/libvirt.h.in: preparing release of 0.1.4,
regenerated docs, fixed a few things
* src/proxy_internal.c src/test.c src/xend_internal.c:
a few trivial fixes
Wed Aug 16 12:33:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/virsh.c: Added 'setvcpus', 'setmem', 'setmaxmem'
commands to virsh shell. Allow full read-write connection
to non-Xen test hypervisor.
Wed Aug 16 11:38:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/test.c, src/test.h: Allow a hypervisor config to be
loaded from an external XML file. Implement drivers for
setMemory, setMaxMemory, createLinux, dumpXML, setVcpus.
* docs/testnode.xml, docs/testfc4.xml, docs/testfv0.xml:
Example config for using with test driver
Wed Aug 16 11:36:21 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c, src/xml.c, src/xml.h: Refactored the
sexpr_uuid method into a re-usable virParseUUID method which
can be used by any backend
Wed Aug 16 11:31:59 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/libvirt.c: Remove some duplicated changes for VIR_DOMAIN_RO
accidentally left in place from last checkin. Tell the drivers to
be 'quiet' when opening a RW connection, to stop XenD driver
complaining when we open the test driver.
Wed Aug 16 17:24:59 CEST 2006 Daniel Veillard <veillard@redhat.com>
* include/libvirt/virterror.h src/libvirt.c src/virterror.c: enforce
blocking operations with side effect on read-only connections. Adds
a new error code and message.
Tue Aug 15 11:55:15 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xml.c, src/xend_internal.c: Added a <features> block
to XML allowing enablement of guest CPU / system features.
Currently support PAE, ACPI, APIC for HVM domains.
* docs/libvir.html: Documented new <features> block and those
features enabled for HVM guests
Mon Aug 14 10:55:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
* docs/libvir.html, docs/format.html: Updated description of
HVM boot device, and disk device configuration to match up
new new behaviour from previous changes
Fri Aug 11 09:37:02 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/libvirt.c: Avoid duplicated attempts to shutdown or
pause a domain if the first attempt succeeded.
* src/xend_internal.c, src/xml.c: When parsing UUID from
SEXPR also allow for format without any embedded '-'. The
ioemu: prefix is no longer required for HVM domains. It is
added when generating SEXPR, and removing when parsing SEXPR
never appearing in XML. CDROM & floppy devices for HVM domains
are now included in XML under <devices><disk> tag. The <disk>
tag now has a 'device' attribute allowing one of 'floppy',
'cdrom', 'disk' to be specified. If the <console> tag is present
in XML, HVM domains get a serial console activated. <boot>
tag now expects one of 'fd' 'hd' or 'cdrom' when specifying
boot device preference. Increased size of XML doc buffer from
1k to 4k to deal with large numbers of devices
Fri Aug 11 13:08:01 CEST 2006 Daniel Veillard <veillard@redhat.com>
* configure.in: updated python detection code from latest libxml2 one
* docs//*: rebuilt the docs
Thu Aug 10 15:28:52 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xml.c: markmc pointed out that using number(xpath) could lead
to NaN and following comparison would be wrong in a couple of places
if the element looked at was missing.
Wed Aug 9 10:17:03 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/driver.h, src/libvirt.c: Made the virDomainGetXMLDesc
method use the driver backends.
* src/xend_internal.c: Surround all functions which are not
needed for proxy with #ifndef PROXY. Refactor XML generator
functions to allow calling from proxy based on domain id
instead of virDomainPtr object
* src/xs_internal.c, src/xs_internal.h: Change signature
of method for extracting VNC port & console TTY to use domain
id instead of virDomainPtr. Surround functions not used by
proxy in #ifndef PROXY
* src/xml.c:Surround functions not used by proxy in #ifndef PROXY
* src/test.c, src/xen_internal.c: Added NULL entry for new
driver method for fetching XML
* src/proxy_internal.c, src/proxy_internal.h, proxy/libvirt_proxy.c:
Added implmentation of virDomainGetXMLDesc driver method which
goes via proxy.
Tue Aug 8 23:24:51 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/driver.h src/libvirt.c src/proxy_internal.c src/test.c
src/xen_internal.c src/xend_internal.c src/xend_internal.h
src/xml.c src/xs_internal.c: cleanups, force the new vCPU
and affinity entry point to go though the driver framework,
and fix a few warning showing up in my pedantic environment.
Mon Aug 7 18:33:45 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Added details of serial console TTY to XML
representation of domain. Fetch VNC port from xenstore if it is
available (only in xen 3.0.3 or later).
* src/xs_internal.c, src/xs_internal.h: Added APIs for retrieving
the serial console TTY and VNC server port from xenstore.
* docs/libvir.html: Document 'port' attribute for VNC graphics,
and '<console>' element for serial console.
Mon Aug 7 21:57:41 CEST 2006 Daniel Veillard <veillard@redhat.com>
* TODO: updated with new items
Mon Aug 7 14:57:12 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Corrected string length calculation when
appending a CDROM boot device element. Fixes corrupt XML structure.
Mon Aug 7 11:06:20 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: Added a 'port' attribute to the '<graphics>'
tag when display type is VNC, providing the port number on which
the VNC server is listening.
Mon Aug 7 18:47:48 CEST 2006 Daniel Veillard <veillard@redhat.com>
* include/libvirt/libvirt.h.in: previous change to libvirt.h should
have gone on .in too
Fri Aug 4 20:19:23 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/libvirt.c: Fix off-by-one in validated VCPU number (it is
zero based, not one based).
* include/libvirt/libvirt.h: Add some convenience macros for
calculating neccessary CPU map lengths & total host CPUs
* src/virsh.c: Add 'vcpuinfo' and 'vcpumap' commands
Fri Aug 4 14:45:25 CEST 2006 Daniel Veillard <veillard@redhat.com>
* python/generator.py: fix the generator when handling long integers
Dan Berrange reported problems due to this when using
virDomainSetMemory bindings
Fri Aug 4 11:49:44 CEST 2006 Daniel Veillard <veillard@redhat.com>
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/libvirt.c src/libvirt_sym.version src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xend_internal.h:
applied patch from Michel Ponceau and Philippe Berthault for
virtual CPU and affinity support plus a bit of cleanup.
Tue Aug 1 16:22:52 CEST 2006 Daniel Veillard <veillard@redhat.com>
* libvirt.spec.in: xen is now built for ia64, c.f. RH#199685
Fri Jul 28 16:18:30 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/virterror.c: Hugh Brock pointed out that error message
for bad argument were wrong and incomplete, this should fix it and
a few other problems in error reporting
Mon Jul 24 14:34:15 IST 2006 Mark McLoughlin <markmc@redhat.com>
* libvirt.spec.in: sync changes from fedora CVS
Thu Jul 20 09:05:15 EDT 2006 Daniel Veillard <veillard@redhat.com>
* proxy/Makefile.am src/xen_internal.c src/xend_internal.c: cleanup
code when compiled for the proxy, changed the command line macro and
remove warnings.
Wed Jul 19 17:26:48 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/*.c: Bulk replace 'informations' with 'information' to
correct English spelling
Thu Jul 13 23:33:48 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xml.c: applied patch from Peter Vetere to pass down the
UUID from the XML description if present when creating the domain.
Tue Jul 11 18:03:51 CEST 2006 Daniel Veillard <veillard@redhat.com>
* configure.in libvirt.spec.in docs/* NEWS: preparing release of
libvirt-0.1.3
* src/xend_internal.c: uninitialized var and disable TCP slow start
Mon Jul 10 14:19:52 CEST 2006 Daniel Veillard <veillard@redhat.com>
* docs/format.html docs/libvir.html docs/news.html: updated the XML
format documentation to cover the new HVM domains.
Mon Jul 10 12:27:17 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xend_internal.c src/xml.c: patches from Jim Fehlig for HVM
guests, plus XML format changes and merge from Mark McLoughlin
Fri Jul 7 09:47:14 EDT 2006 Daniel Berrange <berrange@redhat.com>
* src/xend_internal.c: changed xenDaemonLookupByID to simply do
an sexpr GET on /xend/domain/[ID] instead of listing all names
and iterating over /xend/domain/[NAME]. Reduces the running time
and number of GETs from O(n^2) to O(n).
Wed Jul 5 17:11:32 IST 2006 Mark McLoughlin <markmc@redhat.com>
* xml.c: allow a <domain> to not have any <disk> devices - e.g.
when using an NFS root.
Thu Jul 6 10:32:14 CEST 2006 Daniel Veillard <veillard@redhat.com>
* src/xend_internal.c: fixed xenDaemonOpen() to try both unix and
http accesses by default and to use the provided URI otherwise,
applied Jim Fehlig patch working around xend connection close bug
* autogen.sh: fixed package name
Wed Jul 5 17:11:32 IST 2006 Mark McLoughlin <markmc@redhat.com>
* xml.c: make the entire <os> node optional if a bootloader
is specified. If we pass an image config to xend, the
bootloader gets ignored anyway.
Wed Jul 5 16:51:45 IST 2006 Mark McLoughlin <markmc@redhat.com>
* xml.c: only set bootloader flag when we actually get
a bootloader
Tue Jul 4 13:50:55 CEST 2006 Daniel Veillard <veillard@redhat.com>
* libvirt.spec.in proxy/Makefile.am: do the chown at the rpm packaging
level, to allow build as non-root
* src/xml.c: fix bug #197583 raised by markmc
Mon Jul 3 15:41:58 EDT 2006 Daniel Veillard <veillard@redhat.com>
* NEWS docs/* configure.in libvirt.spec.in include/libvirt/libvirt.h:
preparing release of 0.1.2
* src/proxy_internal.c: don't warn on open if using http and not the
proxy.
Mon Jul 3 13:54:03 EDT 2006 Daniel Veillard <veillard@redhat.com>
* libvirt.spec.in proxy/Makefile.am src/proxy_internal.c
src/xen_internal.c: fixing the proxy installation, integrate in
the spec file and fix a few bugs in the proxy, seems to behave
correctly now.
* docs/apibuild.py docs/*: fixing the doc and API generator
Mon Jul 3 11:21:10 EDT 2006 Daniel Veillard <veillard@redhat.com>
* proxy/libvirt_proxy.c src/proxy_internal.[ch] src/xend_internal.[ch]:
finished the last entry point missing for the proxy code.
Fri Jun 30 16:31:47 EDT 2006 Daniel Veillard <veillard@redhat.com>
* proxy/libvirt_proxy.c src/proxy_internal.c: more bug fixes,
virsh starts to work normally over the proxy. Still one entry
point missing but it's minor.
Thu Jun 29 23:57:35 EDT 2006 Daniel Veillard <veillard@redhat.com>
* proxy/libvirt_proxy.c src/proxy_internal.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c src/xend_internal.h:
implemented id based lookup and other cleanups, virsh starts to
work, but still some TODOs
Thu Jun 29 22:19:51 EDT 2006 Daniel Veillard <veillard@redhat.com>
* src/proxy_internal.c src/proxy_internal.h src/driver.h src/libvirt.c
src/Makefile.am: moved proxy/proxy.h and proxy/proxy_client.c as
proxy_internal.[ch] and integrated them as a new driver.
* proxy/Makefile.am proxy/libvirt_proxy.c src/xen_internal.c
src/xen_internal.h src/xend_internal.c: various related cleanups.
Thu Jun 29 14:53:01 EDT 2006 Daniel Veillard <veillard@redhat.com>
* proxy/libvirt_proxy.c proxy/proxy.h proxy/proxy_client.c: more
progresses on the proxy implementation.
* src/xend_internal.c src/xend_internal.h: exported one routine
Wed Jun 28 19:23:25 CEST 2006 Daniel Veillard <veillard@redhat.com>
* configure.in Makefile.am proxy/Makefile.am proxy/libvirt_proxy.c
proxy/proxy.h proxy/proxy_client.c src/internal.h src/xen_internal.c
src/xend_internal.c: started working on a proxy to access xend
for unpriviledged users to avoid opening xend HTTP service to
serve those read-only operations.
Mon Jun 26 16:05:27 CEST 2006 Daniel Veillard <veillard@redhat.com>
* configure.in libvirt.spec.in docs/examples/* include/Makefile.am
include/libvirt/virterror.h python/generator.py python/libvir.c
python/libvirt_wrap.h src/driver.h src/internal.h src/test.h
src/virsh.c src/virterror.c src/xend_internal.c src/xend_internal.h
src/xml.c src/xml.h: moved the includes from include/ to
include/libvirt to reflect the installed include tree. This
avoid using "" in the includes themselves.
Wed Jun 21 14:41:04 CEST 2006 Daniel Veillard <veillard@redhat.com>
* NEWS libvirt.spec.in docs/*: preparing release of 0.1.1

View File

@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = src include docs @PYTHON_SUBDIR@ tests
SUBDIRS = src include docs @PYTHON_SUBDIR@ tests proxy
EXTRA_DIST = libvirt.spec.in libvirt.spec COPYING.LIB \
libvirt.pc.in libvirt.pc TODO AUTHORS ChangeLog \

69
NEWS
View File

@ -5,29 +5,54 @@
http://libvirt.org/news.html
Releases
0.1.1: Jun 21 2006:
- building fixes: ncurses fallback (Jim Fehlig), VPATH builds (Daniel P.
Berrange)
- driver cleanups: new entry points, cleanup of libvirt.c (with Daniel P.
Berrange)
- Cope with API change introduced in Xen changeset 10277
- new test driver for regression checks (Daniel P. Berrange)
- improvements: added UUID to XML serialization, buffer usage (Karel Zak),
--connect argument to virsh (Daniel P. Berrange),
- bug fixes: uninitialized memory access in error reporting, S-Expr
parsing (Jim Fehlig, Jeremy Katz), virConnectOpen bug, remove a TODO
in xs_internal.c
- documentation: Python examples (David Lutterkort), new Perl binding URL,
man page update (Karel Zak)
0.1.4: Aug 16 2006:
- bug fixes: spec file fix (Mark McLoughlin), error report problem (with
Hugh Brock), long integer in Python bindings (with Daniel Berrange), XML
generation bug for CDRom (Daniel Berrange), bug whem using number() XPath
function (Mark McLoughlin), fix python detection code, remove duplicate
initialization errors (Daniel Berrange)
- improvements: UUID in XML description (Peter Vetere), proxy code
cleanup, virtual CPU and affinity support + virsh support (Michel
Ponceau, Philippe Berthault, Daniel Berrange), port and tty informations
for console in XML (Daniel Berrange), added XML dump to driver and proxy
support (Daniel Berrange), extention of boot options with support for
floppy and cdrom (Daniel Berrange), features block in XML to report/ask
PAE, ACPI, APIC for HVM domains (Daniel Berrange), fail saide-effect
operations when using read-only connection, large improvements to test
driver (Daniel Berrange)
- documentation: spelling (Daniel Berrange), test driver examples.
0.1.3: Jul 11 2006:
- bugfixes: build as non-root, fix xend access when root, handling of
empty XML elements (Mark McLoughlin), XML serialization and parsing fixes
(Mark McLoughlin), allow to create domains without disk (Mark
McLoughlin),
- improvement: xenDaemonLookupByID from O(n^2) to O(n) (Daniel Berrange),
support for fully virtualized guest (Jim Fehlig, DV, Mark McLoughlin)
- documentation: augmented to cover hvm domains
0.1.2: Jul 3 2006:
- headers include paths fixup
- proxy mechanism for unpriviledged read-only access by httpu
0.1.1: Jun 21 2006:
- building fixes: ncurses fallback (Jim Fehlig), VPATH builds (Daniel P.
Berrange)
- driver cleanups: new entry points, cleanup of libvirt.c (with Daniel P.
Berrange)
- Cope with API change introduced in Xen changeset 10277
- new test driver for regression checks (Daniel P. Berrange)
- improvements: added UUID to XML serialization, buffer usage (Karel
Zak), --connect argument to virsh (Daniel P. Berrange),
- bug fixes: uninitialized memory access in error reporting, S-Expr
parsing (Jim Fehlig, Jeremy Katz), virConnectOpen bug, remove a TODO in
xs_internal.c
- documentation: Python examples (David Lutterkort), new Perl binding
URL, man page update (Karel Zak)
0.1.0: Apr 10 2006:
- building fixes: --with-xen-distdir option (Ronald Aigner), out of tree
@ -38,7 +63,7 @@ Releases
- 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),
Meyering), virDomainLookupByID (Jim Fehlig),
- documentation: updates on architecture, and format, typo fix (Jim
Meyering)
- bindings: exception handling in examples (Jim Meyering), perl ones out

15
TODO
View File

@ -1,4 +1,10 @@
TODO:
- check impact of HVM device rename
http://lists.xensource.com/archives/html/xen-devel/2006-08/msg00369.html
- Finish integration of vCPU and affinity APIs
https://www.redhat.com/archives/libvir-list/2006-August/msg00017.html
- check how to better handle renaming of domains (xm rename and cache)
- Create() API, how do we best keep flexibility and allow various
specific environment and space for evolution (VMX)
- track change of xend API & XML-RPC
@ -11,6 +17,14 @@ TODO:
- object unicity for domains at the Python level
- UUID lookup in hash.c
Other environment:
- support for QEmu
- support for UML
+ in both case raises the problem of listing the domains
+ UML control layer should be easy at least for one user but incomplete
+ QEmu control is not easy to plug, c.f. discussion on-list
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")
@ -28,7 +42,6 @@ Probable TODOs:
Would-be-nice TODO:
- man page for virsh and the libraries entry points
- support for QEmu and other virtualization engines
- more documentation and examples on using the toolkit
- examples for the error handling code

View File

@ -10,7 +10,7 @@ DIE=0
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autoconf installed to compile libxen."
echo "You must have autoconf installed to compile libvirt."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/autoconf"
DIE=1
@ -18,7 +18,7 @@ DIE=0
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have libtool installed to compile libxen."
echo "You must have libtool installed to compile libvirt."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/libtool"
DIE=1
@ -27,7 +27,7 @@ DIE=0
(automake --version) < /dev/null > /dev/null 2>&1 || {
echo
DIE=1
echo "You must have automake installed to compile libxen."
echo "You must have automake installed to compile libvirt."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/automake"
}
@ -37,7 +37,7 @@ if test "$DIE" -eq 1; then
fi
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 libvirt directory"
exit 1
}

View File

@ -5,7 +5,7 @@ AC_CANONICAL_HOST
LIBVIRT_MAJOR_VERSION=0
LIBVIRT_MINOR_VERSION=1
LIBVIRT_MICRO_VERSION=1
LIBVIRT_MICRO_VERSION=4
LIBVIRT_MICRO_VERSION_SUFFIX=
LIBVIRT_VERSION=$LIBVIRT_MAJOR_VERSION.$LIBVIRT_MINOR_VERSION.$LIBVIRT_MICRO_VERSION$LIBVIRT_MICRO_VERSION_SUFFIX
LIBVIRT_VERSION_INFO=`expr $LIBVIRT_MAJOR_VERSION + $LIBVIRT_MINOR_VERSION`:$LIBVIRT_MICRO_VERSION:$LIBVIRT_MINOR_VERSION
@ -186,6 +186,7 @@ if test "$with_python" != "no" ; then
if test -x "$PYTHON"
then
echo Found python in environment PYTHON=$PYTHON
with_python=`$PYTHON -c "import sys; print sys.exec_prefix"`
else
AC_PATH_PROG(PYTHON, python python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5)
fi
@ -202,17 +203,17 @@ if test "$with_python" != "no" ; then
-d $with_python/lib/python$PYTHON_VERSION/site-packages
then
PYTHON_INCLUDES=$with_python/include/python$PYTHON_VERSION
PYTHON_SITE_PACKAGES=$with_python/lib/python$PYTHON_VERSION/site-packages
PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
else
if test -r $prefix/include/python$PYTHON_VERSION/Python.h
then
PYTHON_INCLUDES='$(prefix)/include/python$(PYTHON_VERSION)'
PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
PYTHON_INCLUDES=$prefix/include/python$PYTHON_VERSION
PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
else
if test -r /usr/include/python$PYTHON_VERSION/Python.h
then
PYTHON_INCLUDES=/usr/include/python$PYTHON_VERSION
PYTHON_SITE_PACKAGES='$(libdir)/python$(PYTHON_VERSION)/site-packages'
PYTHON_SITE_PACKAGES=$libdir/python$PYTHON_VERSION/site-packages
else
echo could not find python$PYTHON_VERSION/Python.h
fi
@ -227,7 +228,7 @@ if test "$with_python" != "no" ; then
then
pythondir='$(PYTHON_SITE_PACKAGES)'
else
pythondir='$(libdir)/python${PYTHON_VERSION}/site-packages'
pythondir='$(libdir)/python$(PYTHON_VERSION)/site-packages'
fi
else
PYTHON=
@ -240,11 +241,10 @@ else
PYTHON_SUBDIR=
fi
AC_SUBST(pythondir)
AC_SUBST(PYTHON)
AC_SUBST(PYTHON_SUBDIR)
AC_SUBST(PYTHON_VERSION)
AC_SUBST(PYTHON_INCLUDES)
AC_SUBST(PYTHON_SITE_PACKAGES)
AC_SUBST(PYTHON_SUBDIR)
# very annoying
rm -f COPYING
@ -253,6 +253,7 @@ cp COPYING.LIB COPYING
AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
docs/examples/Makefile docs/devhelp/Makefile \
docs/examples/python/Makefile \
libvirt.pc libvirt.spec include/libvirt.h \
libvirt.pc libvirt.spec \
include/libvirt/Makefile include/libvirt/libvirt.h \
python/Makefile python/tests/Makefile \
tests/Makefile)
tests/Makefile proxy/Makefile)

View File

@ -1 +1,3 @@
Makefile
Makefile.in
.memdump

View File

@ -1,27 +1,60 @@
<?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>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">d-l</a>
<a href="APIchunk2.html">m-r</a>
<a href="APIchunk3.html">s-z</a>
</h2><h2>Letter A:</h2><dl><dt>APIs</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</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>API Alphabetic Index A-a 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-a for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-a</a>
<a href="APIchunk1.html">b-f</a>
<a href="APIchunk2.html">g-n</a>
<a href="APIchunk3.html">o-s</a>
<a href="APIchunk4.html">t-z</a>
</h2><h2>Letter A:</h2><dl><dt>API</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>APIs</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<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></dl><h2>Letter C:</h2><dl><dt>CPU</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd></dl><h2>Letter B:</h2><dl><dt>Bytes</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd></dl><h2>Letter C:</h2><dl><dt>CPU</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
<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#_virVcpuInfo">_virVcpuInfo</a><br />
<a href="">cpu</a><br />
<a href="">vcpu</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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 />
</dd><dt>CPU0-7</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>CPUs</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
<a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="">cpu</a><br />
<a href="">cpumap</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
</dd><dt>Collect</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</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 />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
</dd><dt>Dynamically</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
</dd><dt>Dynamically</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</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#virDomainSetVcpus">virDomainSetVcpus</a><br />
</dd></dl><h2>Letter E:</h2><dl><dt>Each</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>Extract</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd></dl><h2>Letter F:</h2><dl><dt>For</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
</dd><dt>Free</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
@ -42,34 +75,18 @@
</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></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>NULL</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</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#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDefineXML">virDomainDefineXML</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#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</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>NUMA</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd></dl><h2>Letter N:</h2><dl><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 />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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="">cpumap</a><br />
<a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</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 />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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 />
@ -91,23 +108,35 @@
<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></dl><h2>Letter T:</h2><dl><dt>TODO:</dt><dd><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#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
<a href="">cpumap</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#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#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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 />
<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#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
</dd></dl><h2>Letter U:</h2><dl><dt>UTF-8</dt><dd><a href="html/libvirt-libvirt.html#virDomainDefineXML">virDomainDefineXML</a><br />
</dd></dl><h2>Letter U:</h2><dl><dt>USE_CPU</dt><dd><a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
</dd><dt>UTF-8</dt><dd><a href="html/libvirt-libvirt.html#virDomainDefineXML">virDomainDefineXML</a><br />
<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#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
@ -115,25 +144,34 @@
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</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 />
</dd></dl><h2>Letter V:</h2><dl><dt>VIR_COPY_CPUMAP</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
</dd><dt>VIR_CPU_USABLE</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
</dd><dt>VIR_GET_CPUMAP</dt><dd><a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</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#virDomainDefineXML">virDomainDefineXML</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#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
<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 />
<a href="html/libvirt-libvirt.html#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</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 />
</dd><dt>active</dt><dd><a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</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#virDomainSuspend">virDomainSuspend</a><br />
@ -143,15 +181,21 @@
<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>alive</dt><dd><a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
</dd><dt>all</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>allocated</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>all</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>allocated</dt><dd><a href="">cpumap</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#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</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>already</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>also</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>amount</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#virDomainSetMemory">virDomainSetMemory</a><br />
@ -161,95 +205,31 @@
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
</dd><dt>applications</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>arbitrary</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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 />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>array</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
</dd><dt>array</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<a href="">cpumaps</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
</dd><dt>assumed</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>assumed</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</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 />
</dd><dt>availble</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</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 />
</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#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</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>but</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virDomainDefineXML">virDomainDefineXML</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#virDomainUndefine">virDomainUndefine</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>bytes</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUIDString">virDomainGetUUIDString</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#virDomainCreate">virDomainCreate</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#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#virConnectOpenReadOnly">virConnectOpenReadOnly</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>can</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</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>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 />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
</dd><dt>clean</dt><dd><a href="html/libvirt-virterror.html#virResetError">virResetError</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-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>command</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>compiled</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</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>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 />
<a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="APIchunk1.html">d-l</a>
<a href="APIchunk2.html">m-r</a>
<a href="APIchunk3.html">s-z</a>
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-a</a>
<a href="APIchunk1.html">b-f</a>
<a href="APIchunk2.html">g-n</a>
<a href="APIchunk3.html">o-s</a>
<a href="APIchunk4.html">t-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 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://search.cpan.org/~danberr/Sys-Virt-0.1.0/">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,130 @@
<?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>API Alphabetic Index d-l 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-l for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="APIchunk1.html">d-l</a>
<a href="APIchunk2.html">m-r</a>
<a href="APIchunk3.html">s-z</a>
</h2><h2>Letter d:</h2><dl><dt>data</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</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>API Alphabetic Index b-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 b-f for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-a</a>
<a href="APIchunk1.html">b-f</a>
<a href="APIchunk2.html">g-n</a>
<a href="APIchunk3.html">o-s</a>
<a href="APIchunk4.html">t-z</a>
</h2><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 />
</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#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</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>between</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
</dd><dt>bit</dt><dd><a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
<a href="">cpumap</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
<a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virDomainDefineXML">virDomainDefineXML</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#virDomainUndefine">virDomainUndefine</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>byte</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>bytes</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="">cpumap</a><br />
<a href="">cpumaps</a><br />
<a href="">maplen</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUID">virDomainGetUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd></dl><h2>Letter c:</h2><dl><dt>calculate</dt><dd><a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
</dd><dt>call</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</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#virDomainSetVcpus">virDomainSetVcpus</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#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>caller</dt><dd><a href="">cpumap</a><br />
<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>calloc</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>can</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#virDomainPinVcpu">virDomainPinVcpu</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#virDomainPinVcpu">virDomainPinVcpu</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
</dd><dt>clean</dt><dd><a href="html/libvirt-virterror.html#virResetError">virResetError</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-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#virDomainPinVcpu">virDomainPinVcpu</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>command</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>compiled</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>complete</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
</dd><dt>conjonction</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</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>control</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>copy</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<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>corresponding</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>could</dt><dd><a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>cpu</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
</dd><dt>cpumap</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
<a href="">cpumap</a><br />
<a href="">cpumaps</a><br />
<a href="">maplen</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>cpumaps</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>cupmap</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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 />
</dd></dl><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 />
@ -16,6 +136,7 @@
</dd><dt>defined</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</a><br />
<a href="html/libvirt-libvirt.html#virDomainUndefine">virDomainUndefine</a><br />
</dd><dt>described</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>description</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainDefineXML">virDomainDefineXML</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
@ -25,6 +146,7 @@
</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#virDomainDefineXML">virDomainDefineXML</a><br />
<a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainUndefine">virDomainUndefine</a><br />
</dd><dt>domains</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a><br />
@ -33,34 +155,41 @@
<a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</a><br />
</dd><dt>down</dt><dd><a href="html/libvirt-libvirt.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>driver</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter e:</h2><dl><dt>encoded</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd></dl><h2>Letter e:</h2><dl><dt>each</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><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>extract</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</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 />
</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 />
</dd></dl><h2>Letter f:</h2><dl><dt>fail</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
</dd><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#virDomainGetVcpus">virDomainGetVcpus</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#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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 />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</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>filled</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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 />
@ -75,17 +204,21 @@
<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#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetVcpus">virDomainSetVcpus</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>format</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<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#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
@ -97,7 +230,12 @@
<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#virDomainCreate">virDomainCreate</a><br />
</dd><dt>from</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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 />
@ -107,107 +245,20 @@
<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#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</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 />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</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>indicating</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</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#virDomainGetUUIDString">virDomainGetUUIDString</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>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>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 />
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>int</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</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 />
<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#virDomainLookupByUUIDString">virDomainLookupByUUIDString</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><dt>kernel</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>kilobytes</dt><dd><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#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</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><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>launch</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</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-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>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#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>limited</dt><dd><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>list</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
<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>looked</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</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 />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="APIchunk1.html">d-l</a>
<a href="APIchunk2.html">m-r</a>
<a href="APIchunk3.html">s-z</a>
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-a</a>
<a href="APIchunk1.html">b-f</a>
<a href="APIchunk2.html">g-n</a>
<a href="APIchunk3.html">o-s</a>
<a href="APIchunk4.html">t-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 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://search.cpan.org/~danberr/Sys-Virt-0.1.0/">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,14 +1,137 @@
<?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>API Alphabetic Index m-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 m-r for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="APIchunk1.html">d-l</a>
<a href="APIchunk2.html">m-r</a>
<a href="APIchunk3.html">s-z</a>
</h2><h2>Letter m:</h2><dl><dt>major</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</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>API Alphabetic Index g-n 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-n for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-a</a>
<a href="APIchunk1.html">b-f</a>
<a href="APIchunk2.html">g-n</a>
<a href="APIchunk3.html">o-s</a>
<a href="APIchunk4.html">t-z</a>
</h2><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 />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</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>growing</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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>has</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>have</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>host</dt><dd><a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</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>ie:</dt><dd><a href="">cpumap</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><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>indicating</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>info</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</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>initializing</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>inside</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>instance</dt><dd><a href="">nodeinfo</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#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>int</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetID">virDomainGetID</a><br />
</dd><dt>interaction</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
</dd><dt>into</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</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#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</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><dt>kernel</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>kilobytes</dt><dd><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#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</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><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#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>launch</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</a><br />
</dd><dt>least</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>length</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="">maplen</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-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>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#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>limited</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
</dd><dt>line</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>list</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
<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>little-endian</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>looked</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</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 />
<a href="html/libvirt-libvirt.html#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
</dd><dt>lowest</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd></dl><h2>Letter m:</h2><dl><dt>macro</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
</dd><dt>major</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>malloc</dt><dd><a href="">cpumap</a><br />
</dd><dt>map</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="">cpumap</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>maplen</dt><dd><a href="">cpumap</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>maxinfo</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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 />
@ -18,13 +141,16 @@
<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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>means</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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 />
<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#virDomainGetVcpus">virDomainGetVcpus</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#virDomainSetMemory">virDomainSetMemory</a><br />
@ -37,6 +163,7 @@
</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#virGetVersion">virGetVersion</a><br />
</dd><dt>missing</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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>more</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
@ -44,13 +171,17 @@
</dd><dt>multithreaded</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
<a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>must</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd><dt>must</dt><dd><a href="">cpumap</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</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-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>names</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
</dd><dt>nanoseconds</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</a><br />
</dd><dt>neccessarily</dt><dd><a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</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 />
@ -62,11 +193,15 @@
<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#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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>non</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</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 />
</dd><dt>not</dt><dd><a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<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#virDomainDefineXML">virDomainDefineXML</a><br />
@ -76,158 +211,14 @@
<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#virDomainSetVcpus">virDomainSetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvirt-libvirt.html#virDomainUndefine">virDomainUndefine</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#virConnectListDefinedDomains">virConnectListDefinedDomains</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#virDomainGetUUIDString">virDomainGetUUIDString</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#virDomainLookupByUUIDString">virDomainLookupByUUIDString</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#virDomainSetMemory">virDomainSetMemory</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#virDomainDefineXML">virDomainDefineXML</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 />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
</dd><dt>pointed</dt><dd><a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
</dd><dt>pointers</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
</dd><dt>pointing</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>pools</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</a><br />
</dd><dt>potential</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>preferably</dt><dd><a href="html/libvirt-libvirt.html#virDomainDefineXML">virDomainDefineXML</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#virDomainSetMemory">virDomainSetMemory</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-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</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>raw</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</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#virDomainSetMemory">virDomainSetMemory</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 />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</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#virDomainCreate">virDomainCreate</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 />
<a href="html/libvirt-libvirt.html#virDomainUndefine">virDomainUndefine</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 />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-c</a>
<a href="APIchunk1.html">d-l</a>
<a href="APIchunk2.html">m-r</a>
<a href="APIchunk3.html">s-z</a>
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-a</a>
<a href="APIchunk1.html">b-f</a>
<a href="APIchunk2.html">g-n</a>
<a href="APIchunk3.html">o-s</a>
<a href="APIchunk4.html">t-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 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://search.cpan.org/~danberr/Sys-Virt-0.1.0/">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,18 +1,187 @@
<?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>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-c</a>
<a href="APIchunk1.html">d-l</a>
<a href="APIchunk2.html">m-r</a>
<a href="APIchunk3.html">s-z</a>
</h2><h2>Letter s:</h2><dl><dt>same</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</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>API Alphabetic Index o-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 o-s for libvirt</h1><h2 align="center"><a href="APIchunk0.html">A-a</a>
<a href="APIchunk1.html">b-f</a>
<a href="APIchunk2.html">g-n</a>
<a href="APIchunk3.html">o-s</a>
<a href="APIchunk4.html">t-z</a>
</h2><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#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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>offline</dt><dd><a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</a><br />
</dd><dt>one</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="">maplen</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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>order:</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>otherwise</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
<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#virDomainDefineXML">virDomainDefineXML</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#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="">cpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
</dd><dt>pointed</dt><dd><a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
</dd><dt>pointers</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
</dd><dt>pointing</dt><dd><a href="html/libvirt-libvirt.html#_virDomainKernel">_virDomainKernel</a><br />
</dd><dt>pools</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</a><br />
</dd><dt>potential</dt><dd><a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>preferably</dt><dd><a href="html/libvirt-libvirt.html#virDomainDefineXML">virDomainDefineXML</a><br />
</dd><dt>previously</dt><dd><a href="">cpumap</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#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</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>raw</dt><dd><a href="html/libvirt-libvirt.html#virDomainLookupByUUID">virDomainLookupByUUID</a><br />
</dd><dt>reactivate</dt><dd><a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>real</dt><dd><a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</a><br />
<a href="">cpumap</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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>related</dt><dd><a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</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>required</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</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#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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 />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
</dd><dt>reset</dt><dd><a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<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#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>returns</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<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#virDomainCreate">virDomainCreate</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 />
<a href="html/libvirt-libvirt.html#virDomainUndefine">virDomainUndefine</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 />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</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>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>see</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
</dd><dt>set</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>set</dt><dd><a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</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#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>should</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 />
@ -20,15 +189,21 @@
<a href="html/libvirt-libvirt.html#virDomainFree">virDomainFree</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>significant</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>similar</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>single</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
</dd><dt>size</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</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#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</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>specified</dt><dd><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
</dd><dt>start</dt><dd><a href="html/libvirt-libvirt.html#virDomainDefineXML">virDomainDefineXML</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 />
@ -42,9 +217,12 @@
</dd><dt>stop</dt><dd><a href="html/libvirt-libvirt.html#virDomainUndefine">virDomainUndefine</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#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
</dd><dt>store</dt><dd><a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</a><br />
<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#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>stored</dt><dd><a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd><dt>stores</dt><dd><a href="html/libvirt-libvirt.html#virConnectListDefinedDomains">virConnectListDefinedDomains</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 />
@ -57,6 +235,7 @@
<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#virNodeGetInfo">virNodeGetInfo</a><br />
</dd><dt>structures</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
</dd><dt>succeed</dt><dd><a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</a><br />
</dd><dt>success</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvirt-libvirt.html#virDomainCreate">virDomainCreate</a><br />
@ -65,12 +244,15 @@
<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#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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#virDomainUndefine">virDomainUndefine</a><br />
@ -79,133 +261,16 @@
</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>support</dt><dd><a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
</dd><dt>supported</dt><dd><a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</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>system</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd></dl><h2>Letter t:</h2><dl><dt>target</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#virDomainSetMemory">virDomainSetMemory</a><br />
</dd><dt>terminated</dt><dd><a href="html/libvirt-libvirt.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>that</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-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<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 />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
</dd><dt>there</dt><dd><a href="html/libvirt-libvirt.html#virConnectClose">virConnectClose</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-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</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-virterror.html#_virError">_virError</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#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virInitialize">virInitialize</a><br />
</dd><dt>those</dt><dd><a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>threads</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
</dd><dt>time</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</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>undefine</dt><dd><a href="html/libvirt-libvirt.html#virDomainUndefine">virDomainUndefine</a><br />
</dd><dt>uniform</dt><dd><a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</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#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>use</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</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#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>user</dt><dd><a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</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>virConnCopyLastError</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a><br />
</dd><dt>virCopyLastError</dt><dd><a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a><br />
</dd><dt>virDomainCreateLinux</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</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>virDomainGetXMLDesc</dt><dd><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>virError</dt><dd><a href="html/libvirt-virterror.html#virResetError">virResetError</a><br />
</dd><dt>virErrorNumber</dt><dd><a href="html/libvirt-virterror.html#_virError">_virError</a><br />
</dd><dt>virNodeInfo</dt><dd><a href="html/libvirt-libvirt.html#virNodeGetInfo">virNodeGetInfo</a><br />
</dd><dt>virResetError</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
</dd><dt>virSuspendDomain</dt><dd><a href="html/libvirt-libvirt.html#virDomainResume">virDomainResume</a><br />
</dd><dt>virtual</dt><dd><a href="html/libvirt-libvirt.html#_virDomainInfo">_virDomainInfo</a><br />
</dd></dl><h2>Letter w:</h2><dl><dt>was</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#virDomainResume">virDomainResume</a><br />
<a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>when</dt><dd><a href="html/libvirt-virterror.html#virErrorFunc">virErrorFunc</a><br />
<a href="html/libvirt-libvirt.html#virInitialize">virInitialize</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 />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
</dd><dt>which</dt><dd><a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</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-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>while</dt><dd><a href="html/libvirt-libvirt.html#virGetVersion">virGetVersion</a><br />
</dd><dt>will</dt><dd><a href="html/libvirt-virterror.html#virConnCopyLastError">virConnCopyLastError</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-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 />
<a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a><br />
</dd><dt>with</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-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvirt-virterror.html#virCopyLastError">virCopyLastError</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</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></dl><h2>Letter x:</h2><dl><dt>xen</dt><dd><a href="html/libvirt-libvirt.html#virConnectOpen">virConnectOpen</a><br />
</dd></dl><h2>Letter y:</h2><dl><dt>yet</dt><dd><a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</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-c</a>
<a href="APIchunk1.html">d-l</a>
<a href="APIchunk2.html">m-r</a>
<a href="APIchunk3.html">s-z</a>
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-a</a>
<a href="APIchunk1.html">b-f</a>
<a href="APIchunk2.html">g-n</a>
<a href="APIchunk3.html">o-s</a>
<a href="APIchunk4.html">t-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 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://search.cpan.org/~danberr/Sys-Virt-0.1.0/">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,6 +1,9 @@
<?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>List of Symbols per Module 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">List of Symbols per Module for libvirt</h1><h2><a name="libvirt" id="libvirt">Module libvirt</a>:</h2><p><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
<a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
<a href="html/libvirt-libvirt.html#VIR_DEVICE_DEFAULT">VIR_DEVICE_DEFAULT</a><br />
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RO">VIR_DEVICE_RO</a><br />
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RW">VIR_DEVICE_RW</a><br />
@ -17,9 +20,17 @@
<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_SHUTOFF">VIR_DOMAIN_SHUTOFF</a><br />
<a href="html/libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_VCPU_BLOCKED">VIR_VCPU_BLOCKED</a><br />
<a href="html/libvirt-libvirt.html#VIR_VCPU_OFFLINE">VIR_VCPU_OFFLINE</a><br />
<a href="html/libvirt-libvirt.html#VIR_VCPU_RUNNING">VIR_VCPU_RUNNING</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#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</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#virConnectGetType">virConnectGetType</a><br />
@ -45,6 +56,7 @@
<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#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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#virDomainInfoPtr">virDomainInfoPtr</a><br />
@ -54,6 +66,7 @@
<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#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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 />
@ -62,6 +75,7 @@
<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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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#virDomainSuspend">virDomainSuspend</a><br />
@ -71,6 +85,9 @@
<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-libvirt.html#virVcpuInfo">virVcpuInfo</a><br />
<a href="html/libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a><br />
<a href="html/libvirt-libvirt.html#virVcpuState">virVcpuState</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_DOM_EXIST">VIR_ERR_DOM_EXIST</a><br />
<a href="html/libvirt-virterror.html#VIR_ERR_DRIVER_FULL">VIR_ERR_DRIVER_FULL</a><br />
@ -95,6 +112,7 @@
<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_DENIED">VIR_ERR_OPERATION_DENIED</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 />
@ -105,6 +123,7 @@
<a href="html/libvirt-virterror.html#VIR_ERR_XML_ERROR">VIR_ERR_XML_ERROR</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_PROXY">VIR_FROM_PROXY</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_RPC">VIR_FROM_RPC</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 />

View File

@ -4,8 +4,12 @@
</p><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 />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
</p><h2>Type unsigned int:</h2><p><a href="html/libvirt-libvirt.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</a><br />
<a href="html/libvirt-libvirt.html#virDomainReboot">virDomainReboot</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</a><br />
</p><h2>Type unsigned long:</h2><p><a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetMemory">virDomainSetMemory</a><br />
</p><h2>Type unsigned long *:</h2><p><a href="html/libvirt-libvirt.html#virConnectGetVersion">virConnectGetVersion</a><br />
@ -39,12 +43,15 @@
<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#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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#virDomainUndefine">virDomainUndefine</a><br />
@ -56,6 +63,7 @@
<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 virVcpuInfoPtr:</h2><p><a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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 />

View File

@ -1,7 +1,10 @@
<?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>Alphabetic List of Symbols 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">Alphabetic List of Symbols in libvirt</h1><h2>Letter L:</h2><p><a href="html/libvirt-libvirt.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
</p><h2>Letter V:</h2><p><a href="html/libvirt-libvirt.html#VIR_DEVICE_DEFAULT">VIR_DEVICE_DEFAULT</a><br />
</p><h2>Letter V:</h2><p><a href="html/libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a><br />
<a href="html/libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a><br />
<a href="html/libvirt-libvirt.html#VIR_DEVICE_DEFAULT">VIR_DEVICE_DEFAULT</a><br />
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RO">VIR_DEVICE_RO</a><br />
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RW">VIR_DEVICE_RW</a><br />
<a href="html/libvirt-libvirt.html#VIR_DEVICE_RW_FORCE">VIR_DEVICE_RW_FORCE</a><br />
@ -41,6 +44,7 @@
<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_DENIED">VIR_ERR_OPERATION_DENIED</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 />
@ -51,16 +55,25 @@
<a href="html/libvirt-virterror.html#VIR_ERR_XML_ERROR">VIR_ERR_XML_ERROR</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_PROXY">VIR_FROM_PROXY</a><br />
<a href="html/libvirt-virterror.html#VIR_FROM_RPC">VIR_FROM_RPC</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-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a><br />
<a href="html/libvirt-libvirt.html#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a><br />
<a href="html/libvirt-libvirt.html#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_USE_CPU">VIR_USE_CPU</a><br />
<a href="html/libvirt-libvirt.html#VIR_VCPU_BLOCKED">VIR_VCPU_BLOCKED</a><br />
<a href="html/libvirt-libvirt.html#VIR_VCPU_OFFLINE">VIR_VCPU_OFFLINE</a><br />
<a href="html/libvirt-libvirt.html#VIR_VCPU_RUNNING">VIR_VCPU_RUNNING</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-virterror.html#_virError">_virError</a><br />
<a href="html/libvirt-libvirt.html#_virNodeInfo">_virNodeInfo</a><br />
<a href="html/libvirt-libvirt.html#_virVcpuInfo">_virVcpuInfo</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 />
@ -92,6 +105,7 @@
<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#virDomainGetUUIDString">virDomainGetUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainGetVcpus">virDomainGetVcpus</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#virDomainInfoPtr">virDomainInfoPtr</a><br />
@ -101,6 +115,7 @@
<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#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a><br />
<a href="html/libvirt-libvirt.html#virDomainPinVcpu">virDomainPinVcpu</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 />
@ -109,6 +124,7 @@
<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#virDomainSetMemory">virDomainSetMemory</a><br />
<a href="html/libvirt-libvirt.html#virDomainSetVcpus">virDomainSetVcpus</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#virDomainSuspend">virDomainSuspend</a><br />
@ -128,4 +144,7 @@
<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 />
<a href="html/libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a><br />
<a href="html/libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a><br />
<a href="html/libvirt-libvirt.html#virVcpuState">virVcpuState</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://search.cpan.org/~danberr/Sys-Virt-0.1.0/">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

@ -46,7 +46,7 @@ $(srcdir)/html/index.html: libvirt-api.xml $(srcdir)/newapi.xsl
echo "Validating the resulting XHTML pages" ; \
$(XMLLINT) --nonet --valid --noout html/*.html ; fi );
libvirt-api.xml libvirt-refs.xml: apibuild.py ../include/*.h ../src/*.h ../src/*.c
libvirt-api.xml libvirt-refs.xml: apibuild.py ../include/libvirt/*.h ../src/*.h ../src/*.c
-(./apibuild.py)
$(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html

View File

@ -25,6 +25,8 @@ ignored_files = {
"driver.h": "internal driver interfaces",
"xend_internal.h": "internal includes and defines",
"xend_internal.c": "internal code",
"proxy_internal.h": "internal includes and defines",
"proxy_internal.c": "internal code",
"xen_internal.h": "internal includes and defines",
"xen_internal.c": "internal code",
"xs_internal.h": "internal includes and defines",
@ -2086,11 +2088,11 @@ def rebuild():
builder = None
if glob.glob("../src/libvirt.c") != [] :
print "Rebuilding API description for libvirt"
builder = docBuilder("libvirt", ["../src", "../include"],
builder = docBuilder("libvirt", ["../src", "../include/libvirt"],
[])
elif glob.glob("src/libvirt.c") != [] :
print "Rebuilding API description for libvir"
builder = docBuilder("libvirt", ["src", "include"],
builder = docBuilder("libvirt", ["src", "include/libvirt"],
[])
else:
print "rebuild() failed, unable to guess the module"

3
docs/devhelp/.cvsignore Normal file
View File

@ -0,0 +1,3 @@
Makefile
Makefile.in
libvirt.devhelp

View File

@ -38,7 +38,14 @@
<p>Author(s): Daniel Veillard &lt;veillard@redhat.com&gt; </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a>;
<pre class="synopsis">#define <a href="#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a>(nodeinfo);
#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a>;
#define <a href="#VIR_USE_CPU">VIR_USE_CPU</a>(cpumap, cpu);
#define <a href="#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a>(cpu);
#define <a href="#VIR_CPU_USABLE">VIR_CPU_USABLE</a>(cpumaps, maplen, vcpu, cpu);
#define <a href="#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a>(cpumaps, maplen, vcpu, cpumap);
#define <a href="#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a>(cpumaps, maplen, vcpu);
#define <a href="#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a>(cpumap, cpu);
typedef <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> * <a href="#virNodeInfoPtr">virNodeInfoPtr</a>;
typedef <a href="libvirt-libvirt.html#virDomainInfo">virDomainInfo</a> * <a href="#virDomainInfoPtr">virDomainInfoPtr</a>;
typedef <a href="libvirt-libvirt.html#virDomainKernel">virDomainKernel</a> * <a href="#virDomainKernelPtr">virDomainKernelPtr</a>;
@ -49,10 +56,13 @@ typedef enum <a href="#virDomainState">virDomainState</a>;
typedef enum <a href="#virDeviceMode">virDeviceMode</a>;
typedef struct _virDomain <a href="#virDomain">virDomain</a>;
typedef <a href="libvirt-libvirt.html#virDomain">virDomain</a> * <a href="#virDomainPtr">virDomainPtr</a>;
typedef struct _virVcpuInfo <a href="#virVcpuInfo">virVcpuInfo</a>;
typedef <a href="libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a> * <a href="#virVcpuInfoPtr">virVcpuInfoPtr</a>;
typedef enum <a href="#virDomainRestart">virDomainRestart</a>;
typedef struct _virConnect <a href="#virConnect">virConnect</a>;
typedef enum <a href="#virDomainCreateFlags">virDomainCreateFlags</a>;
typedef struct _virDomainInfo <a href="#virDomainInfo">virDomainInfo</a>;
typedef enum <a href="#virVcpuState">virVcpuState</a>;
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);
int <a href="#virDomainUndefine">virDomainUndefine</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainDefineXML">virDomainDefineXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * xml);
@ -60,6 +70,7 @@ int <a href="#virDomainShutdown">virDomainShutdown</a> (<a href="libvirt-libvir
int <a href="#virGetVersion">virGetVersion</a> (unsigned long * libVer, <br/> const char * type, <br/> unsigned long * typeVer);
int <a href="#virConnectListDefinedDomains">virConnectListDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char ** names, <br/> int maxnames);
<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);
int <a href="#virDomainPinVcpu">virDomainPinVcpu</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int vcpu, <br/> unsigned char * cpumap, <br/> int maplen);
int <a href="#virDomainRestore">virDomainRestore</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * from);
const char * <a href="#virConnectGetType">virConnectGetType</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
int <a href="#virDomainSave">virDomainSave</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> const char * to);
@ -73,7 +84,7 @@ int <a href="#virNodeGetInfo">virNodeGetInfo</a> (<a href="libvirt-libvirt.htm
int <a href="#virDomainGetUUID">virDomainGetUUID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned char * uuid);
int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
int <a href="#virDomainGetUUIDString">virDomainGetUUIDString</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> char * buf);
unsigned long <a href="#virDomainGetMaxMemory">virDomainGetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
int <a href="#virDomainGetVcpus">virDomainGetVcpus</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> <a href="libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a> info, <br/> int maxinfo, <br/> unsigned char * cpumaps, <br/> int maplen);
int <a href="#virConnectGetVersion">virConnectGetVersion</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> unsigned long * hvVer);
int <a href="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned long memory);
int <a href="#virDomainFree">virDomainFree</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
@ -82,11 +93,13 @@ int <a href="#virDomainSuspend">virDomainSuspend</a> (<a href="libvirt-libvirt.
int <a href="#virConnectClose">virConnectClose</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
int <a href="#virDomainReboot">virDomainReboot</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int flags);
int <a href="#virInitialize">virInitialize</a> (void);
int <a href="#virDomainSetVcpus">virDomainSetVcpus</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int nvcpus);
unsigned int <a href="#virDomainGetID">virDomainGetID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
int <a href="#virDomainResume">virDomainResume</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
<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);
int <a href="#virDomainSetMemory">virDomainSetMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned long memory);
int <a href="#virDomainDestroy">virDomainDestroy</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
unsigned long <a href="#virDomainGetMaxMemory">virDomainGetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
char * <a href="#virDomainGetXMLDesc">virDomainGetXMLDesc</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> int flags);
const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpenReadOnly">virConnectOpenReadOnly</a> (const char * name);
@ -100,6 +113,34 @@ const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvirt-
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="LIBVIR_VERSION_NUMBER">Macro </a>LIBVIR_VERSION_NUMBER</h3><pre class="programlisting">#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a>;
</pre><p>Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="VIR_COPY_CPUMAP">Macro </a>VIR_COPY_CPUMAP</h3><pre class="programlisting">#define <a href="#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a>(cpumaps, maplen, vcpu, cpumap);
</pre><p>This macro is to be used in conjonction with virDomainGetVcpus() and virDomainPinVcpu() APIs. <a href="libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a> macro extract the cpumap of the specified vcpu from cpumaps array and copy it into cpumap to be used later by virDomainPinVcpu() API.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an array of cpumap (in 8-bit bytes) (IN)</td></tr><tr><td><span class="term"><i><tt>maplen</tt></i>:</span></td><td>the length (in bytes) of one cpumap</td></tr><tr><td><span class="term"><i><tt>vcpu</tt></i>:</span></td><td>the virtual CPU number</td></tr><tr><td><span class="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a cpumap (in 8-bit bytes) (OUT) This cpumap must be previously allocated by the caller (ie: malloc(maplen))</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="VIR_CPU_MAPLEN">Macro </a>VIR_CPU_MAPLEN</h3><pre class="programlisting">#define <a href="#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a>(cpu);
</pre><p>This macro is to be used in conjonction with virDomainPinVcpu() API. It returns the length (in bytes) required to store the complete CPU map between a single virtual &amp; all physical CPUs of a domain.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cpu</tt></i>:</span></td><td>number of physical CPUs</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="VIR_CPU_USABLE">Macro </a>VIR_CPU_USABLE</h3><pre class="programlisting">#define <a href="#VIR_CPU_USABLE">VIR_CPU_USABLE</a>(cpumaps, maplen, vcpu, cpu);
</pre><p>This macro is to be used in conjonction with virDomainGetVcpus() API. <a href="libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a> macro returns a non zero value (true) if the cpu is usable by the vcpu, and 0 otherwise.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an array of cpumap (in 8-bit bytes) (IN)</td></tr><tr><td><span class="term"><i><tt>maplen</tt></i>:</span></td><td>the length (in bytes) of one cpumap</td></tr><tr><td><span class="term"><i><tt>vcpu</tt></i>:</span></td><td>the virtual CPU number</td></tr><tr><td><span class="term"><i><tt>cpu</tt></i>:</span></td><td>the physical CPU number</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="VIR_GET_CPUMAP">Macro </a>VIR_GET_CPUMAP</h3><pre class="programlisting">#define <a href="#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a>(cpumaps, maplen, vcpu);
</pre><p>This macro is to be used in conjonction with virDomainGetVcpus() and virDomainPinVcpu() APIs. <a href="libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a> macro returns a pointer to the cpumap of the specified vcpu from cpumaps array.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an array of cpumap (in 8-bit bytes) (IN)</td></tr><tr><td><span class="term"><i><tt>maplen</tt></i>:</span></td><td>the length (in bytes) of one cpumap</td></tr><tr><td><span class="term"><i><tt>vcpu</tt></i>:</span></td><td>the virtual CPU number</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="VIR_NODEINFO_MAXCPUS">Macro </a>VIR_NODEINFO_MAXCPUS</h3><pre class="programlisting">#define <a href="#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a>(nodeinfo);
</pre><p>This macro is to calculate the total number of CPUs supported but not neccessarily active in the host.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>nodeinfo</tt></i>:</span></td><td><a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> instance</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="VIR_UNUSE_CPU">Macro </a>VIR_UNUSE_CPU</h3><pre class="programlisting">#define <a href="#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a>(cpumap, cpu);
</pre><p>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro reset the bit (CPU not usable) of the related cpu in cpumap.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)</td></tr><tr><td><span class="term"><i><tt>cpu</tt></i>:</span></td><td>the physical CPU number</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="VIR_USE_CPU">Macro </a>VIR_USE_CPU</h3><pre class="programlisting">#define <a href="#VIR_USE_CPU">VIR_USE_CPU</a>(cpumap, cpu);
</pre><p>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)</td></tr><tr><td><span class="term"><i><tt>cpu</tt></i>:</span></td><td>the physical CPU number</td></tr></tbody></table></div>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConnect">Structure </a>virConnect</h3><pre class="programlisting">struct _virConnect {
@ -200,6 +241,27 @@ The content of this structure is not made public by the API.
<hr/>
<div class="refsect2" lang="en"><h3><a name="virNodeInfoPtr">Typedef </a>virNodeInfoPtr</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> * virNodeInfoPtr;
</pre><p>a <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> is a pointer to a <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> structure.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virVcpuInfo">Structure </a>virVcpuInfo</h3><pre class="programlisting">struct _virVcpuInfo {
unsigned int number : virtual CPU number
int state : value from <a href="libvirt-libvirt.html#virVcpuState">virVcpuState</a>
unsigned long long cpuTime : CPU time used, in nanoseconds
int cpu : real CPU number, or -1 if offline
} virVcpuInfo;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virVcpuInfoPtr">Typedef </a>virVcpuInfoPtr</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a> * virVcpuInfoPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virVcpuState">Enum </a>virVcpuState</h3><pre class="programlisting">enum <a href="#virVcpuState">virVcpuState</a> {
<a name="VIR_VCPU_OFFLINE">VIR_VCPU_OFFLINE</a> = 0 /* the virtual CPU is offline */
<a name="VIR_VCPU_RUNNING">VIR_VCPU_RUNNING</a> = 1 /* the virtual CPU is running */
<a name="VIR_VCPU_BLOCKED">VIR_VCPU_BLOCKED</a> = 2 /* the virtual CPU is blocked on resource */
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConnectClose"/>virConnectClose ()</h3><pre class="programlisting">int virConnectClose (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br/>
@ -259,7 +321,7 @@ The content of this structure is not made public by the API.
<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></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainGetInfo"/>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 information 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="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></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainGetMaxMemory"/>virDomainGetMaxMemory ()</h3><pre class="programlisting">unsigned long virDomainGetMaxMemory (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br/>
@ -281,6 +343,10 @@ The content of this structure is not made public by the API.
<div class="refsect2" lang="en"><h3><a name="virDomainGetUUIDString"/>virDomainGetUUIDString ()</h3><pre class="programlisting">int virDomainGetUUIDString (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> char * buf)<br/>
</pre><p>Get the UUID for a domain as string. For more information about UUID see RFC4122.</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>buf</tt></i>:</span></td><td>pointer to a 37 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></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainGetVcpus"/>virDomainGetVcpus ()</h3><pre class="programlisting">int virDomainGetVcpus (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> <a href="libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a> info, <br/> int maxinfo, <br/> unsigned char * cpumaps, <br/> int maplen)<br/>
</pre><p>Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer is'nt NULL.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object, or NULL for Domain0</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to an array of <a href="libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a> structures (OUT)</td></tr><tr><td><span class="term"><i><tt>maxinfo</tt></i>:</span></td><td>number of structures in info array</td></tr><tr><td><span class="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an bit map of real CPUs for all vcpus of this domain (in 8-bit bytes) (OUT) If cpumaps is NULL, then no cupmap information is returned by the API. It's assumed there is &lt;maxinfo&gt; cpumap in cpumaps array. The memory allocated to cpumaps must be (maxinfo * maplen) bytes (ie: calloc(maxinfo, maplen)). One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.</td></tr><tr><td><span class="term"><i><tt>maplen</tt></i>:</span></td><td>number of bytes in one cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of info filled in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainGetXMLDesc"/>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>
@ -301,6 +367,10 @@ The content of this structure is not made public by the API.
<div class="refsect2" lang="en"><h3><a name="virDomainLookupByUUIDString"/>virDomainLookupByUUIDString ()</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainLookupByUUIDString (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * uuidstr)<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>uuidstr</tt></i>:</span></td><td>the string UUID 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></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainPinVcpu"/>virDomainPinVcpu ()</h3><pre class="programlisting">int virDomainPinVcpu (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int vcpu, <br/> unsigned char * cpumap, <br/> int maplen)<br/>
</pre><p>Dynamically change the real CPUs which can be allocated to a virtual CPU. 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>pointer to domain object, or NULL for Domain0</td></tr><tr><td><span class="term"><i><tt>vcpu</tt></i>:</span></td><td>virtual CPU number</td></tr><tr><td><span class="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.</td></tr><tr><td><span class="term"><i><tt>maplen</tt></i>:</span></td><td>number of bytes in cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...). If maplen &lt; size, missing bytes are set to zero. If maplen &gt; size, failure code is returned.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainReboot"/>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>
@ -325,6 +395,10 @@ The content of this structure is not made public by the API.
<div class="refsect2" lang="en"><h3><a name="virDomainSetMemory"/>virDomainSetMemory ()</h3><pre class="programlisting">int virDomainSetMemory (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned long memory)<br/>
</pre><p>Dynamically change the target 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 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>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></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainSetVcpus"/>virDomainSetVcpus ()</h3><pre class="programlisting">int virDomainSetVcpus (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int nvcpus)<br/>
</pre><p>Dynamically change the number of virtual CPUs used by the domain. Note that this call may fail if the underlying virtualization hypervisor does not support it or if growing the number is arbitrary limited. 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>pointer to domain object, or NULL for Domain0</td></tr><tr><td><span class="term"><i><tt>nvcpus</tt></i>:</span></td><td>the new number of virtual CPUs for this domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDomainShutdown"/>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>

View File

@ -86,7 +86,8 @@ void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvi
<a name="VIR_FROM_SEXPR">VIR_FROM_SEXPR</a> = 4 /* Error in the S-Epression code */
<a name="VIR_FROM_XML">VIR_FROM_XML</a> = 5 /* Error in the XML code */
<a name="VIR_FROM_DOM">VIR_FROM_DOM</a> = 6 /* Error when operating on a domain */
<a name="VIR_FROM_RPC">VIR_FROM_RPC</a> = 7 /* Error in the XML-RPC code */
<a name="VIR_FROM_RPC">VIR_FROM_RPC</a> = 7 /* Error in the XML-RPC code */
<a name="VIR_FROM_PROXY">VIR_FROM_PROXY</a> = 8 /* Error in the proxy code */
};
</pre><p/>
</div>
@ -128,7 +129,8 @@ void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvi
<a name="VIR_ERR_DRIVER_FULL">VIR_ERR_DRIVER_FULL</a> = 25 /* too many drivers registered */
<a name="VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a> = 26 /* not supported by the drivers */
<a name="VIR_ERR_XML_ERROR">VIR_ERR_XML_ERROR</a> = 27 /* an XML description is not well formed or broken */
<a name="VIR_ERR_DOM_EXIST">VIR_ERR_DOM_EXIST</a> = 28 /* the domain already exist */
<a name="VIR_ERR_DOM_EXIST">VIR_ERR_DOM_EXIST</a> = 28 /* the domain already exist */
<a name="VIR_ERR_OPERATION_DENIED">VIR_ERR_OPERATION_DENIED</a> = 29 /* operation forbidden on read-only connections */
};
</pre><p/>
</div>

View File

@ -1,5 +1,7 @@
.memdump
Makefile.in
Makefile
suspend
info1
suspend
.libs
.deps

View File

@ -18,24 +18,24 @@ install-data-local:
EXTRA_DIST=examples.xsl index.py examples.xml
noinst_PROGRAMS=suspend info1
suspend_SOURCES=suspend.c
suspend_LDFLAGS=
suspend_DEPENDENCIES= $(DEPS)
suspend_LDADD= $(LDADDS)
noinst_PROGRAMS=info1 suspend
info1_SOURCES=info1.c
info1_LDFLAGS=
info1_DEPENDENCIES= $(DEPS)
info1_LDADD= $(LDADDS)
suspend_SOURCES=suspend.c
suspend_LDFLAGS=
suspend_DEPENDENCIES= $(DEPS)
suspend_LDADD= $(LDADDS)
valgrind:
$(MAKE) CHECKER='valgrind' tests
tests: $(noinst_PROGRAMS)
@(echo '## examples regression tests')
@($(CHECKER) ./suspend)
@($(CHECKER) ./info1)
@($(CHECKER) ./suspend)

View File

@ -1,26 +1,4 @@
<examples>
<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>
<example filename='info1.c'>
<synopsis>Extract informations about Xen domain 0</synopsis>
<purpose>Demonstrate the basic use of the library to connect to the hypervisor and extract domain informations.</purpose>
@ -32,41 +10,63 @@
<includes>
</includes>
<uses>
<function line='43' file='libvirt' name='virDomainGetInfo'/>
<function line='53' file='libvirt' name='virDomainFree'/>
<function line='36' file='libvirt' name='virDomainLookupByID'/>
<function line='55' file='libvirt' name='virConnectClose'/>
<struct line='25' file='libvirt' name='virDomainInfo'/>
<function line='29' file='libvirt' name='virConnectOpenReadOnly'/>
<function line='43' name='virDomainGetInfo'/>
<function line='53' name='virDomainFree'/>
<function line='36' name='virDomainLookupByID'/>
<function line='55' name='virConnectClose'/>
<type line='25' name='virDomainInfo'/>
<function line='29' name='virConnectOpenReadOnly'/>
</uses>
</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' name='virDomainGetInfo'/>
<function line='111' name='virConnectListDomains'/>
<function line='93' name='virDomainFree'/>
<function line='73' name='virDomainResume'/>
<function line='50' name='virDomainLookupByID'/>
<function line='132' name='virConnectClose'/>
<type line='28' name='virDomainInfo'/>
<function line='62' name='virDomainSuspend'/>
<function line='100' name='virConnectOpenReadOnly'/>
</uses>
</example>
<symbols>
<symbol name='virConnectClose'>
<ref filename='suspend.c'/>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virConnectListDomains'>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virConnectOpenReadOnly'>
<ref filename='suspend.c'/>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainFree'>
<ref filename='suspend.c'/>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainGetInfo'>
<ref filename='suspend.c'/>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainInfo'>
<ref filename='suspend.c'/>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainLookupByID'>
<ref filename='suspend.c'/>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainResume'>
<ref filename='suspend.c'/>

View File

@ -10,7 +10,7 @@
*/
#include <stdio.h>
#include <libvirt.h>
#include <libvirt/libvirt.h>
/**
* getDomainInfo:

View File

@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@ -13,7 +13,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <libvirt.h>
#include <libvirt/libvirt.h>
virConnectPtr conn = NULL; /* the hypervisor connection */

View File

@ -1,6 +1,10 @@
<?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>
<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>This section describes the XML format used to represent domains, there are
variations on the format based on the kind of domains run and the options
used to launch them:</p><p><a href="#Normal1">Normal paravirtualized Xen domains</a></p><p><a href="#Fully1">Fully virtualized Xen domains</a></p><p>The formats try as much as possible to follow the same structure and reuse
elements and attributes where it makes sense.</p><h3 id="Normal"><a name="Normal1" id="Normal1">Normal paravirtualized Xen
guests</a>:</h3><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;
@ -24,6 +28,7 @@ the following is an example of the format as returned by the shell command
&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>
<span style="color: #FF8000; background-color: #FFFFFF">&lt;console tty='/dev/pts/5'/&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
@ -43,27 +48,30 @@ significant:</p><ul><li>name: the domain name, preferably ASCII based</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>
<li>devices: a list of <code>disk</code>, <code>interface</code> and
<code>console</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
following should be sufficient for basic use:</p><p>A <code>disk</code> 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>
</ul><p>An <code>interface</code> 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,
</ul><p>A <code>console</code> element describes a serial console connection to
the guest. It has no children, and a single attribute <code>tty</code> which
provides the path to the Pseudo TTY on which the guest console can be
accessed</p><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>
@ -81,4 +89,90 @@ poweroff. There is various actions possible when this happen:</p><ul><li>destroy
...
&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://search.cpan.org/~danberr/Sys-Virt-0.1.0/">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>
will remain functional in spite of the evolution of the library.</p><h3 id="Fully"><a name="Fully1" id="Fully1">Fully virtualized guests</a>
(added in 0.1.3):</h3><p>Here is an example of a domain description used to start a fully
virtualized (a.k.a. HVM) Xen domain. This requires hardware virtualization
support at the processor level but allows to run unmodified operating
systems:</p><pre>&lt;domain type='xen' id='3'&gt;
&lt;name&gt;fv0&lt;/name&gt;
&lt;uuid&gt;4dea22b31d52d8f32516782e98ab3fa0&lt;/uuid&gt;
&lt;os&gt;
<span style="color: #0000E5; background-color: #FFFFFF">&lt;type&gt;hvm&lt;/type&gt;</span>
<span style="color: #0000E5; background-color: #FFFFFF">&lt;loader&gt;/usr/lib/xen/boot/hvmloader&lt;/loader&gt;</span>
<span style="color: #0000E5; background-color: #FFFFFF">&lt;boot dev='hd'/&gt;</span>
&lt;/os&gt;
&lt;memory&gt;524288&lt;/memory&gt;
&lt;vcpu&gt;1&lt;/vcpu&gt;
&lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
&lt;on_reboot&gt;restart&lt;/on_reboot&gt;
&lt;on_crash&gt;restart&lt;/on_crash&gt;
&lt;features&gt;
<span style="color: #E50000; background-color: #FFFFFF">&lt;pae/&gt;
&lt;acpi/&gt;
&lt;apic/&gt;</span>
&lt;/features&gt;
&lt;devices&gt;
<span style="color: #0000E5; background-color: #FFFFFF">&lt;emulator&gt;/usr/lib/xen/bin/qemu-dm&lt;/emulator&gt;</span>
&lt;interface type='bridge'&gt;
&lt;source bridge='xenbr0'/&gt;
&lt;mac address='00:16:3e:5d:c7:9e'/&gt;
&lt;script path='vif-bridge'/&gt;
&lt;/interface&gt;
&lt;disk type='file'&gt;
&lt;source file='/root/fv0'/&gt;
&lt;target <span style="color: #0000E5; background-color: #FFFFFF">dev='hda'</span>/&gt;
&lt;/disk&gt;
&lt;disk type='file' <span style="color: #0000E5; background-color: #FFFFFF">device='cdrom'</span>&gt;
&lt;source file='/root/fc5-x86_64-boot.iso'/&gt;
&lt;target <span style="color: #0000E5; background-color: #FFFFFF">dev='hdc'</span>/&gt;
&lt;readonly/&gt;
&lt;/disk&gt;
&lt;disk type='file' <span style="color: #0000E5; background-color: #FFFFFF">device='floppy'</span>&gt;
&lt;source file='/root/fd.img'/&gt;
&lt;target <span style="color: #0000E5; background-color: #FFFFFF">dev='fda'</span>/&gt;
&lt;/disk&gt;
<span style="color: #0000E5; background-color: #FFFFFF">&lt;graphics type='vnc' port='5904'/&gt;</span>
&lt;/devices&gt;
&lt;/domain&gt;</pre><p>There is a few things to notice specifically for HVM domains:</p><ul><li>the optional <code>&lt;features&gt;</code> block is used to enable
certain guest CPU / system features. For HVM guests the following
features are defined:
<ul><li><code>pae</code> - enable PAE memory addressing</li>
<li><code>apic</code> - enable IO APIC</li>
<li><code>acpi</code> - enable ACPI bios</li>
</ul></li>
<li>the <code>&lt;os&gt;</code> block description is very different, first
it indicates that the type is 'hvm' for hardware virtualization, then
instead of a kernel, boot and command line arguments, it points to an os
boot loader which will extract the boot informations from the boot device
specified in a separate boot element. The <code>dev</code> attribute on
the <code>boot</code> tag can be one of:
<ul><li><code>fd</code> - boot from first floppy device</li>
<li><code>hd</code> - boot from first harddisk device</li>
<li><code>cdrom</code> - boot from first cdrom device</li>
</ul></li>
<li>the <code>&lt;devices&gt;</code> section includes an emulator entry
pointing to an additional program in charge of emulating the devices</li>
<li>the disk entry indicates in the dev target section that the emulation
for the drive is the first IDE disk device hda. The list of device names
supported is dependant on the Hypervisor, but for Xen it can be any IDE
device <code>hda</code>-<code>hdd</code>, or a floppy device
<code>fda</code>, <code>fdb</code>. The <code>&lt;disk&gt;</code> element
also supports a 'device' attribute to indicate what kinda of hardware to
emulate. The following values are supported:
<ul><li><code>floppy</code> - a floppy disk controller</li>
<li><code>disk</code> - a generic hard drive (the default it
omitted)</li>
<li><code>cdrom</code> - a CDROM device</li>
</ul>
For Xen 3.0.2 and earlier a CDROM device can only be emulated on the
<code>hdc</code> channel, while for 3.0.3 and later, it can be emulated
on any IDE channel.</li>
<li>the <code>&lt;devices&gt;</code> section also include at least one
entry for the graphic device used to render the os. Currently there is
just 2 types possible 'vnc' or 'sdl'. If the type is 'vnc', then an
additional <code>port</code> attribute will be present indicating the TCP
port on which the VNC server is accepting client connections.</li>
</ul><p>It is likely that the HVM description gets additional optional elements
and attributes as the support for fully virtualized domain expands,
especially for the variety of devices emulated and the graphic support
options offered.</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://search.cpan.org/~danberr/Sys-Virt-0.1.0/">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,6 +1,6 @@
<?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 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
<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">#define <a href="#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a></pre><pre class="programlisting">#define <a href="#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a></pre><pre class="programlisting">#define <a href="#VIR_CPU_USABLE">VIR_CPU_USABLE</a></pre><pre class="programlisting">#define <a href="#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a></pre><pre class="programlisting">#define <a href="#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a></pre><pre class="programlisting">#define <a href="#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a></pre><pre class="programlisting">#define <a href="#VIR_USE_CPU">VIR_USE_CPU</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.
</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>
@ -16,6 +16,9 @@ The content of this structure is not made public by the API.
</pre><pre class="programlisting">Enum <a href="#virDomainState">virDomainState</a>
</pre><pre class="programlisting">Structure <a href="#virNodeInfo">virNodeInfo</a><br />struct _virNodeInfo
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> * <a name="virNodeInfoPtr" id="virNodeInfoPtr">virNodeInfoPtr</a>
</pre><pre class="programlisting">Structure <a href="#virVcpuInfo">virVcpuInfo</a><br />struct _virVcpuInfo
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a> * <a name="virVcpuInfoPtr" id="virVcpuInfoPtr">virVcpuInfoPtr</a>
</pre><pre class="programlisting">Enum <a href="#virVcpuState">virVcpuState</a>
</pre><pre class="programlisting">int <a href="#virConnectClose">virConnectClose</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</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="#virConnectGetVersion">virConnectGetVersion</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)</pre>
@ -36,17 +39,20 @@ The content of this structure is not made public by the API.
<pre class="programlisting">char * <a href="#virDomainGetOSType">virDomainGetOSType</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</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="#virDomainGetUUIDString">virDomainGetUUIDString</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> char * buf)</pre>
<pre class="programlisting">int <a href="#virDomainGetVcpus">virDomainGetVcpus</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a> info, <br /> int maxinfo, <br /> unsigned char * cpumaps, <br /> int maplen)</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"><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"><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"><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"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByUUIDString">virDomainLookupByUUIDString</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * uuidstr)</pre>
<pre class="programlisting">int <a href="#virDomainPinVcpu">virDomainPinVcpu</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int vcpu, <br /> unsigned char * cpumap, <br /> int maplen)</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="#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="#virDomainSetMemory">virDomainSetMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)</pre>
<pre class="programlisting">int <a href="#virDomainSetVcpus">virDomainSetVcpus</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int nvcpus)</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="#virDomainUndefine">virDomainUndefine</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
@ -55,6 +61,13 @@ The content of this structure is not made public by the API.
<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>
<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="VIR_COPY_CPUMAP" id="VIR_COPY_CPUMAP"></a>Macro: VIR_COPY_CPUMAP</h3><pre>#define VIR_COPY_CPUMAP</pre><p>This macro is to be used in conjonction with virDomainGetVcpus() and virDomainPinVcpu() APIs. <a href="libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a> macro extract the cpumap of the specified vcpu from cpumaps array and copy it into cpumap to be used later by virDomainPinVcpu() API.</p>
<h3><a name="VIR_CPU_MAPLEN" id="VIR_CPU_MAPLEN"></a>Macro: VIR_CPU_MAPLEN</h3><pre>#define VIR_CPU_MAPLEN</pre><p>This macro is to be used in conjonction with virDomainPinVcpu() API. It returns the length (in bytes) required to store the complete CPU map between a single virtual &amp; all physical CPUs of a domain.</p>
<h3><a name="VIR_CPU_USABLE" id="VIR_CPU_USABLE"></a>Macro: VIR_CPU_USABLE</h3><pre>#define VIR_CPU_USABLE</pre><p>This macro is to be used in conjonction with virDomainGetVcpus() API. <a href="libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a> macro returns a non zero value (true) if the cpu is usable by the vcpu, and 0 otherwise.</p>
<h3><a name="VIR_GET_CPUMAP" id="VIR_GET_CPUMAP"></a>Macro: VIR_GET_CPUMAP</h3><pre>#define VIR_GET_CPUMAP</pre><p>This macro is to be used in conjonction with virDomainGetVcpus() and virDomainPinVcpu() APIs. <a href="libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a> macro returns a pointer to the cpumap of the specified vcpu from cpumaps array.</p>
<h3><a name="VIR_NODEINFO_MAXCPUS" id="VIR_NODEINFO_MAXCPUS"></a>Macro: VIR_NODEINFO_MAXCPUS</h3><pre>#define VIR_NODEINFO_MAXCPUS</pre><p>This macro is to calculate the total number of CPUs supported but not neccessarily active in the host.</p>
<h3><a name="VIR_UNUSE_CPU" id="VIR_UNUSE_CPU"></a>Macro: VIR_UNUSE_CPU</h3><pre>#define VIR_UNUSE_CPU</pre><p>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro reset the bit (CPU not usable) of the related cpu in cpumap.</p>
<h3><a name="VIR_USE_CPU" id="VIR_USE_CPU"></a>Macro: VIR_USE_CPU</h3><pre>#define VIR_USE_CPU</pre><p>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.</p>
<h3><a name="virConnect" id="virConnect">Structure virConnect</a></h3><pre class="programlisting">Structure virConnect<br />struct _virConnect {
The content of this structure is not made public by the API.
}</pre>
@ -113,7 +126,17 @@ The content of this structure is not made public by the API.
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 />
<h3><a name="virVcpuInfo" id="virVcpuInfo">Structure virVcpuInfo</a></h3><pre class="programlisting">Structure virVcpuInfo<br />struct _virVcpuInfo {
unsigned int number : virtual CPU number
int state : value from <a href="libvirt-libvirt.html#virVcpuState">virVcpuState</a>
unsigned long long cpuTime : CPU time used, in nanoseconds
int cpu : real CPU number, or -1 if offline
}</pre><h3>Enum <a name="virVcpuState" id="virVcpuState">virVcpuState</a></h3><pre class="programlisting">Enum virVcpuState {
<a name="VIR_VCPU_OFFLINE" id="VIR_VCPU_OFFLINE">VIR_VCPU_OFFLINE</a> = 0 : the virtual CPU is offline
<a name="VIR_VCPU_RUNNING" id="VIR_VCPU_RUNNING">VIR_VCPU_RUNNING</a> = 1 : the virtual CPU is running
<a name="VIR_VCPU_BLOCKED" id="VIR_VCPU_BLOCKED">VIR_VCPU_BLOCKED</a> = 2 : the virtual CPU is blocked on resource
}
</pre><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>
<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>
@ -142,7 +165,7 @@ The content of this structure is not made public by the API.
<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>
<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 information 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="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>
<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 />
@ -153,7 +176,9 @@ The content of this structure is not made public by the API.
</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>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="virDomainGetUUIDString" id="virDomainGetUUIDString"></a>Function: virDomainGetUUIDString</h3><pre class="programlisting">int virDomainGetUUIDString (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> char * buf)<br />
</pre><p>Get the UUID for a domain as string. For more information about UUID see RFC4122.</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>buf</tt></i>:</span></td><td>pointer to a 37 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 />
<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>buf</tt></i>:</span></td><td>pointer to a 37 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="virDomainGetVcpus" id="virDomainGetVcpus"></a>Function: virDomainGetVcpus</h3><pre class="programlisting">int virDomainGetVcpus (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a> info, <br /> int maxinfo, <br /> unsigned char * cpumaps, <br /> int maplen)<br />
</pre><p>Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer is'nt NULL.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object, or NULL for Domain0</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to an array of <a href="libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a> structures (OUT)</td></tr><tr><td><span class="term"><i><tt>maxinfo</tt></i>:</span></td><td>number of structures in info array</td></tr><tr><td><span class="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an bit map of real CPUs for all vcpus of this domain (in 8-bit bytes) (OUT) If cpumaps is NULL, then no cupmap information is returned by the API. It's assumed there is &lt;maxinfo&gt; cpumap in cpumaps array. The memory allocated to cpumaps must be (maxinfo * maplen) bytes (ie: calloc(maxinfo, maplen)). One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.</td></tr><tr><td><span class="term"><i><tt>maplen</tt></i>:</span></td><td>number of bytes in one cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of info filled in case of success, -1 in case of failure.</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>
@ -163,7 +188,9 @@ The content of this structure is not made public by the API.
</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 raw UUID 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="virDomainLookupByUUIDString" id="virDomainLookupByUUIDString"></a>Function: virDomainLookupByUUIDString</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainLookupByUUIDString (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * uuidstr)<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>uuidstr</tt></i>:</span></td><td>the string UUID 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 />
<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>uuidstr</tt></i>:</span></td><td>the string UUID 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="virDomainPinVcpu" id="virDomainPinVcpu"></a>Function: virDomainPinVcpu</h3><pre class="programlisting">int virDomainPinVcpu (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int vcpu, <br /> unsigned char * cpumap, <br /> int maplen)<br />
</pre><p>Dynamically change the real CPUs which can be allocated to a virtual CPU. 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>pointer to domain object, or NULL for Domain0</td></tr><tr><td><span class="term"><i><tt>vcpu</tt></i>:</span></td><td>virtual CPU number</td></tr><tr><td><span class="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.</td></tr><tr><td><span class="term"><i><tt>maplen</tt></i>:</span></td><td>number of bytes in cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...). If maplen &lt; size, missing bytes are set to zero. If maplen &gt; size, failure code is returned.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 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>
@ -175,7 +202,9 @@ The content of this structure is not made public by the API.
</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="virDomainSetMemory" id="virDomainSetMemory"></a>Function: virDomainSetMemory</h3><pre class="programlisting">int virDomainSetMemory (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)<br />
</pre><p>Dynamically change the target 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 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>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 />
<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="virDomainSetVcpus" id="virDomainSetVcpus"></a>Function: virDomainSetVcpus</h3><pre class="programlisting">int virDomainSetVcpus (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int nvcpus)<br />
</pre><p>Dynamically change the number of virtual CPUs used by the domain. Note that this call may fail if the underlying virtualization hypervisor does not support it or if growing the number is arbitrary limited. 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>pointer to domain object, or NULL for Domain0</td></tr><tr><td><span class="term"><i><tt>nvcpus</tt></i>:</span></td><td>the new number of virtual CPUs for this domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -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>
<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>

View File

@ -40,6 +40,7 @@ void <a href="#virErrorFunc">virErrorFunc</a> (void * userData, <br /> <a
<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
<a name="VIR_FROM_RPC" id="VIR_FROM_RPC">VIR_FROM_RPC</a> = 7 : Error in the XML-RPC code
<a name="VIR_FROM_PROXY" id="VIR_FROM_PROXY">VIR_FROM_PROXY</a> = 8 : Error in the proxy code
}
</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
@ -76,6 +77,7 @@ void <a href="#virErrorFunc">virErrorFunc</a> (void * userData, <br /> <a
<a name="VIR_ERR_CALL_FAILED" id="VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a> = 26 : not supported by the drivers
<a name="VIR_ERR_XML_ERROR" id="VIR_ERR_XML_ERROR">VIR_ERR_XML_ERROR</a> = 27 : an XML description is not well formed or broken
<a name="VIR_ERR_DOM_EXIST" id="VIR_ERR_DOM_EXIST">VIR_ERR_DOM_EXIST</a> = 28 : the domain already exist
<a name="VIR_ERR_OPERATION_DENIED" id="VIR_ERR_OPERATION_DENIED">VIR_ERR_OPERATION_DENIED</a> = 29 : operation forbidden on read-only connections
}
</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>

View File

@ -33,23 +33,59 @@ 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.1.4: Aug 16 2006</h3>
<ul>
<li>bug fixes: spec file fix (Mark McLoughlin), error report problem (with
Hugh Brock), long integer in Python bindings (with Daniel Berrange), XML
generation bug for CDRom (Daniel Berrange), bug whem using number() XPath
function (Mark McLoughlin), fix python detection code, remove duplicate
initialization errors (Daniel Berrange)</li>
<li>improvements: UUID in XML description (Peter Vetere), proxy code
cleanup, virtual CPU and affinity support + virsh support (Michel
Ponceau, Philippe Berthault, Daniel Berrange), port and tty informations
for console in XML (Daniel Berrange), added XML dump to driver and proxy
support (Daniel Berrange), extention of boot options with support for
floppy and cdrom (Daniel Berrange), features block in XML to report/ask
PAE, ACPI, APIC for HVM domains (Daniel Berrange), fail saide-effect
operations when using read-only connection, large improvements to test
driver (Daniel Berrange) </li>
<li>documentation: spelling (Daniel Berrange), test driver examples.</li>
</ul>
<h3>0.1.3: Jul 11 2006</h3>
<ul>
<li>bugfixes: build as non-root, fix xend access when root, handling of
empty XML elements (Mark McLoughlin), XML serialization and parsing fixes
(Mark McLoughlin), allow to create domains without disk (Mark
McLoughlin),</li>
<li>improvement: xenDaemonLookupByID from O(n^2) to O(n) (Daniel Berrange),
support for fully virtualized guest (Jim Fehlig, DV, Mark McLoughlin)</li>
<li>documentation: augmented to cover hvm domains</li>
</ul>
<h3>0.1.2: Jul 3 2006</h3>
<ul>
<li>headers include paths fixup</li>
<li>proxy mechanism for unpriviledged read-only access by httpu</li>
</ul>
<h3>0.1.1: Jun 21 2006</h3>
<ul>
<li> building fixes: ncurses fallback (Jim Fehlig), VPATH builds (Daniel P.
Berrange)
<li> driver cleanups: new entry points, cleanup of libvirt.c (with Daniel P.
Berrange)
<li> Cope with API change introduced in Xen changeset 10277
<li> new test driver for regression checks (Daniel P. Berrange)
<li> improvements: added UUID to XML serialization, buffer usage (Karel Zak),
--connect argument to virsh (Daniel P. Berrange),
<li> bug fixes: uninitialized memory access in error reporting, S-Expr
parsing (Jim Fehlig, Jeremy Katz), virConnectOpen bug, remove a TODO
in xs_internal.c
<li> documentation: Python examples (David Lutterkort), new Perl binding URL,
man page update (Karel Zak)
<li>building fixes: ncurses fallback (Jim Fehlig), VPATH builds (Daniel P.
Berrange)</li>
<li>driver cleanups: new entry points, cleanup of libvirt.c (with Daniel P.
Berrange)</li>
<li>Cope with API change introduced in Xen changeset 10277</li>
<li>new test driver for regression checks (Daniel P. Berrange)</li>
<li>improvements: added UUID to XML serialization, buffer usage (Karel
Zak), --connect argument to virsh (Daniel P. Berrange),</li>
<li>bug fixes: uninitialized memory access in error reporting, S-Expr
parsing (Jim Fehlig, Jeremy Katz), virConnectOpen bug, remove a TODO in
xs_internal.c</li>
<li>documentation: Python examples (David Lutterkort), new Perl binding
URL, man page update (Karel Zak)</li>
</ul>
<h3>0.1.0: Apr 10 2006</h3>
<ul>
<li>building fixes: --with-xen-distdir option (Ronald Aigner), out of tree
@ -60,7 +96,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p>
<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>
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
@ -262,6 +298,20 @@ available except commiting to the base.</p>
<h2><a name="Format">XML Format</a></h2>
<p>This section describes the XML format used to represent domains, there are
variations on the format based on the kind of domains run and the options
used to launch them:</p>
<p><a href="#Normal1">Normal paravirtualized Xen domains</a></p>
<p><a href="#Fully1">Fully virtualized Xen domains</a></p>
<p>The formats try as much as possible to follow the same structure and reuse
elements and attributes where it makes sense.</p>
<h3 id="Normal"><a name="Normal1" id="Normal1">Normal paravirtualized Xen
guests</a>:</h3>
<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
@ -289,6 +339,7 @@ the following is an example of the format as returned by the shell command
&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>
<span style="color: #FF8000; background-color: #FFFFFF">&lt;console tty='/dev/pts/5'/&gt;</span>
&lt;/devices&gt;
&lt;/domain&gt;</pre>
@ -314,17 +365,17 @@ significant:</p>
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>
<li>devices: a list of <code>disk</code>, <code>interface</code> and
<code>console</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>
<p>A <code>disk</code> 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
@ -335,9 +386,9 @@ one in no specific order:</p>
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>
<p>An <code>interface</code> 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>
@ -346,6 +397,11 @@ children in no specific order:</p>
<li>target: and optional target indicating the device name.</li>
</ul>
<p>A <code>console</code> element describes a serial console connection to
the guest. It has no children, and a single attribute <code>tty</code> which
provides the path to the Pseudo TTY on which the guest console can be
accessed</p>
<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>
@ -373,6 +429,108 @@ poweroff. There is various actions possible when this happen:</p>
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>
<h3 id="Fully"><a name="Fully1" id="Fully1">Fully virtualized guests</a>
(added in 0.1.3):</h3>
<p>Here is an example of a domain description used to start a fully
virtualized (a.k.a. HVM) Xen domain. This requires hardware virtualization
support at the processor level but allows to run unmodified operating
systems:</p>
<pre>&lt;domain type='xen' id='3'&gt;
&lt;name&gt;fv0&lt;/name&gt;
&lt;uuid&gt;4dea22b31d52d8f32516782e98ab3fa0&lt;/uuid&gt;
&lt;os&gt;
<span style="color: #0000E5; background-color: #FFFFFF">&lt;type&gt;hvm&lt;/type&gt;</span>
<span style="color: #0000E5; background-color: #FFFFFF">&lt;loader&gt;/usr/lib/xen/boot/hvmloader&lt;/loader&gt;</span>
<span style="color: #0000E5; background-color: #FFFFFF">&lt;boot dev='hd'/&gt;</span>
&lt;/os&gt;
&lt;memory&gt;524288&lt;/memory&gt;
&lt;vcpu&gt;1&lt;/vcpu&gt;
&lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
&lt;on_reboot&gt;restart&lt;/on_reboot&gt;
&lt;on_crash&gt;restart&lt;/on_crash&gt;
&lt;features&gt;
<span style="color: #E50000; background-color: #FFFFFF">&lt;pae/&gt;
&lt;acpi/&gt;
&lt;apic/&gt;</span>
&lt;/features&gt;
&lt;devices&gt;
<span style="color: #0000E5; background-color: #FFFFFF">&lt;emulator&gt;/usr/lib/xen/bin/qemu-dm&lt;/emulator&gt;</span>
&lt;interface type='bridge'&gt;
&lt;source bridge='xenbr0'/&gt;
&lt;mac address='00:16:3e:5d:c7:9e'/&gt;
&lt;script path='vif-bridge'/&gt;
&lt;/interface&gt;
&lt;disk type='file'&gt;
&lt;source file='/root/fv0'/&gt;
&lt;target <span style="color: #0000E5; background-color: #FFFFFF">dev='hda'</span>/&gt;
&lt;/disk&gt;
&lt;disk type='file' <span style="color: #0000E5; background-color: #FFFFFF">device='cdrom'</span>&gt;
&lt;source file='/root/fc5-x86_64-boot.iso'/&gt;
&lt;target <span style="color: #0000E5; background-color: #FFFFFF">dev='hdc'</span>/&gt;
&lt;readonly/&gt;
&lt;/disk&gt;
&lt;disk type='file' <span style="color: #0000E5; background-color: #FFFFFF">device='floppy'</span>&gt;
&lt;source file='/root/fd.img'/&gt;
&lt;target <span style="color: #0000E5; background-color: #FFFFFF">dev='fda'</span>/&gt;
&lt;/disk&gt;
<span style="color: #0000E5; background-color: #FFFFFF">&lt;graphics type='vnc' port='5904'/&gt;</span>
&lt;/devices&gt;
&lt;/domain&gt;</pre>
<p>There is a few things to notice specifically for HVM domains:</p>
<ul>
<li>the optional <code>&lt;features&gt;</code> block is used to enable
certain guest CPU / system features. For HVM guests the following
features are defined:
<ul>
<li><code>pae</code> - enable PAE memory addressing</li>
<li><code>apic</code> - enable IO APIC</li>
<li><code>acpi</code> - enable ACPI bios</li>
</ul>
</li>
<li>the <code>&lt;os&gt;</code> block description is very different, first
it indicates that the type is 'hvm' for hardware virtualization, then
instead of a kernel, boot and command line arguments, it points to an os
boot loader which will extract the boot informations from the boot device
specified in a separate boot element. The <code>dev</code> attribute on
the <code>boot</code> tag can be one of:
<ul>
<li><code>fd</code> - boot from first floppy device</li>
<li><code>hd</code> - boot from first harddisk device</li>
<li><code>cdrom</code> - boot from first cdrom device</li>
</ul>
</li>
<li>the <code>&lt;devices&gt;</code> section includes an emulator entry
pointing to an additional program in charge of emulating the devices</li>
<li>the disk entry indicates in the dev target section that the emulation
for the drive is the first IDE disk device hda. The list of device names
supported is dependant on the Hypervisor, but for Xen it can be any IDE
device <code>hda</code>-<code>hdd</code>, or a floppy device
<code>fda</code>, <code>fdb</code>. The <code>&lt;disk&gt;</code> element
also supports a 'device' attribute to indicate what kinda of hardware to
emulate. The following values are supported:
<ul>
<li><code>floppy</code> - a floppy disk controller</li>
<li><code>disk</code> - a generic hard drive (the default it
omitted)</li>
<li><code>cdrom</code> - a CDROM device</li>
</ul>
For Xen 3.0.2 and earlier a CDROM device can only be emulated on the
<code>hdc</code> channel, while for 3.0.3 and later, it can be emulated
on any IDE channel.</li>
<li>the <code>&lt;devices&gt;</code> section also include at least one
entry for the graphic device used to render the os. Currently there is
just 2 types possible 'vnc' or 'sdl'. If the type is 'vnc', then an
additional <code>port</code> attribute will be present indicating the TCP
port on which the VNC server is accepting client connections.</li>
</ul>
<p>It is likely that the HVM description gets additional optional elements
and attributes as the support for fully virtualized domain expands,
especially for the variety of devices emulated and the graphic support
options offered.</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

View File

@ -5,15 +5,25 @@
<summary>core interfaces for the libvirt library</summary>
<description>Provides the interfaces of the libvirt library to handle Xen domains from a process running in domain 0 </description>
<author>Daniel Veillard &lt;veillard@redhat.com&gt; </author>
<exports symbol='VIR_NODEINFO_MAXCPUS' type='macro'/>
<exports symbol='LIBVIR_VERSION_NUMBER' type='macro'/>
<exports symbol='VIR_USE_CPU' type='macro'/>
<exports symbol='VIR_CPU_MAPLEN' type='macro'/>
<exports symbol='VIR_CPU_USABLE' type='macro'/>
<exports symbol='VIR_COPY_CPUMAP' type='macro'/>
<exports symbol='VIR_GET_CPUMAP' type='macro'/>
<exports symbol='VIR_UNUSE_CPU' type='macro'/>
<exports symbol='VIR_DOMAIN_SHUTOFF' type='enum'/>
<exports symbol='VIR_DOMAIN_DESTROY' type='enum'/>
<exports symbol='VIR_DEVICE_DEFAULT' type='enum'/>
<exports symbol='VIR_DOMAIN_RENAME_RESTART' type='enum'/>
<exports symbol='VIR_DOMAIN_PRESERVE' type='enum'/>
<exports symbol='VIR_VCPU_BLOCKED' type='enum'/>
<exports symbol='VIR_DOMAIN_SHUTDOWN' type='enum'/>
<exports symbol='VIR_VCPU_OFFLINE' type='enum'/>
<exports symbol='VIR_DEVICE_RO' type='enum'/>
<exports symbol='VIR_DEVICE_RW_FORCE' type='enum'/>
<exports symbol='VIR_VCPU_RUNNING' type='enum'/>
<exports symbol='VIR_DOMAIN_CRASHED' type='enum'/>
<exports symbol='VIR_DOMAIN_NONE' type='enum'/>
<exports symbol='VIR_DEVICE_RW' type='enum'/>
@ -32,13 +42,17 @@
<exports symbol='virDeviceMode' type='typedef'/>
<exports symbol='virDomain' type='typedef'/>
<exports symbol='virDomainPtr' type='typedef'/>
<exports symbol='virVcpuInfo' type='typedef'/>
<exports symbol='virVcpuInfoPtr' type='typedef'/>
<exports symbol='virDomainRestart' type='typedef'/>
<exports symbol='virConnect' type='typedef'/>
<exports symbol='virDomainCreateFlags' type='typedef'/>
<exports symbol='virDomainInfo' type='typedef'/>
<exports symbol='virVcpuState' type='typedef'/>
<exports symbol='_virDomainInfo' type='struct'/>
<exports symbol='_virDomainKernel' type='struct'/>
<exports symbol='_virNodeInfo' type='struct'/>
<exports symbol='_virVcpuInfo' type='struct'/>
<exports symbol='virDomainGetInfo' type='function'/>
<exports symbol='virDomainUndefine' type='function'/>
<exports symbol='virDomainDefineXML' type='function'/>
@ -46,6 +60,7 @@
<exports symbol='virGetVersion' type='function'/>
<exports symbol='virConnectListDefinedDomains' type='function'/>
<exports symbol='virDomainLookupByName' type='function'/>
<exports symbol='virDomainPinVcpu' type='function'/>
<exports symbol='virDomainRestore' type='function'/>
<exports symbol='virConnectGetType' type='function'/>
<exports symbol='virDomainSave' type='function'/>
@ -59,7 +74,7 @@
<exports symbol='virDomainGetUUID' type='function'/>
<exports symbol='virConnectNumOfDomains' type='function'/>
<exports symbol='virDomainGetUUIDString' type='function'/>
<exports symbol='virDomainGetMaxMemory' type='function'/>
<exports symbol='virDomainGetVcpus' type='function'/>
<exports symbol='virConnectGetVersion' type='function'/>
<exports symbol='virDomainSetMaxMemory' type='function'/>
<exports symbol='virDomainFree' type='function'/>
@ -68,11 +83,13 @@
<exports symbol='virConnectClose' type='function'/>
<exports symbol='virDomainReboot' type='function'/>
<exports symbol='virInitialize' type='function'/>
<exports symbol='virDomainSetVcpus' type='function'/>
<exports symbol='virDomainGetID' type='function'/>
<exports symbol='virDomainResume' type='function'/>
<exports symbol='virDomainCreateLinux' type='function'/>
<exports symbol='virDomainSetMemory' type='function'/>
<exports symbol='virDomainDestroy' type='function'/>
<exports symbol='virDomainGetMaxMemory' type='function'/>
<exports symbol='virDomainGetXMLDesc' type='function'/>
<exports symbol='virDomainGetName' type='function'/>
<exports symbol='virConnectOpenReadOnly' type='function'/>
@ -111,9 +128,11 @@
<exports symbol='VIR_ERR_DOM_EXIST' type='enum'/>
<exports symbol='VIR_ERR_NO_SOURCE' type='enum'/>
<exports symbol='VIR_ERR_NO_TARGET' type='enum'/>
<exports symbol='VIR_ERR_OPERATION_DENIED' 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_PROXY' type='enum'/>
<exports symbol='VIR_ERR_SEXPR_SERIAL' type='enum'/>
<exports symbol='VIR_FROM_XENSTORE' type='enum'/>
<exports symbol='VIR_FROM_XEN' type='enum'/>
@ -144,6 +163,44 @@
<macro name='LIBVIR_VERSION_NUMBER' file='libvirt'>
<info>Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro</info>
</macro>
<macro name='VIR_COPY_CPUMAP' file='libvirt'>
<info>This macro is to be used in conjonction with virDomainGetVcpus() and virDomainPinVcpu() APIs. VIR_COPY_CPUMAP macro extract the cpumap of the specified vcpu from cpumaps array and copy it into cpumap to be used later by virDomainPinVcpu() API.</info>
<arg name='cpumaps' info='pointer to an array of cpumap (in 8-bit bytes) (IN)'/>
<arg name='maplen' info='the length (in bytes) of one cpumap'/>
<arg name='vcpu' info='the virtual CPU number'/>
<arg name='cpumap' info='pointer to a cpumap (in 8-bit bytes) (OUT) This cpumap must be previously allocated by the caller (ie: malloc(maplen))'/>
</macro>
<macro name='VIR_CPU_MAPLEN' file='libvirt'>
<info>This macro is to be used in conjonction with virDomainPinVcpu() API. It returns the length (in bytes) required to store the complete CPU map between a single virtual &amp; all physical CPUs of a domain.</info>
<arg name='cpu' info='number of physical CPUs'/>
</macro>
<macro name='VIR_CPU_USABLE' file='libvirt'>
<info>This macro is to be used in conjonction with virDomainGetVcpus() API. VIR_CPU_USABLE macro returns a non zero value (true) if the cpu is usable by the vcpu, and 0 otherwise.</info>
<arg name='cpumaps' info='pointer to an array of cpumap (in 8-bit bytes) (IN)'/>
<arg name='maplen' info='the length (in bytes) of one cpumap'/>
<arg name='vcpu' info='the virtual CPU number'/>
<arg name='cpu' info='the physical CPU number'/>
</macro>
<macro name='VIR_GET_CPUMAP' file='libvirt'>
<info>This macro is to be used in conjonction with virDomainGetVcpus() and virDomainPinVcpu() APIs. VIR_GET_CPUMAP macro returns a pointer to the cpumap of the specified vcpu from cpumaps array.</info>
<arg name='cpumaps' info='pointer to an array of cpumap (in 8-bit bytes) (IN)'/>
<arg name='maplen' info='the length (in bytes) of one cpumap'/>
<arg name='vcpu' info='the virtual CPU number'/>
</macro>
<macro name='VIR_NODEINFO_MAXCPUS' file='libvirt'>
<info>This macro is to calculate the total number of CPUs supported but not neccessarily active in the host.</info>
<arg name='nodeinfo' info='virNodeInfo instance'/>
</macro>
<macro name='VIR_UNUSE_CPU' file='libvirt'>
<info>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro reset the bit (CPU not usable) of the related cpu in cpumap.</info>
<arg name='cpumap' info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)'/>
<arg name='cpu' info='the physical CPU number'/>
</macro>
<macro name='VIR_USE_CPU' file='libvirt'>
<info>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.</info>
<arg name='cpumap' info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)'/>
<arg name='cpu' info='the physical CPU number'/>
</macro>
<enum name='VIR_DEVICE_DEFAULT' file='libvirt' value='0' type='virDeviceMode' info='Default mode'/>
<enum name='VIR_DEVICE_RO' file='libvirt' value='1' type='virDeviceMode' info='Access read-only'/>
<enum name='VIR_DEVICE_RW' file='libvirt' value='2' type='virDeviceMode' info='Access read-write'/>
@ -161,7 +218,7 @@
<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_ERR_CALL_FAILED' file='virterror' value='26' type='virErrorNumber' info='not supported by the drivers'/>
<enum name='VIR_ERR_DOM_EXIST' file='virterror' value='28' type='virErrorNumber' info=' the domain already exist'/>
<enum name='VIR_ERR_DOM_EXIST' file='virterror' value='28' type='virErrorNumber' info='the domain already exist'/>
<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'/>
@ -184,6 +241,7 @@
<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_DENIED' file='virterror' value='29' type='virErrorNumber' info=' operation forbidden on read-only connections'/>
<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'/>
@ -194,12 +252,16 @@
<enum name='VIR_ERR_XML_ERROR' file='virterror' value='27' type='virErrorNumber' info='an XML description is not well formed or broken'/>
<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_RPC' file='virterror' value='7' type='virErrorDomain' info=' Error in the XML-RPC code'/>
<enum name='VIR_FROM_PROXY' file='virterror' value='8' type='virErrorDomain' info=' Error in the proxy code'/>
<enum name='VIR_FROM_RPC' file='virterror' value='7' type='virErrorDomain' info='Error in the XML-RPC code'/>
<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'/>
<enum name='VIR_VCPU_BLOCKED' file='libvirt' value='2' type='virVcpuState' info=' the virtual CPU is blocked on resource'/>
<enum name='VIR_VCPU_OFFLINE' file='libvirt' value='0' type='virVcpuState' info='the virtual CPU is offline'/>
<enum name='VIR_VCPU_RUNNING' file='libvirt' value='1' type='virVcpuState' info='the virtual CPU is running'/>
<struct name='virConnect' file='libvirt' type='struct _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>
@ -261,6 +323,14 @@
<typedef name='virNodeInfoPtr' file='libvirt' type='virNodeInfo *'>
<info>a virNodeInfoPtr is a pointer to a virNodeInfo structure.</info>
</typedef>
<struct name='virVcpuInfo' file='libvirt' type='struct _virVcpuInfo'>
<field name='number' type='unsigned int' info=' virtual CPU number'/>
<field name='state' type='int' info=' value from virVcpuState'/>
<field name='cpuTime' type='unsigned long long' info=' CPU time used, in nanoseconds'/>
<field name='cpu' type='int' info=' real CPU number, or -1 if offline'/>
</struct>
<typedef name='virVcpuInfoPtr' file='libvirt' type='virVcpuInfo *'/>
<typedef name='virVcpuState' file='libvirt' type='enum'/>
<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.'/>
@ -373,7 +443,7 @@
<arg name='domain' type='virDomainPtr' info='a domain object'/>
</function>
<function name='virDomainGetInfo' file='libvirt' module='libvirt'>
<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>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</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='info' type='virDomainInfoPtr' info='pointer to a virDomainInfo structure allocated by the user'/>
@ -405,6 +475,15 @@
<arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='buf' type='char *' info='pointer to a 37 bytes array'/>
</function>
<function name='virDomainGetVcpus' file='libvirt' module='libvirt'>
<info>Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer is&apos;nt NULL.</info>
<return type='int' info='the number of info filled in case of success, -1 in case of failure.'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/>
<arg name='info' type='virVcpuInfoPtr' info='pointer to an array of virVcpuInfo structures (OUT)'/>
<arg name='maxinfo' type='int' info='number of structures in info array'/>
<arg name='cpumaps' type='unsigned char *' info='pointer to an bit map of real CPUs for all vcpus of this domain (in 8-bit bytes) (OUT) If cpumaps is NULL, then no cupmap information is returned by the API. It&apos;s assumed there is &lt;maxinfo&gt; cpumap in cpumaps array. The memory allocated to cpumaps must be (maxinfo * maplen) bytes (ie: calloc(maxinfo, maplen)). One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.'/>
<arg name='maplen' type='int' info='number of bytes in one cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...).'/>
</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.'/>
@ -435,6 +514,14 @@
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='uuidstr' type='const char *' info='the string UUID for the domain'/>
</function>
<function name='virDomainPinVcpu' file='libvirt' module='libvirt'>
<info>Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires priviledged access to the hypervisor.</info>
<return type='int' info='0 in case of success, -1 in case of failure.'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/>
<arg name='vcpu' type='unsigned int' info='virtual CPU number'/>
<arg name='cpumap' type='unsigned char *' info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.'/>
<arg name='maplen' type='int' info='number of bytes in cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...). If maplen &lt; size, missing bytes are set to zero. If maplen &gt; size, failure code is returned.'/>
</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.'/>
@ -470,6 +557,12 @@
<arg name='domain' type='virDomainPtr' info='a domain object or NULL'/>
<arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
</function>
<function name='virDomainSetVcpus' file='libvirt' module='libvirt'>
<info>Dynamically change the number of virtual CPUs used by the domain. Note that this call may fail if the underlying virtualization hypervisor does not support it or if growing the number is arbitrary limited. This function requires priviledged access to the hypervisor.</info>
<return type='int' info='0 in case of success, -1 in case of failure.'/>
<arg name='domain' type='virDomainPtr' info='pointer to domain object, or NULL for Domain0'/>
<arg name='nvcpus' type='unsigned int' info='the new number of virtual CPUs for this domain'/>
</function>
<function name='virDomainShutdown' file='libvirt' module='libvirt'>
<info>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 ?</info>
<return type='int' info='0 in case of success and -1 in case of failure.'/>

File diff suppressed because it is too large Load Diff

View File

@ -2,21 +2,44 @@
<!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
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.1.1: Jun 21 2006</h3><ul><li> building fixes: ncurses fallback (Jim Fehlig), VPATH builds (Daniel P.
Berrange)
</li><li> driver cleanups: new entry points, cleanup of libvirt.c (with Daniel P.
Berrange)
</li><li> Cope with API change introduced in Xen changeset 10277
</li><li> new test driver for regression checks (Daniel P. Berrange)
</li><li> improvements: added UUID to XML serialization, buffer usage (Karel Zak),
--connect argument to virsh (Daniel P. Berrange),
</li><li> bug fixes: uninitialized memory access in error reporting, S-Expr
parsing (Jim Fehlig, Jeremy Katz), virConnectOpen bug, remove a TODO
in xs_internal.c
</li><li> documentation: Python examples (David Lutterkort), new Perl binding URL,
man page update (Karel Zak)
</li></ul><h3>0.1.0: Apr 10 2006</h3><ul><li>building fixes: --with-xen-distdir option (Ronald Aigner), out of tree
and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3>0.1.4: Aug 16 2006</h3><ul><li>bug fixes: spec file fix (Mark McLoughlin), error report problem (with
Hugh Brock), long integer in Python bindings (with Daniel Berrange), XML
generation bug for CDRom (Daniel Berrange), bug whem using number() XPath
function (Mark McLoughlin), fix python detection code, remove duplicate
initialization errors (Daniel Berrange)</li>
<li>improvements: UUID in XML description (Peter Vetere), proxy code
cleanup, virtual CPU and affinity support + virsh support (Michel
Ponceau, Philippe Berthault, Daniel Berrange), port and tty informations
for console in XML (Daniel Berrange), added XML dump to driver and proxy
support (Daniel Berrange), extention of boot options with support for
floppy and cdrom (Daniel Berrange), features block in XML to report/ask
PAE, ACPI, APIC for HVM domains (Daniel Berrange), fail saide-effect
operations when using read-only connection, large improvements to test
driver (Daniel Berrange) </li>
<li>documentation: spelling (Daniel Berrange), test driver examples.</li>
</ul><h3>0.1.3: Jul 11 2006</h3><ul><li>bugfixes: build as non-root, fix xend access when root, handling of
empty XML elements (Mark McLoughlin), XML serialization and parsing fixes
(Mark McLoughlin), allow to create domains without disk (Mark
McLoughlin),</li>
<li>improvement: xenDaemonLookupByID from O(n^2) to O(n) (Daniel Berrange),
support for fully virtualized guest (Jim Fehlig, DV, Mark McLoughlin)</li>
<li>documentation: augmented to cover hvm domains</li>
</ul><h3>0.1.2: Jul 3 2006</h3><ul><li>headers include paths fixup</li>
<li>proxy mechanism for unpriviledged read-only access by httpu</li>
</ul><h3>0.1.1: Jun 21 2006</h3><ul><li>building fixes: ncurses fallback (Jim Fehlig), VPATH builds (Daniel P.
Berrange)</li>
<li>driver cleanups: new entry points, cleanup of libvirt.c (with Daniel P.
Berrange)</li>
<li>Cope with API change introduced in Xen changeset 10277</li>
<li>new test driver for regression checks (Daniel P. Berrange)</li>
<li>improvements: added UUID to XML serialization, buffer usage (Karel
Zak), --connect argument to virsh (Daniel P. Berrange),</li>
<li>bug fixes: uninitialized memory access in error reporting, S-Expr
parsing (Jim Fehlig, Jeremy Katz), virConnectOpen bug, remove a TODO in
xs_internal.c</li>
<li>documentation: Python examples (David Lutterkort), new Perl binding
URL, man page update (Karel Zak)</li>
</ul><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>
@ -24,7 +47,7 @@ and check the <a href="ChangeLog.html">ChangeLog</a> to gauge progresses.</p><h3
<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>
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

25
docs/testdomfc4.xml Normal file
View File

@ -0,0 +1,25 @@
<domain type='test'>
<name>fc4</name>
<uuid>EF86180145B911CB88E3AFBFE5370493</uuid>
<os>
<type>linux</type>
<kernel>/boot/vmlinuz-2.6.15-1.43_FC5guest</kernel>
<initrd>/boot/initrd-2.6.15-1.43_FC5guest.img</initrd>
<root>/dev/sda1</root>
<cmdline> ro selinux=0 3</cmdline>
</os>
<memory>131072</memory>
<vcpu>1</vcpu>
<devices>
<disk type='file'>
<source file='/u/fc4.img'/>
<target dev='sda1'/>
</disk>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='aa:00:00:00:00:11'/>
<script path='/etc/xen/scripts/vif-bridge'/>
</interface>
<console tty='/dev/pts/5'/>
</devices>
</domain>

42
docs/testdomfv0.xml Normal file
View File

@ -0,0 +1,42 @@
<domain type='test'>
<name>fv0</name>
<uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
<os>
<type>hvm</type>
<loader>/usr/lib/xen/boot/hvmloader</loader>
<boot dev='hd'/>
</os>
<memory>524288</memory>
<maxMemory>1524288</maxMemory>
<vcpu>4</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<features>
<pae/>
<acpi/>
<apic/>
</features>
<devices>
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='00:16:3e:5d:c7:9e'/>
<script path='vif-bridge'/>
</interface>
<disk type='file'>
<source file='/root/fv0'/>
<target dev='hda'/>
</disk>
<disk type='file' device='cdrom'>
<source file='/root/fc5-x86_64-boot.iso'/>
<target dev='hdc'/>
<readonly/>
</disk>
<disk type='file' device='floppy'>
<source file='/root/fd.img'/>
<target dev='fda'/>
</disk>
<graphics type='vnc' port='5904'/>
</devices>
</domain>

23
docs/testnode.xml Normal file
View File

@ -0,0 +1,23 @@
<node>
<!-- This file gives an example config for the mock 'test' backend
driver to libvirt. This is intended to allow relible unit testing
of applications using libvirt. To use this with virsh, run something
like:
virsh -connect test:////path/to/this/dir/testnode.xml nodeinfo
-->
<domain file="testdomfv0.xml"/>
<domain file="testdomfc4.xml"/>
<cpu>
<mhz>6000</mhz>
<model>i986</model>
<active>50</active>
<nodes>4</nodes>
<sockets>4</sockets>
<cores>4</cores>
<threads>2</threads>
</cpu>
<memory>137438953472</memory>
</node>

2
include/.cvsignore Normal file
View File

@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@ -1,11 +1,2 @@
## Process this file with automake to produce Makefile.in
virincdir = $(includedir)/libvirt
virinc_HEADERS = libvirt.h \
virterror.h
install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(virincdir)
EXTRA_DIST = libvirt.h.in
SUBDIRS=libvirt

View File

@ -1,297 +0,0 @@
/*
* libvirt.h:
* Summary: core interfaces for the libvirt library
* Description: Provides the interfaces of the libvirt library to handle
* Xen domains from a process running in domain 0
*
* Copy: Copyright (C) 2005,2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Author: Daniel Veillard <veillard@redhat.com>
*/
#ifndef __VIR_VIRLIB_H__
#define __VIR_VIRLIB_H__
#ifdef __cplusplus
extern "C" {
#endif
/**
* virConnect:
*
* a virConnect is a private structure representing a connection to
* the Xen Hypervisor.
*/
typedef struct _virConnect virConnect;
/**
* virConnectPtr:
*
* 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.
*/
typedef virConnect *virConnectPtr;
/**
* virDomain:
*
* a virDomain is a private structure representing a Xen domain.
*/
typedef struct _virDomain virDomain;
/**
* virDomainPtr:
*
* a virDomainPtr is pointer to a virDomain private structure, this is the
* type used to reference a Xen domain in the API.
*/
typedef virDomain *virDomainPtr;
/**
* virDomainState:
*
* A domain may be in different states at a given point in time
*/
typedef enum {
VIR_DOMAIN_NOSTATE = 0, /* no state */
VIR_DOMAIN_RUNNING = 1, /* the domain is running */
VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
VIR_DOMAIN_CRASHED = 6 /* the domain is crashed */
} virDomainState;
/**
* virDomainRestart:
*
* Flags that determine the action to take on a shutdown or crash of a domain
*/
typedef enum {
VIR_DOMAIN_DESTROY = 1, /* destroy the domain */
VIR_DOMAIN_RESTART = 2, /* restart the domain */
VIR_DOMAIN_PRESERVE= 3, /* keep as is, need manual destroy, for debug */
VIR_DOMAIN_RENAME_RESTART= 4/* restart under an new unique name */
} virDomainRestart;
/**
* virDeviceMode:
*
* Flags that determine permission to expose a device to the guest
*/
typedef enum {
VIR_DEVICE_DEFAULT = 0, /* Default mode */
VIR_DEVICE_RO = 1, /* Access read-only */
VIR_DEVICE_RW = 2, /* Access read-write */
VIR_DEVICE_RW_FORCE= 3 /* Forced read-write even if already used */
} virDeviceMode;
/**
* virDomainInfoPtr:
*
* a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
* runtime informations for a given active Domain
*/
typedef struct _virDomainInfo virDomainInfo;
struct _virDomainInfo {
unsigned char state; /* the running state, one of virDomainFlags */
unsigned long maxMem; /* the maximum memory in KBytes allowed */
unsigned long memory; /* the memory in KBytes used by the domain */
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
unsigned long long cpuTime; /* the CPU time used in nanoseconds */
};
/**
* virDomainInfoPtr:
*
* a virDomainInfoPtr is a pointer to a virDomainInfo structure.
*/
typedef virDomainInfo *virDomainInfoPtr;
/**
* virDomainKernel:
*
* a virDomainImage is the set of kernel related informations associated
* to a domain
*/
typedef struct _virDomainKernel virDomainKernel;
struct _virDomainKernel {
const char *kernel; /* filename pointing to the kernel image */
const char *ramdisk; /* an optional init ramdisk */
const char *root; /* an optional root block device */
const char *extra; /* optional kernel command line parameters */
};
/**
* virDomainKernelPtr:
*
* a virDomainKernelPtr is a pointer to a virDomainKernel structure.
*/
typedef virDomainKernel *virDomainKernelPtr;
/**
* virDomainCreateFlags:
*
* Flags OR'ed together to provide specific behaviour when creating a
* Domain.
*/
typedef enum {
VIR_DOMAIN_NONE = 0
} 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 */
/**
* LIBVIR_VERSION_NUMBER:
*
* Macro providing the version of the library as
* version * 1,000,000 + minor * 1000 + micro
*/
#define LIBVIR_VERSION_NUMBER 1001
int virGetVersion (unsigned long *libVer,
const char *type,
unsigned long *typeVer);
/*
* Connection and disconnections to the Hypervisor
*/
int virInitialize (void);
virConnectPtr virConnectOpen (const char *name);
virConnectPtr virConnectOpenReadOnly (const char *name);
int virConnectClose (virConnectPtr conn);
const char * virConnectGetType (virConnectPtr conn);
int virConnectGetVersion (virConnectPtr conn,
unsigned long *hvVer);
int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info);
/*
* Gather list of running domains
*/
int virConnectListDomains (virConnectPtr conn,
int *ids,
int maxids);
/*
* Number of domains
*/
int virConnectNumOfDomains (virConnectPtr conn);
/*
* Domain creation and destruction
*/
virDomainPtr virDomainCreateLinux (virConnectPtr conn,
const char *xmlDesc,
unsigned int flags);
virDomainPtr virDomainLookupByName (virConnectPtr conn,
const char *name);
virDomainPtr virDomainLookupByID (virConnectPtr conn,
int id);
virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
const unsigned char *uuid);
virDomainPtr virDomainLookupByUUIDString (virConnectPtr conn,
const char *uuid);
int virDomainShutdown (virDomainPtr domain);
int virDomainReboot (virDomainPtr domain,
unsigned int flags);
int virDomainDestroy (virDomainPtr domain);
int virDomainFree (virDomainPtr domain);
/*
* Domain suspend/resume
*/
int virDomainSuspend (virDomainPtr domain);
int virDomainResume (virDomainPtr domain);
/*
* Domain save/restore
*/
int virDomainSave (virDomainPtr domain,
const char *to);
int virDomainRestore (virConnectPtr conn,
const char *from);
/*
* Domain runtime informations
*/
int virDomainGetInfo (virDomainPtr domain,
virDomainInfoPtr info);
/*
* Dynamic control of domains
*/
const char * virDomainGetName (virDomainPtr domain);
unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
int virDomainGetUUIDString (virDomainPtr domain,
char *buf);
char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
int virDomainSetMaxMemory (virDomainPtr domain,
unsigned long memory);
int virDomainSetMemory (virDomainPtr domain,
unsigned long memory);
/*
* XML domain description
*/
char * virDomainGetXMLDesc (virDomainPtr domain,
int flags);
/*
* defined but not running domains
*/
virDomainPtr virDomainDefineXML (virConnectPtr conn,
const char *xml);
int virDomainUndefine (virDomainPtr domain);
int virConnectListDefinedDomains(virConnectPtr conn,
const char **names,
int maxnames);
int virDomainCreate (virDomainPtr domain);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_VIRLIB_H__ */

View File

@ -1,297 +0,0 @@
/*
* libvirt.h:
* Summary: core interfaces for the libvirt library
* Description: Provides the interfaces of the libvirt library to handle
* Xen domains from a process running in domain 0
*
* Copy: Copyright (C) 2005,2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Author: Daniel Veillard <veillard@redhat.com>
*/
#ifndef __VIR_VIRLIB_H__
#define __VIR_VIRLIB_H__
#ifdef __cplusplus
extern "C" {
#endif
/**
* virConnect:
*
* a virConnect is a private structure representing a connection to
* the Xen Hypervisor.
*/
typedef struct _virConnect virConnect;
/**
* virConnectPtr:
*
* 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.
*/
typedef virConnect *virConnectPtr;
/**
* virDomain:
*
* a virDomain is a private structure representing a Xen domain.
*/
typedef struct _virDomain virDomain;
/**
* virDomainPtr:
*
* a virDomainPtr is pointer to a virDomain private structure, this is the
* type used to reference a Xen domain in the API.
*/
typedef virDomain *virDomainPtr;
/**
* virDomainState:
*
* A domain may be in different states at a given point in time
*/
typedef enum {
VIR_DOMAIN_NOSTATE = 0, /* no state */
VIR_DOMAIN_RUNNING = 1, /* the domain is running */
VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
VIR_DOMAIN_CRASHED = 6 /* the domain is crashed */
} virDomainState;
/**
* virDomainRestart:
*
* Flags that determine the action to take on a shutdown or crash of a domain
*/
typedef enum {
VIR_DOMAIN_DESTROY = 1, /* destroy the domain */
VIR_DOMAIN_RESTART = 2, /* restart the domain */
VIR_DOMAIN_PRESERVE= 3, /* keep as is, need manual destroy, for debug */
VIR_DOMAIN_RENAME_RESTART= 4/* restart under an new unique name */
} virDomainRestart;
/**
* virDeviceMode:
*
* Flags that determine permission to expose a device to the guest
*/
typedef enum {
VIR_DEVICE_DEFAULT = 0, /* Default mode */
VIR_DEVICE_RO = 1, /* Access read-only */
VIR_DEVICE_RW = 2, /* Access read-write */
VIR_DEVICE_RW_FORCE= 3 /* Forced read-write even if already used */
} virDeviceMode;
/**
* virDomainInfoPtr:
*
* a virDomainInfo is a structure filled by virDomainGetInfo() and extracting
* runtime informations for a given active Domain
*/
typedef struct _virDomainInfo virDomainInfo;
struct _virDomainInfo {
unsigned char state; /* the running state, one of virDomainFlags */
unsigned long maxMem; /* the maximum memory in KBytes allowed */
unsigned long memory; /* the memory in KBytes used by the domain */
unsigned short nrVirtCpu; /* the number of virtual CPUs for the domain */
unsigned long long cpuTime; /* the CPU time used in nanoseconds */
};
/**
* virDomainInfoPtr:
*
* a virDomainInfoPtr is a pointer to a virDomainInfo structure.
*/
typedef virDomainInfo *virDomainInfoPtr;
/**
* virDomainKernel:
*
* a virDomainImage is the set of kernel related informations associated
* to a domain
*/
typedef struct _virDomainKernel virDomainKernel;
struct _virDomainKernel {
const char *kernel; /* filename pointing to the kernel image */
const char *ramdisk; /* an optional init ramdisk */
const char *root; /* an optional root block device */
const char *extra; /* optional kernel command line parameters */
};
/**
* virDomainKernelPtr:
*
* a virDomainKernelPtr is a pointer to a virDomainKernel structure.
*/
typedef virDomainKernel *virDomainKernelPtr;
/**
* virDomainCreateFlags:
*
* Flags OR'ed together to provide specific behaviour when creating a
* Domain.
*/
typedef enum {
VIR_DOMAIN_NONE = 0
} 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 */
/**
* LIBVIR_VERSION_NUMBER:
*
* Macro providing the version of the library as
* version * 1,000,000 + minor * 1000 + micro
*/
#define LIBVIR_VERSION_NUMBER @LIBVIRT_VERSION_NUMBER@
int virGetVersion (unsigned long *libVer,
const char *type,
unsigned long *typeVer);
/*
* Connection and disconnections to the Hypervisor
*/
int virInitialize (void);
virConnectPtr virConnectOpen (const char *name);
virConnectPtr virConnectOpenReadOnly (const char *name);
int virConnectClose (virConnectPtr conn);
const char * virConnectGetType (virConnectPtr conn);
int virConnectGetVersion (virConnectPtr conn,
unsigned long *hvVer);
int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info);
/*
* Gather list of running domains
*/
int virConnectListDomains (virConnectPtr conn,
int *ids,
int maxids);
/*
* Number of domains
*/
int virConnectNumOfDomains (virConnectPtr conn);
/*
* Domain creation and destruction
*/
virDomainPtr virDomainCreateLinux (virConnectPtr conn,
const char *xmlDesc,
unsigned int flags);
virDomainPtr virDomainLookupByName (virConnectPtr conn,
const char *name);
virDomainPtr virDomainLookupByID (virConnectPtr conn,
int id);
virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
const unsigned char *uuid);
virDomainPtr virDomainLookupByUUIDString (virConnectPtr conn,
const char *uuid);
int virDomainShutdown (virDomainPtr domain);
int virDomainReboot (virDomainPtr domain,
unsigned int flags);
int virDomainDestroy (virDomainPtr domain);
int virDomainFree (virDomainPtr domain);
/*
* Domain suspend/resume
*/
int virDomainSuspend (virDomainPtr domain);
int virDomainResume (virDomainPtr domain);
/*
* Domain save/restore
*/
int virDomainSave (virDomainPtr domain,
const char *to);
int virDomainRestore (virConnectPtr conn,
const char *from);
/*
* Domain runtime informations
*/
int virDomainGetInfo (virDomainPtr domain,
virDomainInfoPtr info);
/*
* Dynamic control of domains
*/
const char * virDomainGetName (virDomainPtr domain);
unsigned int virDomainGetID (virDomainPtr domain);
int virDomainGetUUID (virDomainPtr domain,
unsigned char *uuid);
int virDomainGetUUIDString (virDomainPtr domain,
char *buf);
char * virDomainGetOSType (virDomainPtr domain);
unsigned long virDomainGetMaxMemory (virDomainPtr domain);
int virDomainSetMaxMemory (virDomainPtr domain,
unsigned long memory);
int virDomainSetMemory (virDomainPtr domain,
unsigned long memory);
/*
* XML domain description
*/
char * virDomainGetXMLDesc (virDomainPtr domain,
int flags);
/*
* defined but not running domains
*/
virDomainPtr virDomainDefineXML (virConnectPtr conn,
const char *xml);
int virDomainUndefine (virDomainPtr domain);
int virConnectListDefinedDomains(virConnectPtr conn,
const char **names,
int maxnames);
int virDomainCreate (virDomainPtr domain);
#ifdef __cplusplus
}
#endif
#endif /* __VIR_VIRLIB_H__ */

View File

@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@ -167,6 +167,18 @@ struct _virNodeInfo {
unsigned int threads;/* number of threads per core */
};
/**
* VIR_NODEINFO_MAXCPUS:
* @nodeinfo: virNodeInfo instance
*
* This macro is to calculate the total number of CPUs supported
* but not neccessarily active in the host.
*/
#define VIR_NODEINFO_MAXCPUS(nodeinfo) ((nodeinfo).nodes*(nodeinfo).sockets*(nodeinfo).cores*(nodeinfo).threads)
/**
* virNodeInfoPtr:
*
@ -184,7 +196,7 @@ typedef virNodeInfo *virNodeInfoPtr;
* version * 1,000,000 + minor * 1000 + micro
*/
#define LIBVIR_VERSION_NUMBER 1001
#define LIBVIR_VERSION_NUMBER 1004
int virGetVersion (unsigned long *libVer,
const char *type,
@ -290,6 +302,119 @@ int virConnectListDefinedDomains(virConnectPtr conn,
int maxnames);
int virDomainCreate (virDomainPtr domain);
/**
* virVcpuInfo: structure for information about a virtual CPU in a domain.
*/
typedef enum {
VIR_VCPU_OFFLINE = 0, /* the virtual CPU is offline */
VIR_VCPU_RUNNING = 1, /* the virtual CPU is running */
VIR_VCPU_BLOCKED = 2, /* the virtual CPU is blocked on resource */
} virVcpuState;
typedef struct _virVcpuInfo virVcpuInfo;
struct _virVcpuInfo {
unsigned int number; /* virtual CPU number */
int state; /* value from virVcpuState */
unsigned long long cpuTime; /* CPU time used, in nanoseconds */
int cpu; /* real CPU number, or -1 if offline */
};
typedef virVcpuInfo *virVcpuInfoPtr;
int virDomainSetVcpus (virDomainPtr domain,
unsigned int nvcpus);
int virDomainPinVcpu (virDomainPtr domain,
unsigned int vcpu,
unsigned char *cpumap,
int maplen);
/**
* VIR_USE_CPU:
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)
* @cpu: the physical CPU number
*
* This macro is to be used in conjonction with virDomainPinVcpu() API.
* USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.
*/
#define VIR_USE_CPU(cpumap,cpu) (cpumap[(cpu)/8] |= (1<<((cpu)%8)))
/**
* VIR_UNUSE_CPU:
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)
* @cpu: the physical CPU number
*
* This macro is to be used in conjonction with virDomainPinVcpu() API.
* USE_CPU macro reset the bit (CPU not usable) of the related cpu in cpumap.
*/
#define VIR_UNUSE_CPU(cpumap,cpu) (cpumap[(cpu)/8] &= ~(1<<((cpu)%8)))
/**
* VIR_CPU_MAPLEN:
* @cpu: number of physical CPUs
*
* This macro is to be used in conjonction with virDomainPinVcpu() API.
* It returns the length (in bytes) required to store the complete
* CPU map between a single virtual & all physical CPUs of a domain.
*/
#define VIR_CPU_MAPLEN(cpu) (((cpu)+7)/8)
int virDomainGetVcpus (virDomainPtr domain,
virVcpuInfoPtr info,
int maxinfo,
unsigned char *cpumaps,
int maplen);
/**
* VIR_CPU_USABLE:
* @cpumaps: pointer to an array of cpumap (in 8-bit bytes) (IN)
* @maplen: the length (in bytes) of one cpumap
* @vcpu: the virtual CPU number
* @cpu: the physical CPU number
*
* This macro is to be used in conjonction with virDomainGetVcpus() API.
* VIR_CPU_USABLE macro returns a non zero value (true) if the cpu
* is usable by the vcpu, and 0 otherwise.
*/
#define VIR_CPU_USABLE(cpumaps,maplen,vcpu,cpu) \
(cpumaps[((vcpu)*(maplen))+((cpu)/8)] & (1<<((cpu)%8)))
/**
* VIR_COPY_CPUMAP:
* @cpumaps: pointer to an array of cpumap (in 8-bit bytes) (IN)
* @maplen: the length (in bytes) of one cpumap
* @vcpu: the virtual CPU number
* @cpumap: pointer to a cpumap (in 8-bit bytes) (OUT)
* This cpumap must be previously allocated by the caller
* (ie: malloc(maplen))
*
* This macro is to be used in conjonction with virDomainGetVcpus() and
* virDomainPinVcpu() APIs. VIR_COPY_CPUMAP macro extract the cpumap of
* the specified vcpu from cpumaps array and copy it into cpumap to be used
* later by virDomainPinVcpu() API.
*/
#define VIR_COPY_CPUMAP(cpumaps,maplen,vcpu,cpumap) \
memcpy(cpumap, &(cpumaps[(vcpu)*(maplen)]), (maplen))
/**
* VIR_GET_CPUMAP:
* @cpumaps: pointer to an array of cpumap (in 8-bit bytes) (IN)
* @maplen: the length (in bytes) of one cpumap
* @vcpu: the virtual CPU number
*
* This macro is to be used in conjonction with virDomainGetVcpus() and
* virDomainPinVcpu() APIs. VIR_GET_CPUMAP macro returns a pointer to the
* cpumap of the specified vcpu from cpumaps array.
*/
#define VIR_GET_CPUMAP(cpumaps,maplen,vcpu) &(cpumaps[(vcpu)*(maplen)])
#ifdef __cplusplus
}
#endif

View File

@ -167,6 +167,18 @@ struct _virNodeInfo {
unsigned int threads;/* number of threads per core */
};
/**
* VIR_NODEINFO_MAXCPUS:
* @nodeinfo: virNodeInfo instance
*
* This macro is to calculate the total number of CPUs supported
* but not neccessarily active in the host.
*/
#define VIR_NODEINFO_MAXCPUS(nodeinfo) ((nodeinfo).nodes*(nodeinfo).sockets*(nodeinfo).cores*(nodeinfo).threads)
/**
* virNodeInfoPtr:
*
@ -290,6 +302,119 @@ int virConnectListDefinedDomains(virConnectPtr conn,
int maxnames);
int virDomainCreate (virDomainPtr domain);
/**
* virVcpuInfo: structure for information about a virtual CPU in a domain.
*/
typedef enum {
VIR_VCPU_OFFLINE = 0, /* the virtual CPU is offline */
VIR_VCPU_RUNNING = 1, /* the virtual CPU is running */
VIR_VCPU_BLOCKED = 2, /* the virtual CPU is blocked on resource */
} virVcpuState;
typedef struct _virVcpuInfo virVcpuInfo;
struct _virVcpuInfo {
unsigned int number; /* virtual CPU number */
int state; /* value from virVcpuState */
unsigned long long cpuTime; /* CPU time used, in nanoseconds */
int cpu; /* real CPU number, or -1 if offline */
};
typedef virVcpuInfo *virVcpuInfoPtr;
int virDomainSetVcpus (virDomainPtr domain,
unsigned int nvcpus);
int virDomainPinVcpu (virDomainPtr domain,
unsigned int vcpu,
unsigned char *cpumap,
int maplen);
/**
* VIR_USE_CPU:
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)
* @cpu: the physical CPU number
*
* This macro is to be used in conjonction with virDomainPinVcpu() API.
* USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.
*/
#define VIR_USE_CPU(cpumap,cpu) (cpumap[(cpu)/8] |= (1<<((cpu)%8)))
/**
* VIR_UNUSE_CPU:
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)
* @cpu: the physical CPU number
*
* This macro is to be used in conjonction with virDomainPinVcpu() API.
* USE_CPU macro reset the bit (CPU not usable) of the related cpu in cpumap.
*/
#define VIR_UNUSE_CPU(cpumap,cpu) (cpumap[(cpu)/8] &= ~(1<<((cpu)%8)))
/**
* VIR_CPU_MAPLEN:
* @cpu: number of physical CPUs
*
* This macro is to be used in conjonction with virDomainPinVcpu() API.
* It returns the length (in bytes) required to store the complete
* CPU map between a single virtual & all physical CPUs of a domain.
*/
#define VIR_CPU_MAPLEN(cpu) (((cpu)+7)/8)
int virDomainGetVcpus (virDomainPtr domain,
virVcpuInfoPtr info,
int maxinfo,
unsigned char *cpumaps,
int maplen);
/**
* VIR_CPU_USABLE:
* @cpumaps: pointer to an array of cpumap (in 8-bit bytes) (IN)
* @maplen: the length (in bytes) of one cpumap
* @vcpu: the virtual CPU number
* @cpu: the physical CPU number
*
* This macro is to be used in conjonction with virDomainGetVcpus() API.
* VIR_CPU_USABLE macro returns a non zero value (true) if the cpu
* is usable by the vcpu, and 0 otherwise.
*/
#define VIR_CPU_USABLE(cpumaps,maplen,vcpu,cpu) \
(cpumaps[((vcpu)*(maplen))+((cpu)/8)] & (1<<((cpu)%8)))
/**
* VIR_COPY_CPUMAP:
* @cpumaps: pointer to an array of cpumap (in 8-bit bytes) (IN)
* @maplen: the length (in bytes) of one cpumap
* @vcpu: the virtual CPU number
* @cpumap: pointer to a cpumap (in 8-bit bytes) (OUT)
* This cpumap must be previously allocated by the caller
* (ie: malloc(maplen))
*
* This macro is to be used in conjonction with virDomainGetVcpus() and
* virDomainPinVcpu() APIs. VIR_COPY_CPUMAP macro extract the cpumap of
* the specified vcpu from cpumaps array and copy it into cpumap to be used
* later by virDomainPinVcpu() API.
*/
#define VIR_COPY_CPUMAP(cpumaps,maplen,vcpu,cpumap) \
memcpy(cpumap, &(cpumaps[(vcpu)*(maplen)]), (maplen))
/**
* VIR_GET_CPUMAP:
* @cpumaps: pointer to an array of cpumap (in 8-bit bytes) (IN)
* @maplen: the length (in bytes) of one cpumap
* @vcpu: the virtual CPU number
*
* This macro is to be used in conjonction with virDomainGetVcpus() and
* virDomainPinVcpu() APIs. VIR_GET_CPUMAP macro returns a pointer to the
* cpumap of the specified vcpu from cpumaps array.
*/
#define VIR_GET_CPUMAP(cpumaps,maplen,vcpu) &(cpumaps[(vcpu)*(maplen)])
#ifdef __cplusplus
}
#endif

View File

@ -14,7 +14,7 @@
#ifndef __VIR_VIRERR_H__
#define __VIR_VIRERR_H__
#include "libvirt.h"
#include <libvirt/libvirt.h>
#ifdef __cplusplus
extern "C" {
@ -44,7 +44,8 @@ typedef enum {
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 */
VIR_FROM_RPC /* Error in the XML-RPC code */
VIR_FROM_RPC, /* Error in the XML-RPC code */
VIR_FROM_PROXY /* Error in the proxy code */
} virErrorDomain;
@ -104,7 +105,8 @@ typedef enum {
VIR_ERR_DRIVER_FULL, /* too many drivers registered */
VIR_ERR_CALL_FAILED, /* not supported by the drivers */
VIR_ERR_XML_ERROR, /* an XML description is not well formed or broken */
VIR_ERR_DOM_EXIST /* the domain already exist */
VIR_ERR_DOM_EXIST,/* the domain already exist */
VIR_ERR_OPERATION_DENIED /* operation forbidden on read-only connections */
} virErrorNumber;
/**

View File

@ -1,145 +0,0 @@
/*
* 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 */
VIR_FROM_RPC /* Error in the XML-RPC code */
} 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 */
VIR_ERR_XML_ERROR, /* an XML description is not well formed or broken */
VIR_ERR_DOM_EXIST /* the domain already exist */
} 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

@ -11,10 +11,13 @@ BuildRequires: xen python python-devel
Requires: xen
Requires: libxml2
Requires: readline
Requires: ncurses
BuildRequires: xen-devel
BuildRequires: libxml2-devel
BuildRequires: readline-devel
BuildRequires: ncurses-devel
Obsoletes: libvir
ExclusiveArch: i386 x86_64
ExclusiveArch: i386 x86_64 ia64
%description
This C library provides an API to use the Xen virtualization framework,
@ -75,6 +78,7 @@ rm -fr %{buildroot}
%doc %{_mandir}/man1/virsh.1*
%{_bindir}/virsh
%{_libdir}/lib*.so.*
%attr(4755, root, root) %{_libexecdir}/libvirt_proxy
%files devel
%defattr(-, root, root)
@ -103,6 +107,20 @@ rm -fr %{buildroot}
%doc docs/examples/python
%changelog
* Mon Jul 24 2006 Mark McLoughlin <markmc@redhat.com> - 0.1.3-2
- Add BuildRequires: xen-devel
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.1.3-1.1
- rebuild
* Tue Jul 11 2006 Daniel Veillard <veillard@redhat.com> 0.1.3-1
- support for HVM Xen guests
- various bugfixes
* Mon Jul 3 2006 Daniel Veillard <veillard@redhat.com> 0.1.2-1
- added a proxy mechanism for read only access using httpu
- fixed header includes paths
* Wed Jun 21 2006 Daniel Veillard <veillard@redhat.com> 0.1.1-1
- extend and cleanup the driver infrastructure and code
- python examples

5
proxy/.cvsignore Normal file
View File

@ -0,0 +1,5 @@
Makefile
Makefile.in
.deps
.libs
libvirt_proxy

19
proxy/Makefile.am Normal file
View File

@ -0,0 +1,19 @@
## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_builddir)/include -I@top_srcdir@/include \
-I@top_srcdir@/proxy -I@top_srcdir@/src @LIBXML_CFLAGS@ \
-DPROXY
libexec_PROGRAMS = libvirt_proxy
libvirt_proxy_SOURCES = libvirt_proxy.c @top_srcdir@/src/xend_internal.c \
@top_srcdir@/src/xen_internal.c @top_srcdir@/src/virterror.c \
@top_srcdir@/src/sexpr.c @top_srcdir@/src/xml.c \
@top_srcdir@/src/xs_internal.c
libvirt_proxy_LDFLAGS =
libvirt_proxy_DEPENDENCIES =
libvirt_proxy_LDADD =
install-exec-hook:
chmod u+s $(DESTDIR)$(libexecdir)/libvirt_proxy

752
proxy/libvirt_proxy.c Normal file
View File

@ -0,0 +1,752 @@
/*
* proxy_svr.c: root suid proxy server for Xen access to APIs with no
* side effects from unauthenticated clients.
*
* Copyright (C) 2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Daniel Veillard <veillard@redhat.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/un.h>
#include "internal.h"
#include "proxy_internal.h"
#include "xen_internal.h"
#include "xend_internal.h"
#include "xs_internal.h"
static int fdServer = -1;
static int debug = 0;
static int persist = 0;
static int done = 0;
#define MAX_CLIENT 64
static int nbClients = 0; /* client 0 is the unix listen socket */
static struct pollfd pollInfos[MAX_CLIENT + 1];
static virConnect conninfos;
static virConnectPtr conn = &conninfos;
static unsigned long xenVersion = 0;
/************************************************************************
* *
* Interfaces with the Xen hypervisor *
* *
************************************************************************/
/**
* proxyInitXen:
*
* Initialize the communication layer with Xen
*
* Returns 0 or -1 in case of error
*/
static int
proxyInitXen(void) {
int ret;
unsigned long xenVersion2;
ret = xenHypervisorOpen(conn, NULL, VIR_DRV_OPEN_QUIET);
if (ret < 0) {
fprintf(stderr, "Failed to open Xen hypervisor\n");
return(-1);
} else {
ret = xenHypervisorGetVersion(conn, &xenVersion);
if (ret != 0) {
fprintf(stderr, "Failed to get Xen hypervisor version\n");
return(-1);
}
}
ret = xenDaemonOpen_unix(conn, "/var/lib/xend/xend-socket");
if (ret < 0) {
fprintf(stderr, "Failed to connect to Xen daemon\n");
return(-1);
}
ret = xenStoreOpen(conn, NULL, VIR_DRV_OPEN_QUIET | VIR_DRV_OPEN_RO);
if (ret < 0) {
fprintf(stderr, "Failed to open XenStore connection");
return (-1);
}
ret = xenDaemonGetVersion(conn, &xenVersion2);
if (ret != 0) {
fprintf(stderr, "Failed to get Xen daemon version\n");
return(-1);
}
if (debug)
fprintf(stderr, "Connected to hypervisor %lu and daemon %lu\n",
xenVersion, xenVersion2);
if (xenVersion2 > xenVersion)
xenVersion = xenVersion2;
return(0);
}
/************************************************************************
* *
* Processing of the unix socket to listen for clients *
* *
************************************************************************/
/**
* proxyCloseUnixSocket:
*
* close the unix socket
*
* Returns 0 or -1 in case of error
*/
static int
proxyCloseUnixSocket(void) {
int ret;
if (fdServer < 0)
return(0);
ret = close(fdServer);
if (debug > 0)
fprintf(stderr, "closing unix socket %d: %d\n", fdServer, ret);
fdServer = -1;
pollInfos[0].fd = -1;
return(ret);
}
/**
* proxyListenUnixSocket:
* @path: the fileame for the socket
*
* create a new abstract socket based on that path and listen on it
*
* Returns the associated file descriptor or -1 in case of failure
*/
static int
proxyListenUnixSocket(const char *path) {
int fd;
struct sockaddr_un addr;
if (fdServer >= 0)
return(fdServer);
fd = socket(PF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
fprintf(stderr, "Failed to create unix socket");
return(-1);
}
/*
* Abstract socket do not hit the filesystem, way more secure and
* garanteed to be atomic
*/
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
addr.sun_path[0] = '\0';
strncpy(&addr.sun_path[1], path, (sizeof(addr) - 4) - 2);
/*
* now bind the socket to that address and listen on it
*/
if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
fprintf(stderr, "Failed to bind to socket %s\n", path);
close(fd);
return (-1);
}
if (listen(fd, 30 /* backlog */ ) < 0) {
fprintf(stderr, "Failed to listen to socket %s\n", path);
close(fd);
return (-1);
}
if (debug > 0)
fprintf(stderr, "opened and bound unix socket %d\n", fd);
fdServer = fd;
pollInfos[0].fd = fd;
pollInfos[0].events = POLLIN | POLLERR | POLLHUP | POLLNVAL;
return (fd);
}
/**
* proxyAcceptClientSocket:
*
* Process a request to the unix socket
*
* Returns the filedescriptor of the new client or -1 in case of error
*/
static int
proxyAcceptClientSocket(void) {
int client;
socklen_t client_addrlen;
struct sockaddr client_addr;
retry:
client_addrlen = sizeof(client_addr);
client = accept(pollInfos[0].fd, &client_addr, &client_addrlen);
if (client < 0) {
if (errno == EINTR) {
if (debug > 0)
fprintf(stderr, "accept connection on socket %d interrupted\n",
pollInfos[0].fd);
goto retry;
}
fprintf(stderr, "Failed to accept incoming connection on socket %d\n",
pollInfos[0].fd);
done = 1;
return(-1);
}
if (nbClients >= MAX_CLIENT) {
fprintf(stderr, "Too many client registered\n");
close(client);
return(-1);
}
nbClients++;
pollInfos[nbClients].fd = client;
pollInfos[nbClients].events = POLLIN | POLLERR | POLLHUP | POLLNVAL;
if (debug > 0)
fprintf(stderr, "accept connection on socket %d for client %d\n",
client, nbClients);
return(client);
}
/************************************************************************
* *
* Processing of client sockets *
* *
************************************************************************/
/**
* proxyCloseClientSocket:
* @nr: client number
*
* Close the socket from that client, and recompact the pollInfo array
*
* Returns 0 in case of success and -1 in case of error
*/
static int
proxyCloseClientSocket(int nr) {
int ret;
ret = close(pollInfos[nr].fd);
if (ret != 0)
fprintf(stderr, "Failed to close socket %d from client %d\n",
pollInfos[nr].fd, nr);
else if (debug > 0)
fprintf(stderr, "Closed socket %d from client %d\n",
pollInfos[nr].fd, nr);
if (nr < nbClients) {
memmove(&pollInfos[nr], &pollInfos[nr + 1],
(nbClients - nr) * sizeof(pollInfos[0]));
}
nbClients--;
return(ret);
}
/**
* proxyCloseClientSockets:
*
* Close all the sockets from the clients
*/
static void
proxyCloseClientSockets(void) {
int i, ret;
for (i = 1;i <= nbClients;i++) {
ret = close(pollInfos[i].fd);
if (ret != 0)
fprintf(stderr, "Failed to close socket %d from client %d\n",
pollInfos[i].fd, i);
else if (debug > 0)
fprintf(stderr, "Closed socket %d from client %d\n",
pollInfos[i].fd, i);
}
nbClients = 0;
}
/**
* proxyWriteClientSocket:
* @nr: the client number
* @req: pointer to the packet
*
* Send back a packet to the client. If it seems write would be blocking
* then try to disconnect from it.
*
* Return 0 in case of success and -1 in case of error.
*/
static int
proxyWriteClientSocket(int nr, virProxyPacketPtr req) {
int ret;
if ((nr <= 0) || (nr > nbClients) || (req == NULL) ||
(req->len < sizeof(virProxyPacket)) ||
(req->len > sizeof(virProxyFullPacket)) ||
(pollInfos[nr].fd < 0)) {
fprintf(stderr, "write to client %d in error", nr);
proxyCloseClientSocket(nr);
return(-1);
}
retry:
ret = write(pollInfos[nr].fd, (char *) req, req->len);
if (ret < 0) {
if (errno == EINTR) {
if (debug > 0)
fprintf(stderr, "write socket %d to client %d interrupted\n",
pollInfos[nr].fd, nr);
goto retry;
}
fprintf(stderr, "write %d bytes to socket %d from client %d failed\n",
req->len, pollInfos[nr].fd, nr);
proxyCloseClientSocket(nr);
return(-1);
}
if (ret == 0) {
if (debug)
fprintf(stderr, "end of stream from client %d on socket %d\n",
nr, pollInfos[nr].fd);
proxyCloseClientSocket(nr);
return(-1);
}
if (ret != req->len) {
fprintf(stderr, "write %d of %d bytes to socket %d from client %d\n",
ret, req->len, pollInfos[nr].fd, nr);
proxyCloseClientSocket(nr);
return(-1);
}
if (debug)
fprintf(stderr, "wrote %d bytes to client %d on socket %d\n",
ret, nr, pollInfos[nr].fd);
return(0);
}
/**
* proxyReadClientSocket:
* @nr: the client number
*
* Process a read from a client socket
*/
static int
proxyReadClientSocket(int nr) {
virProxyFullPacket request;
virProxyPacketPtr req = (virProxyPacketPtr) &request;
int ret;
char *xml;
retry:
ret = read(pollInfos[nr].fd, req, sizeof(virProxyPacket));
if (ret < 0) {
if (errno == EINTR) {
if (debug > 0)
fprintf(stderr, "read socket %d from client %d interrupted\n",
pollInfos[nr].fd, nr);
goto retry;
}
fprintf(stderr, "Failed to read socket %d from client %d\n",
pollInfos[nr].fd, nr);
proxyCloseClientSocket(nr);
return(-1);
}
if (ret == 0) {
if (debug)
fprintf(stderr, "end of stream from client %d on socket %d\n",
nr, pollInfos[nr].fd);
proxyCloseClientSocket(nr);
return(-1);
}
if (debug)
fprintf(stderr, "read %d bytes from client %d on socket %d\n",
ret, nr, pollInfos[nr].fd);
if ((req->version != PROXY_PROTO_VERSION) ||
(req->len < sizeof(virProxyPacket)) ||
(req->len > sizeof(virProxyFullPacket)))
goto comm_error;
if (debug)
fprintf(stderr, "Got command %d from client %d\n", req->command, nr);
/*
* complete reading the packet.
* TODO: we should detect when blocking and abort connection if this happen
*/
if (req->len > ret) {
int total, extra;
char *base = (char *) &request;
total = ret;
while (total < req->len) {
extra = req->len - total;
retry2:
ret = read(pollInfos[nr].fd, base + total, extra);
if (ret < 0) {
if (errno == EINTR) {
if (debug > 0)
fprintf(stderr,
"read socket %d from client %d interrupted\n",
pollInfos[nr].fd, nr);
goto retry2;
}
fprintf(stderr, "Failed to read socket %d from client %d\n",
pollInfos[nr].fd, nr);
proxyCloseClientSocket(nr);
return(-1);
}
if (ret == 0) {
if (debug)
fprintf(stderr,
"end of stream from client %d on socket %d\n",
nr, pollInfos[nr].fd);
proxyCloseClientSocket(nr);
return(-1);
}
total += ret;
}
}
switch (req->command) {
case VIR_PROXY_NONE:
if (req->len != sizeof(virProxyPacket))
goto comm_error;
break;
case VIR_PROXY_VERSION:
if (req->len != sizeof(virProxyPacket))
goto comm_error;
req->data.larg = xenVersion;
break;
case VIR_PROXY_LIST: {
int maxids;
if (req->len != sizeof(virProxyPacket))
goto comm_error;
maxids = sizeof(request.extra.arg) / sizeof(int);
ret = xenHypervisorListDomains(conn, &request.extra.arg[0],
maxids);
if (ret < 0) {
req->len = sizeof(virProxyPacket);
req->data.arg = 0;
} else {
req->len = sizeof(virProxyPacket) + ret * sizeof(int);
req->data.arg = ret;
}
break;
}
case VIR_PROXY_NUM_DOMAIN:
if (req->len != sizeof(virProxyPacket))
goto comm_error;
req->data.arg = xenHypervisorNumOfDomains(conn);
break;
case VIR_PROXY_MAX_MEMORY:
if (req->len != sizeof(virProxyPacket))
goto comm_error;
req->data.larg = xenHypervisorGetDomMaxMemory(conn, req->data.arg);
break;
case VIR_PROXY_DOMAIN_INFO:
if (req->len != sizeof(virProxyPacket))
goto comm_error;
memset(&request.extra.dinfo, 0, sizeof(virDomainInfo));
ret = xenHypervisorGetDomInfo(conn, req->data.arg,
&request.extra.dinfo);
if (ret < 0) {
req->data.arg = -1;
} else {
req->len += sizeof(virDomainInfo);
}
break;
case VIR_PROXY_LOOKUP_ID: {
char *name = NULL;
unsigned char uuid[16];
int len;
if (req->len != sizeof(virProxyPacket))
goto comm_error;
if (xenDaemonDomainLookupByID(conn, req->data.arg, &name, uuid) < 0) {
req->data.arg = -1;
} else {
len = strlen(name);
if (len > 1000) {
len = 1000;
name[1000] = 0;
}
req->len += 16 + len + 1;
memcpy(&request.extra.str[0], uuid, 16);
strcpy(&request.extra.str[16], name);
}
if (name)
free(name);
break;
}
case VIR_PROXY_LOOKUP_UUID: {
char **names;
char **tmp;
int ident, len;
char *name = NULL;
unsigned char uuid[16];
if (req->len != sizeof(virProxyPacket) + 16)
goto comm_error;
/*
* Xend API forces to collect the full domain list by names, and
* then query each of them until the id is found
*/
names = xenDaemonListDomainsOld(conn);
tmp = names;
if (names != NULL) {
while (*tmp != NULL) {
ident = xenDaemonDomainLookupByName_ids(conn, *tmp, &uuid[0]);
if (!memcmp(uuid, &request.extra.str[0], 16)) {
name = *tmp;
break;
}
tmp++;
}
}
if (name == NULL) {
/* not found */
req->data.arg = -1;
req->len = sizeof(virProxyPacket);
} else {
len = strlen(name);
if (len > 1000) {
len = 1000;
name[1000] = 0;
}
req->len = sizeof(virProxyPacket) + len + 1;
strcpy(&request.extra.str[0], name);
req->data.arg = ident;
}
free(names);
break;
}
case VIR_PROXY_LOOKUP_NAME: {
int ident;
unsigned char uuid[16];
if (req->len > sizeof(virProxyPacket) + 1000)
goto comm_error;
ident = xenDaemonDomainLookupByName_ids(conn,
&request.extra.str[0], &uuid[0]);
if (ident < 0) {
/* not found */
req->data.arg = -1;
req->len = sizeof(virProxyPacket);
} else {
req->len = sizeof(virProxyPacket) + 16;
memcpy(&request.extra.str[0], uuid, 16);
req->data.arg = ident;
}
break;
}
case VIR_PROXY_NODE_INFO:
if (req->len != sizeof(virProxyPacket))
goto comm_error;
/*
* Hum, could we expect those informations to be unmutable and
* cache them ? Since it's probably an unfrequent call better
* not make assumption and do the xend RPC each call.
*/
ret = xenDaemonNodeGetInfo(conn, &request.extra.ninfo);
if (ret < 0) {
req->data.arg = -1;
req->len = sizeof(virProxyPacket);
} else {
req->data.arg = 0;
req->len = sizeof(virProxyPacket) + sizeof(virNodeInfo);
}
break;
case VIR_PROXY_DOMAIN_XML:
if (req->len != sizeof(virProxyPacket))
goto comm_error;
xml = xenDaemonDomainDumpXMLByID(conn, request.data.arg);
if (!xml) {
req->data.arg = -1;
req->len = sizeof(virProxyPacket);
} else {
int xmllen = strlen(xml);
if (xmllen > sizeof(request.extra.str)) {
req->data.arg = -2;
req->len = sizeof(virProxyPacket);
} else {
req->data.arg = 0;
memmove(&request.extra.str[0], xml, xmllen);
req->len = sizeof(virProxyPacket) + xmllen;
}
free(xml);
}
break;
default:
goto comm_error;
}
ret = proxyWriteClientSocket(nr, req);
return(ret);
comm_error:
fprintf(stderr,
"Communication error with client %d: malformed packet\n", nr);
proxyCloseClientSocket(nr);
return(-1);
}
/************************************************************************
* *
* Main loop processing *
* *
************************************************************************/
/**
* proxyProcessRequests:
*
* process requests and timers
*/
static void
proxyProcessRequests(void) {
int exit_timeout = 30;
int ret, i;
while (!done) {
/*
* wait for requests, with a one second timeout
*/
ret = poll(&pollInfos[0], nbClients + 1, 1000);
if (ret == 0) { /* timeout */
if ((nbClients == 0) && (persist == 0)) {
exit_timeout--;
if (exit_timeout == 0) {
done = 1;
if (debug > 0) {
fprintf(stderr, "Exitting after 30s without clients\n");
}
}
} else
exit_timeout = 30;
if (debug > 1)
fprintf(stderr, "poll timeout\n");
continue;
} else if (ret < 0) {
if (errno == EINTR) {
if (debug > 0)
fprintf(stderr, "poll syscall interrupted\n");
continue;
}
fprintf(stderr, "poll syscall failed\n");
break;
}
/*
* there have been I/O to process
*/
exit_timeout = 30;
if (pollInfos[0].revents != 0) {
if (pollInfos[0].revents & POLLIN) {
proxyAcceptClientSocket();
} else {
fprintf(stderr, "Got an error %d on incoming socket %d\n",
pollInfos[0].revents, pollInfos[0].fd);
break;
}
}
/*
* process the clients in reverse order since on error or disconnect
* pollInfos is compacted to remove the given client.
*/
for (i = nbClients;i > 0;i--) {
if (pollInfos[i].revents & POLLIN) {
proxyReadClientSocket(i);
} else if (pollInfos[i].revents != 0) {
fprintf(stderr, "Got an error %d on client %d socket %d\n",
pollInfos[i].revents, i, pollInfos[i].fd);
proxyCloseClientSocket(i);
}
}
}
}
/**
* proxyMainLoop:
*
* main loop for the proxy, continually try to keep the unix socket
* open, serve client requests, and process timing events.
*/
static void
proxyMainLoop(void) {
while (! done) {
if (proxyListenUnixSocket(PROXY_SOCKET_PATH) < 0)
break;
proxyProcessRequests();
}
proxyCloseClientSockets();
}
/**
* usage:
*
* dump on stdout informations about the program
*/
static void
usage(const char *progname) {
printf("Usage: %s [-v] [-v]\n", progname);
printf(" option -v increase the verbosity level for debugging\n");
printf("This is a proxy for xen services used by libvirt to offer\n");
printf("safe and fast status information on the Xen virtualization.\n");
printf("This need not be run manually it's started automatically.\n");
}
/**
* main:
*
* Check that we are running with root priviledges, initialize the
* connections to the daemon and or hypervisor, and then run the main loop
*/
int main(int argc, char **argv) {
int i;
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "-v")) {
debug++;
} else if (!strcmp(argv[i], "-no-timeout")) {
persist = 1;
} else {
usage(argv[0]);
exit(1);
}
}
if (geteuid() != 0) {
fprintf(stderr, "%s must be run as root or suid\n", argv[0]);
/* exit(1); */
}
/*
* setup a connection block
*/
memset(conn, 0, sizeof(conninfos));
conn->magic = VIR_CONNECT_MAGIC;
/*
* very fist thing, use the socket as an exclusive lock, this then
* allow to do timed exits, avoiding constant CPU usage in case of
* failure.
*/
if (proxyListenUnixSocket(PROXY_SOCKET_PATH) < 0)
exit(0);
if (proxyInitXen() == 0)
proxyMainLoop();
sleep(1);
proxyCloseUnixSocket();
exit(0);
}

12
python/.cvsignore Normal file
View File

@ -0,0 +1,12 @@
Makefile
Makefile.in
.deps
.libs
*.lo
*.la
libvirt.py
libvirt-export.c
libvirtclass.txt
libvirt-py.[ch]
libvirtclass.py
gen_prog

View File

@ -224,10 +224,10 @@ skipped_types = {
py_types = {
'void': (None, None, None, None),
'int': ('i', None, "int", "int"),
'long': ('i', None, "int", "int"),
'long': ('l', None, "long", "long"),
'double': ('d', None, "double", "double"),
'unsigned int': ('i', None, "int", "int"),
'unsigned long': ('i', None, "int", "int"),
'unsigned long': ('l', None, "long", "long"),
'unsigned char *': ('z', None, "charPtr", "char *"),
'char *': ('z', None, "charPtr", "char *"),
'const char *': ('z', None, "charPtrConst", "const char *"),
@ -480,7 +480,7 @@ def buildStubs():
wrapper = open("libvirt-py.c", "w")
wrapper.write("/* Generated */\n\n")
wrapper.write("#include <Python.h>\n")
wrapper.write("#include <libvirt.h>\n")
wrapper.write("#include <libvirt/libvirt.h>\n")
wrapper.write("#include \"libvirt_wrap.h\"\n")
wrapper.write("#include \"libvirt-py.h\"\n\n")
for function in functions.keys():

View File

@ -10,8 +10,8 @@
*/
#include <Python.h>
#include <libvirt.h>
#include <virterror.h>
#include <libvirt/libvirt.h>
#include <libvirt/virterror.h>
#include "libvirt_wrap.h"
#include "libvirt-py.h"

View File

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

2
python/tests/.cvsignore Normal file
View File

@ -0,0 +1,2 @@
Makefile
Makefile.in

View File

@ -1 +1,7 @@
Makefile
Makefile.in
.deps
.libs
*.lo
*.la
virsh

View File

@ -1,6 +1,7 @@
## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_builddir)/include -I@top_srcdir@/include @LIBXML_CFLAGS@
INCLUDES = -I$(top_builddir)/include -I@top_srcdir@/include @LIBXML_CFLAGS@ \
-DBINDIR=\""$(libexecdir)"\"
DEPS = libvirt.la
LDADDS = @STATIC_BINARIES@ libvirt.la
VIRSH_LIBS = @VIRSH_LIBS@
@ -23,7 +24,8 @@ libvirt_la_SOURCES = \
xend_internal.c xend_internal.h \
sexpr.c sexpr.h \
virterror.c \
driver.h
driver.h \
proxy_internal.c proxy_internal.h
bin_PROGRAMS = virsh

View File

@ -6,8 +6,8 @@
#ifndef __VIR_DRIVER_H__
#define __VIR_DRIVER_H__
#include "libvirt.h"
#include "virterror.h"
#include "libvirt/libvirt.h"
#include "libvirt/virterror.h"
#ifdef __cplusplus
extern "C" {
@ -20,7 +20,8 @@ typedef enum {
VIR_DRV_XEN_HYPERVISOR = 1,
VIR_DRV_XEN_STORE = 2,
VIR_DRV_XEN_DAEMON = 3,
VIR_DRV_TEST = 4
VIR_DRV_TEST = 4,
VIR_DRV_XEN_PROXY = 5
} virDrvNo;
@ -103,6 +104,24 @@ typedef int
typedef int
(*virDrvDomainRestore) (virConnectPtr conn,
const char *from);
typedef char *
(*virDrvDomainDumpXML) (virDomainPtr dom,
int flags);
typedef int
(*virDrvDomainSetVcpus) (virDomainPtr domain,
unsigned int nvcpus);
typedef int
(*virDrvDomainPinVcpu) (virDomainPtr domain,
unsigned int vcpu,
unsigned char *cpumap,
int maplen);
typedef int
(*virDrvDomainGetVcpus) (virDomainPtr domain,
virVcpuInfoPtr info,
int maxinfo,
unsigned char *cpumaps,
int maplen);
typedef struct _virDriver virDriver;
typedef virDriver *virDriverPtr;
@ -145,6 +164,10 @@ struct _virDriver {
virDrvDomainGetInfo domainGetInfo;
virDrvDomainSave domainSave;
virDrvDomainRestore domainRestore;
virDrvDomainSetVcpus domainSetVcpus;
virDrvDomainPinVcpu domainPinVcpu;
virDrvDomainGetVcpus domainGetVcpus;
virDrvDomainDumpXML domainDumpXML;
};

View File

@ -13,8 +13,8 @@
#include <libxml/threads.h>
#include "hash.h"
#include "libvirt.h"
#include "virterror.h"
#include "libvirt/libvirt.h"
#include "libvirt/virterror.h"
#include "driver.h"
#ifdef __cplusplus
@ -101,7 +101,8 @@ struct _virConnect {
/* extra data needed by drivers */
int handle; /* internal handle used for hypercall */
struct xs_handle *xshandle; /* handle to talk to the xenstore */
struct xs_handle *xshandle;/* handle to talk to the xenstore */
int proxy; /* file descriptor if using the proxy */
/* connection to xend */
int type; /* PF_UNIX or PF_INET */

View File

@ -9,7 +9,7 @@
* Daniel Veillard <veillard@redhat.com>
*/
#include "libvirt.h"
#include "libvirt/libvirt.h"
#include <stdio.h>
#include <stdlib.h>
@ -28,6 +28,7 @@
#include "xen_internal.h"
#include "xend_internal.h"
#include "xs_internal.h"
#include "proxy_internal.h"
#include "xml.h"
#include "test.h"
@ -69,6 +70,7 @@ virInitialize(void)
* Note that the order is important the first ones have a higher priority
*/
xenHypervisorRegister();
xenProxyRegister();
xenDaemonRegister();
xenStoreRegister();
testRegister();
@ -238,13 +240,14 @@ virConnectOpen(const char *name)
for (i = 0;i < MAX_DRIVERS;i++) {
if ((virDriverTab[i] != NULL) && (virDriverTab[i]->open != NULL)) {
res = virDriverTab[i]->open(ret, name, 0);
res = virDriverTab[i]->open(ret, name, VIR_DRV_OPEN_QUIET);
/*
* For a default connect to Xen make sure we manage to contact
* all related drivers.
*/
if ((res < 0) && (for_xen) &&
(!strncasecmp(virDriverTab[i]->name, "xen", 3)))
(!strncasecmp(virDriverTab[i]->name, "xen", 3)) &&
(virDriverTab[i]->no != VIR_DRV_XEN_PROXY))
goto failed;
if (res == 0)
ret->drivers[ret->nb_drivers++] = virDriverTab[i];
@ -530,6 +533,10 @@ virDomainCreateLinux(virConnectPtr conn, const char *xmlDesc,
virLibConnError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
if (conn->flags & VIR_CONNECT_RO) {
virLibConnError(conn, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (NULL);
}
for (i = 0;i < conn->nb_drivers;i++) {
if ((conn->drivers[i] != NULL) &&
@ -717,7 +724,7 @@ virDomainLookupByName(virConnectPtr conn, const char *name)
int
virDomainDestroy(virDomainPtr domain)
{
int ret = -1, i;
int i;
virConnectPtr conn;
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
@ -726,10 +733,10 @@ virDomainDestroy(virDomainPtr domain)
}
conn = domain->conn;
#if PEDANTIC
if (domain->conn->flags & VIR_CONNECT_RO)
return (-1);
#endif
if (conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
/*
* Go though the driver registered entry points but use the
@ -740,7 +747,7 @@ virDomainDestroy(virDomainPtr domain)
(conn->drivers[i]->no != VIR_DRV_XEN_HYPERVISOR) &&
(conn->drivers[i]->domainDestroy != NULL)) {
if (conn->drivers[i]->domainDestroy(domain) == 0)
ret = 0;
return (0);
}
}
for (i = 0;i < conn->nb_drivers;i++) {
@ -748,16 +755,12 @@ virDomainDestroy(virDomainPtr domain)
(conn->drivers[i]->no == VIR_DRV_XEN_HYPERVISOR) &&
(conn->drivers[i]->domainDestroy != NULL)) {
if (conn->drivers[i]->domainDestroy(domain) == 0)
ret = 0;
return (0);
}
}
if (ret != 0) {
virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__);
return (ret);
}
return (ret);
return (-1);
}
/**
@ -796,19 +799,19 @@ virDomainFree(virDomainPtr domain)
int
virDomainSuspend(virDomainPtr domain)
{
int ret = -1, i;
int i;
virConnectPtr conn;
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
conn = domain->conn;
#if PEDANTIC
if (domain->conn->flags & VIR_CONNECT_RO)
return (-1);
#endif
/*
* Go though the driver registered entry points but use the
@ -819,7 +822,7 @@ virDomainSuspend(virDomainPtr domain)
(conn->drivers[i]->no != VIR_DRV_XEN_HYPERVISOR) &&
(conn->drivers[i]->domainSuspend != NULL)) {
if (conn->drivers[i]->domainSuspend(domain) == 0)
ret = 0;
return (0);
}
}
for (i = 0;i < conn->nb_drivers;i++) {
@ -827,16 +830,12 @@ virDomainSuspend(virDomainPtr domain)
(conn->drivers[i]->no == VIR_DRV_XEN_HYPERVISOR) &&
(conn->drivers[i]->domainSuspend != NULL)) {
if (conn->drivers[i]->domainSuspend(domain) == 0)
ret = 0;
return (0);
}
}
if (ret != 0) {
virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__);
return (ret);
}
return (ret);
return (-1);
}
/**
@ -859,12 +858,12 @@ virDomainResume(virDomainPtr domain)
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
conn = domain->conn;
#if PEDANTIC
if (domain->conn->flags & VIR_CONNECT_RO)
return (-1);
#endif
/*
* Go though the driver registered entry points but use the
@ -914,6 +913,10 @@ virDomainSave(virDomainPtr domain, const char *to)
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
conn = domain->conn;
if (to == NULL) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
@ -972,6 +975,10 @@ virDomainRestore(virConnectPtr conn, const char *from)
virLibConnError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (-1);
}
if (conn->flags & VIR_CONNECT_RO) {
virLibConnError(conn, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
if (from == NULL) {
virLibConnError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
@ -1032,12 +1039,12 @@ virDomainShutdown(virDomainPtr domain)
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
conn = domain->conn;
#if PEDANTIC
if (domain->conn->flags & VIR_CONNECT_RO)
return (-1);
#endif
/* Go though the driver registered entry points */
for (i = 0;i < conn->nb_drivers;i++) {
@ -1077,12 +1084,12 @@ virDomainReboot(virDomainPtr domain, unsigned int flags)
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
conn = domain->conn;
#if PEDANTIC
if (domain->conn->flags & VIR_CONNECT_RO)
return (-1);
#endif
/* Go though the driver registered entry points */
for (i = 0;i < conn->nb_drivers;i++) {
@ -1173,7 +1180,7 @@ int
virDomainGetUUIDString(virDomainPtr domain, char *buf)
{
unsigned char uuid[16];
if (!VIR_IS_DOMAIN(domain)) {
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
@ -1301,10 +1308,6 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
int ret = -1 , i;
virConnectPtr conn;
if (memory < 4096) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
if (domain == NULL) {
TODO
return (-1);
@ -1313,9 +1316,15 @@ virDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
conn = domain->conn;
if (domain->conn->flags & VIR_CONNECT_RO)
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
if (memory < 4096) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
conn = domain->conn;
/*
* in that case instead of trying only though one method try all availble.
@ -1353,10 +1362,6 @@ virDomainSetMemory(virDomainPtr domain, unsigned long memory)
int ret = -1 , i;
virConnectPtr conn;
if (memory < 4096) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
if (domain == NULL) {
TODO
return (-1);
@ -1365,9 +1370,16 @@ virDomainSetMemory(virDomainPtr domain, unsigned long memory)
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
conn = domain->conn;
if (domain->conn->flags & VIR_CONNECT_RO)
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
if (memory < 4096) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
conn = domain->conn;
/*
* in that case instead of trying only though one method try all availble.
@ -1393,7 +1405,7 @@ virDomainSetMemory(virDomainPtr domain, unsigned long memory)
* @info: pointer to a virDomainInfo structure allocated by the user
*
* Extract information about a domain. Note that if the connection
* used to get the domain is limited only a partial set of the informations
* used to get the domain is limited only a partial set of the information
* can be extracted.
*
* Returns 0 in case of success and -1 in case of failure.
@ -1439,6 +1451,8 @@ virDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
char *
virDomainGetXMLDesc(virDomainPtr domain, int flags)
{
int i;
char *ret = NULL;
if (!VIR_IS_DOMAIN(domain)) {
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (NULL);
@ -1448,7 +1462,19 @@ virDomainGetXMLDesc(virDomainPtr domain, int flags)
return (NULL);
}
return (xenDaemonDomainDumpXML(domain));
for (i = 0;i < domain->conn->nb_drivers;i++) {
if ((domain->conn->drivers[i] != NULL) &&
(domain->conn->drivers[i]->domainDumpXML != NULL)) {
ret = domain->conn->drivers[i]->domainDumpXML(domain, flags);
if (ret)
break;
}
}
if (!ret) {
virLibConnError(domain->conn, VIR_ERR_CALL_FAILED, __FUNCTION__);
return (NULL);
}
return(ret);
}
/**
@ -1516,6 +1542,10 @@ virDomainDefineXML(virConnectPtr conn, const char *xml) {
virLibConnError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (NULL);
}
if (conn->flags & VIR_CONNECT_RO) {
virLibConnError(conn, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (NULL);
}
if (xml == NULL) {
virLibConnError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
@ -1606,6 +1636,11 @@ virDomainUndefine(virDomainPtr domain) {
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
/* TODO shall we keep a list of defined domains there ? */
ret = virFreeDomain(domain->conn, domain);
@ -1643,6 +1678,198 @@ virConnectListDefinedDomains(virConnectPtr conn, const char **names,
int
virDomainCreate(virDomainPtr domain) {
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
return(-1);
}
/**
* virDomainSetVcpus:
* @domain: pointer to domain object, or NULL for Domain0
* @nvcpus: the new number of virtual CPUs for this domain
*
* Dynamically change the number of virtual CPUs used by the domain.
* Note that this call may fail if the underlying virtualization hypervisor
* does not support it or if growing the number is arbitrary limited.
* This function requires priviledged access to the hypervisor.
*
* Returns 0 in case of success, -1 in case of failure.
*/
int
virDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
{
int i;
virConnectPtr conn;
if (domain == NULL) {
TODO
return (-1);
}
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
if (nvcpus < 1) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
conn = domain->conn;
/*
* Go though the driver registered entry points but use the
* XEN_HYPERVISOR directly only as a last mechanism
*/
for (i = 0;i < conn->nb_drivers;i++) {
if ((conn->drivers[i] != NULL) &&
(conn->drivers[i]->no != VIR_DRV_XEN_HYPERVISOR) &&
(conn->drivers[i]->domainSetVcpus != NULL)) {
if (conn->drivers[i]->domainSetVcpus(domain, nvcpus) == 0)
return(0);
}
}
for (i = 0;i < conn->nb_drivers;i++) {
if ((conn->drivers[i] != NULL) &&
(conn->drivers[i]->no == VIR_DRV_XEN_HYPERVISOR) &&
(conn->drivers[i]->domainSetVcpus != NULL)) {
if (conn->drivers[i]->domainSetVcpus(domain, nvcpus) == 0)
return(0);
}
}
virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__);
return (-1);
}
/**
* virDomainPinVcpu:
* @domain: pointer to domain object, or NULL for Domain0
* @vcpu: virtual CPU number
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes) (IN)
* Each bit set to 1 means that corresponding CPU is usable.
* Bytes are stored in little-endian order: CPU0-7, 8-15...
* In each byte, lowest CPU number is least significant bit.
* @maplen: number of bytes in cpumap, from 1 up to size of CPU map in
* underlying virtualization system (Xen...).
* If maplen < size, missing bytes are set to zero.
* If maplen > size, failure code is returned.
*
* Dynamically change the real CPUs which can be allocated to a virtual CPU.
* This function requires priviledged access to the hypervisor.
*
* Returns 0 in case of success, -1 in case of failure.
*/
int
virDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
unsigned char *cpumap, int maplen)
{
int i;
virConnectPtr conn;
if (domain == NULL) {
TODO
return (-1);
}
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
virLibDomainError(domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
if ((vcpu > 32000) || (cpumap == NULL) || (maplen < 1)) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
conn = domain->conn;
/*
* Go though the driver registered entry points
*/
for (i = 0;i < conn->nb_drivers;i++) {
if ((conn->drivers[i] != NULL) &&
(conn->drivers[i]->domainPinVcpu != NULL)) {
if (conn->drivers[i]->domainPinVcpu(domain, vcpu,
cpumap, maplen) == 0)
return(0);
}
}
virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__);
return (-1);
}
/**
* virDomainGetVcpus:
* @domain: pointer to domain object, or NULL for Domain0
* @info: pointer to an array of virVcpuInfo structures (OUT)
* @maxinfo: number of structures in info array
* @cpumaps: pointer to an bit map of real CPUs for all vcpus of this
* domain (in 8-bit bytes) (OUT)
* If cpumaps is NULL, then no cupmap information is returned by the API.
* It's assumed there is <maxinfo> cpumap in cpumaps array.
* The memory allocated to cpumaps must be (maxinfo * maplen) bytes
* (ie: calloc(maxinfo, maplen)).
* One cpumap inside cpumaps has the format described in
* virDomainPinVcpu() API.
* @maplen: number of bytes in one cpumap, from 1 up to size of CPU map in
* underlying virtualization system (Xen...).
*
* Extract information about virtual CPUs of domain, store it in info array
* and also in cpumaps if this pointer is'nt NULL.
*
* Returns the number of info filled in case of success, -1 in case of failure.
*/
int
virDomainGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
unsigned char *cpumaps, int maplen)
{
int ret;
int i;
virConnectPtr conn;
if (domain == NULL) {
TODO
return (-1);
}
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
virLibDomainError(domain, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (-1);
}
if ((info == NULL) || (maxinfo < 1)) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
if (cpumaps != NULL && maplen < 1) {
virLibDomainError(domain, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
conn = domain->conn;
/*
* Go though the driver registered entry points
*/
for (i = 0;i < conn->nb_drivers;i++) {
if ((conn->drivers[i] != NULL) &&
(conn->drivers[i]->domainGetVcpus != NULL)) {
ret = conn->drivers[i]->domainGetVcpus(domain, info, maxinfo,
cpumaps, maplen);
if (ret >= 0)
return(ret);
}
}
virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__);
return (-1);
}

View File

@ -47,5 +47,9 @@
virConnResetLastError;
virDefaultErrorFunc;
virNodeGetInfo;
virDomainSetVcpus;
virDomainPinVcpu;
virDomainGetVcpus;
local: *;
};

978
src/proxy_internal.c Normal file
View File

@ -0,0 +1,978 @@
/*
* proxy_client.c: client side of the communication with the libvirt proxy.
*
* Copyright (C) 2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Daniel Veillard <veillard@redhat.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/wait.h>
#include "internal.h"
#include "driver.h"
#include "proxy_internal.h"
#define STANDALONE
static int debug = 0;
static int xenProxyClose(virConnectPtr conn);
static int xenProxyOpen(virConnectPtr conn, const char *name, int flags);
static int xenProxyGetVersion(virConnectPtr conn, unsigned long *hvVer);
static int xenProxyNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info);
static int xenProxyListDomains(virConnectPtr conn, int *ids, int maxids);
static int xenProxyNumOfDomains(virConnectPtr conn);
static virDomainPtr xenProxyLookupByID(virConnectPtr conn, int id);
static virDomainPtr xenProxyLookupByUUID(virConnectPtr conn,
const unsigned char *uuid);
static virDomainPtr xenProxyDomainLookupByName(virConnectPtr conn,
const char *domname);
static unsigned long xenProxyDomainGetMaxMemory(virDomainPtr domain);
static int xenProxyDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info);
static char *xenProxyDomainDumpXML(virDomainPtr domain, int flags);
static virDriver xenProxyDriver = {
VIR_DRV_XEN_PROXY,
"XenProxy",
0,
NULL, /* init */
xenProxyOpen, /* open */
xenProxyClose, /* close */
NULL, /* type */
xenProxyGetVersion, /* version */
xenProxyNodeGetInfo, /* nodeGetInfo */
xenProxyListDomains, /* listDomains */
xenProxyNumOfDomains, /* numOfDomains */
NULL, /* domainCreateLinux */
xenProxyLookupByID, /* domainLookupByID */
xenProxyLookupByUUID, /* domainLookupByUUID */
xenProxyDomainLookupByName, /* domainLookupByName */
NULL, /* domainSuspend */
NULL, /* domainResume */
NULL, /* domainShutdown */
NULL, /* domainReboot */
NULL, /* domainDestroy */
NULL, /* domainFree */
NULL, /* domainGetName */
NULL, /* domainGetID */
NULL, /* domainGetUUID */
NULL, /* domainGetOSType */
xenProxyDomainGetMaxMemory, /* domainGetMaxMemory */
NULL, /* domainSetMaxMemory */
NULL, /* domainSetMemory */
xenProxyDomainGetInfo, /* domainGetInfo */
NULL, /* domainSave */
NULL, /* domainRestore */
NULL, /* domainSetVcpus */
NULL, /* domainPinVcpu */
NULL, /* domainGetVcpus */
xenProxyDomainDumpXML, /* domainDumpXML */
};
/**
* xenProxyRegister:
*
* Registers the xenHypervisor driver
*/
void xenProxyRegister(void)
{
virRegisterDriver(&xenProxyDriver);
}
/************************************************************************
* *
* Error handling *
* *
************************************************************************/
/**
* virProxyError:
* @conn: the connection if available
* @error: the error noumber
* @info: extra information string
*
* Handle an error at the xend daemon interface
*/
static void
virProxyError(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_PROXY, error, VIR_ERR_ERROR,
errmsg, info, NULL, 0, 0, errmsg, info);
}
/************************************************************************
* *
* Automatic startup of the proxy server if it is not running *
* *
************************************************************************/
/**
* virProxyFindServerPath:
*
* Tries to find the path to the gam_server binary.
*
* Returns path on success or NULL in case of error.
*/
static const char *
virProxyFindServerPath(void)
{
static const char *serverPaths[] = {
BINDIR "/libvirt_proxy",
"/usr/bin/libvirt_proxy_dbg",
NULL
};
int i;
const char *debugProxy = getenv("LIBVIRT_DEBUG_PROXY");
if (debugProxy)
return(debugProxy);
for (i = 0; serverPaths[i]; i++) {
if (access(serverPaths[i], X_OK | R_OK) == 0) {
return serverPaths[i];
}
}
return NULL;
}
/**
* virProxyForkServer:
*
* Forks and try to launch the proxy server processing the requests for
* libvirt when communicating with Xen.
*
* Returns 0 in case of success or -1 in case of detected error.
*/
static int
virProxyForkServer(void)
{
const char *proxyPath = virProxyFindServerPath();
int ret, pid, status;
if (!proxyPath) {
fprintf(stderr, "failed to find libvirt_proxy\n");
return(-1);
}
if (debug)
fprintf(stderr, "Asking to launch %s\n", proxyPath);
/* Become a daemon */
pid = fork();
if (pid == 0) {
long open_max;
long i;
/* don't hold open fd opened from the client of the library */
open_max = sysconf (_SC_OPEN_MAX);
for (i = 0; i < open_max; i++)
fcntl (i, F_SETFD, FD_CLOEXEC);
setsid();
if (fork() == 0) {
execl(proxyPath, proxyPath, NULL);
fprintf(stderr, "failed to exec %s\n", proxyPath);
}
/*
* calling exit() generate troubles for termination handlers
*/
_exit(0);
}
/*
* do a waitpid on the intermediate process to avoid zombies.
*/
retry_wait:
ret = waitpid(pid, &status, 0);
if (ret < 0) {
if (errno == EINTR)
goto retry_wait;
}
return (0);
}
/************************************************************************
* *
* Processing of client sockets *
* *
************************************************************************/
/**
* virProxyOpenClientSocket:
* @path: the fileame for the socket
*
* try to connect to the socket open by libvirt_proxy
*
* Returns the associated file descriptor or -1 in case of failure
*/
static int
virProxyOpenClientSocket(const char *path) {
int fd;
struct sockaddr_un addr;
int trials = 0;
retry:
fd = socket(PF_UNIX, SOCK_STREAM, 0);
if (fd < 0) {
return(-1);
}
/*
* Abstract socket do not hit the filesystem, way more secure and
* garanteed to be atomic
*/
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
addr.sun_path[0] = '\0';
strncpy(&addr.sun_path[1], path, (sizeof(addr) - 4) - 2);
/*
* now bind the socket to that address and listen on it
*/
if (connect(fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
close(fd);
if (trials < 3) {
if (virProxyForkServer() < 0)
return(-1);
trials++;
usleep(5000 * trials * trials);
goto retry;
}
return (-1);
}
if (debug > 0)
fprintf(stderr, "connected to unix socket %s via %d\n", path, fd);
return (fd);
}
/**
* virProxyCloseClientSocket:
* @fd: the file descriptor for the socket
*
* Close the socket from that client
*
* Returns 0 in case of success and -1 in case of error
*/
static int
virProxyCloseClientSocket(int fd) {
int ret;
if (fd < 0)
return(-1);
ret = close(fd);
if (ret != 0)
fprintf(stderr, "Failed to close socket %d\n", fd);
else if (debug > 0)
fprintf(stderr, "Closed socket %d\n", fd);
return(ret);
}
/**
* virProxyReadClientSocket:
* @fd: the socket
* @buffer: the target memory area
* @len: the lenght in bytes
* @quiet: quiet access
*
* Process a read from a client socket
*
* Returns the number of byte read or -1 in case of error.
*/
static int
virProxyReadClientSocket(int fd, char *buffer, int len, int quiet) {
int ret;
if ((fd < 0) || (buffer == NULL) || (len < 0))
return(-1);
retry:
ret = read(fd, buffer, len);
if (ret < 0) {
if (errno == EINTR) {
if (debug > 0)
fprintf(stderr, "read socket %d interrupted\n", fd);
goto retry;
}
if (!quiet)
fprintf(stderr, "Failed to read socket %d\n", fd);
return(-1);
}
if (debug)
fprintf(stderr, "read %d bytes from socket %d\n",
ret, fd);
return(ret);
}
/**
* virProxyWriteClientSocket:
* @fd: the socket
* @data: the data
* @len: the lenght of data in bytes
*
* Process a read from a client socket
*/
static int
virProxyWriteClientSocket(int fd, const char *data, int len) {
int ret;
if ((fd < 0) || (data == NULL) || (len < 0))
return(-1);
retry:
ret = write(fd, data, len);
if (ret < 0) {
if (errno == EINTR) {
if (debug > 0)
fprintf(stderr, "write socket %d, %d bytes interrupted\n",
fd, len);
goto retry;
}
fprintf(stderr, "Failed to write to socket %d\n", fd);
return(-1);
}
if (debug)
fprintf(stderr, "wrote %d bytes to socket %d\n",
len, fd);
return(0);
}
/************************************************************************
* *
* Proxy commands processing *
* *
************************************************************************/
/**
* xenProxyClose:
* @conn: pointer to the hypervisor connection
*
* Shutdown the Xen proxy communication layer
*/
static int
xenProxyClose(virConnectPtr conn) {
if ((conn == NULL) || (conn->proxy < 0))
return(-1);
virProxyCloseClientSocket(conn->proxy);
conn->proxy = -1;
return (0);
}
static int
xenProxyCommand(virConnectPtr conn, virProxyPacketPtr request,
virProxyFullPacketPtr answer, int quiet) {
static int serial = 0;
int ret;
virProxyPacketPtr res = NULL;
if ((conn == NULL) || (conn->proxy < 0))
return(-1);
/*
* normal communication serial numbers are in 0..4095
*/
++serial;
if (serial >= 4096)
serial = 0;
request->version = PROXY_PROTO_VERSION;
request->serial = serial;
ret = virProxyWriteClientSocket(conn->proxy, (const char *) request,
request->len);
if (ret < 0)
return(-1);
retry:
if (answer == NULL) {
/* read in situ */
ret = virProxyReadClientSocket(conn->proxy, (char *) request,
sizeof(virProxyPacket), quiet);
if (ret < 0)
return(-1);
if (ret != sizeof(virProxyPacket)) {
fprintf(stderr,
"Communication error with proxy: got %d bytes of %d\n",
ret, (int) sizeof(virProxyPacket));
xenProxyClose(conn);
return(-1);
}
res = request;
if (res->len != sizeof(virProxyPacket)) {
fprintf(stderr,
"Communication error with proxy: expected %d bytes got %d\n",
(int) sizeof(virProxyPacket), res->len);
xenProxyClose(conn);
return(-1);
}
} else {
/* read in packet provided */
ret = virProxyReadClientSocket(conn->proxy, (char *) answer,
sizeof(virProxyPacket), quiet);
if (ret < 0)
return(-1);
if (ret != sizeof(virProxyPacket)) {
fprintf(stderr,
"Communication error with proxy: got %d bytes of %d\n",
ret, (int) sizeof(virProxyPacket));
xenProxyClose(conn);
return(-1);
}
res = (virProxyPacketPtr) answer;
if ((res->len < sizeof(virProxyPacket)) ||
(res->len > sizeof(virProxyFullPacket))) {
fprintf(stderr,
"Communication error with proxy: got %d bytes packet\n",
res->len);
xenProxyClose(conn);
return(-1);
}
if (res->len > sizeof(virProxyPacket)) {
ret = virProxyReadClientSocket(conn->proxy,
(char *) &(answer->extra.arg[0]),
res->len - ret, quiet);
if (ret != (int) (res->len - sizeof(virProxyPacket))) {
fprintf(stderr,
"Communication error with proxy: got %d bytes of %d\n",
ret, (int) sizeof(virProxyPacket));
xenProxyClose(conn);
return(-1);
}
}
}
/*
* do more checks on the incoming packet.
*/
if ((res == NULL) || (res->version != PROXY_PROTO_VERSION) ||
(res->len < sizeof(virProxyPacket))) {
fprintf(stderr,
"Communication error with proxy: malformed packet\n");
xenProxyClose(conn);
return(-1);
}
if (res->serial != serial) {
TODO /* Asynchronous communication */
fprintf(stderr, "gor asynchronous packet number %d\n", res->serial);
goto retry;
}
return(0);
}
/**
* xenProxyOpen:
* @conn: pointer to the hypervisor connection
* @name: URL for the target, NULL for local
* @flags: combination of virDrvOpenFlag(s)
*
* Try to initialize the Xen proxy communication layer
* This can be opened only for a read-only kind of access
*
* Returns 0 in case of success, and -1 in case of failure
*/
int
xenProxyOpen(virConnectPtr conn, const char *name, int flags)
{
virProxyPacket req;
int ret;
int fd;
if ((name != NULL) && (strcasecmp(name, "xen")))
return(-1);
if (!(flags & VIR_DRV_OPEN_RO))
return(-1);
conn->proxy = -1;
fd = virProxyOpenClientSocket(PROXY_SOCKET_PATH);
if (fd < 0) {
if (!(flags & VIR_DRV_OPEN_QUIET))
virProxyError(conn, VIR_ERR_NO_XEN, PROXY_SOCKET_PATH);
return(-1);
}
conn->proxy = fd;
memset(&req, 0, sizeof(req));
req.command = VIR_PROXY_NONE;
req.len = sizeof(req);
ret = xenProxyCommand(conn, &req, NULL, 1);
if ((ret < 0) || (req.command != VIR_PROXY_NONE)) {
if (!(flags & VIR_DRV_OPEN_QUIET))
virProxyError(conn, VIR_ERR_OPERATION_FAILED, __FUNCTION__);
xenProxyClose(conn);
return(-1);
}
return(0);
}
/************************************************************************
* *
* Driver entry points *
* *
************************************************************************/
/**
* xenProxyGetVersion:
* @conn: pointer to the Xen Daemon block
* @hvVer: return value for the version of the running hypervisor (OUT)
*
* Get the version level of the Hypervisor running.
*
* Returns -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
*/
static int
xenProxyGetVersion(virConnectPtr conn, unsigned long *hvVer)
{
virProxyPacket req;
int ret;
if (!VIR_IS_CONNECT(conn)) {
virProxyError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (-1);
}
if (hvVer == NULL) {
virProxyError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
memset(&req, 0, sizeof(req));
req.command = VIR_PROXY_VERSION;
req.len = sizeof(req);
ret = xenProxyCommand(conn, &req, NULL, 0);
if (ret < 0) {
xenProxyClose(conn);
return(-1);
}
*hvVer = req.data.larg;
return(0);
}
/**
* xenProxyListDomains:
* @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
*/
static int
xenProxyListDomains(virConnectPtr conn, int *ids, int maxids)
{
virProxyPacket req;
virProxyFullPacket ans;
int ret;
int nb;
if (!VIR_IS_CONNECT(conn)) {
virProxyError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (-1);
}
if ((ids == NULL) || (maxids <= 0)) {
virProxyError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
memset(&req, 0, sizeof(req));
req.command = VIR_PROXY_LIST;
req.len = sizeof(req);
ret = xenProxyCommand(conn, &req, &ans, 0);
if (ret < 0) {
xenProxyClose(conn);
return(-1);
}
nb = ans.data.arg;
if ((nb > 1020) || (nb <= 0) ||
(ans.len <= sizeof(virProxyPacket)) ||
(ans.len > sizeof(virProxyFullPacket))) {
virProxyError(conn, VIR_ERR_OPERATION_FAILED, __FUNCTION__);
return(-1);
}
if (nb > maxids)
nb = maxids;
memmove(ids, &ans.extra.arg[0], nb * sizeof(int));
return(nb);
}
/**
* xenProxyNumOfDomains:
* @conn: pointer to the hypervisor connection
*
* Provides the number of active domains.
*
* Returns the number of domain found or -1 in case of error
*/
static int
xenProxyNumOfDomains(virConnectPtr conn)
{
virProxyPacket req;
int ret;
if (!VIR_IS_CONNECT(conn)) {
virProxyError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (-1);
}
memset(&req, 0, sizeof(req));
req.command = VIR_PROXY_NUM_DOMAIN;
req.len = sizeof(req);
ret = xenProxyCommand(conn, &req, NULL, 0);
if (ret < 0) {
xenProxyClose(conn);
return(-1);
}
return(req.data.arg);
}
/**
* xenProxyDomainGetDomMaxMemory:
* @conn: pointer to the hypervisor connection
* @id: the domain ID number
*
* Ask the Xen Daemon for the maximum memory allowed for a domain
*
* Returns the memory size in kilobytes or 0 in case of error.
*/
static unsigned long
xenProxyDomainGetDomMaxMemory(virConnectPtr conn, int id)
{
virProxyPacket req;
int ret;
if (!VIR_IS_CONNECT(conn)) {
virProxyError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (-1);
}
memset(&req, 0, sizeof(req));
req.command = VIR_PROXY_MAX_MEMORY;
req.data.arg = id;
req.len = sizeof(req);
ret = xenProxyCommand(conn, &req, NULL, 0);
if (ret < 0) {
xenProxyClose(conn);
return(-1);
}
return(req.data.larg);
}
/**
* xenProxyDomainGetMaxMemory:
* @domain: pointer to the domain block
*
* Ask the Xen Daemon for the maximum memory allowed for a domain
*
* Returns the memory size in kilobytes or 0 in case of error.
*/
static unsigned long
xenProxyDomainGetMaxMemory(virDomainPtr domain)
{
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
if (domain == NULL)
virProxyError(NULL, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
else
virProxyError(domain->conn, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (0);
}
return(xenProxyDomainGetDomMaxMemory(domain->conn, domain->handle));
}
/**
* xenProxyDomainGetInfo:
* @domain: a domain object
* @info: pointer to a virDomainInfo structure allocated by the user
*
* This method looks up information about a domain and update the
* information block provided.
*
* Returns 0 in case of success, -1 in case of error
*/
static int
xenProxyDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
{
virProxyPacket req;
virProxyFullPacket ans;
int ret;
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
if (domain == NULL)
virProxyError(NULL, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
else
virProxyError(domain->conn, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (0);
}
if (info == NULL) {
virProxyError(domain->conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
memset(&req, 0, sizeof(req));
req.command = VIR_PROXY_DOMAIN_INFO;
req.data.arg = domain->handle;
req.len = sizeof(req);
ret = xenProxyCommand(domain->conn, &req, &ans, 0);
if (ret < 0) {
xenProxyClose(domain->conn);
return(-1);
}
if (ans.len != sizeof(virProxyPacket) + sizeof(virDomainInfo)) {
virProxyError(domain->conn, VIR_ERR_OPERATION_FAILED, __FUNCTION__);
return (-1);
}
memmove(info, &ans.extra.dinfo, sizeof(virDomainInfo));
return(0);
}
/**
* xenProxyLookupByID:
* @conn: pointer to the hypervisor connection
* @id: the domain ID number
*
* Try to find a domain based on the hypervisor ID number
*
* Returns a new domain object or NULL in case of failure
*/
static virDomainPtr
xenProxyLookupByID(virConnectPtr conn, int id)
{
virProxyPacket req;
virProxyFullPacket ans;
unsigned char uuid[16];
const char *name;
int ret;
virDomainPtr res;
if (!VIR_IS_CONNECT(conn)) {
virProxyError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (NULL);
}
if (id < 0) {
virProxyError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
memset(&req, 0, sizeof(req));
req.command = VIR_PROXY_LOOKUP_ID;
req.data.arg = id;
req.len = sizeof(req);
ret = xenProxyCommand(conn, &req, &ans, 0);
if (ret < 0) {
xenProxyClose(conn);
return(NULL);
}
if (ans.data.arg == -1) {
return(NULL);
}
memcpy(uuid, &ans.extra.str[0], 16);
name = &ans.extra.str[16];
res = virGetDomain(conn, name, uuid);
if (res == NULL)
virProxyError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
else
res->handle = id;
return(res);
}
/**
* xenProxyLookupByUUID:
* @conn: pointer to the hypervisor connection
* @uuid: the raw UUID for the domain
*
* Try to lookup a domain on xend based on its UUID.
*
* Returns a new domain object or NULL in case of failure
*/
static virDomainPtr
xenProxyLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
{
virProxyFullPacket req;
const char *name;
int ret;
virDomainPtr res;
if (!VIR_IS_CONNECT(conn)) {
virProxyError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (NULL);
}
if (uuid == NULL) {
virProxyError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
memset(&req, 0, sizeof(virProxyPacket));
req.command = VIR_PROXY_LOOKUP_UUID;
req.len = sizeof(virProxyPacket) + 16;
ret = xenProxyCommand(conn, (virProxyPacketPtr) &req, &req, 0);
if (ret < 0) {
xenProxyClose(conn);
return(NULL);
}
if (req.data.arg == -1) {
return(NULL);
}
name = &req.extra.str[0];
res = virGetDomain(conn, name, uuid);
if (res == NULL)
virProxyError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
else
res->handle = req.data.arg;
return(res);
}
/**
* xenProxyDomainLookupByName:
* @conn: A xend instance
* @name: The name of the domain
*
* This method looks up information about a domain based on its name
*
* Returns a new domain object or NULL in case of failure
*/
static virDomainPtr
xenProxyDomainLookupByName(virConnectPtr conn, const char *name)
{
virProxyFullPacket req;
int ret, len;
virDomainPtr res;
if (!VIR_IS_CONNECT(conn)) {
virProxyError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (NULL);
}
if (name == NULL) {
virProxyError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
len = strlen(name);
if (len > 1000) {
virProxyError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
memset(&req, 0, sizeof(virProxyPacket));
req.command = VIR_PROXY_LOOKUP_NAME;
req.len = sizeof(virProxyPacket) + len + 1;
strcpy(&req.extra.str[0], name);
ret = xenProxyCommand(conn, (virProxyPacketPtr) &req, &req, 0);
if (ret < 0) {
xenProxyClose(conn);
return(NULL);
}
if (req.data.arg == -1) {
return(NULL);
}
res = virGetDomain(conn, name, (const unsigned char *)&req.extra.str[0]);
if (res == NULL)
virProxyError(conn, VIR_ERR_NO_MEMORY, "Allocating domain");
else
res->handle = req.data.arg;
return(res);
}
/**
* xenProxyNodeGetInfo:
* @conn: pointer to the Xen Daemon block
* @info: pointer to a virNodeInfo structure allocated by the user
*
* Extract hardware information about the node.
*
* Returns 0 in case of success and -1 in case of failure.
*/
static int
xenProxyNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) {
virProxyPacket req;
virProxyFullPacket ans;
int ret;
if (!VIR_IS_CONNECT(conn)) {
virProxyError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (-1);
}
if (info == NULL) {
virProxyError(conn, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (-1);
}
memset(&req, 0, sizeof(req));
req.command = VIR_PROXY_NODE_INFO;
req.data.arg = 0;
req.len = sizeof(req);
ret = xenProxyCommand(conn, &req, &ans, 0);
if (ret < 0) {
xenProxyClose(conn);
return(-1);
}
if (ans.data.arg == -1) {
return(-1);
}
if (ans.len != sizeof(virProxyPacket) + sizeof(virNodeInfo)) {
return(-1);
}
memcpy(info, &ans.extra.ninfo, sizeof(virNodeInfo));
return(0);
}
/**
* xenProxyDomainDumpXML:
* @domain: a domain object
* @flags: xml generation flags
*
* This method generates an XML description of a domain.
*
* Returns the XML document on success, NULL otherwise.
*/
static char *
xenProxyDomainDumpXML(virDomainPtr domain, int flags ATTRIBUTE_UNUSED)
{
virProxyPacket req;
virProxyFullPacket ans;
int ret;
int xmllen;
char *xml;
if (!VIR_IS_CONNECTED_DOMAIN(domain)) {
if (domain == NULL)
virProxyError(NULL, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
else
virProxyError(domain->conn, VIR_ERR_INVALID_DOMAIN, __FUNCTION__);
return (NULL);
}
memset(&req, 0, sizeof(req));
req.command = VIR_PROXY_DOMAIN_XML;
req.data.arg = domain->handle;
req.len = sizeof(req);
ret = xenProxyCommand(domain->conn, &req, &ans, 0);
if (ret < 0) {
xenProxyClose(domain->conn);
return(NULL);
}
if (ans.len <= sizeof(virProxyPacket)) {
virProxyError(domain->conn, VIR_ERR_OPERATION_FAILED, __FUNCTION__);
return (NULL);
}
xmllen = ans.len - sizeof(virProxyPacket);
if (!(xml = malloc(xmllen+1))) {
return NULL;
}
memmove(xml, &ans.extra.dinfo, xmllen);
xml[xmllen] = '\0';
return(xml);
}

94
src/proxy_internal.h Normal file
View File

@ -0,0 +1,94 @@
/*
* proxy.h: common definitions for proxy usage
*
* Copyright (C) 2006 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
* Daniel Veillard <veillard@redhat.com>
*/
#ifndef __LIBVIR_PROXY_H__
#define __LIBVIR_PROXY_H__
#include <libvirt/libvirt.h>
#ifdef __cplusplus
extern "C" {
#endif
#define PROXY_SOCKET_PATH "/tmp/livirt_proxy_conn"
#define PROXY_PROTO_VERSION 1
/*
* the command allowed though the proxy
*/
typedef enum {
VIR_PROXY_NONE = 0,
VIR_PROXY_VERSION = 1,
VIR_PROXY_NODE_INFO = 2,
VIR_PROXY_LIST = 3,
VIR_PROXY_NUM_DOMAIN = 4,
VIR_PROXY_LOOKUP_ID = 5,
VIR_PROXY_LOOKUP_UUID = 6,
VIR_PROXY_LOOKUP_NAME = 7,
VIR_PROXY_MAX_MEMORY = 8,
VIR_PROXY_DOMAIN_INFO = 9,
VIR_PROXY_DOMAIN_XML = 10,
} virProxyCommand;
/*
* structure used by the client to make a request to the proxy
* and by the proxy when answering the client.
* the size may not be fixed, it's passed as len.
*/
struct _virProxyPacket {
unsigned short version; /* version of the proxy protocol */
unsigned short command; /* command number a virProxyCommand */
unsigned short serial; /* command serial number */
unsigned short len; /* the length of the request */
union {
char string[8]; /* string data */
int arg; /* or int argument */
long larg; /* or long argument */
} data;
};
typedef struct _virProxyPacket virProxyPacket;
typedef virProxyPacket *virProxyPacketPtr;
/*
* If there is extra data sent from the proxy to the client,
* they are appended after the packet.
* the size may not be fixed, it's passed as len and includes the
* extra data.
*/
struct _virProxyFullPacket {
unsigned short version; /* version of the proxy protocol */
unsigned short command; /* command number a virProxyCommand */
unsigned short serial; /* command serial number */
unsigned short len; /* the length of the request */
union {
char string[8]; /* string data */
int arg; /* or int argument */
long larg; /* or long argument */
} data;
/* that should be aligned on a 16bytes boundary */
union {
char str[4080]; /* extra char array */
int arg[1020]; /* extra int array */
virDomainInfo dinfo; /* domain information */
virNodeInfo ninfo; /* node information */
} extra;
};
typedef struct _virProxyFullPacket virProxyFullPacket;
typedef virProxyFullPacket *virProxyFullPacketPtr;
/*
* Functions callable from libvirt library
*/
void xenProxyRegister(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __LIBVIR_PROXY_H__ */

View File

@ -11,10 +11,16 @@
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <libxml/uri.h>
#include <fcntl.h>
#include <unistd.h>
#include "internal.h"
#include "test.h"
#include "xml.h"
static virDriver testDriver = {
VIR_DRV_TEST,
@ -28,7 +34,7 @@ static virDriver testDriver = {
testNodeGetInfo, /* nodeGetInfo */
testListDomains, /* listDomains */
testNumOfDomains, /* numOfDomains */
NULL, /* domainCreateLinux */
testDomainCreateLinux, /* domainCreateLinux */
testLookupDomainByID, /* domainLookupByID */
testLookupDomainByUUID, /* domainLookupByUUID */
testLookupDomainByName, /* domainLookupByName */
@ -42,12 +48,16 @@ static virDriver testDriver = {
NULL, /* domainGetID */
NULL, /* domainGetUUID */
NULL, /* domainGetOSType */
NULL, /* domainGetMaxMemory */
testGetMaxMemory, /* domainGetMaxMemory */
testSetMaxMemory, /* domainSetMaxMemory */
NULL, /* domainSetMemory */
testSetMemory, /* domainSetMemory */
testGetDomainInfo, /* domainGetInfo */
NULL, /* domainSave */
NULL /* domainRestore */
NULL, /* domainRestore */
testSetVcpus, /* domainSetVcpus */
NULL, /* domainPinVcpu */
NULL, /* domainGetVcpus */
testDomainDumpXML, /* domainDumpXML */
};
/* Amount of time it takes to shutdown */
@ -67,7 +77,10 @@ typedef struct _testDom {
virDomainKernel kernel;
virDomainInfo info;
time_t shutdownStartedAt;
virDomainRestart onRestart;
virDomainRestart onRestart; /* What to do at end of current shutdown procedure */
virDomainRestart onReboot;
virDomainRestart onPoweroff;
virDomainRestart onCrash;
int numDevices;
testDev devices[MAX_DEVICES];
} testDom;
@ -76,6 +89,7 @@ typedef struct _testDom {
typedef struct _testCon {
int active;
virNodeInfo nodeInfo;
int numDomains;
testDom domains[MAX_DOMAINS];
} testCon;
@ -94,8 +108,8 @@ typedef struct _testNode {
too probably */
static testNode *node = NULL;
static virNodeInfo nodeInfo = {
"i86",
static const virNodeInfo defaultNodeInfo = {
"i686",
1024*1024*3, /* 3 GB */
16,
1400,
@ -121,6 +135,33 @@ testError(virConnectPtr con,
errmsg, info, NULL, 0, 0, errmsg, info, 0);
}
static int testRestartStringToFlag(const char *str) {
if (!strcmp(str, "restart")) {
return VIR_DOMAIN_RESTART;
} else if (!strcmp(str, "destroy")) {
return VIR_DOMAIN_DESTROY;
} else if (!strcmp(str, "preserve")) {
return VIR_DOMAIN_PRESERVE;
} else if (!strcmp(str, "rename-restart")) {
return VIR_DOMAIN_RENAME_RESTART;
} else {
return 0;
}
}
static const char *testRestartFlagToString(int flag) {
switch (flag) {
case VIR_DOMAIN_RESTART:
return "restart";
case VIR_DOMAIN_DESTROY:
return "destroy";
case VIR_DOMAIN_PRESERVE:
return "preserve";
case VIR_DOMAIN_RENAME_RESTART:
return "rename-restart";
}
return NULL;
}
/**
* testRegister:
@ -132,13 +173,452 @@ void testRegister(void)
virRegisterDriver(&testDriver);
}
static int testLoadDomain(virConnectPtr conn,
int domid,
xmlDocPtr xml) {
xmlNodePtr root = NULL;
xmlXPathContextPtr ctxt = NULL;
xmlXPathObjectPtr obj = NULL;
char *name = NULL;
unsigned char rawuuid[16];
char *dst_uuid;
testCon *con;
struct timeval tv;
unsigned long memory;
int nrVirtCpu;
char *conv;
virDomainRestart onReboot = VIR_DOMAIN_RESTART;
virDomainRestart onPoweroff = VIR_DOMAIN_DESTROY;
virDomainRestart onCrash = VIR_DOMAIN_RENAME_RESTART;
if (gettimeofday(&tv, NULL) < 0) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
return -1;
}
root = xmlDocGetRootElement(xml);
if ((root == NULL) || (!xmlStrEqual(root->name, BAD_CAST "domain"))) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed root element");
goto error;
}
ctxt = xmlXPathNewContext(xml);
if (ctxt == NULL) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "cannot create xpath context");
goto error;
}
obj = xmlXPathEval(BAD_CAST "string(/domain/name[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "missing name element on domain");
goto error;
}
name = strdup((const char *)obj->stringval);
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "string(/domain/uuid[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "missing uuid element on domain");
goto error;
}
dst_uuid = (char *) &rawuuid[0];
if (!(virParseUUID((char **)&dst_uuid, (const char *)obj->stringval))) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed uuid data in domain");
goto error;
}
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "string(/domain/memory[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "missing memory element on domain");
goto error;
}
memory = strtoll((const char*)obj->stringval, &conv, 10);
if (conv == (const char*)obj->stringval) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed memory value for domain");
goto error;
}
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "string(/domain/vcpu[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
nrVirtCpu = 1;
} else {
nrVirtCpu = strtoll((const char*)obj->stringval, &conv, 10);
if (conv == (const char*)obj->stringval) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed vcpus value for domain");
goto error;
}
}
if (obj)
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "string(/domain/on_reboot[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
if (!(onReboot = testRestartStringToFlag((const char *)obj->stringval))) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed on_reboot value for domain");
goto error;
}
}
if (obj)
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "string(/domain/on_poweroff[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
if (!(onReboot = testRestartStringToFlag((const char *)obj->stringval))) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed on_poweroff value for domain");
goto error;
}
}
if (obj)
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "string(/domain/on_crash[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
if (!(onReboot = testRestartStringToFlag((const char *)obj->stringval))) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed on_crash value for domain");
goto error;
}
}
if (obj)
xmlXPathFreeObject(obj);
con = &node->connections[conn->handle];
con->domains[domid].active = 1;
strncpy(con->domains[domid].name, name, sizeof(con->domains[domid].name));
free(name);
name = NULL;
memmove(con->domains[domid].uuid, rawuuid, 16);
con->domains[domid].info.maxMem = memory;
con->domains[domid].info.memory = memory;
con->domains[domid].info.state = VIR_DOMAIN_RUNNING;
con->domains[domid].info.nrVirtCpu = nrVirtCpu;
con->domains[domid].info.cpuTime = ((tv.tv_sec * 1000ll * 1000ll * 1000ll) + (tv.tv_usec * 1000ll));
con->domains[domid].onReboot = onReboot;
con->domains[domid].onPoweroff = onPoweroff;
con->domains[domid].onCrash = onCrash;
return 0;
error:
if (obj)
xmlXPathFreeObject(obj);
if (name)
free(name);
return -1;
}
static int testLoadDomainFromDoc(virConnectPtr conn,
int domid,
const char *doc) {
int ret;
xmlDocPtr xml;
if (!(xml = xmlReadDoc(BAD_CAST doc, "domain.xml", NULL,
XML_PARSE_NOENT | XML_PARSE_NONET |
XML_PARSE_NOERROR | XML_PARSE_NOWARNING))) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot parse domain definition");
return -1;
}
ret = testLoadDomain(conn, domid, xml);
xmlFreeDoc(xml);
return ret;
}
static int testLoadDomainFromFile(virConnectPtr conn,
int domid,
const char *file) {
int ret, fd;
xmlDocPtr xml;
if ((fd = open(file, O_RDONLY)) < 0) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot load domain definition");
return -1;
}
if (!(xml = xmlReadFd(fd, file, NULL,
XML_PARSE_NOENT | XML_PARSE_NONET |
XML_PARSE_NOERROR | XML_PARSE_NOWARNING))) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot parse domain definition");
close(fd);
return -1;
}
close(fd);
ret = testLoadDomain(conn, domid, xml);
xmlFreeDoc(xml);
return ret;
}
static int testOpenDefault(virConnectPtr conn,
int connid) {
int u;
struct timeval tv;
if (gettimeofday(&tv, NULL) < 0) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
return -1;
}
conn->handle = connid;
node->connections[connid].active = 1;
memmove(&node->connections[connid].nodeInfo, &defaultNodeInfo, sizeof(defaultNodeInfo));
node->connections[connid].numDomains = 1;
node->connections[connid].domains[0].active = 1;
strcpy(node->connections[connid].domains[0].name, "Domain-0");
for (u = 0 ; u < 16 ; u++) {
node->connections[connid].domains[0].uuid[u] = (u * 75)%255;
}
node->connections[connid].domains[0].info.maxMem = 8192 * 1024;
node->connections[connid].domains[0].info.memory = 2048 * 1024;
node->connections[connid].domains[0].info.state = VIR_DOMAIN_RUNNING;
node->connections[connid].domains[0].info.nrVirtCpu = 2;
node->connections[connid].domains[0].info.cpuTime = ((tv.tv_sec * 1000ll * 1000ll * 1000ll) + (tv.tv_usec * 1000ll));
return 0;
}
static char *testBuildFilename(const char *relativeTo,
const char *filename) {
char *offset;
int baseLen;
if (!filename || filename[0] == '\0')
return NULL;
if (filename[0] == '/')
return strdup(filename);
offset = rindex(relativeTo, '/');
if ((baseLen = (offset-relativeTo+1))) {
char *absFile = malloc(baseLen + strlen(filename) + 1);
strncpy(absFile, relativeTo, baseLen);
absFile[baseLen] = '\0';
strcat(absFile, filename);
return absFile;
} else {
return strdup(filename);
}
}
static int testOpenFromFile(virConnectPtr conn,
int connid,
const char *file) {
int fd, i;
xmlDocPtr xml;
xmlNodePtr root = NULL;
xmlXPathContextPtr ctxt = NULL;
xmlXPathObjectPtr obj = NULL;
virNodeInfoPtr nodeInfo;
if ((fd = open(file, O_RDONLY)) < 0) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot load host definition");
return -1;
}
if (!(xml = xmlReadFd(fd, file, NULL,
XML_PARSE_NOENT | XML_PARSE_NONET |
XML_PARSE_NOERROR | XML_PARSE_NOWARNING))) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot parse host definition");
goto error;
}
close(fd);
fd = -1;
root = xmlDocGetRootElement(xml);
if ((root == NULL) || (!xmlStrEqual(root->name, BAD_CAST "node"))) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "malformed root element");
goto error;
}
ctxt = xmlXPathNewContext(xml);
if (ctxt == NULL) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot create xpath context");
goto error;
}
conn->handle = connid;
node->connections[connid].active = 1;
node->connections[connid].numDomains = 0;
memmove(&node->connections[connid].nodeInfo, &defaultNodeInfo, sizeof(defaultNodeInfo));
nodeInfo = &node->connections[connid].nodeInfo;
obj = xmlXPathEval(BAD_CAST "string(/node/cpu/nodes[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
char *conv = NULL;
nodeInfo->nodes = strtol((const char*)obj->stringval, &conv, 10);
if (conv == (const char*)obj->stringval) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed nodes value for node cpu");
goto error;
}
xmlXPathFreeObject(obj);
}
obj = xmlXPathEval(BAD_CAST "string(/node/cpu/sockets[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
char *conv = NULL;
nodeInfo->sockets = strtol((const char*)obj->stringval, &conv, 10);
if (conv == (const char*)obj->stringval) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed sockets value for node cpu");
goto error;
}
xmlXPathFreeObject(obj);
}
obj = xmlXPathEval(BAD_CAST "string(/node/cpu/cores[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
char *conv = NULL;
nodeInfo->cores = strtol((const char*)obj->stringval, &conv, 10);
if (conv == (const char*)obj->stringval) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed cores value for node cpu");
goto error;
}
xmlXPathFreeObject(obj);
}
obj = xmlXPathEval(BAD_CAST "string(/node/cpu/threads[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
char *conv = NULL;
nodeInfo->threads = strtol((const char*)obj->stringval, &conv, 10);
if (conv == (const char*)obj->stringval) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed threads value for node cpu");
goto error;
}
xmlXPathFreeObject(obj);
}
nodeInfo->cpus = nodeInfo->cores * nodeInfo->threads * nodeInfo->sockets * nodeInfo->nodes;
obj = xmlXPathEval(BAD_CAST "string(/node/cpu/active[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
char *conv = NULL;
unsigned int active = strtol((const char*)obj->stringval, &conv, 10);
if (conv == (const char*)obj->stringval) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed active value for node cpu");
goto error;
}
if (active < nodeInfo->cpus) {
nodeInfo->cpus = active;
}
xmlXPathFreeObject(obj);
}
obj = xmlXPathEval(BAD_CAST "string(/node/cpu/mhz[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
char *conv = NULL;
nodeInfo->mhz = strtol((const char*)obj->stringval, &conv, 10);
if (conv == (const char*)obj->stringval) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed threads value for node cpu");
goto error;
}
xmlXPathFreeObject(obj);
}
obj = xmlXPathEval(BAD_CAST "string(/node/cpu/model[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
strncpy(nodeInfo->model, (const char *)obj->stringval, sizeof(nodeInfo->model)-1);
nodeInfo->model[sizeof(nodeInfo->model)-1] = '\0';
xmlXPathFreeObject(obj);
}
obj = xmlXPathEval(BAD_CAST "string(/node/memory[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
char *conv = NULL;
nodeInfo->memory = strtol((const char*)obj->stringval, &conv, 10);
if (conv == (const char*)obj->stringval) {
testError(conn, NULL, VIR_ERR_INTERNAL_ERROR, "malformed memory value for node");
goto error;
}
xmlXPathFreeObject(obj);
}
obj = xmlXPathEval(BAD_CAST "/node/domain", ctxt);
if ((obj == NULL) || (obj->type != XPATH_NODESET) ||
(obj->nodesetval == NULL)) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot extract domain list");
goto error;
}
for (i = 0 ; i < obj->nodesetval->nodeNr ; i++) {
xmlChar *domFile = xmlGetProp(obj->nodesetval->nodeTab[i], BAD_CAST "file");
char *absFile = testBuildFilename(file, (const char *)domFile);
free(domFile);
if (!absFile) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot resolve filename");
goto error;
}
if (testLoadDomainFromFile(conn, i, absFile) != 0) {
free(absFile);
goto error;
}
free(absFile);
node->connections[connid].numDomains++;
}
xmlXPathFreeObject(obj);
xmlFreeDoc(xml);
return 0;
error:
if (node->connections[connid].active) {
for (i = 0 ; i <node->connections[connid].numDomains ; i++) {
node->connections[connid].domains[i].active = 0;
}
node->connections[connid].numDomains = 0;
node->connections[connid].active = 0;
}
if (obj)
xmlXPathFreeObject(obj);
if (xml)
xmlFreeDoc(xml);
if (fd != -1)
close(fd);
return -1;
}
static int getNextConnection(void) {
int i;
if (node == NULL) {
node = calloc(1, sizeof(testNode));
if (!node) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot allocate memory");
return -1;
}
}
for (i = 0 ; i < MAX_CONNECTIONS ; i++) {
if (!node->connections[i].active) {
return i;
}
}
return -1;
}
int testOpen(virConnectPtr conn,
const char *name,
int flags)
{
xmlURIPtr uri;
int i, j;
int ret, connid;
if (!name) {
return -1;
@ -153,53 +633,29 @@ int testOpen(virConnectPtr conn,
if (!uri->scheme ||
strcmp(uri->scheme, "test") ||
!uri->path ||
strcmp(uri->path, "/default")) {
!uri->path) {
xmlFreeURI(uri);
return -1;
}
if ((connid = getNextConnection()) < 0) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "too many connections");
return -1;
}
if (!strcmp(uri->path, "/default")) {
ret = testOpenDefault(conn,
connid);
} else {
ret = testOpenFromFile(conn,
connid,
uri->path);
}
xmlFreeURI(uri);
if (node == NULL) {
node = calloc(1, sizeof(testNode));
if (!node) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot allocate memory");
return -1;
}
}
for (i = 0 ; i < MAX_CONNECTIONS ; i++) {
if (!node->connections[i].active) {
struct timeval tv;
if (gettimeofday(&tv, NULL) < 0) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
return -1;
}
conn->handle = i;
node->connections[i].active = 1;
node->connections[i].numDomains = 1;
node->connections[i].domains[0].active = 1;
strcpy(node->connections[i].domains[0].name, "Domain-0");
for (j = 0 ; j < 16 ; j++) {
node->connections[i].domains[0].uuid[j] = (j * 75)%255;
}
node->connections[i].domains[0].info.maxMem = 8192 * 1024;
node->connections[i].domains[0].info.memory = 2048 * 1024;
node->connections[i].domains[0].info.state = VIR_DOMAIN_RUNNING;
node->connections[i].domains[0].info.nrVirtCpu = 2;
node->connections[i].domains[0].info.cpuTime = ((tv.tv_sec * 1000ll * 1000ll * 1000ll) + (tv.tv_usec * 1000ll));
return 0;
}
}
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "too make connections");
return -1;
return (ret);
}
int testClose(virConnectPtr conn)
@ -211,17 +667,18 @@ int testClose(virConnectPtr conn)
return 0;
}
int testGetVersion(virConnectPtr conn,
int testGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED,
unsigned long *hvVer)
{
*hvVer = 1;
*hvVer = 2;
return 0;
}
int testNodeGetInfo(virConnectPtr conn,
virNodeInfoPtr info)
{
memcpy(info, &nodeInfo, sizeof(nodeInfo));
testCon *con = &node->connections[conn->handle];
memcpy(info, &con->nodeInfo, sizeof(virNodeInfo));
return 0;
}
@ -231,14 +688,58 @@ int testNumOfDomains(virConnectPtr conn)
return con->numDomains;
}
virDomainPtr
testDomainCreateLinux(virConnectPtr conn, const char *xmlDesc,
unsigned int flags ATTRIBUTE_UNUSED)
{
testCon *con;
int i;
virDomainPtr dom;
if (!VIR_IS_CONNECT(conn)) {
testError(conn, NULL, VIR_ERR_INVALID_CONN, __FUNCTION__);
return (NULL);
}
if (xmlDesc == NULL) {
testError(conn, NULL, VIR_ERR_INVALID_ARG, __FUNCTION__);
return (NULL);
}
if (conn->flags & VIR_CONNECT_RO) {
testError(conn, NULL, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (NULL);
}
con = &node->connections[conn->handle];
for (i = 0 ; i < MAX_DOMAINS ; i++) {
if (!con->domains[i].active) {
if (testLoadDomainFromDoc(conn, i, xmlDesc) < 0)
return NULL;
dom = virGetDomain(conn, con->domains[i].name, con->domains[i].uuid);
if (dom == NULL) {
testError(conn, NULL, VIR_ERR_NO_MEMORY, "allocating domain");
return NULL;
}
con->numDomains++;
return dom;
}
}
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "too many domains");
return (NULL);
}
virDomainPtr testLookupDomainByID(virConnectPtr conn,
int id)
{
testCon *con = &node->connections[conn->handle];
virDomainPtr dom;
if (!con->domains[id].active) {
return NULL;
}
dom = virGetDomain(conn, con->domains[id].name, con->domains[id].uuid);
if (dom == NULL) {
testError(conn, NULL, VIR_ERR_NO_MEMORY, "Allocating domain");
@ -313,23 +814,56 @@ int testListDomains (virConnectPtr conn,
int testDestroyDomain (virDomainPtr domain)
{
testCon *con = &node->connections[domain->conn->handle];
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
testError(domain->conn, domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
con = &node->connections[domain->conn->handle];
con->domains[domain->handle].active = 0;
return 0;
return (0);
}
int testResumeDomain (virDomainPtr domain)
{
testCon *con = &node->connections[domain->conn->handle];
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
testError(domain->conn, domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
con = &node->connections[domain->conn->handle];
con->domains[domain->handle].info.state = VIR_DOMAIN_RUNNING;
return 0;
}
int testPauseDomain (virDomainPtr domain)
{
testCon *con = &node->connections[domain->conn->handle];
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
testError(domain->conn, domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
con = &node->connections[domain->conn->handle];
con->domains[domain->handle].info.state = VIR_DOMAIN_PAUSED;
return 0;
return (0);
}
/* We don't do an immediate shutdown. We basically pretend that
@ -338,27 +872,51 @@ int testPauseDomain (virDomainPtr domain)
will check to see if shutdown ought to be marked complete. */
int testShutdownDomain (virDomainPtr domain)
{
testCon *con = &node->connections[domain->conn->handle];
testCon *con;
struct timeval tv;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return (-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
testError(domain->conn, domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
con = &node->connections[domain->conn->handle];
if (gettimeofday(&tv, NULL) < 0) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
return -1;
return (-1);
}
con->domains[domain->handle].info.state = VIR_DOMAIN_SHUTDOWN;
con->domains[domain->handle].onRestart = VIR_DOMAIN_DESTROY;
con->domains[domain->handle].shutdownStartedAt = tv.tv_sec;
return 0;
return (0);
}
/* Similar behaviour as shutdown */
int testRebootDomain (virDomainPtr domain, virDomainRestart action)
{
testCon *con = &node->connections[domain->conn->handle];
testCon *con;
struct timeval tv;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
testError(domain->conn, domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
con = &node->connections[domain->conn->handle];
if (gettimeofday(&tv, NULL) < 0) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
return -1;
return (-1);
}
if (!action)
@ -367,17 +925,25 @@ int testRebootDomain (virDomainPtr domain, virDomainRestart action)
con->domains[domain->handle].info.state = VIR_DOMAIN_SHUTDOWN;
con->domains[domain->handle].onRestart = action;
con->domains[domain->handle].shutdownStartedAt = tv.tv_sec;
return 0;
return (0);
}
int testGetDomainInfo (virDomainPtr domain,
virDomainInfoPtr info)
{
testCon *con = &node->connections[domain->conn->handle];
struct timeval tv;
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
con = &node->connections[domain->conn->handle];
if (gettimeofday(&tv, NULL) < 0) {
testError(NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot get timeofday");
return -1;
return (-1);
}
/* Check to see if there is an in-progresss shutdown/reboot that
@ -415,13 +981,129 @@ int testGetDomainInfo (virDomainPtr domain,
con->domains[domain->handle].info.cpuTime = ((tv.tv_sec * 1000ll * 1000ll * 1000ll) + (tv.tv_usec * 1000ll));
}
memcpy(info, &con->domains[domain->handle].info, sizeof(virDomainInfo));
return 0;
return (0);
}
unsigned long testGetMaxMemory(virDomainPtr domain) {
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
con = &node->connections[domain->conn->handle];
return con->domains[domain->handle].info.maxMem;
}
int testSetMaxMemory (virDomainPtr domain,
unsigned long memory)
{
testCon *con = &node->connections[domain->conn->handle];
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
testError(domain->conn, domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
con = &node->connections[domain->conn->handle];
/* XXX validate not over host memory wrt to other domains */
con->domains[domain->handle].info.maxMem = memory;
return 0;
return (0);
}
int testSetMemory (virDomainPtr domain,
unsigned long memory)
{
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
testError(domain->conn, domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
con = &node->connections[domain->conn->handle];
if (memory > con->domains[domain->handle].info.maxMem) {
testError(domain->conn, domain, VIR_ERR_INVALID_ARG, "memory over maximum limit");
return (-1);
}
con->domains[domain->handle].info.memory = memory;
return (0);
}
int testSetVcpus(virDomainPtr domain,
unsigned int nrCpus) {
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(-1);
}
if (domain->conn->flags & VIR_CONNECT_RO) {
testError(domain->conn, domain, VIR_ERR_OPERATION_DENIED, __FUNCTION__);
return (-1);
}
con = &node->connections[domain->conn->handle];
/* We allow more cpus in guest than host */
if (nrCpus > 32) {
testError(domain->conn, domain, VIR_ERR_INVALID_ARG, "too many virtual cpus");
return (-1);
}
con->domains[domain->handle].info.nrVirtCpu = nrCpus;
return (0);
}
char * testDomainDumpXML(virDomainPtr domain, int flags ATTRIBUTE_UNUSED)
{
virBufferPtr buf;
char *xml;
unsigned char *uuid;
testCon *con;
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
testError((domain ? domain->conn : NULL), domain, VIR_ERR_INVALID_ARG,
__FUNCTION__);
return(NULL);
}
con = &node->connections[domain->conn->handle];
if (!(buf = virBufferNew(4000))) {
return (NULL);
}
virBufferVSprintf(buf, "<domain type='test' id='%d'>\n", domain->handle);
virBufferVSprintf(buf, " <name>%s</name>\n", domain->name);
uuid = domain->uuid;
virBufferVSprintf(buf,
" <uuid>%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x</uuid>\n",
uuid[0], uuid[1], uuid[2], uuid[3],
uuid[4], uuid[5], uuid[6], uuid[7],
uuid[8], uuid[9], uuid[10], uuid[11],
uuid[12], uuid[13], uuid[14], uuid[15]);
virBufferVSprintf(buf, " <memory>%d</memory>\n", con->domains[domain->handle].info.maxMem);
virBufferVSprintf(buf, " <vcpu>%d</vcpu>\n", con->domains[domain->handle].info.nrVirtCpu);
virBufferVSprintf(buf, " <on_reboot>%s</on_reboot>\n", testRestartFlagToString(con->domains[domain->handle].onReboot));
virBufferVSprintf(buf, " <on_poweroff>%s</on_poweroff>\n", testRestartFlagToString(con->domains[domain->handle].onPoweroff));
virBufferVSprintf(buf, " <on_crash>%s</on_crash>\n", testRestartFlagToString(con->domains[domain->handle].onCrash));
virBufferAdd(buf, "</domain>\n", -1);
xml = buf->content;
free(buf);
return xml;
}

View File

@ -11,42 +11,50 @@
#ifndef __VIR_TEST_SIMPLE_INTERNAL_H__
#define __VIR_TEST_SIMPLE_INTERNAL_H__
#include <libvirt/virterror.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <virterror.h>
void testRegister(void);
int testOpen(virConnectPtr conn,
const char *name,
int flags);
int testClose (virConnectPtr conn);
int testGetVersion(virConnectPtr conn,
unsigned long *hvVer);
int testNodeGetInfo(virConnectPtr conn,
virNodeInfoPtr info);
int testNumOfDomains(virConnectPtr conn);
int testListDomains(virConnectPtr conn,
int *ids,
int maxids);
virDomainPtr testLookupDomainByID(virConnectPtr conn,
int id);
virDomainPtr testLookupDomainByUUID(virConnectPtr conn,
const unsigned char *uuid);
virDomainPtr testLookupDomainByName(virConnectPtr conn,
const char *name);
int testDestroyDomain(virDomainPtr domain);
int testResumeDomain(virDomainPtr domain);
int testPauseDomain(virDomainPtr domain);
int testShutdownDomain (virDomainPtr domain);
int testRebootDomain (virDomainPtr domain, virDomainRestart action);
int testGetDomainInfo(virDomainPtr domain,
virDomainInfoPtr info);
int testGetDomainID(virDomainPtr domain);
const char*testGetDomainName(virDomainPtr domain);
int testSetMaxMemory(virDomainPtr domain,
unsigned long memory);
void testRegister(void);
int testOpen(virConnectPtr conn,
const char *name,
int flags);
int testClose (virConnectPtr conn);
int testGetVersion(virConnectPtr conn,
unsigned long *hvVer);
int testNodeGetInfo(virConnectPtr conn,
virNodeInfoPtr info);
int testNumOfDomains(virConnectPtr conn);
int testListDomains(virConnectPtr conn,
int *ids,
int maxids);
virDomainPtr
testDomainCreateLinux(virConnectPtr conn, const char *xmlDesc,
unsigned int flags ATTRIBUTE_UNUSED);
virDomainPtr testLookupDomainByID(virConnectPtr conn,
int id);
virDomainPtr testLookupDomainByUUID(virConnectPtr conn,
const unsigned char *uuid);
virDomainPtr testLookupDomainByName(virConnectPtr conn,
const char *name);
int testDestroyDomain(virDomainPtr domain);
int testResumeDomain(virDomainPtr domain);
int testPauseDomain(virDomainPtr domain);
int testShutdownDomain (virDomainPtr domain);
int testRebootDomain (virDomainPtr domain,
virDomainRestart action);
int testGetDomainInfo(virDomainPtr domain,
virDomainInfoPtr info);
unsigned long testGetMaxMemory(virDomainPtr domain);
int testSetMaxMemory(virDomainPtr domain,
unsigned long memory);
int testSetMemory(virDomainPtr domain,
unsigned long memory);
int testSetVcpus(virDomainPtr domain,
unsigned int nrCpus);
char * testDomainDumpXML(virDomainPtr domain, int flags);
#ifdef __cplusplus
}

View File

@ -15,8 +15,8 @@
#define _GNU_SOURCE /* isblank() */
#include "libvirt.h"
#include "virterror.h"
#include "libvirt/libvirt.h"
#include "libvirt/virterror.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -207,6 +207,7 @@ static void vshDebug(vshControl * ctl, int level, const char *format, ...);
#define vshPrint(_ctl, ...) fprintf(stdout, __VA_ARGS__)
static const char *vshDomainStateToString(int state);
static const char *vshDomainVcpuStateToString(int state);
static int vshConnectionUsability(vshControl * ctl, virConnectPtr conn,
int showerror);
@ -231,7 +232,7 @@ static vshCmdInfo info_help[] = {
{"syntax", "help [<command>]"},
{"help", "print help"},
{"desc", "Prints global help or command specific help."},
{"version", "Prints versionning informations."},
{"version", "Prints version information."},
{NULL, NULL}
};
@ -793,6 +794,304 @@ cmdDominfo(vshControl * ctl, vshCmd * cmd)
return ret;
}
/*
* "vcpuinfo" command
*/
static vshCmdInfo info_vcpuinfo[] = {
{"syntax", "vcpuinfo <domain>"},
{"help", "domain vcpu information"},
{"desc", "Returns basic information about the domain virtual CPUs."},
{NULL, NULL}
};
static vshCmdOptDef opts_vcpuinfo[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, "domain name, id or uuid"},
{NULL, 0, 0, NULL}
};
static int
cmdVcpuinfo(vshControl * ctl, vshCmd * cmd)
{
virDomainInfo info;
virDomainPtr dom;
virNodeInfo nodeinfo;
virVcpuInfoPtr cpuinfo;
unsigned char *cpumap;
int ncpus;
size_t cpumaplen;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE;
if (!(dom = vshCommandOptDomain(ctl, cmd, "domain", NULL)))
return FALSE;
if (virNodeGetInfo(ctl->conn, &nodeinfo) != 0) {
virDomainFree(dom);
return FALSE;
}
if (virDomainGetInfo(dom, &info) != 0) {
virDomainFree(dom);
return FALSE;
}
cpuinfo = malloc(sizeof(virVcpuInfo)*info.nrVirtCpu);
cpumaplen = VIR_CPU_MAPLEN(VIR_NODEINFO_MAXCPUS(nodeinfo));
cpumap = malloc(info.nrVirtCpu * cpumaplen);
if ((ncpus = virDomainGetVcpus(dom,
cpuinfo, info.nrVirtCpu,
cpumap, cpumaplen)) >= 0) {
int n;
for (n = 0 ; n < ncpus ; n++) {
unsigned int m;
vshPrint(ctl, "%-15s %d\n", "VCPU:", n);
vshPrint(ctl, "%-15s %d\n", "CPU:", cpuinfo[n].cpu);
vshPrint(ctl, "%-15s %s\n", "State:",
vshDomainVcpuStateToString(cpuinfo[n].state));
if (cpuinfo[n].cpuTime != 0) {
double cpuUsed = cpuinfo[n].cpuTime;
cpuUsed /= 1000000000.0;
vshPrint(ctl, "%-15s %.1lfs\n", "CPU time:", cpuUsed);
}
vshPrint(ctl, "%-15s ", "CPU Affinity:");
for (m = 0 ; m < VIR_NODEINFO_MAXCPUS(nodeinfo) ; m++) {
vshPrint(ctl, "%c", VIR_CPU_USABLE(cpumap, cpumaplen, n, m) ? 'y' : '-');
}
vshPrint(ctl, "\n");
if (n < (ncpus - 1)) {
vshPrint(ctl, "\n");
}
}
} else {
ret = FALSE;
}
free(cpumap);
free(cpuinfo);
virDomainFree(dom);
return ret;
}
/*
* "vcpupin" command
*/
static vshCmdInfo info_vcpupin[] = {
{"syntax", "vcpupin <domain>"},
{"help", "control domain vcpu affinity"},
{"desc", "Pin domain VCPUs to host physical CPUs"},
{NULL, NULL}
};
static vshCmdOptDef opts_vcpupin[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, "domain name, id or uuid"},
{"vcpu", VSH_OT_DATA, VSH_OFLAG_REQ, "vcpu number"},
{"cpulist", VSH_OT_DATA, VSH_OFLAG_REQ, "host cpu number(s) (comma separated)"},
{NULL, 0, 0, NULL}
};
static int
cmdVcpupin(vshControl * ctl, vshCmd * cmd)
{
virDomainInfo info;
virDomainPtr dom;
virNodeInfo nodeinfo;
int vcpu;
char *cpulist;
int ret = TRUE;
int vcpufound = 0;
unsigned char *cpumap;
int cpumaplen;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE;
if (!(dom = vshCommandOptDomain(ctl, cmd, "domain", NULL)))
return FALSE;
vcpu = vshCommandOptInt(cmd, "vcpu", &vcpufound);
if (!vcpufound) {
virDomainFree(dom);
return FALSE;
}
if (!(cpulist = vshCommandOptString(cmd, "cpulist", NULL))) {
virDomainFree(dom);
return FALSE;
}
if (virNodeGetInfo(ctl->conn, &nodeinfo) != 0) {
virDomainFree(dom);
return FALSE;
}
if (virDomainGetInfo(dom, &info) != 0) {
virDomainFree(dom);
return FALSE;
}
if (vcpu >= info.nrVirtCpu) {
virDomainFree(dom);
return FALSE;
}
cpumaplen = VIR_CPU_MAPLEN(VIR_NODEINFO_MAXCPUS(nodeinfo));
cpumap = malloc(cpumaplen);
memset(cpumap, 0, cpumaplen);
do {
unsigned int cpu = atoi(cpulist);
if (cpu < VIR_NODEINFO_MAXCPUS(nodeinfo)) {
VIR_USE_CPU(cpumap, cpu);
}
cpulist = index(cpulist, ',');
if (cpulist)
cpulist++;
} while (cpulist);
if (virDomainPinVcpu(dom, vcpu, cpumap, cpumaplen) != 0) {
ret = FALSE;
}
free(cpumap);
virDomainFree(dom);
return ret;
}
/*
* "setvcpus" command
*/
static vshCmdInfo info_setvcpus[] = {
{"syntax", "setvcpus <domain> <count>"},
{"help", "change number of virtual CPUs"},
{"desc", "Change the number of virtual CPUs active in the guest domain"},
{NULL, NULL}
};
static vshCmdOptDef opts_setvcpus[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, "domain name, id or uuid"},
{"count", VSH_OT_DATA, VSH_OFLAG_REQ, "number of virtual CPUs"},
{NULL, 0, 0, NULL}
};
static int
cmdSetvcpus(vshControl * ctl, vshCmd * cmd)
{
virDomainPtr dom;
int count;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE;
if (!(dom = vshCommandOptDomain(ctl, cmd, "domain", NULL)))
return FALSE;
count = vshCommandOptInt(cmd, "count", &count);
if (!count) {
virDomainFree(dom);
return FALSE;
}
if (virDomainSetVcpus(dom, count) != 0) {
ret = FALSE;
}
virDomainFree(dom);
return ret;
}
/*
* "setmemory" command
*/
static vshCmdInfo info_setmem[] = {
{"syntax", "setmem <domain> <bytes>"},
{"help", "change memory allocation"},
{"desc", "Change the current memory allocation in the guest domain"},
{NULL, NULL}
};
static vshCmdOptDef opts_setmem[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, "domain name, id or uuid"},
{"bytes", VSH_OT_DATA, VSH_OFLAG_REQ, "number of bytes of memory"},
{NULL, 0, 0, NULL}
};
static int
cmdSetmem(vshControl * ctl, vshCmd * cmd)
{
virDomainPtr dom;
int bytes;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE;
if (!(dom = vshCommandOptDomain(ctl, cmd, "domain", NULL)))
return FALSE;
bytes = vshCommandOptInt(cmd, "bytes", &bytes);
if (!bytes) {
virDomainFree(dom);
return FALSE;
}
if (virDomainSetMemory(dom, bytes) != 0) {
ret = FALSE;
}
virDomainFree(dom);
return ret;
}
/*
* "setmaxmem" command
*/
static vshCmdInfo info_setmaxmem[] = {
{"syntax", "setmaxmem <domain> <bytes>"},
{"help", "change maximum memory limit"},
{"desc", "Change the maximum memory allocation limit in the guest domain"},
{NULL, NULL}
};
static vshCmdOptDef opts_setmaxmem[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, "domain name, id or uuid"},
{"bytes", VSH_OT_DATA, VSH_OFLAG_REQ, "maxmimum memory limit in bytes"},
{NULL, 0, 0, NULL}
};
static int
cmdSetmaxmem(vshControl * ctl, vshCmd * cmd)
{
virDomainPtr dom;
int bytes;
int ret = TRUE;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE;
if (!(dom = vshCommandOptDomain(ctl, cmd, "domain", NULL)))
return FALSE;
bytes = vshCommandOptInt(cmd, "bytes", &bytes);
if (!bytes) {
virDomainFree(dom);
return FALSE;
}
if (virDomainSetMaxMemory(dom, bytes) != 0) {
ret = FALSE;
}
virDomainFree(dom);
return ret;
}
/*
* "nodeinfo" command
*/
@ -833,7 +1132,7 @@ cmdNodeinfo(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
static vshCmdInfo info_dumpxml[] = {
{"syntax", "dumpxml <name>"},
{"help", "domain information in XML"},
{"desc", "Ouput the domain informations as an XML dump to stdout"},
{"desc", "Ouput the domain information as an XML dump to stdout"},
{NULL, NULL}
};
@ -968,7 +1267,7 @@ cmdDomuuid(vshControl * ctl, vshCmd * cmd)
static vshCmdInfo info_version[] = {
{"syntax", "version"},
{"help", "show versions"},
{"desc", "Display the version informations available"},
{"desc", "Display the version information available"},
{NULL, NULL}
};
@ -1080,7 +1379,12 @@ static vshCmdDef commands[] = {
{"resume", cmdResume, opts_resume, info_resume},
{"save", cmdSave, opts_save, info_save},
{"shutdown", cmdShutdown, opts_shutdown, info_shutdown},
{"setmem", cmdSetmem, opts_setmem, info_setmem},
{"setmaxmem", cmdSetmaxmem, opts_setmaxmem, info_setmaxmem},
{"setvcpus", cmdSetvcpus, opts_setvcpus, info_setvcpus},
{"suspend", cmdSuspend, opts_suspend, info_suspend},
{"vcpuinfo", cmdVcpuinfo, opts_vcpuinfo, info_vcpuinfo},
{"vcpupin", cmdVcpupin, opts_vcpupin, info_vcpupin},
{"version", cmdVersion, NULL, info_version},
{NULL, NULL, NULL, NULL}
};
@ -1643,6 +1947,22 @@ vshDomainStateToString(int state)
return NULL;
}
static const char *
vshDomainVcpuStateToString(int state)
{
switch (state) {
case VIR_VCPU_OFFLINE:
return "offline";
case VIR_VCPU_BLOCKED:
return "blocked";
case VIR_VCPU_RUNNING:
return "running";
default:
return "no state";
}
return NULL;
}
static int
vshConnectionUsability(vshControl * ctl, virConnectPtr conn, int showerror)
{
@ -1757,8 +2077,10 @@ vshInit(vshControl * ctl)
/* set up the library error handler */
virSetErrorFunc(NULL, virshErrorHandler);
/* basic connection to hypervisor */
if (ctl->uid == 0)
/* basic connection to hypervisor, for Xen connections unless
we're root open a read only connections. Allow 'test' HV
to be RW all the time though */
if (ctl->uid == 0 || (ctl->name && !strncmp(ctl->name, "test", 4)))
ctl->conn = virConnectOpen(ctl->name);
else
ctl->conn = virConnectOpenReadOnly(ctl->name);

View File

@ -12,8 +12,8 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "libvirt.h"
#include "virterror.h"
#include "libvirt/libvirt.h"
#include "libvirt/virterror.h"
#include "internal.h"
static virError lastErr = /* the last error */
@ -387,7 +387,10 @@ __virErrorMsg(virErrorNumber error, const char *info)
errmsg = "out of memory";
break;
case VIR_ERR_NO_SUPPORT:
errmsg = "no support for hypervisor %s";
if (info != NULL)
errmsg = "no support for hypervisor";
else
errmsg = "no support for hypervisor %s";
break;
case VIR_ERR_NO_CONNECT:
if (info == NULL)
@ -396,13 +399,22 @@ __virErrorMsg(virErrorNumber error, const char *info)
errmsg = "could not connect to %s";
break;
case VIR_ERR_INVALID_CONN:
errmsg = "invalid connection pointer in";
if (info == NULL)
errmsg = "invalid connection pointer in";
else
errmsg = "invalid connection pointer in %s";
break;
case VIR_ERR_INVALID_DOMAIN:
errmsg = "invalid domain pointer in";
if (info == NULL)
errmsg = "invalid domain pointer in";
else
errmsg = "invalid domain pointer in %s";
break;
case VIR_ERR_INVALID_ARG:
errmsg = "invalid domain pointer in";
if (info == NULL)
errmsg = "invalid argument in";
else
errmsg = "invalid argument in %s";
break;
case VIR_ERR_OPERATION_FAILED:
if (info != NULL)
@ -426,7 +438,10 @@ __virErrorMsg(virErrorNumber error, const char *info)
errmsg = "got unknown HTTP error code %d";
break;
case VIR_ERR_UNKNOWN_HOST:
errmsg = "unknown host %s";
if (info != NULL)
errmsg = "unknown host %s";
else
errmsg = "unknown host";
break;
case VIR_ERR_SEXPR_SERIAL:
if (info != NULL)
@ -456,43 +471,43 @@ __virErrorMsg(virErrorNumber error, const char *info)
errmsg = "unknown OS type %s";
break;
case VIR_ERR_NO_KERNEL:
errmsg = "missing kernel informations";
errmsg = "missing kernel information";
break;
case VIR_ERR_NO_ROOT:
if (info == NULL)
errmsg = "missing root device informations";
errmsg = "missing root device information";
else
errmsg = "missing root device informations in %s";
errmsg = "missing root device information in %s";
break;
case VIR_ERR_NO_SOURCE:
if (info == NULL)
errmsg = "missing source informations for device";
errmsg = "missing source information for device";
else
errmsg = "missing source informations for device %s";
errmsg = "missing source information for device %s";
break;
case VIR_ERR_NO_TARGET:
if (info == NULL)
errmsg = "missing target informations for device";
errmsg = "missing target information for device";
else
errmsg = "missing target informations for device %s";
errmsg = "missing target information for device %s";
break;
case VIR_ERR_NO_NAME:
if (info == NULL)
errmsg = "missing domain name informations";
errmsg = "missing domain name information";
else
errmsg = "missing domain name informations in %s";
errmsg = "missing domain name information in %s";
break;
case VIR_ERR_NO_OS:
if (info == NULL)
errmsg = "missing operating system informations";
errmsg = "missing operating system information";
else
errmsg = "missing operating system informations for %s";
errmsg = "missing operating system information for %s";
break;
case VIR_ERR_NO_DEVICE:
if (info == NULL)
errmsg = "missing devices informations";
errmsg = "missing devices information";
else
errmsg = "missing devices informations for %s";
errmsg = "missing devices information for %s";
break;
case VIR_ERR_DRIVER_FULL:
if (info == NULL)
@ -518,6 +533,12 @@ __virErrorMsg(virErrorNumber error, const char *info)
else
errmsg = "domain %s exists already";
break;
case VIR_ERR_OPERATION_DENIED:
if (info == NULL)
errmsg = "operation forbidden for read only access";
else
errmsg = "operation %s forbidden for read only access";
break;
}
return (errmsg);
}

View File

@ -18,7 +18,7 @@
#include <fcntl.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <limits.h>
#include <stdint.h>
/* required for dom0_getdomaininfo_t */
@ -49,10 +49,13 @@ static int hv_version = 0;
#define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd"
#ifndef PROXY
static const char * xenHypervisorGetType(virConnectPtr conn);
static unsigned long xenHypervisorGetMaxMemory(virDomainPtr domain);
#endif
static int xenHypervisorInit(void);
#ifndef PROXY
static virDriver xenHypervisorDriver = {
VIR_DRV_XEN_HYPERVISOR,
"Xen",
@ -86,8 +89,13 @@ static virDriver xenHypervisorDriver = {
NULL, /* domainSetMemory */
xenHypervisorGetDomainInfo, /* domainGetInfo */
NULL, /* domainSave */
NULL /* domainRestore */
NULL, /* domainRestore */
xenHypervisorSetVcpus, /* domainSetVcpus */
xenHypervisorPinVcpu, /* domainPinVcpu */
xenHypervisorGetVcpus, /* domainGetVcpus */
NULL, /* domainDumpXML */
};
#endif /* !PROXY */
/**
* virXenError:
@ -175,6 +183,7 @@ done:
}
#ifndef PROXY
/**
* xenHypervisorRegister:
*
@ -187,6 +196,7 @@ void xenHypervisorRegister(void)
virRegisterDriver(&xenHypervisorDriver);
}
#endif /* !PROXY */
/**
* xenHypervisorOpen:
@ -329,6 +339,7 @@ xenHypervisorDoOp(int handle, dom0_op_t * op)
return (0);
}
#ifndef PROXY
/**
* xenHypervisorGetType:
* @conn: pointer to the Xen Hypervisor block
@ -348,6 +359,7 @@ xenHypervisorGetType(virConnectPtr conn)
}
return("Xen");
}
#endif
/**
* xenHypervisorGetVersion:
@ -506,24 +518,23 @@ xenHypervisorListDomains(virConnectPtr conn, int *ids, int maxids)
}
/**
* xenHypervisorGetMaxMemory:
* @domain: a domain object or NULL
* xenHypervisorGetDomMaxMemory:
* @conn: connection data
* @id: domain id
*
* 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.
* domain.
*
* Returns the memory size in kilobytes or 0 in case of error.
*/
static unsigned long
xenHypervisorGetMaxMemory(virDomainPtr domain)
unsigned long
xenHypervisorGetDomMaxMemory(virConnectPtr conn, int id)
{
dom0_op_t op;
dom0_getdomaininfo_t dominfo;
int ret;
if ((domain == NULL) || (domain->conn == NULL) ||
(domain->conn->handle < 0))
if ((conn == NULL) || (conn->handle < 0))
return (0);
memset(&dominfo, 0, sizeof(dom0_getdomaininfo_t));
@ -535,13 +546,13 @@ xenHypervisorGetMaxMemory(virDomainPtr domain)
}
op.cmd = DOM0_GETDOMAININFOLIST;
op.u.getdomaininfolist.first_domain = (domid_t) domain->handle;
op.u.getdomaininfolist.first_domain = (domid_t) id;
op.u.getdomaininfolist.max_domains = 1;
op.u.getdomaininfolist.buffer = &dominfo;
op.u.getdomaininfolist.num_domains = 1;
dominfo.domain = domain->handle;
dominfo.domain = id;
ret = xenHypervisorDoOp(domain->conn->handle, &op);
ret = xenHypervisorDoOp(conn->handle, &op);
if (munlock(&dominfo, sizeof(dom0_getdomaininfo_t)) < 0) {
virXenError(VIR_ERR_XEN_CALL, " release",
@ -555,24 +566,46 @@ xenHypervisorGetMaxMemory(virDomainPtr domain)
return((unsigned long) dominfo.max_pages * 4);
}
#ifndef PROXY
/**
* xenHypervisorGetDomainInfo:
* @domain: pointer to the domain block
* @info: the place where informations should be stored
* xenHypervisorGetMaxMemory:
* @domain: a domain object or NULL
*
* 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.
*
* Do an hypervisor call to get the related set of domain informations.
* Returns the memory size in kilobytes or 0 in case of error.
*/
static unsigned long
xenHypervisorGetMaxMemory(virDomainPtr domain)
{
if ((domain == NULL) || (domain->conn == NULL) ||
(domain->conn->handle < 0))
return (0);
return(xenHypervisorGetDomMaxMemory(domain->conn, domain->handle));
}
#endif
/**
* xenHypervisorGetDomInfo:
* @conn: connection data
* @id: the domain ID
* @info: the place where information should be stored
*
* Do an hypervisor call to get the related set of domain information.
*
* Returns 0 in case of success, -1 in case of error.
*/
int
xenHypervisorGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
xenHypervisorGetDomInfo(virConnectPtr conn, int id, virDomainInfoPtr info)
{
dom0_op_t op;
dom0_getdomaininfo_t dominfo;
int ret;
if ((domain == NULL) || (domain->conn == NULL) ||
(domain->conn->handle < 0) || (info == NULL))
if ((conn == NULL) || (conn->handle < 0) || (info == NULL))
return (-1);
memset(info, 0, sizeof(virDomainInfo));
@ -585,13 +618,13 @@ xenHypervisorGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
}
op.cmd = DOM0_GETDOMAININFOLIST;
op.u.getdomaininfolist.first_domain = (domid_t) domain->handle;
op.u.getdomaininfolist.first_domain = (domid_t) id;
op.u.getdomaininfolist.max_domains = 1;
op.u.getdomaininfolist.buffer = &dominfo;
op.u.getdomaininfolist.num_domains = 1;
dominfo.domain = domain->handle;
dominfo.domain = id;
ret = xenHypervisorDoOp(domain->conn->handle, &op);
ret = xenHypervisorDoOp(conn->handle, &op);
if (munlock(&dominfo, sizeof(dom0_getdomaininfo_t)) < 0) {
virXenError(VIR_ERR_XEN_CALL, " release",
@ -634,6 +667,27 @@ xenHypervisorGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
return (0);
}
/**
* xenHypervisorGetDomainInfo:
* @domain: pointer to the domain block
* @info: the place where information should be stored
*
* Do an hypervisor call to get the related set of domain information.
*
* Returns 0 in case of success, -1 in case of error.
*/
int
xenHypervisorGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
{
if ((domain == NULL) || (domain->conn == NULL) ||
(domain->conn->handle < 0) || (info == NULL) ||
(domain->handle < 0))
return (-1);
return(xenHypervisorGetDomInfo(domain->conn, domain->handle, info));
}
#ifndef PROXY
/**
* xenHypervisorPauseDomain:
* @domain: pointer to the domain block
@ -747,11 +801,12 @@ xenHypervisorSetMaxMemory(virDomainPtr domain, unsigned long memory)
return (-1);
return (0);
}
#endif /* PROXY */
/**
* xenHypervisorCheckID:
* @domain: pointer to the domain block
* @info: the place where informations should be stored
* @info: the place where information should be stored
*
* Do an hypervisor call to verify the domain ID is valid
*
@ -796,3 +851,138 @@ xenHypervisorCheckID(virConnectPtr conn, int id)
return (0);
}
#ifndef PROXY
/**
* xenHypervisorSetVcpus:
* @domain: pointer to domain object
* @nvcpus: the new number of virtual CPUs for this domain
*
* Dynamically change the number of virtual CPUs used by the domain.
*
* Returns 0 in case of success, -1 in case of failure.
*/
int
xenHypervisorSetVcpus(virDomainPtr domain, unsigned int nvcpus)
{
dom0_op_t op;
if ((domain == NULL) || (domain->conn == NULL) || (domain->conn->handle < 0)
|| (nvcpus < 1))
return (-1);
op.cmd = DOM0_MAX_VCPUS;
op.u.max_vcpus.domain = (domid_t) domain->handle;
op.u.max_vcpus.max = nvcpus;
if (xenHypervisorDoOp(domain->conn->handle, &op) < 0)
return (-1);
return 0;
}
/**
* xenHypervisorPinVcpu:
* @domain: pointer to domain object
* @vcpu: virtual CPU number
* @cpumap: pointer to a bit map of real CPUs (in 8-bit bytes)
* @maplen: length of cpumap in bytes
*
* Dynamically change the real CPUs which can be allocated to a virtual CPU.
*
* Returns 0 in case of success, -1 in case of failure.
*/
int
xenHypervisorPinVcpu(virDomainPtr domain, unsigned int vcpu,
unsigned char *cpumap, int maplen)
{
dom0_op_t op;
uint64_t *pm = (uint64_t *)&op.u.setvcpuaffinity.cpumap;
int j;
if ((domain == NULL) || (domain->conn == NULL) || (domain->conn->handle < 0)
|| (cpumap == NULL) || (maplen < 1) || (maplen > (int)sizeof(cpumap_t))
|| (sizeof(cpumap_t) & 7))
return (-1);
op.cmd = DOM0_SETVCPUAFFINITY;
op.u.setvcpuaffinity.domain = (domid_t) domain->handle;
op.u.setvcpuaffinity.vcpu = vcpu;
memset(pm, 0, sizeof(cpumap_t));
for (j = 0; j < maplen; j++)
*(pm + (j / 8)) |= cpumap[j] << (8 * (j & 7));
if (xenHypervisorDoOp(domain->conn->handle, &op) < 0)
return (-1);
return 0;
}
#endif
/**
* virDomainGetVcpus:
* @domain: pointer to domain object, or NULL for Domain0
* @info: pointer to an array of virVcpuInfo structures (OUT)
* @maxinfo: number of structures in info array
* @cpumaps: pointer to an bit map of real CPUs for all vcpus of this domain (in 8-bit bytes) (OUT)
* If cpumaps is NULL, then no cupmap information is returned by the API.
* It's assumed there is <maxinfo> cpumap in cpumaps array.
* The memory allocated to cpumaps must be (maxinfo * maplen) bytes
* (ie: calloc(maxinfo, maplen)).
* One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.
* @maplen: number of bytes in one cpumap, from 1 up to size of CPU map in
* underlying virtualization system (Xen...).
*
* Extract information about virtual CPUs of domain, store it in info array
* and also in cpumaps if this pointer is'nt NULL.
*
* Returns the number of info filled in case of success, -1 in case of failure.
*/
int
xenHypervisorGetVcpus(virDomainPtr domain, virVcpuInfoPtr info, int maxinfo,
unsigned char *cpumaps, int maplen)
{
dom0_op_t op;
uint64_t *pm = (uint64_t *)&op.u.getvcpuinfo.cpumap;
virVcpuInfoPtr ipt;
int nbinfo, mapl, i;
unsigned char *cpumap;
int vcpu, cpu;
if ((domain == NULL) || (domain->conn == NULL) || (domain->conn->handle < 0)
|| (info == NULL) || (maxinfo < 1)
|| (sizeof(cpumap_t) & 7))
return (-1);
if (cpumaps != NULL && maplen < 1)
return -1;
/* first get the number of virtual CPUs in this domain */
op.cmd = DOM0_GETDOMAININFO;
op.u.getdomaininfo.domain = (domid_t) domain->handle;
if (xenHypervisorDoOp(domain->conn->handle, &op) < 0)
return (-1);
nbinfo = (int)op.u.getdomaininfo.max_vcpu_id + 1;
if (nbinfo > maxinfo) nbinfo = maxinfo;
if (cpumaps != NULL)
memset(cpumaps, 0, maxinfo * maplen);
op.cmd = DOM0_GETVCPUINFO;
for (i=0, ipt=info; i < nbinfo; i++, ipt++) {
vcpu = op.u.getvcpuinfo.vcpu = i;
if (xenHypervisorDoOp(domain->conn->handle, &op) < 0)
return (-1);
ipt->number = i;
if (op.u.getvcpuinfo.online) {
if (op.u.getvcpuinfo.running) ipt->state = VIR_VCPU_RUNNING;
if (op.u.getvcpuinfo.blocked) ipt->state = VIR_VCPU_BLOCKED;
}
else ipt->state = VIR_VCPU_OFFLINE;
ipt->cpuTime = op.u.getvcpuinfo.cpu_time;
ipt->cpu = op.u.getvcpuinfo.online ? (int)op.u.getvcpuinfo.cpu : -1;
if (cpumaps != NULL && vcpu >= 0 && vcpu < maxinfo) {
cpumap = (unsigned char *)VIR_GET_CPUMAP(cpumaps, maplen, vcpu);
mapl = (maplen > (int)sizeof(cpumap_t)) ? (int)sizeof(cpumap_t) : maplen;
for (cpu = 0; cpu < (mapl * CHAR_BIT); cpu++) {
if (*pm & ((uint64_t)1<<cpu))
VIR_USE_CPU(cpumap, cpu);
}
}
}
return nbinfo;
}

View File

@ -25,6 +25,9 @@ int xenHypervisorOpen (virConnectPtr conn,
int xenHypervisorClose (virConnectPtr conn);
int xenHypervisorGetVersion (virConnectPtr conn,
unsigned long *hvVer);
unsigned long
xenHypervisorGetDomMaxMemory (virConnectPtr conn,
int id);
int xenHypervisorNumOfDomains (virConnectPtr conn);
int xenHypervisorListDomains (virConnectPtr conn,
int *ids,
@ -34,10 +37,25 @@ int xenHypervisorResumeDomain (virDomainPtr domain);
int xenHypervisorPauseDomain (virDomainPtr domain);
int xenHypervisorGetDomainInfo (virDomainPtr domain,
virDomainInfoPtr info);
int xenHypervisorGetDomInfo (virConnectPtr conn,
int id,
virDomainInfoPtr info);
int xenHypervisorSetMaxMemory (virDomainPtr domain,
unsigned long memory);
int xenHypervisorCheckID (virConnectPtr conn,
int id);
int xenHypervisorSetVcpus (virDomainPtr domain,
unsigned int nvcpus);
int xenHypervisorPinVcpu (virDomainPtr domain,
unsigned int vcpu,
unsigned char *cpumap,
int maplen);
int xenHypervisorGetVcpus (virDomainPtr domain,
virVcpuInfoPtr info,
int maxinfo,
unsigned char *cpumaps,
int maplen);
#ifdef __cplusplus
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "libvirt.h"
#include "libvirt/libvirt.h"
#ifdef __cplusplus
extern "C" {
@ -534,6 +534,23 @@ int xenDaemonDomainLookupByName_ids(virConnectPtr xend,
const char *name, unsigned char *uuid);
/**
* \brief Lookup the name of a domain
* \param xend A xend instance
* \param id The id of the domain
* \param name pointer to store a copy of the name
* \param uuid pointer to store a copy of the uuid
*
* This method looks up the name/uuid of a domain
*/
int xenDaemonDomainLookupByID(virConnectPtr xend,
int id,
char **name, unsigned char *uuid);
char *xenDaemonDomainDumpXMLByID(virConnectPtr xend,
int domid);
/**
* \brief Lookup information about the host machine
* \param xend A xend instance
@ -600,6 +617,8 @@ int xenDaemonDomainLookupByName_ids(virConnectPtr xend,
void xenDaemonRegister(void);
int xenDaemonOpen(virConnectPtr conn, const char *name, int flags);
int xenDaemonClose(virConnectPtr conn);
int xenDaemonGetVersion(virConnectPtr conn, unsigned long *hvVer);
int xenDaemonNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info);
int xenDaemonDomainSuspend(virDomainPtr domain);
int xenDaemonDomainResume(virDomainPtr domain);
int xenDaemonDomainShutdown(virDomainPtr domain);
@ -610,9 +629,22 @@ int xenDaemonDomainRestore(virConnectPtr conn, const char *filename);
int xenDaemonDomainSetMemory(virDomainPtr domain, unsigned long memory);
int xenDaemonDomainSetMaxMemory(virDomainPtr domain, unsigned long memory);
int xenDaemonDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info);
char *xenDaemonDomainDumpXML(virDomainPtr domain);
char *xenDaemonDomainDumpXML(virDomainPtr domain, int flags);
virDomainPtr xenDaemonDomainLookupByName(virConnectPtr conn, const char *domname);
unsigned long xenDaemonDomainGetMaxMemory(virDomainPtr domain);
char **xenDaemonListDomainsOld(virConnectPtr xend);
int xenDaemonDomainSetVcpus (virDomainPtr domain,
unsigned int vcpus);
int xenDaemonDomainPinVcpu (virDomainPtr domain,
unsigned int vcpu,
unsigned char *cpumap,
int maplen);
int xenDaemonDomainGetVcpus (virDomainPtr domain,
virVcpuInfoPtr info,
int maxinfo,
unsigned char *cpumaps,
int maplen);
#ifdef __cplusplus
}

429
src/xml.c
View File

@ -8,7 +8,7 @@
* Daniel Veillard <veillard@redhat.com>
*/
#include "libvirt.h"
#include "libvirt/libvirt.h"
#include <stdio.h>
#include <stdlib.h>
@ -18,6 +18,7 @@
#include <libxml/parser.h>
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include <math.h> /* for isnan() */
#include "internal.h"
#include "hash.h"
#include "sexpr.h"
@ -246,7 +247,7 @@ virDomainGetXMLDeviceInfo(virDomainPtr domain, const char *sub,
* @buf: the output buffer object
* @dev: the xenstrore internal device number
*
* Extract and dump in the buffer informations on the device used by the domain
* Extract and dump in the buffer information on the device used by the domain
*
* Returns 0 in case of success, -1 in case of failure
*/
@ -267,7 +268,10 @@ virDomainGetXMLDevice(virDomainPtr domain, virBufferPtr buf, long dev)
}
val = virDomainGetXMLDeviceInfo(domain, "vbd", dev, "dev");
if (val != NULL) {
virBufferVSprintf(buf, " <target dev='%s'/>\n", val);
char *tmp = val;
if (!strncmp(tmp, "ioemu:", 6))
tmp += 6;
virBufferVSprintf(buf, " <target dev='%s'/>\n", tmp);
free(val);
}
val = virDomainGetXMLDeviceInfo(domain, "vbd", dev, "read-only");
@ -285,7 +289,10 @@ virDomainGetXMLDevice(virDomainPtr domain, virBufferPtr buf, long dev)
}
val = virDomainGetXMLDeviceInfo(domain, "vbd", dev, "dev");
if (val != NULL) {
virBufferVSprintf(buf, " <target dev='%s'/>\n", val);
char *tmp = val;
if (!strncmp(tmp, "ioemu:", 6))
tmp += 6;
virBufferVSprintf(buf, " <target dev='%s'/>\n", tmp);
free(val);
}
val = virDomainGetXMLDeviceInfo(domain, "vbd", dev, "read-only");
@ -357,7 +364,7 @@ virDomainGetXMLDevices(virDomainPtr domain, virBufferPtr buf)
* @buf: the output buffer object
* @dev: the xenstrore internal device number
*
* Extract and dump in the buffer informations on the interface used by
* Extract and dump in the buffer information on the interface used by
* the domain
*
* Returns 0 in case of success, -1 in case of failure
@ -457,7 +464,7 @@ virDomainGetXMLInterfaces(virDomainPtr domain, virBufferPtr buf)
* @domain: a domain object
* @buf: the output buffer object
*
* Extract the boot informations used to start that domain
* Extract the boot information used to start that domain
*
* Returns 0 in case of success, -1 in case of failure
*/
@ -560,23 +567,216 @@ virDomainGetXMLDesc(virDomainPtr domain, int flags)
return (ret);
}
#endif
#endif /* 0 - UNUSED */
#ifndef PROXY
/**
* virDomainParseXMLOSDesc:
* @xmldesc: string with the XML description
* virDomainParseXMLOSDescHVM:
* @node: node containing HVM OS description
* @buf: a buffer for the result S-Expr
* @bootloader: indocate if a bootloader script was provided
* @ctxt: a path context representing the XML description
*
* Parse the OS part of the XML description and add it to the S-Expr in buf
* This is a temporary interface as the S-Expr interface
* Parse the OS part of the XML description for an HVM domain and add it to
* the S-Expr in buf. This is a temporary interface as the S-Expr interface
* will be replaced by XML-RPC in the future. However the XML format should
* stay valid over time.
*
* Returns 0 in case of success, -1 in case of error.
*/
static int
virDomainParseXMLOSDesc(xmlNodePtr node, virBufferPtr buf, int bootloader)
virDomainParseXMLOSDescHVM(xmlNodePtr node, virBufferPtr buf, xmlXPathContextPtr ctxt)
{
xmlXPathObjectPtr obj = NULL;
xmlNodePtr cur, txt;
const xmlChar *type = NULL;
const xmlChar *loader = NULL;
const xmlChar *boot_dev = NULL;
xmlChar *graphics_type = NULL;
cur = node->children;
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
if ((type == NULL)
&& (xmlStrEqual(cur->name, BAD_CAST "type"))) {
txt = cur->children;
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
type = txt->content;
} else if ((loader == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "loader"))) {
txt = cur->children;
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
loader = txt->content;
} else if ((boot_dev == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "boot"))) {
boot_dev = xmlGetProp(cur, BAD_CAST "dev");
}
}
cur = cur->next;
}
if ((type == NULL) || (!xmlStrEqual(type, BAD_CAST "hvm"))) {
/* VIR_ERR_OS_TYPE */
virXMLError(VIR_ERR_OS_TYPE, (const char *) type, 0);
return (-1);
}
virBufferAdd(buf, "(image (hvm ", 12);
if (loader == NULL) {
virXMLError(VIR_ERR_NO_KERNEL, NULL, 0);
goto error;
} else {
virBufferVSprintf(buf, "(kernel '%s')", (const char *) loader);
}
/* get the device emulation model */
obj = xmlXPathEval(BAD_CAST "string(/domain/devices/emulator[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
(obj->stringval == NULL) || (obj->stringval[0] == 0)) {
virXMLError(VIR_ERR_NO_KERNEL, NULL, 0); /* TODO: error */
goto error;
}
virBufferVSprintf(buf, "(device_model '%s')",
(const char *) obj->stringval);
xmlXPathFreeObject(obj);
obj = NULL;
if (boot_dev) {
if (xmlStrEqual(boot_dev, BAD_CAST "fd")) {
virBufferVSprintf(buf, "(boot a)", (const char *) boot_dev);
} else if (xmlStrEqual(boot_dev, BAD_CAST "cdrom")) {
virBufferVSprintf(buf, "(boot d)", (const char *) boot_dev);
} else if (xmlStrEqual(boot_dev, BAD_CAST "hd")) {
virBufferVSprintf(buf, "(boot c)", (const char *) boot_dev);
} else {
/* Any other type of boot dev is unsupported right now */
virXMLError(VIR_ERR_XML_ERROR, NULL, 0);
}
/* get the 1st floppy device file */
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk[@device='floppy' and target/@dev='fda']/source", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
cur = obj->nodesetval->nodeTab[0];
virBufferVSprintf(buf, "(fda '%s')",
(const char *) xmlGetProp(cur, BAD_CAST "file"));
cur = NULL;
}
if (obj) {
xmlXPathFreeObject(obj);
obj = NULL;
}
/* get the 2nd floppy device file */
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk[@device='floppy' and target/@dev='fdb']/source", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
cur = obj->nodesetval->nodeTab[0];
virBufferVSprintf(buf, "(fdb '%s')",
(const char *) xmlGetProp(cur, BAD_CAST "file"));
cur = NULL;
}
if (obj) {
xmlXPathFreeObject(obj);
obj = NULL;
}
/* get the cdrom device file */
/* XXX new (3.0.3) Xend puts cdrom devs in usual (devices) block */
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk[@device='cdrom' and target/@dev='hdc']/source", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
cur = obj->nodesetval->nodeTab[0];
virBufferVSprintf(buf, "(cdrom '%s')",
(const char *) xmlGetProp(cur, BAD_CAST "file"));
cur = NULL;
}
if (obj) {
xmlXPathFreeObject(obj);
obj = NULL;
}
obj = xmlXPathEval(BAD_CAST "/domain/features/acpi", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
virBufferAdd(buf, "(acpi 1)", 8);
xmlXPathFreeObject(obj);
obj = NULL;
}
obj = xmlXPathEval(BAD_CAST "/domain/features/apic", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
virBufferAdd(buf, "(apic 1)", 8);
xmlXPathFreeObject(obj);
obj = NULL;
}
obj = xmlXPathEval(BAD_CAST "/domain/features/pae", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
virBufferAdd(buf, "(pae 1)", 7);
xmlXPathFreeObject(obj);
obj = NULL;
}
}
obj = xmlXPathEval(BAD_CAST "count(domain/devices/console) > 0", ctxt);
if ((obj == NULL) || (obj->type != XPATH_BOOLEAN)) {
virXMLError(VIR_ERR_XML_ERROR, NULL, 0);
goto error;
}
if (obj->boolval) {
virBufferAdd(buf, "(serial pty)", 12);
}
xmlXPathFreeObject(obj);
obj = NULL;
/* Is a graphics device specified? */
obj = xmlXPathEval(BAD_CAST "/domain/devices/graphics[1]", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr = 0)) {
virXMLError(VIR_ERR_NO_OS, "", 0); /* TODO: error */
goto error;
}
graphics_type = xmlGetProp(obj->nodesetval->nodeTab[0], BAD_CAST "type");
if (graphics_type != NULL) {
if (xmlStrEqual(graphics_type, BAD_CAST "sdl")) {
virBufferAdd(buf, "(sdl 1)", 7);
// TODO:
// Need to understand sdl options
//
//virBufferAdd(buf, "(display localhost:10.0)", 24);
//virBufferAdd(buf, "(xauthority /root/.Xauthority)", 30);
}
else if (xmlStrEqual(graphics_type, BAD_CAST "vnc"))
virBufferAdd(buf, "(vnc 1)", 7);
xmlFree(graphics_type);
}
xmlXPathFreeObject(obj);
virBufferAdd(buf, "))", 2);
return (0);
error:
if (obj != NULL)
xmlXPathFreeObject(obj);
return(-1);
}
/**
* virDomainParseXMLOSDescPV:
* @node: node containing PV OS description
* @buf: a buffer for the result S-Expr
*
* Parse the OS part of the XML description for a paravirtualized domain
* and add it to the S-Expr in buf. This is a temporary interface as the
* S-Expr interface will be replaced by XML-RPC in the future. However
* the XML format should stay valid over time.
*
* Returns 0 in case of success, -1 in case of error.
*/
static int
virDomainParseXMLOSDescPV(xmlNodePtr node, virBufferPtr buf)
{
xmlNodePtr cur, txt;
const xmlChar *type = NULL;
@ -591,27 +791,32 @@ virDomainParseXMLOSDesc(xmlNodePtr node, virBufferPtr buf, int bootloader)
if ((type == NULL)
&& (xmlStrEqual(cur->name, BAD_CAST "type"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
type = txt->content;
} else if ((kernel == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "kernel"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
kernel = txt->content;
} else if ((root == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "root"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
root = txt->content;
} else if ((initrd == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "initrd"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
initrd = txt->content;
} else if ((cmdline == NULL) &&
(xmlStrEqual(cur->name, BAD_CAST "cmdline"))) {
txt = cur->children;
if ((txt->type == XML_TEXT_NODE) && (txt->next == NULL))
if ((txt != NULL) && (txt->type == XML_TEXT_NODE) &&
(txt->next == NULL))
cmdline = txt->content;
}
}
@ -622,12 +827,10 @@ virDomainParseXMLOSDesc(xmlNodePtr node, virBufferPtr buf, int bootloader)
virXMLError(VIR_ERR_OS_TYPE, (const char *) type, 0);
return (-1);
}
virBufferAdd(buf, "(linux ", 7);
virBufferAdd(buf, "(image (linux ", 14);
if (kernel == NULL) {
if (bootloader == 0) {
virXMLError(VIR_ERR_NO_KERNEL, NULL, 0);
return (-1);
}
virXMLError(VIR_ERR_NO_KERNEL, NULL, 0);
return (-1);
} else {
virBufferVSprintf(buf, "(kernel '%s')", (const char *) kernel);
}
@ -637,13 +840,13 @@ virDomainParseXMLOSDesc(xmlNodePtr node, virBufferPtr buf, int bootloader)
virBufferVSprintf(buf, "(root '%s')", (const char *) root);
if (cmdline != NULL)
virBufferVSprintf(buf, "(args '%s')", (const char *) cmdline);
virBufferAdd(buf, ")", 1);
virBufferAdd(buf, "))", 2);
return (0);
}
/**
* virDomainParseXMLDiskDesc:
* @xmldesc: string with the XML description
* @node: node containing disk description
* @buf: a buffer for the result S-Expr
*
* Parse the one disk in the XML description and add it to the S-Expr in buf
@ -654,10 +857,11 @@ virDomainParseXMLOSDesc(xmlNodePtr node, virBufferPtr buf, int bootloader)
* Returns 0 in case of success, -1 in case of error.
*/
static int
virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf)
virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf, int hvm)
{
xmlNodePtr cur;
xmlChar *type = NULL;
xmlChar *device = NULL;
xmlChar *source = NULL;
xmlChar *target = NULL;
int ro = 0;
@ -671,6 +875,8 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf)
typ = 1;
xmlFree(type);
}
device = xmlGetProp(node, BAD_CAST "device");
cur = node->children;
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
@ -704,11 +910,30 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf)
xmlFree(source);
return (-1);
}
/* Skip floppy/cdrom disk used as the boot device
* since that's incorporated into the HVM kernel
* (image (hvm..)) part of the sexpr, rather than
* the (devices...) bit. Odd Xend HVM config :-(
* XXX This will have to change in Xen 3.0.3
*/
if (hvm && device &&
(!strcmp((const char *)device, "floppy") ||
!strcmp((const char *)device, "cdrom"))) {
return 0;
}
virBufferAdd(buf, "(device ", 8);
virBufferAdd(buf, "(vbd ", 5);
if (target[0] == '/')
virBufferVSprintf(buf, "(dev '%s')", (const char *) target);
else
virBufferVSprintf(buf, "(dev '/dev/%s')", (const char *) target);
/* XXX ioemu prefix is going away in Xen 3.0.3 */
if (hvm) {
char *tmp = (char *)target;
if (!strncmp((const char *) tmp, "ioemu:", 6))
tmp += 6;
virBufferVSprintf(buf, "(dev 'ioemu:%s')", (const char *) tmp);
} else
virBufferVSprintf(buf, "(dev '%s')", (const char *) target);
if (typ == 0)
virBufferVSprintf(buf, "(uname 'file:%s')", source);
else if (typ == 1) {
@ -722,6 +947,7 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf)
else if (ro == 1)
virBufferVSprintf(buf, "(mode 'r')");
virBufferAdd(buf, ")", 1);
virBufferAdd(buf, ")", 1);
xmlFree(target);
xmlFree(source);
@ -730,7 +956,7 @@ virDomainParseXMLDiskDesc(xmlNodePtr node, virBufferPtr buf)
/**
* virDomainParseXMLIfDesc:
* @xmldesc: string with the XML description
* @node: node containing the interface description
* @buf: a buffer for the result S-Expr
*
* Parse the one interface the XML description and add it to the S-Expr in buf
@ -790,6 +1016,7 @@ virDomainParseXMLIfDesc(xmlNodePtr node, virBufferPtr buf)
}
if (script != NULL)
virBufferVSprintf(buf, "(script '%s')", script);
virBufferAdd(buf, "(type ioemu)", 12);
virBufferAdd(buf, ")", 1);
if (mac != NULL)
@ -822,9 +1049,11 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
virBuffer buf;
xmlChar *prop;
xmlXPathObjectPtr obj = NULL;
xmlXPathObjectPtr tmpobj = NULL;
xmlXPathContextPtr ctxt = NULL;
int i, res;
int bootloader = 0;
int hvm = 0;
if (name != NULL)
*name = NULL;
@ -859,7 +1088,7 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
goto error;
}
/*
* extract soem of the basics, name, memory, cpus ...
* extract some of the basics, name, memory, cpus ...
*/
obj = xmlXPathEval(BAD_CAST "string(/domain/name[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_STRING) ||
@ -877,7 +1106,7 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
obj = xmlXPathEval(BAD_CAST "number(/domain/memory[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_NUMBER) ||
(obj->floatval < 64000)) {
(isnan(obj->floatval)) || (obj->floatval < 64000)) {
virBufferVSprintf(&buf, "(memory 128)(maxmem 128)");
} else {
unsigned long mem = (obj->floatval / 1024);
@ -888,7 +1117,7 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
obj = xmlXPathEval(BAD_CAST "number(/domain/vcpu[1])", ctxt);
if ((obj == NULL) || (obj->type != XPATH_NUMBER) ||
(obj->floatval <= 0)) {
(isnan(obj->floatval)) || (obj->floatval <= 0)) {
virBufferVSprintf(&buf, "(vcpus 1)");
} else {
unsigned int cpu = (unsigned int) obj->floatval;
@ -897,6 +1126,13 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
}
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "string(/domain/uuid[1])", ctxt);
if ((obj == NULL) || ((obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0))) {
virBufferVSprintf(&buf, "(uuid '%s')", obj->stringval);
}
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "string(/domain/bootloader[1])", ctxt);
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
@ -909,7 +1145,6 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
virBufferVSprintf(&buf, "(on_poweroff '%s')", obj->stringval);
bootloader = 1;
}
xmlXPathFreeObject(obj);
@ -917,7 +1152,6 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
virBufferVSprintf(&buf, "(on_reboot '%s')", obj->stringval);
bootloader = 1;
}
xmlXPathFreeObject(obj);
@ -925,42 +1159,52 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
if ((obj != NULL) && (obj->type == XPATH_STRING) &&
(obj->stringval != NULL) && (obj->stringval[0] != 0)) {
virBufferVSprintf(&buf, "(on_crash '%s')", obj->stringval);
bootloader = 1;
}
xmlXPathFreeObject(obj);
/* analyze of the os description */
virBufferAdd(&buf, "(image ", 7);
obj = xmlXPathEval(BAD_CAST "/domain/os[1]", ctxt);
if ((obj == NULL) || (obj->type != XPATH_NODESET) ||
(obj->nodesetval == NULL) || (obj->nodesetval->nodeNr != 1)) {
virXMLError(VIR_ERR_NO_OS, nam, 0);
goto error;
}
res = virDomainParseXMLOSDesc(obj->nodesetval->nodeTab[0], &buf,
bootloader);
if (res != 0) {
goto error;
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr == 1)) {
/* Analyze of the os description, based on HVM or PV. */
tmpobj = xmlXPathEval(BAD_CAST "string(/domain/os/type[1])", ctxt);
if ((tmpobj != NULL) &&
((tmpobj->type != XPATH_STRING) || (tmpobj->stringval == NULL) ||
(tmpobj->stringval[0] == 0))) {
xmlXPathFreeObject(tmpobj);
virXMLError(VIR_ERR_OS_TYPE, nam, 0);
goto error;
}
if ((tmpobj == NULL) || !xmlStrEqual(tmpobj->stringval, BAD_CAST "hvm")) {
res = virDomainParseXMLOSDescPV(obj->nodesetval->nodeTab[0], &buf);
} else {
hvm = 1;
res = virDomainParseXMLOSDescHVM(obj->nodesetval->nodeTab[0], &buf, ctxt);
}
xmlXPathFreeObject(tmpobj);
if (res != 0)
goto error;
} else if (bootloader == 0) {
virXMLError(VIR_ERR_NO_OS, nam, 0);
goto error;
}
xmlXPathFreeObject(obj);
virBufferAdd(&buf, ")", 1);
/* analyze of the devices */
obj = xmlXPathEval(BAD_CAST "/domain/devices/disk", ctxt);
if ((obj == NULL) || (obj->type != XPATH_NODESET) ||
(obj->nodesetval == NULL) || (obj->nodesetval->nodeNr < 1)) {
virXMLError(VIR_ERR_NO_DEVICE, nam, 0);
goto error;
}
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
virBufferAdd(&buf, "(device ", 8);
res = virDomainParseXMLDiskDesc(obj->nodesetval->nodeTab[i], &buf);
if (res != 0) {
goto error;
}
virBufferAdd(&buf, ")", 1);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
res = virDomainParseXMLDiskDesc(obj->nodesetval->nodeTab[i], &buf, hvm);
if (res != 0) {
goto error;
}
}
}
xmlXPathFreeObject(obj);
obj = xmlXPathEval(BAD_CAST "/domain/devices/interface", ctxt);
if ((obj != NULL) && (obj->type == XPATH_NODESET) &&
(obj->nodesetval != NULL) && (obj->nodesetval->nodeNr >= 0)) {
@ -1003,3 +1247,66 @@ virDomainParseXMLDesc(const char *xmldesc, char **name)
free(ret);
return (NULL);
}
#endif /* !PROXY */
unsigned char *virParseUUID(char **ptr, const char *uuid) {
int rawuuid[16];
unsigned char *dst_uuid = NULL;
int ret;
int i;
memset(rawuuid, 0xFF, sizeof(rawuuid));
if (uuid == NULL)
goto error;
ret = sscanf(uuid,
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x",
rawuuid + 0, rawuuid + 1, rawuuid + 2, rawuuid + 3,
rawuuid + 4, rawuuid + 5, rawuuid + 6, rawuuid + 7,
rawuuid + 8, rawuuid + 9, rawuuid + 10, rawuuid + 11,
rawuuid + 12, rawuuid + 13, rawuuid + 14, rawuuid + 15);
if (ret == 16)
goto done;
ret = sscanf(uuid,
"%02x%02x%02x%02x-"
"%02x%02x-"
"%02x%02x-"
"%02x%02x-"
"%02x%02x%02x%02x%02x%02x",
rawuuid + 0, rawuuid + 1, rawuuid + 2, rawuuid + 3,
rawuuid + 4, rawuuid + 5, rawuuid + 6, rawuuid + 7,
rawuuid + 8, rawuuid + 9, rawuuid + 10, rawuuid + 11,
rawuuid + 12, rawuuid + 13, rawuuid + 14, rawuuid + 15);
if (ret == 16)
goto done;
ret = sscanf(uuid,
"%02x%02x%02x%02x-"
"%02x%02x%02x%02x-"
"%02x%02x%02x%02x-"
"%02x%02x%02x%02x",
rawuuid + 0, rawuuid + 1, rawuuid + 2, rawuuid + 3,
rawuuid + 4, rawuuid + 5, rawuuid + 6, rawuuid + 7,
rawuuid + 8, rawuuid + 9, rawuuid + 10, rawuuid + 11,
rawuuid + 12, rawuuid + 13, rawuuid + 14, rawuuid + 15);
if (ret != 16)
goto error;
done:
dst_uuid = (unsigned char *) *ptr;
*ptr += 16;
for (i = 0; i < 16; i++)
dst_uuid[i] = rawuuid[i] & 0xFF;
error:
return dst_uuid;
}

View File

@ -5,7 +5,7 @@
#ifndef __VIR_XML_H__
#define __VIR_XML_H__
#include "libvirt.h"
#include "libvirt/libvirt.h"
#ifdef __cplusplus
extern "C" {
@ -30,6 +30,7 @@ int virBufferAdd(virBufferPtr buf, const char *str, int len);
int virBufferVSprintf(virBufferPtr buf, const char *format, ...);
int virBufferStrcat(virBufferPtr buf, ...);
char *virDomainParseXMLDesc(const char *xmldesc, char **name);
unsigned char *virParseUUID(char **ptr, const char *uuid);
#ifdef __cplusplus
}

View File

@ -31,6 +31,7 @@
#define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd"
#ifndef PROXY
static virDriver xenStoreDriver = {
VIR_DRV_XEN_STORE,
"XenStore",
@ -64,7 +65,11 @@ static virDriver xenStoreDriver = {
xenStoreDomainSetMemory, /* domainSetMemory */
xenStoreGetDomainInfo, /* domainGetInfo */
NULL, /* domainSave */
NULL /* domainRestore */
NULL, /* domainRestore */
NULL, /* domainSetVcpus */
NULL, /* domainPinVcpu */
NULL, /* domainGetVcpus */
NULL, /* domainDumpXML */
};
/**
@ -76,6 +81,7 @@ void xenStoreRegister(void)
{
virRegisterDriver(&xenStoreDriver);
}
#endif /* ! PROXY */
/**
* virXenStoreError:
@ -103,6 +109,7 @@ virXenStoreError(virConnectPtr conn, virErrorNumber error, const char *info)
* Helper internal APIs *
* *
************************************************************************/
#ifndef PROXY
/**
* virConnectDoStoreList:
* @conn: pointer to the hypervisor connection
@ -123,10 +130,12 @@ virConnectDoStoreList(virConnectPtr conn, const char *path,
return xs_directory(conn->xshandle, 0, path, nb);
}
#endif /* ! PROXY */
/**
* virDomainDoStoreQuery:
* @domain: a domain object
* @conn: pointer to the hypervisor connection
* @domid: id of the domain
* @path: the relative path of the data in the store to retrieve
*
* Internal API querying the Xenstore for a string value.
@ -134,23 +143,21 @@ virConnectDoStoreList(virConnectPtr conn, const char *path,
* Returns a string which must be freed by the caller or NULL in case of error
*/
static char *
virDomainDoStoreQuery(virDomainPtr domain, const char *path)
virDomainDoStoreQuery(virConnectPtr conn, int domid, const char *path)
{
char s[256];
unsigned int len = 0;
if (!VIR_IS_CONNECTED_DOMAIN(domain))
return (NULL);
if (domain->conn->xshandle == NULL)
if (conn->xshandle == NULL)
return (NULL);
snprintf(s, 255, "/local/domain/%d/%s", domain->handle, path);
snprintf(s, 255, "/local/domain/%d/%s", domid, path);
s[255] = 0;
return xs_read(domain->conn->xshandle, 0, &s[0], &len);
return xs_read(conn->xshandle, 0, &s[0], &len);
}
#ifndef PROXY
/**
* virDomainDoStoreWrite:
* @domain: a domain object
@ -266,6 +273,7 @@ virConnectCheckStoreID(virConnectPtr conn, int id)
}
return (0);
}
#endif /* ! PROXY */
/************************************************************************
* *
@ -288,10 +296,14 @@ xenStoreOpen(virConnectPtr conn, const char *name, int flags)
if ((name != NULL) && (strcasecmp(name, "xen")))
return(-1);
#ifdef PROXY
conn->xshandle = xs_daemon_open_readonly();
#else
if (flags & VIR_DRV_OPEN_RO)
conn->xshandle = xs_daemon_open_readonly();
else
conn->xshandle = xs_daemon_open();
#endif /* ! PROXY */
if (conn->xshandle == NULL) {
if (!(flags & VIR_DRV_OPEN_QUIET))
@ -324,12 +336,13 @@ xenStoreClose(virConnectPtr conn)
return (0);
}
#ifndef PROXY
/**
* xenStoreGetDomainInfo:
* @domain: pointer to the domain block
* @info: the place where informations should be stored
* @info: the place where information 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 information.
*
* Returns 0 in case of success, -1 in case of error.
*/
@ -340,6 +353,9 @@ xenStoreGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
unsigned int nb_vcpus;
char request[200];
if (!VIR_IS_CONNECTED_DOMAIN(domain))
return (-1);
if ((domain == NULL) || (domain->conn == NULL) || (info == NULL)) {
virXenStoreError(domain ? domain->conn : NULL, VIR_ERR_INVALID_ARG,
__FUNCTION__);
@ -348,7 +364,7 @@ xenStoreGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
if (domain->conn->xshandle == NULL)
return(-1);
tmp = virDomainDoStoreQuery(domain, "running");
tmp = virDomainDoStoreQuery(domain->conn, domain->handle, "running");
if (tmp != NULL) {
if (tmp[0] == '1')
info->state = VIR_DOMAIN_RUNNING;
@ -356,7 +372,7 @@ xenStoreGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
} else {
info->state = VIR_DOMAIN_NONE;
}
tmp = virDomainDoStoreQuery(domain, "memory/target");
tmp = virDomainDoStoreQuery(domain->conn, domain->handle, "memory/target");
if (tmp != NULL) {
info->memory = atol(tmp);
info->maxMem = atol(tmp);
@ -367,7 +383,7 @@ xenStoreGetDomainInfo(virDomainPtr domain, virDomainInfoPtr info)
}
#if 0
/* doesn't seems to work */
tmp = virDomainDoStoreQuery(domain, "cpu_time");
tmp = virDomainDoStoreQuery(domain->conn, domain->handle, "cpu_time");
if (tmp != NULL) {
info->cpuTime = atol(tmp);
free(tmp);
@ -427,7 +443,10 @@ xenStoreDomainGetMaxMemory(virDomainPtr domain)
char *tmp;
unsigned long ret = 0;
tmp = virDomainDoStoreQuery(domain, "memory/target");
if (!VIR_IS_CONNECTED_DOMAIN(domain))
return (ret);
tmp = virDomainDoStoreQuery(domain->conn, domain->handle, "memory/target");
if (tmp != NULL) {
ret = (unsigned long) atol(tmp);
free(tmp);
@ -626,4 +645,45 @@ xenStoreDomainReboot(virDomainPtr domain, unsigned int flags ATTRIBUTE_UNUSED)
*/
return(virDomainDoStoreWrite(domain, "control/shutdown", "reboot"));
}
#endif /* ! PROXY */
/**
* xenStoreDomainGetVNCPort:
* @conn: the hypervisor connection
* @domid: id of the domain
*
* Return the port number on which the domain is listening for VNC
* connections.
*
* Returns the port number, -1 in case of error
*/
int xenStoreDomainGetVNCPort(virConnectPtr conn, int domid) {
char *tmp;
int ret = -1;
tmp = virDomainDoStoreQuery(conn, domid, "console/vnc-port");
if (tmp != NULL) {
char *end;
ret = strtol(tmp, &end, 10);
if (ret == 0 && end == tmp)
ret = -1;
free(tmp);
}
return(ret);
}
/**
* xenStoreDomainGetConsolePath:
* @conn: the hypervisor connection
* @domid: id of the domain
*
* Return the path to the psuedo TTY on which the guest domain's
* serial console is attached.
*
* Returns the path to the serial console. It is the callers
* responsibilty to free() the return string. Returns NULL
* on error
*/
char * xenStoreDomainGetConsolePath(virConnectPtr conn, int domid) {
return virDomainDoStoreQuery(conn, domid, "console/tty");
}

View File

@ -35,6 +35,10 @@ unsigned long xenStoreDomainGetMaxMemory(virDomainPtr domain);
int xenStoreDomainShutdown (virDomainPtr domain);
int xenStoreDomainReboot (virDomainPtr domain,
unsigned int flags);
int xenStoreDomainGetVNCPort(virConnectPtr conn, int domid);
char * xenStoreDomainGetConsolePath(virConnectPtr conn, int domid);
#ifdef __cplusplus
}
#endif

5
tests/.cvsignore Normal file
View File

@ -0,0 +1,5 @@
Makefile
Makefile.in
.deps
.libs
xmlrpctest

View File

@ -19,7 +19,7 @@
#include <libxml/tree.h>
#include <libxml/xpath.h>
#include "libvirt.h"
#include "libvirt/libvirt.h"
#include "xml.h"
#include "xmlrpc.h"