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

Compare commits

..

1105 Commits

Author SHA1 Message Date
6a17c6c652 Release of 0.4.1
* NEWS configure.in libvirt.spec.in docs/* include/libvirt/libvirt.h
  po/*: preparing release of libvirt-0.4.1
Daniel
2008-03-03 14:42:37 +00:00
6272a7d0c2 Plug saslUsernameWhitelist leak.
* qemud/qemud.c (qemudCleanup): Free the array as well as
the strings in it.
2008-03-03 13:17:05 +00:00
cd6eefd3e8 Plug skipped-qemudCleanup leak.
* qemud/qemud.c (main): Call qemudCleanup also upon failure.
Otherwise, an error return would skip it and induce leaks.
2008-03-03 13:16:31 +00:00
ba8459e859 Plug remoteReadConfigFile leak.
* qemud/qemud.c (remoteReadConfigFile): Be careful to free
"conf" after a successful virConfReadFile.
2008-03-03 13:15:57 +00:00
1de5bace80 Plug two leaks: host.migrateTrans and arch.name
* src/capabilities.c (virCapabilitiesFree): Free host.migrateTrans.
(virCapabilitiesFreeGuest): Free arch.name member.
2008-03-03 13:15:14 +00:00
47a4c0fa0b Plug virCapabilities*GuestDomain leak.
* src/capabilities.c (virCapabilitiesFreeGuestDomain): Free dom->type.
(virCapabilitiesAddGuestDomain): Remove duplicate strdup stmt.
2008-03-03 13:14:26 +00:00
3e1aaf27fe missing comments for _virDomainBlockStats fields
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in:
  missing comments for _virDomainBlockStats fields
* docs/*: rebuilt docs
Daniel
2008-03-03 06:18:06 +00:00
39947cec85 fix a broken line split
* qemud/Makefile.am: fix a broken line split
Daniel
2008-02-29 17:02:41 +00:00
bb8340c18d Many typos fixed (Atsushi SAKAI). 2008-02-29 12:53:10 +00:00
ba52fcbcdf Rewrite test-coverage rules to accommodate multiple .o files per .c.
* src/Makefile.am (cov): Rewrite rule to merge gcov results corresponding
to two .o files: the libvirt_la- one, and the libvirt_test_la- one.
(tst): Remove unused rule.
* configure.in (LV_LIBTOOL_OBJDIR): Define and AC_SUBST.
2008-02-28 17:07:37 +00:00
9262d88e28 Avoid link errors with "configure --disable-shared".
* src/Makefile.am: Create a convenience library, libvirt_test.la,
and don't restrict access to *its* symbols.
* tests/Makefile.am (LDADDS): Add ../src/libvirt_test.la, so that
"configure --disable-shared" no longer provokes link errors.
(LIBVIRT): Remove definition.
(LDADDS): Remove use.
($(LIBVIRT)): Remove rule.
(LDADDS): Use the new convenience library instead.
(CLEANFILES): Define.
* docs/examples/index.py (dump_Makefile): Append $(COVERAGE_LDFLAGS),
to the LDADDS definition, to avoid link error with the combination of
--enable-test-coverage and --disable-shared.
* docs/examples/Makefile.am: Regenerate.
* docs/examples/index.html: Likewise.
* qemud/Makefile.am (libvirtd_LDFLAGS): Append $(COVERAGE_LDFLAGS).
* src/libvirt_sym.version: Remove some SP-before-TAB.
2008-02-28 17:06:32 +00:00
004ff90483 Fix qemudReportError.
* src/qemu_conf.c: applied patch from Cole Robinson to use virErrorMsg
  in qemudReportError.
Daniel
2008-02-28 11:17:49 +00:00
26e12450bb Typo. 2008-02-28 11:01:17 +00:00
9699e372c2 Set MAC address on TUN device for Xenner compatability 2008-02-28 01:23:14 +00:00
46b427a310 Make qemud/'s rpcgen rules work.
* qemud/Makefile.am (SUFFIXES): Define to .x before implicit rule.
2008-02-27 19:12:58 +00:00
92a1e14b0b virMacAddrCompare for comparing MAC addresses
* src/util.c, src/util.h, src/libvirt_sym.version: Added
	  virMacAddrCompare utility function for comparing MAC
	  addresses.
	* src/virsh.c, src/xm_internal.c: Use virMacAddrCompare
	  to compare addresses.  (Shigeki Sakamoto and Richard Jones).
2008-02-27 16:14:44 +00:00
fa4ab3325b Avoid "make distcheck" failure.
* src/Makefile.am (virsh_SOURCES): Add util-lib.h.
2008-02-27 15:17:45 +00:00
d7cdc28431 Fix a "make syntax-check" failure.
* src/capabilities.c: Include <config.h> from the .c file,
* src/capabilities.h: ... not from the .h file.
2008-02-27 14:40:19 +00:00
b4882504ea Fix typos (Atsushi SAKAI). 2008-02-27 10:37:19 +00:00
63bc5dd3e1 Add formal internal capabilities API and update drivers to use it 2008-02-27 04:35:08 +00:00
727c5601ec Implement virDomainBlockStats for QEMU/KVM.
* src/qemu_driver.c: Implement virDomainBlockStats for QEMU/KVM
	  using QEMU/KVM 'info blockstats' command (Richard Jones).
	* src/qemu_driver.c, src/qemu_conf.h: const-correctness
	  fixes (Jim Meyering).
2008-02-26 18:41:43 +00:00
242fe3d401 No address attribute in Xen domain XML.
* src/xm_internal.c: handle the case where <mac/> clause
	  in Xen domain interface has no address attribute
	  (Shigeki Sakamoto).
2008-02-26 18:31:57 +00:00
ea47a7d4e4 Oops trailing blank, Daniel 2008-02-26 07:06:48 +00:00
36c6bfa63d * src/driver.h src/libvirt.c src/openvz_driver.c src/qemu_driver.c
src/remote_internal.c src/test.c src/util.c src/util.h
  src/xen_unified.c: added probe interface at the driver level,
  use that to improve default hypervisor selection in the absence
  of a given URI when connecting
Daniel
2008-02-26 07:05:18 +00:00
9b1cd481b8 fix compilation against static libraries
* src/Makefile.am src/util-lib.h: fix done with Jim to allow
  compilation of virsh with the static libraries.
Daniel
2008-02-25 13:55:56 +00:00
e497deb89e Avoid new "make syntax-check" failures.
* .x-sc_avoid_write: Exempt src/util-lib.c, too.
* Makefile.maint (sc_unmarked_diagnostics): Filter out false positives.
* src/storage_backend_fs.c (virStorageBackendFileSystemVolCreate):
Use safewrite, not write.
* src/storage_backend_logical.c (virStorageBackendLogicalBuildPool): Likewise.
2008-02-25 10:00:16 +00:00
b1b23f76be avoid format string warnings
Avoid warnings like this:
file:nnn:format not a string literal and no format arguments

* qemud/qemud.c: Insert a "%s" format argument.
* qemud/remote.c: Likewise.
* src/iptables.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/storage_backend.c: Likewise.
* src/storage_backend_fs.c: Likewise.
* src/storage_backend_iscsi.c Likewise.
* src/storage_backend_logical.c: Likewise.
* src/storage_conf.c: Likewise.
* src/storage_driver.c: Likewise.
2008-02-22 16:26:13 +00:00
b59d9c85f1 Use safewrite in place of write, in many cases.
Also add "make syntax-check" rules to ensure no new uses sneak in.

There are many uses of write like this:

    if (write (fd, xml, towrite) != towrite)
        return -1;

The problem is that the syscall can succeed, yet write less than
the requested number of bytes, so the caller should retry
rather than simply failing.

This patch changes most of them to use util.c's safewrite wrapper,
which encapsulates the process.  Also, there were a few cases in
which the retry loop was open-coded, and I replaced those, too.

* Makefile.maint (sc_avoid_write): New rule, to avoid recurrence.
* .x-sc_avoid_write: New file.  Record two legitimate exemptions.
* qemud/qemud.c (sig_handler, qemudClientWriteBuf): Use safewrite, not write.
* src/conf.c (__virConfWriteFile): Likewise.
* src/qemu_conf.c (qemudSaveConfig, qemudSaveNetworkConfig): Likewise.
* src/qemu_driver.c (qemudWaitForMonitor, qemudStartVMDaemon)
(qemudVMData, PROC_IP_FORWARD): Likewise.
* proxy/libvirt_proxy.c: Include "util.h".
(proxyWriteClientSocket): Use safewrite.
* src/test.c (testDomainSave, testDomainCoreDump): Likewise.
* src/proxy_internal.c (virProxyWriteClientSocket): Likewise.
* src/virsh.c: Include "util-lib.h".
(vshOutputLogFile): Use safewrite.
* src/console.c: Include "util-lib.h".
(vshRunConsole): Use safewrite.
2008-02-22 15:55:04 +00:00
a178a4e7bf Move safewrite and saferead to a separate file.
We currently use safewrite from inside libvirt and don't want to publish
any such function name.  However, we do want to use it in applications
like virsh, libvirtd and libvirt_proxy that link with libvirt.  To that
end, this change moves that function definition (along with the nearly
identical saferead) into a new file, util-lib.c.  To avoid maintaining
separate copies of even such small functions, we simply include that new
file from util.c.  Then, the separate applications that need to use
safewrite simply compile and link with util-lib.c.

Of course, this does mean that each of those applications will
containing two copies of these functions.  However, the functions
are so small that it's not worth worrying about that.

* src/util.c (saferead, safewrite): Move function definitions to
util-lib.c and include that .c file.
* src/util-lib.c (saferead, safewrite): New file.  Functions from src/util.c
with slight change (s/int r =/ssize_t r =/) to reflect read/write return type.
* src/util-lib.h: Declare the two moved functions.
* src/util.h: Remove declarations.  Include src/util-lib.h.
* proxy/Makefile.am (libvirt_proxy_SOURCES): Add src/util-lib.c.
* qemud/Makefile.am (libvirtd_SOURCES): Likewise.
* src/Makefile.am (virsh_SOURCES): Add util-lib.c.  Remove some SP-before-TAB.
2008-02-22 15:53:13 +00:00
6187c6de9b With --enable-iptables-lokkit=no, avoid warning about unused parameter.
* src/iptables.c (iptRulesSave) [!ENABLE_IPTABLES_LOKKIT]:
Mark parameter as used.
2008-02-22 12:34:27 +00:00
bdbce64bab With --without-xen, avoid warning about unused function.
* tests/statstest.c (testQuietError) [!WITH_XEN]: Don't define.
2008-02-22 12:33:47 +00:00
9bcade46df Rewrite openvzSetUUID.
* src/openvz_conf.c (openvzSetUUID): Rewrite to avoid unchecked
lseek, write, and close as well as a potential file descriptor leak.
2008-02-21 18:48:06 +00:00
5fc07cd840 Handle failed openvzLocateConfDir.
* src/openvz_conf.c (openvzLocateConfDir, openvzGetVPSUUID):
(openvzSetUUID): Don't dereference NULL upon failure.
2008-02-21 18:22:45 +00:00
be8653b183 Fix double-free in OpenVZ driver.
* src/openvz_conf.c: Double-free fix (Anton Protopopov).
2008-02-21 15:20:36 +00:00
83d0aa0706 Added missing symbol export 2008-02-21 03:53:03 +00:00
c8c473c053 Avoid "make syntax-check" failure.
* docs/examples/index.py: Don't emit trailing blanks.
* docs/examples/Makefile.am: Regenerate.
2008-02-20 17:26:01 +00:00
104cc98636 Update to work with new policy kit APIs 2008-02-20 16:54:35 +00:00
caad8777e0 Update po files with latest translatable strings 2008-02-20 16:08:56 +00:00
4bea16df64 Ignore libvirt_parthelper binary 2008-02-20 15:58:38 +00:00
8b6b21d41c Added docs on storage management capabilities 2008-02-20 15:58:06 +00:00
a278dbb776 Ignore doc files for syntax check 2008-02-20 15:57:34 +00:00
291158945d Added no-op stub of storage APIs to test driver 2008-02-20 15:53:34 +00:00
b49b628ab5 Added all example storage XML files 2008-02-20 15:52:40 +00:00
b7db975135 Added disk partition storage pool backend 2008-02-20 15:52:17 +00:00
8ec1fcd925 Added iSCSI storage pool backend 2008-02-20 15:49:25 +00:00
049ff4e572 Set close-on-exec flag for signal pipe 2008-02-20 15:47:06 +00:00
e266ded2f6 Added directory/filesystem/netfs based storage pool backend 2008-02-20 15:45:59 +00:00
ac736602fd Added logical volume storage pool driver 2008-02-20 15:45:33 +00:00
e39438e869 Added directory/filesystem/netfs based storage pool backend 2008-02-20 15:42:30 +00:00
4a4e272f9d Added storage backend helper APIs 2008-02-20 15:38:29 +00:00
20878720c0 Added main internal storage driver impl 2008-02-20 15:34:52 +00:00
f43e709842 Added convenience virsh command for creating pools/volumes without XML 2008-02-20 15:29:13 +00:00
816fd02876 Added virsh commands for storage management 2008-02-20 15:27:08 +00:00
859679f72a Added python binding for storage APIs 2008-02-20 15:26:22 +00:00
661c5c4476 Add storage APIs to remote driver 2008-02-20 15:23:36 +00:00
f48160cfb4 Add remote daemon support for storage APIs 2008-02-20 15:22:35 +00:00
056da31bfe Regenerate docs to include storage APIs 2008-02-20 15:20:44 +00:00
cb228a0e24 Internal driver API for storage management 2008-02-20 15:06:53 +00:00
e1d2e325dd Add public API for storage management 2008-02-20 14:57:39 +00:00
26709f561f Pull useless-if-before-free from gnulib, and update.
* bootstrap (gnulib_tool): Add useless-if-before-free to
the list of modules.
* build-aux/useless-if-before-free: Update from gnulib.
* gnulib/lib/vasnprintf.c: Work around a bug in HPUX 10.20.
* gnulib/m4/vasnprintf.m4: Likewise.
2008-02-13 21:52:19 +00:00
e91aeae437 Ignore ChangeLog/NEWS file for whitespace checks 2008-02-12 14:45:17 +00:00
fd71d295d7 Network doc example fixes
* docs/libvir.html docs/format.html: fixes the examples on the
  section about ethernet bridging, as raised by Maxwell Bottiger,
  fixes bug #430790
Daniel
2008-02-11 16:08:11 +00:00
3da5504e68 Fix gcc-4.3.0 "inlining failed" warning.
* src/internal.h: move xstrol() variants from here ...

* src/util.[ch]: ... to here and rename to virStrToLong()

* src/libvirt_sym.version: export __virStrToLong_i() for
virsh and qemud.

* src/nodeinfo.c, src/stats_linux.c, src/virsh.c,
  src/xend_internal.c, qemud/qemud.c: replace xstrtol()
calls with virStrToLong()

* src/nodeinfo.h: don't include internal.h, which was only
needed for xstrtol(), but instead include libvirt.h which
is suffificient for the declarations in the header.
2008-02-08 09:15:16 +00:00
db4037e592 Enable another syntax-check rule.
* Makefile.cfg (local-checks-to-skip): Remove sc_no_have_config_h.
* qemud/mdns.c: Remove "#ifdef HAVE_CONFIG_H".
* Makefile.maint (sc_no_have_config_h): Tighten up regexp,
so that the above mention of "HAVE_CONFIG_H" doesn't match.
* .x-sc_no_have_config_h: New file, to exempt gnulib/ straggler.
2008-02-07 19:20:36 +00:00
3cb808d2a2 autobuild.sh: Run "make syntax-check", so the autobuilder does this. 2008-02-07 19:19:45 +00:00
55f7de7821 missing ')'
* qemud/remote.c: fix a missing ')' introduced earlier
Daniel
2008-02-07 17:03:17 +00:00
e9b3bc773d virHashRemoveSet bugfixes
* src/hash.c: fix a couple of problems in virHashRemoveSet based
  on Hiroyuki Kaguchi patch and explanations.
Daniel
2008-02-07 16:56:01 +00:00
247df6e448 Mark all qemudLog diagnostics for translation.
* po/POTFILES.in: Add names of many new files.
* Makefile.maint (err_func_re): Add qemudLog.
Mark diagnostics with _(...).  Split some long lines.
* qemud/qemud.c (remoteCheckCertFile, remoteInitializeGnuTLS):
(qemudDispatchSignalEvent, qemudSetCloseExec, qemudSetNonBlock):
(qemudWritePidFile, qemudListenUnix, remoteMakeSockets):
(remoteListenTCP, qemudInitPaths, qemudInitialize):
(qemudNetworkInit, remoteInitializeTLSSession, remoteCheckDN):
(remoteCheckCertificate, remoteCheckAccess, qemudDispatchServer):
(qemudClientReadBuf, qemudDispatchClientRead):
(qemudClientWriteBuf, qemudDispatchClientWrite, qemudOneLoop):
(remoteConfigGetStringList, checkType, GET_CONF_STR):
(remoteConfigGetAuth, remoteReadConfigFile, main):
* qemud/remote.c (remoteDispatchAuthSaslInit, remoteSASLCheckSSF):
(remoteSASLCheckAccess, remoteDispatchAuthSaslStart):
(remoteDispatchAuthSaslStep, remoteDispatchAuthSaslInit):
(remoteDispatchAuthSaslStart, remoteDispatchAuthSaslStep):
(qemudGetSocketIdentity, remoteDispatchAuthPolkit):
* src/iptables.c (notifyRulesUpdated, MAX_FILE_LEN, iptRulesSave):
(iptRulesReload):
* src/qemu_conf.c (qemudExtractVersionInfo, qemudLoadConfig):
(qemudLoadNetworkConfig, qemudScanConfigDir):
* src/qemu_driver.c (qemudSetCloseExec, qemudSetNonBlock):
(qemudAutostartConfigs, qemudStartup, qemudReload):
(qemudWaitForMonitor, qemudStartVMDaemon, qemudVMData):
(qemudShutdownVMDaemon, qemudStartNetworkDaemon):
(qemudShutdownNetworkDaemon, qemudMonitorCommand):
(qemudDomainUndefine, qemudNetworkUndefine):
* src/uuid.c (virUUIDGenerate):
* src/xm_internal.c (xenXMAttachInterface):
2008-02-07 16:50:17 +00:00
e8ff93b4e6 Remove more useless if tests before "free"-like functions.
* build-aux/useless-if-before-free: Rename from ...
* build-aux/find-unnecessary-if-before-free: ... this.  Remove file.
Also changed it so that new names are no longer hard-coded in the
script.  Instead, they're supplied via options:
* Makefile.cfg (useless_free_options): Define.
Add xmlXPathFreeObject to the list of free-like functions it detects.
* Makefile.maint (sc_avoid_if_before_free): Reflect script renaming.
* .x-sc_avoid_if_before_free: Likewise.
* src/openvz_conf.c (openvzParseXML): Remove useless "if"-before-free.
* src/qemu_conf.c (qemudParseXML, qemudParseNetworkXML): Likewise.
* src/virsh.c (cmdVNCDisplay, cmdTTYConsole, cmdDetachInterface):
(cmdDetachDisk): Likewise.
* src/xm_internal.c (xenXMConfigSetIntFromXPath): Likewise.
(xenXMConfigSetStringFromXPath, xenXMParseXMLToConfig): Likewise.
(xenXMDomainAttachDevice, xenXMAttachDisk, xenXMAttachInterface):
(xenXMDomainDetachDevice): Likewise.
* src/xml.c (virXPathString): Likewise.
* tests/xmlrpctest.c (checkRequestValue): Likewise.
2008-02-07 16:49:29 +00:00
5a93214143 Remove trailing blanks 2008-02-07 12:34:19 +00:00
a0f83fd905 * src/xen_internal.c: Don't crash if there's no /sys/hypervisor/capabilities 2008-02-07 10:43:14 +00:00
3d3c8ac4c4 src/iptables.c: Create directory for saving iptables rules 2008-02-07 10:17:24 +00:00
f90cd4c3f4 src/xm_internal.[ch]: Move static function prototype from header 2008-02-07 10:14:43 +00:00
ecaf98fcc5 Python bindings return values fixes
* python/libvir.c: apply patch from Cole Robinson to provide
  return values for manulally written python bindings.
Daniel
2008-02-07 09:49:13 +00:00
232d4f157a Oops forgot >>>>, Daniel 2008-02-07 09:37:41 +00:00
b33f740e1f * src/libvirt.c: fix bug in xenUnifiedDomainSuspend() patch provided
by Marcus Meissner
Daniel
2008-02-07 09:37:10 +00:00
594af3eb22 add/change/delete a Disk/NIC of an inactive domains
* src/xm_internal.[ch]: applied patch from Shigeki Sakamoto to
  add/change/delete a Disk/NIC of an inactive domains
Daniel
2008-02-06 17:57:10 +00:00
eecd68364a QEmu config error handling fixes
* src/qemu_conf.c: applied 2 patches from Guido Guenther to avoid
  crashes when reading the config file
Daniel
2008-02-06 16:24:28 +00:00
5419d0b44d Fix new "make distcheck" failures.
* src/xml.c (virDomainParseXMLOSDescHVM): Mark a diagnostic.
2008-02-05 22:07:31 +00:00
e04912a9f0 Remove all trailing blanks; turn on the rule to detect them.
* Makefile.cfg (local-checks-to-skip): Remove sc_trailing_blank.
* .x-sc_trailing_blank: New file, to exempt the few binary files.
2008-02-05 19:27:37 +00:00
889eab9348 Ignore built test files 2008-02-05 16:29:42 +00:00
e87e3f86bf Added support for booting off kenrel+initrd with HVM guests 2008-02-05 16:21:25 +00:00
fb66d5ab92 Eliminate all uses of virBufferAdd with string literals.
* Makefile.maint (sc_prohibit_virBufferAdd_with_string_literal):
New rule.
* src/buf.h (virBufferAddLit): Define.
* src/conf.c (virConfSaveValue): Use virBufferAddLit, in place
of virBufferAdd everywhere possible.
(virConfSaveEntry): Likewise.
* src/qemu_conf.c (qemudGenerateXML, qemudGenerateNetworkXML): Likewise.
* src/qemu_driver.c (qemudGetFeatures, qemudGetCapabilities): Likewise.
* src/test.c (testDomainDumpXML, testNetworkDumpXML): Likewise.
* src/xen_internal.c (xenHypervisorMakeCapabilitiesXML): Likewise.
* src/xend_internal.c (xend_parse_sexp_desc_os): Likewise.
(xend_parse_sexp_desc, sexpr_to_xend_topology_xml): Likewise.
* src/xm_internal.c (xenXMDomainFormatXML, xenXMDomainPinVcpu): Likewise.
* src/xml.c (virSaveCpuSet, virParseXenCpuTopology): Likewise.
(virDomainParseXMLGraphicsDescImage): Likewise.
(virDomainParseXMLGraphicsDescVFB, virDomainParseXMLOSDescHVM): Likewise.
(virDomainParseXMLOSDescPV, virDomainParseXMLDiskDesc): Likewise.
(virDomainParseXMLIfDesc, virDomainParseXMLDesc): Likewise.
2008-02-05 14:22:28 +00:00
ecaa696250 Enable more checks for unmarked messages; fix violators.
* Makefile.maint (sc_unmarked_diagnostics): Check for more functions.
* src/conf.c (virConfParseValue): Remove trailing space in diagnostic.
* src/libvirt.c (do_open, virDomainMigrate): Mark diagnostics.
* src/xend_internal.c (do_connect, xenDaemonDomainDumpXMLByID): Likewise.
(xenDaemonDomainDumpXMLByName, xenDaemonCreateLinux): Likewise.
(xenDaemonDomainMigratePerform, xenDaemonDomainDefineXML): Likewise.
* src/xml.c (virXPathString, virXPathNumber, virXPathLong): Likewise.
(virXPathBoolean, virXPathNode, virXPathNodeSet): Likewise.
(virDomainParseXMLOSDescHVM): Likewise.
* src/xmlrpc.c (xmlRpcValueNew): Likewise.
(xmlRpcValueUnmarshalDictElement): Likewise.
2008-02-04 19:31:30 +00:00
e99570fc77 Mark a string for translation.
* src/virsh.c: Add a "%s" and wrap with _(...).
2008-02-04 14:58:47 +00:00
70400346d2 Enable the sc_unmarked_diagnostics test and correct all violations
involving the "error" function.
* Makefile.cfg (local-checks-to-skip): Remove from skip list.
* src/remote_internal.c: Mark translatable strings.
2008-02-04 14:58:05 +00:00
aa290a3ece Pull vc-list-files from gnulib, and update.
* bootstrap (gnulib_tool): Add the vc-list-files module.
2008-02-01 19:47:07 +00:00
b5433aaa6f Avoid compilation failure when building --without-xen.
* tests/statstest.c (testDevice) [!WITH_XEN]: #ifdef-out.
(main) [!WITH_XEN]: #ifdef-out the body.

Committer: Jim Meyering <meyering@redhat.com>
Author: Guido Guenther  <agx@sigxcpu.org>
2008-01-31 21:49:47 +00:00
f5f530f33f Avoid virsh leaks due to missing virDomainFree(dom) calls
* src/virsh.c (cmdDomuuid): Add missing virDomainFree call.
(cmdAttachDevice): Likewise.
(cmdDetachDevice): Likewise.
2008-01-30 19:58:59 +00:00
a1d2d2b21c src/virsh.c (cmdCapabilities): Plug a small leak. 2008-01-30 19:57:54 +00:00
34dff95bfd src/test.c (testLoadDomain): Avoid leaks upon failure. 2008-01-30 19:57:13 +00:00
1217e5d516 Avoid used-uninitialized errors in test driver.
* src/test.c (testOpenFromFile): Initialize "privconn".
2008-01-30 19:54:29 +00:00
6997b1920f src/libvirt.c (do_open): Avoid double-free upon failure. 2008-01-30 19:53:10 +00:00
218f866f86 Avoid segfault upon malloc failure, and plug a leak.
* src/test.c (testDomainSave): Detect testDomainDumpXML failure.  Free "xml".
2008-01-30 19:52:16 +00:00
5561e9125f Plug test-related leaks.
* src/test.c (testLoadNetwork): Free forwardDev.
(testLoadDomain): Free ctxt.
(testLoadNetwork): Likewise.
(testOpenFromFile): Likewise.
2008-01-30 19:50:14 +00:00
17ef6faa7f Remove double mutex lock() 2008-01-30 18:21:13 +00:00
03003499e7 Fix XML generation for Xen USB devices 2008-01-30 16:38:18 +00:00
51dd1d9e38 Arrange for "make syntax-check" to pass.
* .x-sc_avoid_if_before_free: Exempt ChangeLog.
* tests/statstest.c: Include <config.h>, not "config.h".
2008-01-30 06:55:56 +00:00
21416a4746 Fix device name -> number conversion for block stats 2008-01-29 18:36:00 +00:00
2367caa327 Also detect and remove unnecessary if-before-xmlXPathFreeContext.
* build-aux/find-unnecessary-if-before-free: Update regexp.
* src/openvz_conf.c: Remove unnecessary "if (P)"-before xmlXPathFreeContext.
* src/qemu_conf.c: Likewise.
* src/virsh.c: Likewise.
* src/xm_internal.c: Likewise.
* src/xml.c: Likewise.
* tests/xmlrpctest.c: Likewise.
2008-01-29 18:23:43 +00:00
1be2c8c814 Enable two more tests.
* Makefile.cfg (local-checks-to-skip)
[sc_cast_of_x_alloc_return_value, sc_cast_of_argument_to_free]: Enable.
2008-01-29 18:21:00 +00:00
2c72562374 Enable the <assert.h>-checking test; fix violations.
* Makefile.cfg (local-checks-to-skip)
[sc_prohibit_assert_without_use]: Enable.
* qemud/mdns.c: Don't include <assert.h>; no uses of assert here.
* qemud/qemud.c: Likewise.
* qemud/remote.c: Likewise.
2008-01-29 18:20:25 +00:00
05ae9d8bc4 Enable the po-check test; fix violations.
* Makefile.cfg (local-checks-to-skip) [po-check]: Enable.
* po/POTFILES.in: Add three file names.  Sort.
2008-01-29 18:19:46 +00:00
bc48db5758 Update from gnulib
* lib/poll.c: Update.
* lib/string.in.h: Update.
* m4/string_h.m4: Update.
* tests/test-getaddrinfo.c: Update.
* lib/Makefile.am: Regenerate.
2008-01-29 18:17:47 +00:00
a378188194 Enable the <config.h>-requiring test; fix violations
Use <config.h>, not "config.h", per autoconf documentation.
* Makefile.cfg (local-checks-to-skip) [sc_require_config_h]: Enable.
* .x-sc_require_config_h: New file, to list exempted files.
* Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h.
2008-01-29 18:15:54 +00:00
9e4c8fcb3a Enable the duplicate-"the" test; fix violations
* Makefile.cfg (local-checks-to-skip) [sc_the_the]: Enable.
* docs/virsh.pod: Remove a duplicate "the".
* libvirt.spec.in: Likewise.
* virsh.1: Likewise.
2008-01-29 17:43:28 +00:00
cc337da21f Add framework for code style- and syntax-checking rules.
Almost all tests are initially disabled via the list in Makefile.cfg.
	* Makefile.am (EXTRA_DIST): Add .x-sc_avoid_if_before_free.
	Omit names of files that automake includes automatically.
	* .x-sc_avoid_if_before_free: New file.
	* build-aux/vc-list-files: Likewise.
	* build-aux/find-unnecessary-if-before-free: Likewise.
	* GNUmakefile, Makefile.cfg, Makefile.maint: New files.
2008-01-29 17:42:39 +00:00
acff2d11ac Given code like if (foo) free (foo); remove the useless "if (foo) " part.
Likewise, given if (foo != NULL) free (foo); remove the useless "if" test.

* proxy/libvirt_proxy.c: Remove unnecessary "if" test before free.
* python/generator.py: Likewise.
* qemud/qemud.c: Likewise.
* src/buf.c: Likewise.
* src/conf.c: Likewise.
* src/hash.c: Likewise.
* src/iptables.c: Likewise.
* src/libvirt.c: Likewise.
* src/openvz_conf.c: Likewise.
* src/qemu_conf.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/remote_internal.c: Likewise.
* src/test.c: Likewise.
* src/virsh.c: Likewise.
* src/virterror.c: Likewise.
* src/xen_internal.c: Likewise.
* src/xen_unified.c: Likewise.
* src/xend_internal.c: Likewise.
* src/xm_internal.c: Likewise.
* src/xml.c: Likewise.
* src/xmlrpc.c: Likewise.
* src/xs_internal.c: Likewise.
* tests/testutils.c: Likewise.
* tests/xencapstest.c: Likewise.
* tests/xmconfigtest.c: Likewise.
2008-01-29 17:41:07 +00:00
b17caa80d1 Clarify virsh documentation.
* docs/virsh.pod: Clarify virsh documentation on when you can
          set memory and vCPUs.
2008-01-25 12:03:05 +00:00
aab826d4cc Fix VIR_DOMAIN_NONE into VIR_DOMAIN_NOSTATE
* src/xen_internal.c: fix an erronous use of VIR_DOMAIN_NONE instead
  of VIR_DOMAIN_NOSTATE (both defined as 0, no regression)
Daniel
2008-01-25 09:47:51 +00:00
3f9a94bec3 * src/libvirt.c: Jay Gagnon pointed out that virDomainGetXMLDesc
was failing with a non-zero flag value
Daniel
2008-01-24 17:09:56 +00:00
7db9140126 Correct typos in the documentation (Atsushi SAKAI)
* README, libvirt.spec.in, docs/devhelp/html.xsl,
          docs/devhelp/index.html: Correct typos in the documentation.
2008-01-24 10:15:13 +00:00
38b2478b41 Fix enablement of SASL 2008-01-23 19:37:10 +00:00
9cf2573c8a Portability improvements for Mac OS X.
* configure.in: Use PortableXDR if available.
        * qemud/internal.h: Use "socketcompat.h".
        * qemud/qemud.c: Use <signal.h>.
        * src/sexpr.c: Use <stdlib.h> instead of <malloc.h>.
        * src/socketcompat.h: Include <sys/un.h> for Mac OS X.
2008-01-23 14:54:41 +00:00
569200b6d4 Remove DOS line-endings.
* src/socketcompat.h: Remove DOS line-endings in this file.
2008-01-23 14:50:14 +00:00
9d7661e415 Fix compat for old pkg-config and gnutls 2008-01-22 21:30:05 +00:00
63dffbf1d2 Avoid "may be used uninitialized" warning.
* tests/xmconfigtest.c (testCompareParseXML): Initialize "old_priv".
2008-01-21 17:06:47 +00:00
97bed42f7a Fix & refactor ref counting cleanup code 2008-01-21 16:29:10 +00:00
c9b7eae903 Make python generator fail build on any missing APIs 2008-01-21 15:55:53 +00:00
62094f72f6 Add missing vcpu/schedular APIs to python binding 2008-01-21 15:41:15 +00:00
45738083a6 Use virFileReadAll in virsh.c 2008-01-21 15:27:14 +00:00
53365f4c54 Remove no-op networking APIs from openvz driver 2008-01-21 15:19:46 +00:00
64b3019d69 Adjust sexpr-related interfaces to be const-correct.
* src/sexpr.c (sexpr_cons, append, sexpr_append, sexpr2string)
(sexpr_lookup_key, sexpr_lookup, sexpr_node, sexpr_fmt_node):
Add "const" attribute where appropriate.
* src/xend_internal.c (sexpr_int, sexpr_float, sexpr_u64)
(sexpr_uuid, sexpr_to_xend_domain_info, sexpr_to_xend_node_info)
(sexpr_to_xend_topology_xml, sexpr_to_domain): Likewise.
* src/sexpr.h: Adjust prototypes.
2008-01-21 14:22:15 +00:00
a430f22be4 Don't access line[-1] for a zero-length "line" from fgets.
A NUL byte at beginning of input, or just after a newline
would provoke an invalid buf[-1] access (possible segfault).
* src/libvirt.c (virConnectAuthCallbackDefault):
2008-01-21 14:09:51 +00:00
5912e7c233 Preserve vif order
* src/xml-internal.c: apply patch from Hiroyuki Kaguchi to
  preserve the vif list order.
Daniel
2008-01-21 08:27:12 +00:00
d3043afe5c Remove docs/API*.html
* docs/API* docs/api.xsl docs/site.xsl docs/Makefile.am: remove the
  generation of the API*.html files as it's not really useful here
Daniel
2008-01-21 08:08:33 +00:00
d56aff5255 Added xstrtol_ll and xstrtol_ull convenience functions 2008-01-20 16:11:25 +00:00
e05a879022 Fix nodeinfo compat for Xen 3.2.0 2008-01-20 15:56:49 +00:00
e8d690aeb5 Enable debug by default, but only if LIBVIRT_DEBUG=1. Use generic macro for debug output 2008-01-19 18:36:01 +00:00
02b98afe29 Handle PyTuple_New's malloc failure.
* python/libvir.c (libvirt_virDomainBlockStats): Handle a NULL
return from PyTuple_New.
(libvirt_virDomainInterfaceStats, libvirt_virGetLastError): Likewise.
(libvirt_virConnGetLastError): Likewise.
2008-01-17 22:14:57 +00:00
ec6e9b7865 Factor out some duplication.
* python/libvir.c (VIR_PY_NONE): New macro, to encapsulate
a common two-statement sequence.
Replace all such 2-stmt sequences.
2008-01-17 22:13:55 +00:00
42e5d20ae9 Avoid format string warnings.
* src/virsh.c: Add "%s" where needed.
* src/proxy_internal.c: Likewise.
2008-01-16 17:13:23 +00:00
df7bf130ae docs/examples/examples.xml: Regenerate, now that *.c file names are sorted. 2008-01-15 15:27:31 +00:00
f6ba6e9eb7 Support VNC keymap option with QEMU (Daniel Hokka Zakrisson) 2008-01-15 15:18:33 +00:00
045d32a8e8 Fix off-by-one in SSH argv checking. Fix format string warning 2008-01-15 14:23:52 +00:00
32d4aeb162 Update from gnulib. 2008-01-14 14:07:25 +00:00
2edab512a0 Clean up the global name space.
* src/qemu_conf.c: Add "static" and "const" attributes to some globals.
* src/qemu_conf.h: Update a declaration.
* src/qemu_driver.c (qemud_driver): Declare static.


Author: Jim Meyering <meyering@redhat.com>
2008-01-14 14:05:25 +00:00
f510a6128b Clean up global name space in examples and tests.
* docs/examples/suspend.c: Declare global "conn" to be static.
* tests/qemuxml2argvtest.c: Declare global "driver" to be static.
* tests/qemuxml2xmltest.c: Likewise.


Author: Jim Meyering <meyering@redhat.com>
2008-01-14 14:04:33 +00:00
6aae9a9efb Re-factor auth code to make clearer (Jim Meyering) 2008-01-14 04:05:23 +00:00
b2083ea907 Fix crash when no auth callback 2008-01-14 04:00:34 +00:00
4c50142381 fix an unused variable warning 2008-01-10 14:41:39 +00:00
73ab4e0845 add iptablesSaveRules(), and don't save the rules to disk
and run lokkit each time a new rule is added.
2008-01-10 14:01:00 +00:00
2d2e410818 now that we only use built-in iptables chains, we don't
need to add or delete them
2008-01-10 13:58:59 +00:00
9b29b2a2a5 Like --with-iptables-prefix, --with-iptables-dir is no
longer useful, so let's remove it.
2008-01-10 13:57:48 +00:00
f8e0674ad5 --with-iptables-prefix was added to integrate with
a proposed system for letting iptables know how to
reload our rules. The proposed system wasn't accepted
so, although there might be some other theoretical
use for this, let's just remove it.
2008-01-10 13:56:22 +00:00
b9daf6d9dd Add support for integrating our iptables support with Fedora's
iptables configuration using the lokkit --custom-rules command.

Basically, we write out our rules to /var/lib/libvirt/iptables
and run lokkit --custom-rules so that if e.g. iptables is
restarted or the user edits their firewall configuration, then
libvirt's rules get reloaded.
2008-01-10 13:54:02 +00:00
a43ddc075a Include the iptables command and chain name in the saved rules files 2008-01-10 13:51:55 +00:00
9d04c25ab2 Re-name the "flipflop" variable to "command_idx" 2008-01-10 13:50:46 +00:00
cc83cda045 make use of virFileMakePath(), virFileBuildPath() and virRun(). 2008-01-10 13:49:55 +00:00
fc11528f98 Fix compile error in --with-iptables-dir code 2008-01-10 13:48:44 +00:00
cf0ee0f6e4 Change virExec() such that with --enable-debug,
stdout and stderr no longer go to /dev/null.
2008-01-10 13:47:49 +00:00
77a2fc0061 Add virRun() helper function (Dan Berrange) 2008-01-10 13:46:10 +00:00
9d11255a47 Fix vcpupin hypercall map data to be 8-bytes 2008-01-09 21:08:29 +00:00
78f2cd3d2d Added graceful shutdown support to QEMU/KVM (patch from Guido Guenther) 2008-01-09 16:05:21 +00:00
8796a9ff74 Fix warning in debug output 2008-01-08 17:52:10 +00:00
8cd4774468 Fix buffer passed to free() 2008-01-08 16:17:15 +00:00
94e49e3f0e Fix config file reading to not truncate large files 2008-01-07 15:21:33 +00:00
029aef1d24 Miscellaneous fixes for building on Windows (MinGW).
* configure.in: xdr functions may require -lxdr.
	* configure.in, src/Makefile.am: Extra linking flags for
	  building libvirt DLL.
	* src/socketcompat.h: Hide Windows Winsock incompatibilities
	  in a separate header file.
	* src/remote_internal.c: Switch to using socketcompat.h /
	  socket_errno().
	* src/test.c: Switch to using socketcompat.h.
	* gnulib/lib/arpa/.cvsignore: Ignore another generated file.
	* src/qparams.c: Include <config.h>.
2008-01-05 16:06:36 +00:00
76122538b6 Fix crash when no auth callback is provided 2008-01-02 22:48:04 +00:00
935490d9e9 Ignore a few more files 2008-01-02 16:31:21 +00:00
7b40fcd11f * src/openvz.c: patch from Mikhail Pokidko to fix the OpenVZ
compilation error #426385
Daniel
2007-12-26 05:41:05 +00:00
52601c33ab Fix docs, daniel 2007-12-18 00:16:56 +00:00
2fb478f921 Added changelog for 0.4.0
Daniel
2007-12-17 23:51:07 +00:00
6cb0289917 * configure.in docs/libvir.html docs/news.html po/*:
prepare release of libvirt-0.4.0
Daniel
2007-12-17 23:20:12 +00:00
7d0cef38b5 Added dep on 'nc' RPM 2007-12-17 23:05:51 +00:00
d575a83f81 Fix nodeinfo compat with Xen 3.2.0 2007-12-17 23:04:33 +00:00
1be1fe69f5 Fix remote_internal.c error handling of qparam_get_query
* src/remote_internal.c: Fixed reversed check of error handling
          of qparam_get_query call (Dan Berrange).
2007-12-17 17:41:02 +00:00
3b0149354b Add separate qparams module for handling query parameters.
* src/qparams.c, src/qparams.h, src/Makefile.am: Added a
	  separate 'qparams' module for handling query parameters.
	* src/remote_internal.c: Factor out query parameter code so
	  it uses the 'qparams' module.
2007-12-17 10:07:56 +00:00
ed9788c796 Add extra utility functions to buf.c
* src/buf.c, src/buf.h: Added utility functions
	  virBufferURIEncodeString and virBufferAddChar to the
	  buffer module.
2007-12-17 10:05:35 +00:00
a11494fd52 Don't invoke callback with unsupported credential types 2007-12-15 17:15:12 +00:00
cc8e4ff318 fix setting CPU parameters in the config files
* src/xm_internal.c: patch from Saori Fukuta to fix setting
  CPU parameters in the config files, the value was overwritten
Daniel
2007-12-14 15:51:42 +00:00
81acc14e3a fix the detach-disk command when using Xen tap devices
* src/xs_internal.[ch]: patch from Saori Fukuta to fix the
  detach-disk command when using Xen tap devices.
* docs/libvir.html: typo fix from Jim Meyering
Daniel
2007-12-14 15:38:02 +00:00
b47ffc035c Fix virBufferEscapeString escaping of '<'
* src/buf.c (virBufferEscapeString): '<' escaped as "&lt;"
2007-12-12 16:27:10 +00:00
0d0b0113d0 Always build in python/ subdir.
* configure.in (PYTHON_SUBDIR): Don't set.  Remove all uses.
* Makefile.am (SUBDIRS): Hard-code "python" here.
(tests): Test equivalent "$(pythondir)", not @PYTHON_SUBDIR@.
2007-12-12 08:12:38 +00:00
9e188e11c5 Accommodate automake-1.9.
* tests/Makefile.am (TESTS_ENVIRONMENT): Adjust PATH setting
to work also with automake-1.9.  Can't use $(abs_top_builddir).


Author: Jim Meyering <meyering@redhat.com>
2007-12-12 07:21:37 +00:00
49230350fa Use a variable name as sizeof argument, not a type name.
Given code like: T *var = calloc (n, sizeof (T));
Convert to this: T *var = calloc (n, sizeof (*var));
This first-cut change adjusts all malloc, calloc, and
realloc statements.

The only binary differences are in remote_internal.c
(due to the bug fix) and in xmlrpc.c (due to factorization).

* python/libvir.c: As above.
* qemud/event.c: Likewise.
* qemud/mdns.c: Likewise.
* qemud/qemud.c: Likewise.
* qemud/remote.c: Likewise.
* src/bridge.c: Likewise.
* src/buf.c: Likewise.
* src/conf.c: Likewise.
* src/hash.c: Likewise.
* src/iptables.c: Likewise.
* src/openvz_conf.c: Likewise.
* src/qemu_conf.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/test.c: Likewise.
* src/xen_internal.c: Likewise.
* src/xen_unified.c: Likewise.
* src/xm_internal.c: Likewise.
* src/xml.c: Likewise.
* tests/qemuxml2argvtest.c: Likewise.
* src/xmlrpc.c (xmlRpcValuePtr): Likewise, and minor factorization.
* src/remote_internal.c (remoteAuthMakeCredentials): Use the right
type when allocating space for an array of cred _pointers_.
2007-12-11 21:57:29 +00:00
5a190594f4 Test libvirtd's config-processing code.
And remove a minor diagnostic inconsistency.
* tests/daemon-conf: New test.
* tests/Makefile.am (TESTS_ENVIRONMENT): Prepend qemud/ to PATH,
so we can invoke libvirtd without an absolute name.
(test_scripts): Add daemon-conf.
* qemud/qemud.c (remoteConfigGetAuth): Use checkType,
rather than open-coding it with a different diagnostic.
2007-12-11 21:20:13 +00:00
ac6bb7e131 Add gnulib-tool unit tests.
* bootstrap: Re-add --with-tests, now that gnulib-tool
arranges to use separate libraries for lib/ and tests/.
* configure.in (AC_OUTPUT): Add gnulib/tests/Makefile.in.
* Makefile.am (SUBDIRS): Add gnulib/tests.
* gnulib/tests/Makefile.am: New file.
* gnulib/lib/.cvsignore: Sort.
* gnulib/lib/Makefile.am, gnulib/m4/getdelim.m4, gnulib/m4/getline.m4:
* gnulib/m4/gnulib-cache.m4, gnulib/m4/gnulib-comp.m4: Regenerate.
* gnulib/tests/test-alloca-opt.c: New file, from gnulib.
* gnulib/tests/test-arpa_inet.c: Likewise.
* gnulib/tests/test-fseeko.c: Likewise.
* gnulib/tests/test-fseeko.sh: Likewise.
* gnulib/tests/test-getaddrinfo.c: Likewise.
* gnulib/tests/test-getdelim.c: Likewise.
* gnulib/tests/test-getline.c: Likewise.
* gnulib/tests/test-lseek.c: Likewise.
* gnulib/tests/test-lseek.sh: Likewise.
* gnulib/tests/test-netinet_in.c: Likewise.
* gnulib/tests/test-snprintf.c: Likewise.
* gnulib/tests/test-stdbool.c: Likewise.
* gnulib/tests/test-stdint.c: Likewise.
* gnulib/tests/test-stdio.c: Likewise.
* gnulib/tests/test-stdlib.c: Likewise.
* gnulib/tests/test-string.c: Likewise.
* gnulib/tests/test-sys_select.c: Likewise.
* gnulib/tests/test-sys_socket.c: Likewise.
* gnulib/tests/test-sys_stat.c: Likewise.
* gnulib/tests/test-sys_time.c: Likewise.
* gnulib/tests/test-unistd.c: Likewise.
* gnulib/tests/test-vasnprintf.c: Likewise.
* gnulib/tests/test-vasprintf.c: Likewise.
* gnulib/tests/test-wchar.c: Likewise.
* gnulib/tests/dummy.c: Likewise.
* gnulib/tests/intprops.h: Likewise.
* gnulib/tests/verify.h: Likewise.
2007-12-10 18:26:56 +00:00
fd6ce1e637 Remove gnulib/lib/arpa/inet.h autogenerated file 2007-12-08 23:08:54 +00:00
8392c710ae Remove bogus autoconf 2.60 prereq 2007-12-07 15:31:36 +00:00
6dfa7af42a Fix minor quoting issue 2007-12-07 15:17:42 +00:00
acbd696b05 Fri Dec 7 14:55:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* proxy/Makefile.am: Include gnulib code when building the
          proxy.
2007-12-07 15:00:26 +00:00
0d14fc0cbb Fri Dec 7 14:49:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/console.c, src/console.h, src/virsh.c: Disable
	  text console on Windows.
	* src/libvirt.c: Use replacement getpass from Gnulib.
	* src/libvirt.c: Initialize Winsock before use.
	* src/remote_internal.c: Header file fixes for Windows.
	  Don't fail if AI_ADDRCONFIG isn't defined.  Disable
	  unsupported stuff under Windows.
	* src/uuid.c: ENODATA unavailable on Windows, use EIO instead.
	* src/virsh.c: No uid_t / getuid on Windows.
	* src/virsh.c: No O_SYNC on Windows.
2007-12-07 14:56:37 +00:00
f3ebd20d35 Fri Dec 7 14:47:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/internal.h: Use gnulib gettext library.  Define
	  INET_ADDRSTRLEN unless already defined.
2007-12-07 14:52:24 +00:00
f1f94721ae Fri Dec 7 14:36:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/.cvsignore: Ignore *.loT files (generated under Windows).
	* proxy/libvirt_proxy.c: Bail out earlier --without-xen.
	* src/proxy_internal.c: Don't build proxy client side if
	  configured --without-xen.
	* src/iptables.c, src/iptables.h: Disable this code if
	  configured --without-qemu.
	* src/nodeinfo.c: If no 'uname' function, set model name to
	  empty string (for Windows).
	* src/xen_unified.h, src/util.c, src/test.c: Include <winsock2.h>
	  on Windows.
	* src/util.c: Disable virExec* and virFileLinkPointsTo on
	  MinGW.
2007-12-07 14:45:39 +00:00
36f0ce0472 Fri Dec 7 14:34:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/sexpr.c: Cosmetic rearrangement of headers.
2007-12-07 14:39:14 +00:00
66e4326c84 Insert cosmetic linebreak 2007-12-07 14:38:34 +00:00
abe8a90952 Fri Dec 7 14:27:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Extra checks for uname and some header files
	  (for MinGW Windows port).
2007-12-07 14:35:18 +00:00
532759a593 Fri Dec 7 14:27:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* bootstrap, Makefile.am, gnulib/*: Import more gnulib
	  modules for use by MinGW Windows port.
2007-12-07 14:32:35 +00:00
4a2f8fc633 Include "config.h" in remaining non-generated files.
* proxy/libvirt_proxy.c: Likewise.
* python/libvir.c: Likewise.
* python/types.c: Likewise.
* src/event.c: Likewise.
* src/xm_internal.c: Likewise.
* tests/reconnect.c: Likewise.
* tests/testutils.c: Likewise.
2007-12-07 10:08:06 +00:00
a56281c0a8 * python/generator.py python/libvir.c python/libvirt-python-api.xml:
add a python binding for virNodeGetCellsFreeMemory
Daniel
2007-12-07 08:41:01 +00:00
7ff9eebeba qemud/qemud.c (qemudInitPaths): Remove unused code. 2007-12-06 16:41:43 +00:00
efd495d667 Thu Dec 6 16:32:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/virsh.c: The prompt should depend on readonly status,
	  not on the UID.
2007-12-06 16:36:21 +00:00
21e0a86f25 Thu Dec 6 16:30:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, qemud/Makefile.am: Added a --without-libvirtd
	  configure option.
2007-12-06 16:34:48 +00:00
48ea0a57f8 Really fix macro for RHEL this time 2007-12-06 16:07:18 +00:00
bb020a9f75 Fix polkit macros for RHEL 2007-12-06 15:35:54 +00:00
d5fc8b3036 * docs/*: rebuilt the docs and XML files
Daniel
2007-12-06 14:54:23 +00:00
5390cfcc72 * po/*: updated the localization files
Daniel
2007-12-06 14:43:41 +00:00
ec38eb9388 Thu Dec 6 12:00:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c: Clean up a warning if neither SASL
          nor PolKit are enabled.
2007-12-06 12:05:35 +00:00
2ec759fc58 Build also on systems where -lreadline requires e.g., -lncurses
* configure.in: If the test for -lreadline fails, search for a
library with termcap support.  If one is found (often -lncurses),
rerun the test for -lreadline, linking also with the new library.


Author: Jim Meyering <meyering@redhat.com>
2007-12-06 11:42:26 +00:00
7633453cfa * configure.in src/Makefile.am src/virsh.c: fix compilation problems
when readline headers were found but not the library
Daniel
2007-12-06 10:24:52 +00:00
d51e7c9ff0 Accommodate developers using autoconf-2.59.
* configure.in (m4_foreach_w): Define if not defined.


Author: Jim Meyering <meyering@redhat.com>
2007-12-05 23:02:13 +00:00
87396257fc Include "config.h".
* qemud/event.c: Likewise.
* src/buf.c: Likewise.
* src/hash.c: Likewise.
* src/nodeinfo.c: Likewise.
* src/openvz_conf.c: Likewise.
* src/proxy_internal.c: Likewise.
* src/virterror.c: Likewise.
* src/xmlrpc.c: Likewise.
* src/xs_internal.c: Likewise.
* tests/conftest.c: Likewise.
* tests/xmlrpctest.c: Likewise.
This fixes a mingw build failure reported by Rich Jones.

Author: Jim Meyering <meyering@redhat.com>
2007-12-05 21:40:15 +00:00
4c6bef2a6c Add all of the files pulled in by running ./bootstrap.
Adjust .cvsignore files.


Author: Jim Meyering <meyering@redhat.com>
2007-12-05 21:35:32 +00:00
261e7581b1 Use gnulib, starting with its physmem and getaddrinfo modules.
New files go into these directories:
  gnulib/lib
  gnulib/m4
  gnulib/tests

* bootstrap: A wrapper around gnulib-tool.
* configure.in: Invoke gl_EARLY and gl_INIT, being careful to put gl_EARLY
before any macro that uses AC_COMPILE_IFELSE.
(AC_OUTPUT): Add lib/Makefile and gl-tests/Makefile.  Remove m4/Makefile.
* Makefile.am (SUBDIRS): Add gnulib/lib and remove m4.  Add gnulib/tests
early enough that those tests run before any libvirt unit tests.
* m4/Makefile.am: Remove file.  Not needed.
* src/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib -I../gnulib/lib.
(LDADDS, libvirt_la_LIBADD): Add ../gnulib/lib/libgnu.la.
* src/nodeinfo.c: Include "physmem.h".
* qemud/qemud.c, src/remote_internal.c: Include "getaddrinfo.h".
(MEMINFO_PATH, linuxNodeInfoMemPopulate): Remove definitions.
(virNodeInfoPopulate): Use physmem_total, not linuxNodeInfoMemPopulate.
* tests/Makefile.am (INCLUDES): Add -I$(top_srcdir)/gnulib/lib -I../gnulib/lib.
(LDADDS): Add ../gnulib/lib/libgnu.la.
* qemud/Makefile.am (libvirtd_LDADD): Add ../gnulib/lib/libgnu.la.
* tests/nodeinfotest.c (linuxTestCompareFiles): No longer read total
memory from a file.
Update expected output not to include "Memory: NNNN"
* tests/nodeinfodata/linux-nodeinfo-1.txt:
* tests/nodeinfodata/linux-nodeinfo-2.txt:
* tests/nodeinfodata/linux-nodeinfo-3.txt:
* tests/nodeinfodata/linux-nodeinfo-4.txt:
* tests/nodeinfodata/linux-nodeinfo-5.txt:
* tests/nodeinfodata/linux-nodeinfo-6.txt:
* src/test.c [WITH_TEST]: Remove definition of _GNU_SOURCE that
would conflict with the one now in "config.h".
* autogen.sh: Add -I gnulib/m4.
* src/conf.c, src/sexpr.c: Don't define _GNU_SOURCE.
Instead, include "config.h".
* qemud/qemud.c: Remove definition of _GNU_SOURCE.
* src/openvz_driver.c: Likewise.
* src/qemu_driver.c: Likewise.
* src/remote_internal.c: Likewise.

* configure.in: Use AC_CONFIG_AUX_DIR(build-aux), so that a bunch
of gettextize-generated files go into build-aux/, rather than in
the top-level directory.
* .cvsignore: Adjust.
* build-aux/.cvsignore: New file.


Author: Jim Meyering <meyering@redhat.com>
2007-12-05 21:31:07 +00:00
1d1cf57b9b * qemud/remote.c: rename remoteDispatchAuthPolkitInit to
remoteDispatchAuthPolkit, the no-op init call when policykit
  is not available
Daniel
2007-12-05 20:45:37 +00:00
2add6b3026 Fix compile issues when SASL is disabled 2007-12-05 19:25:44 +00:00
0e5f5da3db Added docs on authentication setup 2007-12-05 19:16:13 +00:00
48c48b260d Disable setuid Xen proxy if policykit is enabled 2007-12-05 19:11:01 +00:00
5ab109f862 Add manual impl of virConnectOpenAuth python binding 2007-12-05 19:09:23 +00:00
60a6bbe6c5 Re-add listen_tcp/listen_tls config params accidentally lost 2007-12-05 18:56:27 +00:00
e332ccdf71 Wire up SASL interaction callbacks to libvirt callbacks. Provide default callback impl 2007-12-05 18:55:04 +00:00
7fa9ceb740 Added public API for authentication credential callback support 2007-12-05 18:28:05 +00:00
282342c1c5 Added PolicyKit authentication support 2007-12-05 18:21:27 +00:00
f8f1977826 Added missing sasl config file 2007-12-05 18:21:04 +00:00
ffdbb903e4 Wed Dec 5 18:00:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/Makefile.am, tests/Makefile.am: Remove LIBOBJS/LTLIBOBJS
          which were incorrectly committed earlier.
2007-12-05 18:05:13 +00:00
ca71b87cb0 Quit virsh immediately if connection open fails, rather than giving a non-functional interactive shell 2007-12-05 16:24:22 +00:00
cfb62c9d5e Add whitelisting of users. Remove IP whitelisting. Make auth schemes configurable 2007-12-05 15:34:05 +00:00
bb5371f668 Add data encryption using SASL SSF layer 2007-12-05 15:27:08 +00:00
1b1d647439 Initial integration of SASL authentication, working for Kerberos only 2007-12-05 15:24:15 +00:00
a8977b62ba Strip autogenerated vnetXXX interfaces 2007-12-05 15:08:23 +00:00
4bfdb77aae Wed Dec 5 13:48:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* python/libvir.c, python/libvirt_wrap.h, qemud/qemud.c,
        qemud/remote.c, src/internal.h, src/openvz_conf.c,
        src/openvz_driver.c, src/proxy_internal.h, src/qemu_conf.c,
        src/qemu_driver.c, src/remote_internal.h, src/test.h, src/util.c,
        src/xen_unified.c, src/xen_unified.h, tests/nodeinfotest.c,
        tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c, tests/reconnect.c,
        tests/sexpr2xmltest.c, tests/virshtest.c, tests/xencapstest.c,
        tests/xmconfigtest.c, tests/xml2sexprtest.c:
        Change #include <> to #include "" for local includes.
        Removed many includes from src/internal.h and put them in
        the C files which actually use them.
        Removed <ansidecl.h> - unused.
        Added a comment around __func__.
        Removed a clashing redefinition of VERSION symbol.
        All limits (PATH_MAX etc) now done in src/internal.h, so we
        don't need to include those headers in other files.
2007-12-05 13:56:22 +00:00
5682ba5921 Tue Dec 4 18:25:01 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Fix configure if rpcgen program is missing.
2007-12-04 19:14:11 +00:00
4338271f1a Tue Dec 4 17:47:01 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: curses is not actually required to build libvirt
	* configure.in, src/virsh.c: Make readline optional.  If not
	  available then virsh is built without support for command
	  line editing.
2007-12-04 18:27:52 +00:00
025c5df87b Avoid compile failure when HAVE_AVAHI is not defined.
* qemud/qemud.c (remoteReadConfigFile): Remove some of the
"#ifdef HAVE_AVAHI" guards around uses of mdns_name and mdns_adv.
2007-12-03 19:45:00 +00:00
78f756e081 Mon Dec 3 16:15:10 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/util.c: Fix header files for Windows builds.
2007-12-03 16:19:41 +00:00
4cd62fe306 Move generic file & I/O routines out of QEMU driver into util.c 2007-12-03 14:30:46 +00:00
ed5e20baab * src/xen_unified.[ch] src/proxy_internal.c src/xen_internal.c
src/xend_internal.c src/xm_internal.c src/xs_internal.c:
  cleanup the xen subdriver table, remove the type entry and
  always return "Xen" from the unified entry point.
Daniel
2007-12-03 09:34:38 +00:00
2b3c49b6ab Fix numerous memory leaks 2007-12-01 15:45:25 +00:00
b4f841d92f Fix buffer termination off-by-1 in link comparison code 2007-12-01 15:29:45 +00:00
6d3f1d516e Disable Xen specific functions if Xen driver is disabled 2007-11-30 22:51:54 +00:00
c3c80a183e Detect heap allocation failure; factor out some duplication.
* qemud/qemud.c (tls_port, tcp_port, mdns_name, tls_allowed_ip_list):
  (tls_allowed_dn_list): Remove "const", now that we free these.
  (unix_sock_rw_mask): Rename from unix_sock_rw_perms, so that
  the latter name can be used as a local string variable, so that the
  variable name matches the config attribute name.
  (unix_sock_ro_mask): Rename from unix_sock_ro_perms, likewise.
  (remoteCheckDN, remoteCheckAccess): Adapt to const removal.
  (qemudDispatchServer): Check for heap allocation failure.
  (remoteConfigGetStringList): New function, based on code from Dan Berrangé.
  (CHECK_TYPE): Remove macro.
  (checkType): New function.
  (GET_CONF_INT, GET_CONF_STR): New macros.
  (remoteReadConfigFile): Use new macros to avoid duplication and to
  check for allocation failure.
* src/conf.h (virConfTypeName): New static inline function.
2007-11-30 15:43:42 +00:00
2ac691d60e Fri Nov 30 11:04:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* python/libvir.c, python/libvir.py: Make Python aware that
	  the C bindings module is called cygvirtmod.dll when compiled
	  by CYGWIN.
	* python/Makefile.am: Remove symlink libvirtmod.dll -> cygvirtmod.dll
	  no longer necessary because of the above.
	* configure.in: Remove AM_CONDITIONAL(CYGWIN).
2007-11-30 11:10:53 +00:00
d63034c018 Thu Nov 29 17:40:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Added CYGWIN_EXTRA_LDFLAGS, CYGWIN_EXTRA_LIBADD,
	  CYGWIN_EXTRA_PYTHON_LIBADD, CYGWIN automake conditional.
	* src/Makefile.am: Extra flags required to build DLL of libvirt
	  for Cygwin.
	* python/Makefile.am: Extra flags and rule required to build
	  Python module for Cygwin.
2007-11-29 17:44:01 +00:00
65aa3dbf6c Thu Nov 29 17:38:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Check for C compiler first before checking for
	  external programs.
	  Add AC_LIBTOOL_WIN32_DLL.
	  Add AM_PROG_CC_STDC.
	  Add AC_C_CONST.
2007-11-29 17:41:57 +00:00
4a898dd491 Thu Nov 29 16:19:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/libvir.html, docs/windows.html: Updated Windows
	  documentation now that we have shared libraries and Python
	  working.
2007-11-29 16:21:52 +00:00
ba75647b55 Thu Nov 29 09:15:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* src/virsh.c: Added #include <time.h> so it can compile
          on CentOS 4 (Carl Jones).
2007-11-29 09:18:04 +00:00
dbfdd329f2 Added a paragraph about running mkpasswd/mkgroup commands after first install. 2007-11-28 17:17:06 +00:00
df0525a911 Wed Nov 28 14:20:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* src/virsh.c: Missing comma.
2007-11-28 14:22:30 +00:00
55311d6c38 src/virsh.c (vshCloseLogFile): Diagnose close/write failure. 2007-11-28 13:22:33 +00:00
de4a8ce61c Added Windows documentation. 2007-11-28 13:22:16 +00:00
a79cb80048 Images to illustrate Cygwin install. 2007-11-28 11:54:47 +00:00
208a450a53 Wed Nov 28 09:00:00 GMT 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xm_internal.c, src/xm_internal.h: Added support for
          pinning inactive domains for Xen 3.0.3 (Saori Fukuta).
2007-11-28 10:11:18 +00:00
59a375812d When reporting errors, use "conn" whenever possible.
* src/remote_internal.c: change all error (NULL, ... to error (conn, ...
(check_cert_file): Add+use parameter, conn.
Adjust callers.
(initialise_gnutls): The "conn" parameter *is* used, so remove
ATTRIBUTE_UNUSED.


Author: Jim Meyering <meyering@redhat.com>
2007-11-27 18:18:23 +00:00
ba8c4d7400 Updated Windows page. 2007-11-27 15:55:42 +00:00
b4438e5933 * docs/site.xsl docs/libvir.html *.html: add boilerplate for
a Windows support page
Daniel
2007-11-27 15:41:32 +00:00
1338ed4f25 * configure.in: when configuring with --prefix=/usr i.e. the same
prefix as the installed libvirt, use the same localstatedir /var
  (instead of /usr/var) and sysconfdir /etc (instead of /usr/etc) to
  be able to connect to the system daemon, and use the system local
  options
* src/xs_internal.c: avoid error message when non-root cannot open
  xenstore
* src/xend_internal.c: avoid error message when non-root cannot
  directly access xend, in those 2 cases the proxy (or remote code)
  should implement the access so there is no need to raise the error
  there.
Daniel
2007-11-27 14:39:42 +00:00
db444b2264 add a gcc-printf attribute to remoteDispatchError
Author: Jim Meyering <meyering@redhat.com>
2007-11-26 17:41:26 +00:00
881b85a8e5 Also fix the CSS background, Daniel 2007-11-26 14:21:02 +00:00
90da74aee9 fix links again, Daniel 2007-11-26 14:16:03 +00:00
3e59effd03 * doc/*: modified the python page into a bindings page,
added the Ruby binding link to all pages
Daniel
2007-11-26 14:07:56 +00:00
851c651820 Mon Nov 26 12:12:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, src/console.c: Replace cfmakeraw if not in
	  standard library.
2007-11-26 12:14:32 +00:00
b7641686a6 Mon Nov 26 12:03:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* tests/Makefile.am, tests/nodeinfotest.c, tests/qemuxml2argvtest.c,
	  tests/qemuxml2xmltest.c, tests/sexpr2xmltest.c, tests/virshtest.c,
	  tests/xencapstest.c, tests/xmconfigtest.c, tests/xml2sexprtest.c:
	  Miscellaneous fixes to the tests to compile under Cygwin.
2007-11-26 12:03:34 +00:00
fe9d013c3e Mon Nov 26 11:56:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/qemud.c: If AF_INET6 not defined, don't test for it.
2007-11-26 11:56:41 +00:00
31527e43d9 Mon Nov 26 11:54:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/internal.h: Miscellaneous header file fixes to allow
	  libvirtd to build under Cygwin.
2007-11-26 11:54:29 +00:00
b740fe92d3 Mon Nov 26 11:52:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, proxy/Makefile.am: Disable building of the Xen proxy
	  if configured --without-xen.
2007-11-26 11:52:38 +00:00
95585d7c94 Mon Nov 26 11:49:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/bridge.c, src/bridge.h, src/qemu_conf.c, src/qemu_conf.h,
	  src/qemu_driver.c, src/qemu_driver.h, src/test.c: Disable more
	  of qemu if configured --without-qemu.
2007-11-26 11:50:16 +00:00
d6d1c629fa Mon Nov 26 11:47:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c: Miscellaneous header file fixes for
	  Cygwin.
2007-11-26 11:47:15 +00:00
1ef8005d65 Mon Nov 26 11:44:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, qemud/Makefile.am: Check for buggy glibc rpcgen
	  and only run Perl fix-up script for that.
2007-11-26 11:45:26 +00:00
d43607b2f9 Mon Nov 26 11:42:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Check if -lrpc is needed to get XDR functions.
2007-11-26 11:43:01 +00:00
46fdd02c75 Mon Nov 26 11:39:59 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, src/internal.h, src/xml.c: <sys/syslimits.h>
	  is needed on Cygwin to get PATH_MAX.  HOST_NAME_MAX and
	  IF_NAMESIZE defined if not in header files.
2007-11-26 11:40:28 +00:00
a79891f126 Mon Nov 26 11:39:04 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Minimum version of GnuTLS we support is 1.0.25.
2007-11-26 11:34:57 +00:00
3e4ea06702 Fix a typo in a variable name.
* qemud/qemud.c: Check crl_file, not ca_file, for revocation list,
in remoteInitializeGnuTLS.


Author: Jim Meyering <meyering@redhat.com>
2007-11-21 23:16:11 +00:00
1ad3d2cdd8 * src/xm_internal.c: fix the parsing of predefined domains on
xen prior to 3.1 to take into accound the fact that disk can
  be shareable.
Daniel
2007-11-21 16:31:30 +00:00
207962bb1a Wed Nov 21 11:59:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/libvir.html, docs/site.xsl: Fix the link to OCaml
	  bindings.
2007-11-21 12:02:40 +00:00
618db3deb7 Wed Nov 21 11:36:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/bridge.c, src/qemu_driver.c: Incorrect call to
	  brSetForwardDelay changed to brSetEnableSTP.
2007-11-21 11:46:05 +00:00
a1c2e40cac * docs/index.html docs/libvir.html: apply english corrections
suggested by Bruce Montague
Daniel
2007-11-21 10:38:07 +00:00
61b113c623 Cleaned up a couple of comments/tests, Daniel 2007-11-20 18:57:41 +00:00
4ef3a4ea7c Tue Nov 20 10:49:28 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/virterror.c, src/stats_linux.c, include/libvirt/virterror.h:
	  Renamed the VIR_FROM_LINUX error as VIR_FROM_STATS_LINUX for
	  consistency.
2007-11-20 10:58:21 +00:00
aab34d876e * include/libvirt/virterror.h src/openvz_conf.c src/openvz_driver.c
src/stats_linux.c src/virterror.c src/xm_internal.c: patch from
  Saori Fukuta cleaning up various problems in the error reporting
  layers
Daniel
2007-11-20 10:15:38 +00:00
ef4006b3a5 * tests/sexpr2xmltest.c tests/xml2sexprtest.c: warn before exiting
if the path environment variable is missing, add the tests for
  <shareable/> from/to w! ode for disk
* tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.sexpr
  tests/sexpr2xmldata/sexpr2xml-disk-block-shareable.xml
  tests/xml2sexprdata/xml2sexpr-disk-block-shareable.sexpr
  tests/xml2sexprdata/xml2sexpr-disk-block-shareable.xml:
  the new tests data
Daniel
2007-11-20 10:05:45 +00:00
a2492efb60 Re-add quotes around top_srcdir/top_builddir 2007-11-18 11:23:09 +00:00
99c0470dd8 Remove reliance on abs_top_{src,build}dir variables from automake 1.10 2007-11-17 13:16:47 +00:00
4d82d16dc1 Added missing news.xsl to EXTRA_DIST 2007-11-17 12:09:35 +00:00
2efc8ff757 Fixed 32-bit overflow 2007-11-17 11:53:44 +00:00
6bb2d376b5 Refactor processing of incoming packets to remove dead code 2007-11-17 11:17:48 +00:00
e714bb67ca Thu Nov 15 17:43:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/stats_linux.c: Fix parsing of short interface names
	  occurring in the /proc/net/dev file.
	* src/qemu_driver.c: Collect interface stats for QEMU & KVM
	  domains.
2007-11-15 17:45:44 +00:00
7a66394fcb Thu Nov 15 17:40:15 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/hvsupport.html, docs/libvir.html: Document HV support
	  for virNodeGetFreeMemory and virNodeGetCellsFreeMemory.
	* src/libvirt.c: Add DEBUG to virNodeGetFreeMemory and
	  virNodeGetCellsFreeMemory.
	* src/xen_internal.c: virXenError* functions now take an
	  additional virConnectPtr argument, and set it where possible.
2007-11-15 17:44:06 +00:00
9ae4f3d27e * docs/libvir.html docs/uri.html: update docs about the libvirt
daemon startup when using QEmu/KVM.
Daniel
2007-11-15 17:07:28 +00:00
d5117af382 Make "make distcheck" work.
* Makefile.am: Expand some "*" wildcards, and (for now) disable
  the relatively unimportant, distuninstallcheck target.
  Fix a few redirect-directly-to-target bugs.
  Add a few $(srcdir)/ prefixes and add an uninstall-local rule.
* docs/Makefile.am: More of the same.  Split some long lines.
* python/Makefile.am: Likewise.
* python/tests/Makefile.am: Likewise.
* qemud/Makefile.am: Likewise.
* tests/Makefile.am: Remove the directories already listed in SUBDIRS.
* docs/examples/index.py: Adapt to produce the desired changes in
  docs/examples/Makefile.am. Also, sort *.c, so results are reproducible,
  and emit a comment telling emacs and vi that the file is read-only.
* docs/examples/Makefile.am: Regenerate.


Author: Jim Meyering <meyering@redhat.com>
2007-11-15 13:04:28 +00:00
a4499a22c5 * src/stats_linux.c: patch from Jim Paris to fix compilation
when Xen isn't installed
* src/qemu_conf.h: small cleanup of signedness of bitfields
  from Jim Paris
Daniel
2007-11-15 10:56:24 +00:00
ec58960745 * doc/libvir.html doc/format.html: add missing docs for
<shareable/> on disk devices
* src/Makefile.am: fix the tst build rule for missing libraries
Daniel
2007-11-14 17:11:19 +00:00
a3d909888d Handle failed strdup and malloc.
* src/remote_internal.c: Don't dereference NULL after
failed strdup or malloc in doRemoteOpen.
2007-11-14 16:29:08 +00:00
3ba58f158d Wed Nov 14 11:55:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/stats_linux.c, src/stats_linux.h, src_xen_internal.c:
	  Abstract out the Linux-specific statistics.  Fixed parsing
	  of 64 bit numbers.
	* src/Makefile.am: Updated Makefile for new files.
2007-11-14 11:58:36 +00:00
88f28d6980 Wed Nov 14 11:36:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c and all internal driver interfaces: Parse the
	  URI only once and pass it to virDrvOpen instead of the
	  unparsed name string.
2007-11-14 11:40:57 +00:00
5d25419188 Parse integers more carefully, cont'd.
* qemud/qemud.c: Replace uses of strtol with uses of xstrtol_i.
  Avoid overflow for very large --timeout=N values.
* src/nodeinfo.c: In linuxNodeInfoMemPopulate and
  linuxNodeInfoCPUPopulate, use xstrtol_i rather than strtol.
  Unlike in qemud.c, here we allow trailing "isspace", and in
  the case of "cpuinfo cpu MHz", also allow a "." terminator,
  since we ignore the decimal and any following digits.
* src/internal.h: Define xstrtol_ui, too.


Author: Jim Meyering <meyering@redhat.com>
2007-11-14 10:53:05 +00:00
5a6571eba9 Arrange for tests to pass in a non-srcdir build.
* tests/Makefile.am: Include the contents of the *data directories
in the make-dist-built tarball by adding each of that *data
directories to EXTRA_DIST.
Also add int-overflow (via $(test_scripts)) to EXTRA_DIST.
* tests/nodeinfotest.c: Prepend "$abs_top_srcdir/tests" to
each input file name.
* tests/qemuxml2argvtest.c: Likewise.
* tests/qemuxml2xmltest.c: Likewise.
* tests/sexpr2xmltest.c: Likewise.
* tests/test_conf.sh: Likewise.
* tests/virshtest.c: Likewise.
* tests/xencapstest.c: Likewise.
* tests/xmconfigtest.c: Likewise.
* tests/xml2sexprtest.c: Likewise.


Author: Jim Meyering <meyering@redhat.com>
2007-11-14 10:35:58 +00:00
4f2900d097 remove all trailing white space 2007-11-13 15:42:57 +00:00
5f78eccd1c Make qemud's install-init rule work in a non-srcdir build.
* qemud/Makefile.am: In the install-init, remove an unneeded
$(srcdir)/ prefix.


Author: Jim Meyering <meyering@redhat.com>
2007-11-13 14:39:20 +00:00
a8b9c6640a conftest: fix transposed size and count arguments to fwrite.
* tests/conftest.c: Include <string.h> and <errno.h>.
Also include strerror in diagnostic.


Author: Jim Meyering <meyering@redhat.com>
2007-11-12 22:16:25 +00:00
92c8d7dd97 Oops, forgot, Daniel 2007-11-12 14:07:37 +00:00
a500a479b0 Begin fixing uses of strtol: parse integers more carefully.
Patch from Jim Meyering
* src/internal.h: Include <errno.h>.
  Define new static inline function, xstrtol_i.
* src/virsh.c: Detect integer overflow in domain ID number
  in vshCommandOptDomainBy. Detect overflow and invalid port
  number suffix in cmdVNCDisplay.
* src/xend_internal.c: Parse CPU number more carefully in
  xenDaemonDomainGetVcpus.
* tests/int-overflow: New script. Test for the above-fixed bug.
* tests/Makefile.am: Add int-overflow to TESTS. Define
  TESTS_ENVIRONMENT, to propagate $abs_top_* variables into the
  int-overflow script. Adapt the "valgrind" rule not to clobber
  new TESTS_ENVIRONMENT.
Daniel
2007-11-12 14:00:32 +00:00
906c1f5055 * src/virsh.c: initialize a couple of variable to avoid warnings
when compiling with Fedora.
Daniel
2007-11-08 18:07:02 +00:00
710547590b * src/virsh.c: patch from Jim Meyering to use gcc's printf attribute.
Daniel
2007-11-08 18:00:52 +00:00
b31ed75bff * src/virsh.c: patch from Jim Meyering to correct vshCommandOptInt
indentation
Daniel
2007-11-08 16:14:12 +00:00
50804b725b * docs/libvir.html docs/site.xsl: small updates with references
to CIM and OpenVZ
* po/*: updated translations
Daniel
2007-11-07 13:40:19 +00:00
5a628880b0 Tue Nov 6 19:54:00 CET 2007 Jim Meyering <meyering@redhat.com>
Avoid risk of format string abuse (also avoids gcc warnings).
        * src/util.c (ReportError): Use a literal "%s" format string.
        * src/remote_internal.c (server_error): Likewise.
        * src/qemu_conf.c (qemudReportError): Likewise.
        * acinclude.m4: Add -Wformat -Wformat-security to default
          list of warning flags, to warn about errors such as the
          above.
2007-11-07 12:29:37 +00:00
f2886d75e6 * src/xs_internals.c: patch from Chris Lalancette, forgot to
remove the domainDumpXML entry when changing the driver structure
Daniel
2007-11-06 16:25:32 +00:00
9899932303 * src/xml.c src/xs_internal.c src/xs_internal.h: applied patch
from Masayuki Sunou to fix xend errors when adding disk
  devices, due to improper device id lookup.
Daniel
2007-11-06 11:49:01 +00:00
31eade077e * src/virsh.c: patch from Masayuki Sunou to fix parameter
validation of virsh schedinfo parameters.
Daniel
2007-11-06 09:41:18 +00:00
028275d6da * src/xml.c: patch from Beth Kon to fix a problem when the
cpuset parameter for numa uses cpu maxcpu-1
Daniel
2007-11-05 10:14:42 +00:00
c33b54df47 * src/xm_internal.c: patches from Masayuki Sunou to fix a problem
when an HVM domain is started with a CD-Rom config, this should
  fix #328841
Daniel
2007-11-01 13:33:58 +00:00
390cca8125 * proxy/libvirt_proxy.c src/proxy_internal.[ch] src/xen_internal.c
src/xen_unified.[ch] src/xend_internal.[ch] src/xml.[ch]: last
  patch for the library NUMA support, allow to serialize CPU pinning
  to domain configs (but won't work though proxy access), includes
  many patches from Saori Fukuta.
Daniel
2007-10-31 09:39:13 +00:00
8a0711c758 Avoiding calling remote network driver recursively if inside daemon 2007-10-27 01:23:28 +00:00
d6f351690e Support CDROM media change for QEMU/KVM 2007-10-27 01:21:09 +00:00
97185033e5 Refactor shell escaping code 2007-10-27 01:19:51 +00:00
eed1b17791 Refactor device parsing code 2007-10-27 01:18:38 +00:00
79995893de Make qemudMonitorCommand append line endings 2007-10-27 01:16:53 +00:00
2718513226 * src/xml.c: fix build when configured without Xen
Daniel
2007-10-26 13:41:18 +00:00
211a20aefb * src/xml.c: applied patch from Jim Meyering fixing parseNumber
to detect overflow, and also reindented the module.
Daniel
2007-10-24 14:22:25 +00:00
de327d23e7 * po/id.po: Remove again bogus Project-Id-Version field from merge error
Daniel
2007-10-24 08:39:11 +00:00
3d32b50f05 * po/*: updated from translation team
Daniel
2007-10-23 15:45:03 +00:00
14c5c70a78 * src/xml.c: fix the build of the proxy broken on previous commit
Daniel
2007-10-23 15:31:33 +00:00
08be2facab * src/xen_internal.c src/xen_unified.c src/xen_unified.h
src/xend_internal.c src/xml.c src/xml.h: commited erronously
  the NUMA patches sent for review on the list in last commit.
  But that should not affect non NUMA users so early push should
  not be a problem.
Daniel
2007-10-22 20:36:04 +00:00
cfb192ad1e * docs/format.html docs/libvir.html: documentation cleaups
from Jim Paris
Daniel
2007-10-22 20:28:55 +00:00
a87420ae59 * src/xend_internal.c: update to cpuset parsing code for NUMA
Daniel
2007-10-22 13:06:15 +00:00
d620b00ffa * src/Makefile.am: fix tst build rule
* src/buf.c: fix virBufferContentAndFree to make sure the string is
  always 0 terminated.
Daniel
2007-10-19 15:09:31 +00:00
24abf6c925 * src/conf.c: fix bug on negative values in virConfParseLong()
raised by Tatsuro Enokura
Daniel
2007-10-19 10:01:01 +00:00
69b9fcf297 * src/conf.c: documentation cleanups from Jim Meyering
* tests/conftest.c: Use fwrite, not printf, since the
  result buffer is not NUL-terminatedi, from Jim Meyering.
* tests/qemuxml2argvtest.c: Initialize vm.migrateFrom[0],
  to avoid "read-uninitialized" error from within
  qemudBuildCommandLinei, from Jim Meyering.
Daniel
2007-10-19 08:29:13 +00:00
171afdf694 Wed Oct 17 11:27:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* libvirt.spec.in (BuildRequires): Add "qemu" (Jim Meyering).
2007-10-17 10:39:32 +00:00
4e04ee2d2f Wed Oct 17 11:27:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xend_internal.c (sexpr_get): Declare with gcc's printf
        attribute. (Jim Meyering)
2007-10-17 10:33:16 +00:00
b4fab30b89 Mark XML param for attach/detach APIs const 2007-10-15 21:38:56 +00:00
56ba14daa4 Changelog entry for default config files 2007-10-15 21:33:42 +00:00
503cca7cee Mon Oct 15 15:31:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/test.c, include/libvirt/libvirt.h.in: Remove virDomainRestart
        from the public API (it was not used), and move it into the test
        driver where it is used for purely internal purposes.
2007-10-15 14:32:35 +00:00
85ef19558c Added default example configs for libvirtd/qemu driver 2007-10-12 19:54:15 +00:00
912c18afa3 Added QEMU driver config file 2007-10-12 16:05:44 +00:00
af10d71cc2 Reset migration source after failed VM start 2007-10-10 19:46:17 +00:00
175e1711a6 Fixed processing of vncdisplay/vncused params in XM config files 2007-10-10 17:55:38 +00:00
bf70fe4883 Fix virtual networking XML -> XM config file conversion & a mem leak 2007-10-10 17:41:06 +00:00
aa826860bc * src/xend_internal.c: applied patch from Beth Kon to fix
NUMA topology for cells without CPUs
Daniel
2007-10-08 15:02:47 +00:00
77cf0390e4 Fix NUMA topology error handling (beth kon) 2007-10-05 01:08:17 +00:00
d08b12c1a6 Remove bogus Project-Id-Version field 2007-10-03 14:19:35 +00:00
fdc44cf1b7 * configure.in libvirt.spec.in include/libvirt/libvirt.h docs/*:
preparing release of 0.3.3
* po/*: updated the strings localizations
Daniel
2007-09-30 21:09:29 +00:00
795d920028 * python/generator.py python/libvir.c python/libvirt-python-api.xml:
provide bindings for block and interface statistics
Daniel
2007-09-30 20:52:13 +00:00
c4461ff57b Only use bootloader for paravirt guests 2007-09-30 15:36:47 +00:00
b5a3d4da61 * src/virsh.c: use virNodeGetFreeMemory() for freecell without
argument
* src/libvirt_sym.version: export virNodeGetFreeMemory()
Daniel
2007-09-30 13:22:16 +00:00
ab0f561de6 Forgot one change, Daniel 2007-09-30 13:17:45 +00:00
9f211bbf3a * include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/driver.h src/libvirt.c src/openvz_driver.c src/qemu_driver.c
  src/test.c src/xen_unified.c src/xend_internal.c: add new API
  virNodeGetFreeMemory(), extends the driver. Lacks remote and
  QEmu support though.
* src/libvirt.c: allows to fix virNodeGetCellsFreeMemory() adding
  parameter check for startCell.
* proxy/libvirt_proxy.c src/xend_internal.[ch]
  include/libvirt/libvirt.h include/libvirt/libvirt.h.in: applied
  vncpasswd dump patch from Mark Johnson but with the
  virDomainXMLFlags extension as suggested by Daniel Berrange
  this changed a couple of internal APIs too
* tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml: fix one of the
  tests affected by bootloader dump change.
Daniel
2007-09-30 13:09:07 +00:00
0e7aa57385 Solaris hypercall compatability fixes (Mark Johnson) 2007-09-29 18:37:47 +00:00
84b5415cbf Allow empty bootloader tag 2007-09-29 18:31:05 +00:00
fb741174ad Solaris portability fix from Mark Johnson. Remove use of anonymous union members 2007-09-29 18:16:26 +00:00
b876bf6ea5 Fixed crash prossing input tags 2007-09-28 20:47:58 +00:00
4bf3bc9eda * include/libvirt/libvirt.h[.in] src/driver.h src/openvz_driver.c
src/qemu_driver.c src/remote_internal.c src/test.c
  src/xen_internal.[ch] src/xen_unified.c src/xend_internal.[ch]
  src/libvirt.c src/libvirt_sym.version: adding NUMA support patches
  from Beth Kon adding new virNodeGetCellsFreeMemory entry point
  and extending the virConnectGetCapabilities one. Fix a couple of
  issues in the patch and add to exported symbols from shared lib.
* docs/virsh.pod docs/virsh.1 src/virsh.c: added new command
  freecell to get the available memory on the node or in a NUMA cell.
* docs/*: updated and regenerated the documentation
Daniel
2007-09-28 14:28:12 +00:00
dbd8f037e7 * docs/libvir.html: Clarified configuration required for
remote over ssh.
2007-09-28 10:24:58 +00:00
91076f111b * src/remote_internal.c: Fix handling of usernames (thanks to
Fabian Deutsch for finding and fixing this).
2007-09-25 13:54:17 +00:00
136ebc6e3c Detect QEMU flags per VM instead of once for driver as a whole 2007-09-21 21:20:32 +00:00
b32f429849 Added a no_tty param to remote URIs to stop SSH prompting for password 2007-09-21 20:17:09 +00:00
6f44e36e15 Test compiler flags for linking too 2007-09-21 20:01:43 +00:00
01422bd794 Fixed QEMU uri parsing/detection 2007-09-21 19:32:02 +00:00
0caf0d767c Thu Sep 20 19:37:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/bridge.c, src/qemu_driver.c, configure.in: Try to detect
        the paths of dnsmasq and brctl at compile time.  If found
        then compile them in, otherwise search $PATH at runtime.

        * libvirt.spec.in: BR dnsmasq and bridge-utils so we have their
        paths at compile time.
2007-09-20 18:40:36 +00:00
9a79baba76 Thu Sep 20 18:10:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/qemu_driver.c, docs/libvir.html: Support virConnectGetHostname
        and virConnectGetURI for qemu driver.
2007-09-20 17:13:39 +00:00
415015506f Thu Sep 20 13:02:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c: Don't try to generate an error message with
        an invalid connection object.
2007-09-20 12:04:57 +00:00
18ec04c071 Thu Sep 20 12:59:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xend_internal.c: Error message if we cannot connect
        to xend.
2007-09-20 12:02:18 +00:00
736f0e2531 Fix waitpid() call to only run in error case (merge error) 2007-09-19 21:44:32 +00:00
27b4293285 Switch to use pkg-config to find gnutls 2007-09-19 17:42:40 +00:00
e04914328d Make libxml configure process try to use pkg-config if available 2007-09-19 15:35:00 +00:00
e1f4399150 Added config params to customize UNIX sock perms & ownership 2007-09-19 02:28:01 +00:00
8f4e48edff Added support for Avahi mDNS advertisement 2007-09-19 01:56:55 +00:00
c79514fda0 Allow updating of existing timers & file handle event watches 2007-09-19 01:27:32 +00:00
0bde7e57a2 Avoid portability warnings from automake 2007-09-18 23:46:18 +00:00
444f9c368e Don't check for bridge headers if QEMU is disabled 2007-09-18 23:40:34 +00:00
4966664928 Print configuration summary 2007-09-18 23:36:30 +00:00
2384225b8b Avoid zombies with remote tunnels 2007-09-18 03:08:49 +00:00
63dc047468 Fixed PXE network boot config 2007-09-13 22:06:54 +00:00
cc82a93645 Wed Sep 12 16:35:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xend_internal.c, src/xml.c, src/xml.h: Properly check buffer
        size in virDomainXMLDevID (Hugh Brock).
2007-09-12 15:41:51 +00:00
5fac0c95e1 Wed Sep 12 11:30:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xend_internal.c, src/xen_unified.c: Removed an annoying
	  warning when using Xen 3.0.3 and inactive domains.
2007-09-12 10:37:00 +00:00
1361ddec0a Wed Sep 12 11:25:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c: virDrvOpenRemoteFlags was accidentally
	  declared as a global variable, instead of the name an enum.
2007-09-12 10:33:48 +00:00
3292123d13 * docs/architecture.html docs/errors.html docs/format.html
docs/libvir.html: fixing typos spotted by Eduardo Pereira
Daniel
2007-09-10 15:16:25 +00:00
fcf1b59128 * src/xend_internal.c: applied patch from Hugh Brock to allow
CD Rom device reload by reusing virDomainAttachDevice() with
  a new definition
Daniel
2007-09-10 11:47:17 +00:00
298d289542 * include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/libvirt.c: fixes a few problems in the documentation
  pointed out by Toth Istvan.
* docs/*: regenerated the docs
Daniel
2007-09-10 09:37:10 +00:00
372c6f96f7 * docs/libvir.html docs/uri.html: remove references to libvirt_qemud
and replace them with libvirtd
Daniel
2007-09-05 14:32:13 +00:00
5196e6cab7 * src/openvz_conf.c src/openvz_conf.h src/openvz_driver.c: a bit
of cleanup on top of previous patches.
Daniel
2007-09-03 16:30:00 +00:00
b36902c37a * src/openvz_conf.c src/openvz_conf.h src/openvz_driver.c
src/openvz_driver.h: Applied patch from Shuveb Hussain and Anoop
  Cyriac to extent OpenVZ driver capabilities, especially Create().
Daniel
2007-09-03 15:37:07 +00:00
3c999f7ff4 * src/buf.c: applied patch from Masayuki Sunou fixing a loop
due to an error in growing buffers.
Daniel
2007-08-30 13:12:44 +00:00
b001650c7d Wed Aug 29 14:43:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xen_internal.c (xenHypervisorDomainInterfaceStats): Swap
	  TX & RX network stats so they appear correct from the point
	  of view of the domain.
2007-08-29 13:35:15 +00:00
b4d74032b0 * src/virsh.c: apply patch from Masayuki Sunou to fix the exit value
of vncdisplay command.
Daniel
2007-08-29 07:47:09 +00:00
3d5e2a1532 * src/xend_internal.c: applied patch from Masayuki Sunou to avoid
memory corruption on very large XML dumps.
Daniel
2007-08-27 09:31:31 +00:00
c178f52888 Forgot spec update, daniel 2007-08-21 15:04:46 +00:00
cb2e35b604 * configure.in libvirt.spec.in include/libvirt/libvirt.h docs/*:
preparing release of 0.3.2
* src/libvirt.c: fix a couple of comments
* po/*: string localization merge/update
Daniel
2007-08-21 14:59:47 +00:00
3a4c8d219c * src/xs_internal.c: cleanup of memory leaks from Masayuki Sunou
* src/virsh.c: another memory leaks of virsh schedinfo cleanup from
  Saori Fukuta
* po/*: string localization merge/update
Daniel
2007-08-21 11:53:52 +00:00
442a15770c Tue Aug 21 10:58:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c (virDomainBlockStats, virDomainInterfaceStats):
	  Added block device and network interface statistics.
	* src/xen_internal.c: Support for stats from Xen domains.
	* qemud/remote.c, qemud/remote_protocol.x, qemud/remote_internal.c:
	  Support for fetching device and network interface stats
	  across remote connections.
	* src/virsh.c: Added 'virsh domblkstat' and 'virsh domifstat'
	  commands to display stats.
	* docs/libvir.html, docs/hvsupport.html: Updated hvsupport
	  documentation.
2007-08-21 10:08:12 +00:00
c413098dc8 Tue Aug 21 10:36:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* tests/xencapsdata/*.xml: Fixed tests to include new
	  <migration_features> element in capabilities XML.
2007-08-21 09:38:00 +00:00
81005437f4 Tue Aug 21 10:21:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c (virDomainMigrate): Added virDomainMigrate
	  API call.
	* src/xend_internal.c, src/xen_unified.c: Support for migration
	  of Xen domains.
	* src/xen_internal.c: Xen capabilities indicates level of
	  support for migration.
	* qemud/remote.c, qemud/remote_protocol.x, src/remote_internal.c:
	  Support for migration between remote hypervisors.
	* src/virsh.c: Added 'virsh migrate' command.
	* docs/libvir.html, docs/hvsupport.html: Updated hvsupport
	  documentation.
2007-08-21 09:31:12 +00:00
4d8c013104 Removed a CVS conflict line which had been inadvertently committed. 2007-08-21 09:08:45 +00:00
19e21d8672 Tue Aug 21 09:56:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/remote.c, qemud/remote_protocol.x, src/driver.h,
          src/internal.h, src/libvirt.c, src/libvirt_sym.version,
          src/qemu_driver.c, src/remote_internal.c, src/test.c:
          Add a private interface so that libvirt.c coordination
          functions can detect the availability of features in
          underlying drivers, using the VIR_DRV_SUPPORTS_FEATURE
          macro.
2007-08-21 09:03:55 +00:00
9201909064 Tue Aug 21 09:45:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xend_internal.c: Return the interface device name as
          <target dev='vifX.Y'/> in domain XML.
        * tests/*: Update XML in regression tests.
2007-08-21 08:54:07 +00:00
157ddaa295 Tue Aug 21 09:07:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/libvir.html: Updated the hvsupport page to show that
          KVM now supports save and restore operations.
2007-08-21 08:13:40 +00:00
b8906a43fa * src/xend_internal.c: patch from Masayuki Sunou to avoid
attach-disk/attach-interface when < Xen 3.0.4
Daniel
2007-08-16 15:38:38 +00:00
0ee4415cc6 * src/virsh.c: vshCommandOptInt was broken as it would not
detect non-int inputs, problem raised by Masayuki Sunou
Daniel
2007-08-16 13:21:36 +00:00
d7b5e2c2d8 * src/virsh.c: fixed 2 small bugs in setvcpus command, after
Atsushi SAKAI pointed out a value checking problem
Daniel
2007-08-15 10:18:33 +00:00
9cffaad22b * src/proxy_internal.c: fix the UUID lookup though proxy, by
actually sending the UUID string in the request!
Daniel
2007-08-14 12:29:40 +00:00
f39e1b8860 * src/virsh.c: patch from Atsushi SAKAI fixing schedinfo synopsys
Daniel
2007-08-14 07:07:57 +00:00
b8d0a7bc34 * virsh.1 docs/virsh.pod: typo fixes from Atsushi SAKAI
Daniel
2007-08-14 07:02:18 +00:00
1bd2567773 * docs/apibuild.py: fix the API generator to work out of a
include list instead of an exclude list
* po/*: updated localization strings
Daniel
2007-08-14 05:57:07 +00:00
024252d3e3 Implement save/restore for KVM guests 2007-08-14 01:47:24 +00:00
383ae8c4ec Added qemudEscapeShellArg(), and saferead()/safewrite() APIs 2007-08-14 01:33:38 +00:00
79a3754210 Added support for -incoming option in prepare for restore 2007-08-14 01:28:47 +00:00
af7378db35 Allow stdin to be specified with virExec() 2007-08-14 01:23:59 +00:00
4f34d57223 Use \r instead of \n for QEMU monitor 2007-08-14 00:15:16 +00:00
f9372e9408 * src/qemu_driver.c: patch from Jim Paris removing memory leak
* AUTHORS: updated with Shuveb and Jim
Daniel
2007-08-13 09:53:35 +00:00
9112a139df Speed up impl of lookupbyid/uuid and getostype for Xen by using HV where available 2007-08-10 18:25:15 +00:00
46b433f069 Cleanup UUID apis & constants 2007-08-09 20:19:12 +00:00
3860cbb2b7 Tue Aug 7 16:35:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/Makefile.am: gnutls_1_0_compat.h to list of sources
          (bug reported by Jan Michael).
2007-08-07 15:44:42 +00:00
9d5e267e9a Tue Aug 7 16:24:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/virsh.c: Include <time.h> (bug reported by Jan Michael).
2007-08-07 15:26:51 +00:00
754419ec10 Tue Aug 7 15:28:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c: Fix build bug introduced by earlier
          patch.
2007-08-07 14:29:45 +00:00
c47b4c8295 Tue Aug 7 14:18:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/qemud.c: Fix --config/-f option to libvirtd.
2007-08-07 13:24:22 +00:00
c946c197fe Tue Aug 7 13:58:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* acinclude.m4, configure.in: ./configure option
          --disable-stack-protector.
        * src/gnutls_1_0_compat.h: Compatibility with GnuTLS 1.0.
        * src/bridge.c: If no bridge ioctls, give an error at runtime.
2007-08-07 13:02:35 +00:00
6253863e8f * src/xml.c: changes from Masayuki Sunou to improve error reporting
on device XML errors.
Daniel
2007-08-02 10:47:38 +00:00
94711ff791 Fixed memory leaks 2007-07-31 14:27:12 +00:00
f7dd6b4d6f Fixed handling of unsupported machine types 2007-07-30 18:50:07 +00:00
86d352d4fe * src/xen_internal.c: add report of ACPI/APIC for Xen fully virt,
patch from David Lutterkort
* tests/xencapsdata/xen-i686-pae-hvm.xml
  tests/xencapsdata/xen-ia64-be-hvm.xml
  tests/xencapsdata/xen-ia64-hvm.xml
  tests/xencapsdata/xen-x86_64-hvm.xml: this also affects a few tests
Daniel
2007-07-30 10:15:58 +00:00
c7722ca345 * src/qemu_conf.[ch] src/qemu_driver.c: add qemu/kvm drivers report
features for i686 and x86_64, patch from David Lutterkort
Daniel
2007-07-30 09:59:05 +00:00
4e01a607e4 Re-work test driver to implement (nearly) all APIs 2007-07-27 23:23:00 +00:00
1d7164058c * src/virsh.c docs/virsh.pod virsh.1: added a ttyconsole command,
this should fix bug #239687
Daniel
2007-07-26 08:41:16 +00:00
cf5000d9b0 Ignore /usr/include in coverage reports 2007-07-25 23:18:15 +00:00
773aa3b86b Split out generic nodeinfo API 2007-07-25 23:16:30 +00:00
d2cf974b6e Oops forgot to rev in configure.in, Daniel 2007-07-24 15:58:41 +00:00
3edb4bc9fb * libvirt.spec.in NEWS docs/* po/*: preparing release 0.3.1
* src/libvirt.c python/generator.py: some cleanup and warnings
  from Richard W.M. Jones
Daniel
2007-07-24 15:32:55 +00:00
e3af6437f1 Fixed handling of -nographics. Added VNC listen support 2007-07-24 14:30:05 +00:00
1d4d4f3bf9 Fixed crash when cleaning up VMs 2007-07-24 14:24:52 +00:00
f3df229592 Fixed over eager caching of virDomainPtr objects in libvirt daemon 2007-07-24 14:21:03 +00:00
d5b5623ddd * docs/network.rng docs/Makefile.am libvirt.spec.in: added Relax-NG
grammar for network descriptions that David Lutterkort posted in
  April, it needs an update though
Daniel
2007-07-24 09:19:40 +00:00
5e14b0f33a * po/*: update translations and regenerate .pot
Daniel
2007-07-24 08:15:03 +00:00
ce19db8990 Set close-exe on logfile fd, keep monitor FD open 2007-07-23 18:00:33 +00:00
daa2369dde * docs/virsh.pod virsh.1: update to document VIRSH_DEFAULT_CONNECT_URI
environment variable as suggested by David Lutterkort
Daniel
2007-07-23 09:35:59 +00:00
46da4f268f * src/xen_internal.c: and nother one again from Saori Fukuta
Daniel
2007-07-20 10:53:31 +00:00
90ae19cccf * src/xen_internal.c: some error handling improvements from Saori Fukuta
Daniel
2007-07-20 10:44:24 +00:00
6664fdec44 Re: fix Werror, Daniel 2007-07-19 19:25:09 +00:00
5ca7253d4f Fix a Werror breakage, Daniel 2007-07-19 19:23:30 +00:00
68ef3443d4 * src/Makefile.am src/openvz_conf.c src/openvz_conf.h
src/openvz_driver.c src/qemu_driver.c src/util.c src/util.h:
  cleanup patches from Shuveb Hussain, with new util module for
  common code shared between drivers.
Daniel
2007-07-19 16:22:40 +00:00
e2ea955881 Thu Jul 19 16:35:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, src/xen_internal.c: Newer Xen uses
          <xen/sys/privcmd.h>.  Added detection code for this in
          configure.in.
2007-07-19 15:37:54 +00:00
30c10b82c1 * src/xen_internal.c: rewrite of range check in credit scheduler
initially suggested by Atsushi SAKAI
Daniel
2007-07-19 13:39:26 +00:00
ba8648896f Fixed double free of XML property 2007-07-18 21:47:47 +00:00
b3033b99f9 Added testsuite for QEMU XML routines 2007-07-18 21:34:22 +00:00
0bd91c25c0 Fixed compiler warnings 2007-07-18 21:13:26 +00:00
f029721d2b Added support for input devices 2007-07-18 21:08:22 +00:00
6365ff098c * src/test.c include/libvirt/libvirt.h include/libvirt/libvirt.h.in:
cleanup of unused virDeviceMode
Daniel
2007-07-18 10:11:09 +00:00
36e975dd4f * src/openvz_conf.c src/libvirt.c: cleanup, avoid some warnings,
and reuse the existing uuid generation function.
Daniel
2007-07-17 14:40:26 +00:00
b55718444f * configure.in src/Makefile.am src/driver.h src/libvirt.c:
applied patch from Shuveb Hussain to plug the developping
  OpenVZ support. Disabled by default.
* src/openvz_conf.[ch] src/openvz_driver.[ch]: added new
  OpenVZ driver files. Avoid a redefinition of readline().
Daniel
2007-07-17 13:27:26 +00:00
d9adc2eaf1 Re-write notes on IPv6 2007-07-16 21:37:08 +00:00
67c346b102 Added new <clock/> element in XML for choosing utc/localtime 2007-07-16 21:30:30 +00:00
657b5eb50c * src/xml.c: applied modified patch from Masayuki Sunou for
device hot plug description with a wrong root element.
Daniel
2007-07-13 12:26:11 +00:00
5ced7bd1fc * src/virterror.c src/xml.c include/libvirt/virterror.h:
patch from Masayuki Sunou to check Ethernet MAC addresses
  in XML configs
* po/*: string update and merge
Daniel
2007-07-13 08:26:57 +00:00
62442d578d * docs/libvir.html docs/remote.html: update the remote page,
add an index
* docs/pki_check.sh: shell script to check the PKI and client/server
  environment.
Daniel
2007-07-12 15:47:19 +00:00
f36c70775a Check client cert/key ahead of time & report errors 2007-07-12 15:17:08 +00:00
e958eff752 Make QEMU driver report errors against virConnectPtr if available 2007-07-12 15:09:01 +00:00
c0a3f03f4d Clean virConnectPtr object on client disconnect. Fix cleanup when access checks fail 2007-07-12 15:04:05 +00:00
a219c3aba8 Improved error checking for cert/key files 2007-07-12 14:54:45 +00:00
bb6476e771 * src/xen_internal.c: applied patch from Christian Ehrhardt to
fix Xen hypervisor alignment problems on PPC64
* AUTHORS: added Christian
Daniel
2007-07-12 08:57:52 +00:00
38149a2b75 Thu Jul 12 09:34:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Removed --with-qemud-pid-file option since
          it is no longer used.
2007-07-12 08:36:48 +00:00
65a466b551 Thu Jul 12 09:34:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c, src/xen_unified.c: If compiled with
	  --enable-debug=yes then we now trace libvirt calls on
	  stderr.
2007-07-12 08:34:51 +00:00
fdc36dcbe6 * src/xml.c: patch from Masayuki Sunou fixing leaks in
virDomainParseXMLDiskDesc
Daniel
2007-07-11 08:41:11 +00:00
dbe0a4f507 Mark Rich as primary maintainer of the remote driver 2007-07-10 01:04:31 +00:00
f3d774d6c1 * configure.in libvirt.spec.in include/libvirt/libvirt.h
docs/* po/*: prepared release of 0.3.0
Daniel
2007-07-09 12:41:29 +00:00
b36f453a58 * src/xm_internal.c src/xend_internal.c src/buf.[ch]: add
new function virBufferEscapeString() to format a string while
  escaping its content for XML, and apply it to a couple of
  obvious places, should fix bug #206653
* po/*: updated strings, and added new bosnian localization.
Daniel
2007-07-09 11:24:52 +00:00
62efeb0752 Fixed memory corruption after destroying network/domain objects in QEMU driver 2007-07-06 21:52:42 +00:00
f1f70e5099 Fri Jul 6 16:19:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c, src/qemu_driver.c: If the virNetworkLookup*
	  functions cannot find a network, then they now throw
	  VIR_ERR_NO_NETWORK error.
2007-07-06 15:20:38 +00:00
4ea0ef797f Fri Jul 6 16:08:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/proxy_internal.c, src/proxy_internal.h,
	  src.xen_internal.c, src/xen_internal.h,
	  src/xen_unified.c, src/xen_unified.h,
	  src/xend_internal.c, src/xend_internal.h,
	  src/xm_internal.c, src/xm_internal.h,
	  src/xs_internal.c, src/xs_internal.h: The interface
	  between xen_unified.c and its underlying driver now uses
	  a custom structure (struct xenUnifiedDriver) instead
	  of reusing virDriver.
	* src/xen_unified.c: virDomainLookup* functions in Xen
	  now throw VIR_ERR_NO_DOMAIN if the domain does not exist.
	* src/xs_internal.c: Fix indentation.
2007-07-06 15:11:22 +00:00
ea6279cb91 * src/virsh.c: fix an error in the default help string, bug #247197
Daniel
2007-07-06 15:05:19 +00:00
16eae80edf Fri Jul 6 16:00:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/hash.c, src/internal.h: Remove virGetDomainByID function
	  as it is not used or exported.
	* src/proxy_internal.c, src/qemu_driver.c, src/remote_internal.c,
	  src/test.c, src/xend_internal.c, src/xs_internal.c: Fix
	  all callers to virGetDomain and virGetNetwork functions -
	  the callers do not need to set virterror since it is already
	  set inside the functions.
2007-07-06 15:02:09 +00:00
b26376750e Fri Jul 6 15:54:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* include/libvirt/virterror.h, src/virterror.c, src/libvirt.c:
	  Add VIR_ERR_NO_DOMAIN and VIR_ERR_NO_NETWORK errors, which
	  indicate that there is no domain/network from vir*Lookup* functions.
	* src/qemu_driver.c: Use VIR_ERR_NO_DOMAIN in lookup functions.
	* src/test.c: Use VIR_ERR_NO_DOMAIN in lookup functions.
2007-07-06 14:56:15 +00:00
44b20d1056 Ignore libvirtd.init, Daniel 2007-07-06 07:11:24 +00:00
b454313c5d * src/xend_internal.c: fix typo in function comment
* po/*: updated the localizations
* qemud/libvirtd.init.in: LSB'ization of the init script and
  couple of fixups
Daniel
2007-07-05 16:04:11 +00:00
34908a6a1e move conversion of NULL & xen URIs into libvirt.c 2007-07-05 13:49:17 +00:00
8e760f1d09 Fixed typo in flags 2007-07-05 13:47:29 +00:00
6113d4e17d Wed Jul 4 14:17:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xm_internal.c: configCache not getting refilled if the
	  connection was closed (affected the remote case mainly),
	  and error messages added to xenXMConfigCacheRefresh.
2007-07-04 13:16:57 +00:00
9cd405497f Wed Jul 4 10:14:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/conf.c, src/test.c, src/xen_internal.c: Readd checking
          of errors from virBuffer functions.
        * src/sexpr.c: Add comment about use of _GNU_SOURCE.
        * src/virsh.c: Remove use of _GNU_SOURCE / isblank.
        * src/xml.c, tests/Makefile.am: Minor cleanup.
2007-07-04 09:16:23 +00:00
483f6d6951 Make network APIs go via remote driver. Autospawn per-user daemon 2007-07-04 03:59:13 +00:00
6bdad268f4 * src/virsh.c: applied patch from Masayuki Sunou to remove leaks
of domains references in some commands.
Daniel
2007-06-29 13:45:50 +00:00
b4c282a79b * docs/apibuild.py docs/newapi.xsl: fix generation of XML and
stylesheet
* docs/*: regenerated
* src/bridge.c src/bridge.h src/buf.c src/iptables.c src/libvirt.c
  src/qemu_driver.c src/qemu_driver.h src/uuid.c src/uuid.h: cleanup,
  addd comments, made functions static and fixe a few bugs
Daniel
2007-06-29 13:23:13 +00:00
4c0f24c10f Tue Jun 29 13:44:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/site.xsl, docs/libvir.html, docs/hvsupport.html:
	  Document which libvirt versions supported various
	  hypervisor calls.
2007-06-29 12:44:57 +00:00
e0bbd77b4b Remove Makefile & Makefile.in from RPM to avoid multilib issues 2007-06-27 22:33:09 +00:00
a07f0a00da Move the QEMU driver & utility files from qemud/ to src/ 2007-06-27 00:12:29 +00:00
a78a6602df Move QEMU driver into main libvirt.so and use single daemon for all drivers 2007-06-26 23:48:46 +00:00
8c90a88818 Fix typo in read only connection check 2007-06-26 23:05:54 +00:00
b6b8583663 Rename the daemon to libvirtd 2007-06-26 23:04:49 +00:00
de5bd324dc Rename init script 2007-06-26 23:03:48 +00:00
ec834baa9c Remove use of libsysfs from bridge code 2007-06-26 23:01:54 +00:00
dd8b3c6e76 Don't try to handle URIs with hostname in test driver 2007-06-26 22:57:41 +00:00
70da0494c1 Add driver API for global startup/shutdown/reload hooks 2007-06-26 22:56:14 +00:00
25905a78f2 Switch to using internal event API for QEMU driver 2007-06-26 22:51:01 +00:00
133fdfe9e8 Move code relating to vm/network lookups into conf.c 2007-06-26 22:42:47 +00:00
a041de159f Update to comply with internal driver API 2007-06-26 22:39:53 +00:00
2f02d292da Move virBuffer functions into src/buf.c,h 2007-06-26 22:33:22 +00:00
675ba3170d Rename buffer functions 2007-06-26 22:21:22 +00:00
3d6a119de8 Rename UUID functions 2007-06-26 22:19:38 +00:00
b63f8cc9f9 Split up struct qemud_server to move qemu stuff into conf.c 2007-06-26 22:13:21 +00:00
498cc57835 Updated to use virError object & APIs for error reporting 2007-06-26 20:51:00 +00:00
2dd21783ec Move code dealing with global startup/shutdown/reload into driver.c 2007-06-26 20:45:21 +00:00
9f25d22a6f Move process lifecycle code from qemud.c to driver.c 2007-06-26 20:41:25 +00:00
8ebda57b2e Move capabilities XML generation into driver.c 2007-06-26 19:49:50 +00:00
0cb54b45f1 Re-factoring event loop 2007-06-26 19:11:00 +00:00
f2058815e7 Rebuilt generated files in the docs/ directory (no actual change). 2007-06-26 13:50:22 +00:00
4a0cef94a5 Tue Jun 26 14:40:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c, python/Makefile.am: Python bindings
	  fixed, and now building virConnect.getHostname and
	  virConnect.getURI.  Fixed a problem which stopped
	  libvirt.py from being (re-)built.  Rearranged
	  python/Makefile.am to make it cleaner and clearer.
2007-06-26 13:47:04 +00:00
2be812bbc9 Tue Jun 26 12:40:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* include/libvirt/libvirt.h.in, src/libvirt.c: (and numerous
	  other files) Added support for virConnectGetHostname
	  and virConnectGetURI calls.
2007-06-26 11:42:46 +00:00
aa053ba2c5 Mon Jun 25 16:55:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* include/libvirt/libvirt.h.in, src/libvirt.c, src/libvirt_sym.version,
	  python/generator.py: Added virDomainGetConnect and
	  virNetworkGetConnect to allow us to get the "hidden"
	  connection associated with each domain or network.
2007-06-25 15:56:18 +00:00
83471f1ec5 Mon Jun 25 14:30:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* include/libvirt/libvirt.h, include/libvirt/libvirt.h.in,
	  src/test.c: Remove unused virDomainKernel structure.
2007-06-25 13:26:02 +00:00
b19a6c7d28 Mon Jun 25 14:03:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c: Partial revert - defining enum transport
	  as a typedef broke the build.
2007-06-25 13:05:03 +00:00
b48d5f7a47 Mon Jun 25 09:40:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c: Made cosmetic changes to the code and
	  comments to allow 'make -C docs rebuild' to succeed parsing
	  this file.
2007-06-25 08:41:17 +00:00
2670b9c80a Mon Jun 25 09:19:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/site.xsl: Added link to OCaml bindings.
2007-06-25 08:40:38 +00:00
56cd4140d4 Mon Jun 25 09:19:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/remote.c, src/remote_internal.c: Fix virDomainGetVcpus
	  in the remote case.
	* src/libvirt.c: Allow virConnectListDomains,
	  virConnectListDefinedDomains, virConnectListNetworks and
	  virConnectListDefinedNetworks to work in the case where
	  they are called with maxids/maxnames == 0.
	* src/remote_internal.c: Fix virDomainGetMaxVcpus in remote
	  case so that it copies sufficient data.
	* src/xen_unified.c: Remove autostart functions.
2007-06-25 08:23:10 +00:00
137847e55d Fri Jun 22 14:15:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/remote.c, qemud/remote_protocol.x, src/remote_internal.c:
	  Add support for setting scheduler parameters over remote
	  connections.
2007-06-22 13:16:10 +00:00
29ee614511 Fri Jun 22 12:40:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/internal.h: Added STREQ and STRCASEEQ macros for clearer
	  equality testing of strings.
	* src/xen_internal.c: Fix handling of the scheduler parameters
	  field string so that the field doesn't contain garbage
	  after the string.
2007-06-22 11:42:22 +00:00
65d0b1910b * qemud/driver.c: apply patch from Jim Meyering to handle realloc
failure without leaking.
Daniel
2007-06-22 10:14:48 +00:00
e8b0f8a251 Thu Jun 21 16:56:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/virsh.pod: Fixed a few typos and POD directives.
2007-06-21 15:57:49 +00:00
10960f2a1a Thu Jun 21 16:48:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c: Fix virConnectGetMaxVcpus in the
	  remote case when type parameter is NULL.
	* src/xend_internal.c: Proper error reporting in
	  xenDaemonDomainDumpXML function.
2007-06-21 15:49:09 +00:00
67ec3c93bc Couple of small fixes raised by danpb, Daniel 2007-06-21 15:46:04 +00:00
a6a6c9860c Fixed marshalling of id on wire 2007-06-21 15:38:20 +00:00
8fe24e137f * virsh.1 docs/virsh.pod docs/Makefile.am: updated the pod file
to reflect the current set of commands, added a rule in the Makefile
  to regenerate the man page, and regenerated.
Daniel
2007-06-21 15:00:17 +00:00
4fdec95d6b * docs/virsh.pod: commit of original POD file for virsh man page
from Andrew Puch April 2006
Daniel
2007-06-21 07:39:51 +00:00
e2df281e6c Wed Jun 20 18:23:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c, src/qemu_internal.c, src/test.c,
	  src/xen_unified.c, src/xend_internal.c,
	  src/libvirt.c, include/libvirt/virterror.h:
	  VIR_ERR_NO_SUPPORT means the function is not supported by
	  the hypervisor.  VIR_ERR_NO_CONNECT means the connection
	  failed.  VIR_ERR_CALL_FAILED is deprecated.  Drivers which
	  decline a URI now no longer produce an error.  Make
	  xen_unified.c ignore naked URI strings like "foo".
2007-06-20 17:25:39 +00:00
17e1ee3cc7 Wed Jun 20 18:21:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/virsh.c: 'virsh help command' now works even if we could
	  not get a connection to the hypervisor.  Rearranged the list
	  of commands to be in alphabetical order.
2007-06-20 17:22:09 +00:00
2958900d22 Wed Jun 20 10:54:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c src/test.c src/xen_unified.c: Fix URI processing
	  so that local file URIs work again.  Move remote driver to
	  last in the list, and fix all drivers so they decline remote
	  URIs (Daniel Berrange).
2007-06-20 10:01:14 +00:00
9562ed3462 Improving the bugs.html page, Daniel 2007-06-20 09:03:23 +00:00
99089f80cd Tue Jun 19 20:07:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xend_internal.c: Recognise xen:/// as the standard
          URI for connecting to a local Xen hypervisor.
2007-06-19 19:08:09 +00:00
a34c85732d Tue Jun 19 17:02:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/libvir.html docs/remote.html docs/uri.html: Documented
	  all supported URI formats.
2007-06-19 16:07:58 +00:00
995235b13c * docs/site.xsl docs/libvirt.html docs/uri.html docs/*.html:
adding a placeholder for the new URIs page, update the
  stylesheet to generate a new page, rebuilt.
Daniel
2007-06-19 13:43:28 +00:00
44e522c821 Tue Jun 19 13:12:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/remote.html: Check in the updated documentation file
          for the web site.
2007-06-19 12:12:15 +00:00
3b7046a743 Tue Jun 19 10:30:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/virsh.c: vcpupin command now documented properly and
          gives clearer error messages if the cpulist is wrong
          (Masayuki Sunou).
2007-06-19 09:32:04 +00:00
a03844f8ca * src/xend_internal.c: drop the release information as this
is usually garbage ending up polluting minor and major numbers.
* src/virsh.c: applied patch from Masayuki Sunou providing a pair
  of alternate attach/detach commands
Daniel
2007-06-19 09:12:55 +00:00
81bb16b302 Mon Jun 18 16:59:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/libvir.html (Remote): Updated certificate documentation
	  to use GnuTLS certtool instead of CA.pl / openssl.
2007-06-18 16:00:16 +00:00
af933f6ff0 * src/virsh.c: applied SetMem cleanup patch from Mark Johnson
Daniel
2007-06-18 08:33:08 +00:00
852f4340f7 Added Mark Johnson to authors list 2007-06-15 15:27:39 +00:00
6668e64766 Fri Jun 15 16:21:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Solaris header file fixes (Mark Johnson).
2007-06-15 15:24:20 +00:00
a770b4c357 Fri Jun 15 14:42:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/test.c, src/virsh.c, src/xend_internal.c, src/xm_internal.c:
	  Replace calls to deprecated {,r}index with str{,r}chr.
2007-06-15 13:44:19 +00:00
b69fcc15b4 Fri Jun 15 08:53:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/internal.h, src/virsh.c: Replace _N with N_ so that
          Solaris builds work (Mark Johnson).
        * src/virsh.c: Add a couple of missing error messages (Mark
          Johnson).
        * python/types.c: Fix NULL pointer deref on DEBUG build
          (Mark Johnson).
        * src/virsh.c: Spelling fix (Mark Johnson).
2007-06-15 08:18:55 +00:00
1bb74341b4 Fix handling of extra_release for Fedora 2007-06-15 01:31:51 +00:00
512bf1a6b2 Fix coverage file generation 2007-06-15 01:21:18 +00:00
fce0ce6f85 tiny fix on last patch, Daniel 2007-06-13 13:13:59 +00:00
7c85b83736 * src/virsh.c: patch from Saori Fukuta for messages
* *.po: updated with the patch from Saori Fukuta and merge from
  the i18n CVS base.
Daniel
2007-06-13 09:32:44 +00:00
bc2f1b3cf4 Mon Jun 11 14:49:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/examples/index.py: Autogenerate Makefile.am and
	  .cvsignore in this directory with corrected LDADDS and
	  including some generated subdirectories which CVS should
	  ignore.
2007-06-11 13:55:03 +00:00
0bbe8da810 Some fixes for RPM builds:
Mon Jun 11 14:10:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>

	* libvirt.spec.in: BuildRequires gnutls-devel and
	  set the remote PIDfile when configuring.
	* qemud/Makefile.am: Distribute the Perl scripts.
	* qemud/qemud.c: Only use QEMUD_DEBUG when ENABLE_DEBUG
	  is defined.
2007-06-11 13:24:45 +00:00
ec5a9a0ac7 Mon Jun 11 13:25:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* RENAMES: Suggested list of file renames.
2007-06-11 12:25:06 +00:00
7172e734e1 Mon Jun 11 13:24:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/examples/.cvsignore: Ignore .deps and .libs subdirectories.
2007-06-11 12:24:21 +00:00
f7f0a31a82 Mon Jun 11 13:22:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/libvir.html, docs/remote.html: Updated docs to reflect
	  access control lists now based on Distinguished Names.
2007-06-11 12:23:36 +00:00
80b7e43da8 Mon Jun 11 13:18:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in: Add '--with-remote' flag.  Add compatibility
	  code for versions of libxml2 supporting xmlURI.query_raw.
	  Check for GnuTLS library.
2007-06-11 12:19:46 +00:00
9172d0ec27 Mon Jun 11 12:49:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/Makefile.am, qemud/dispatch.c, qemud/dispatch.h,
	  qemud/internal.h, qemud/protocol.c,
	  qemud/protocol.h, qemud/protocol.x, qemud/qemud.c:
	  libvirt_qemud server-side modifications to use
	  XDR-based protocol instead of homebrew (Dan Berrange).
	  QEMUD server modified to dispatch calls from remote
	  clients (Richard Jones).  Added TLS support (Richard Jones).
	  Added TCP & IPv6 support (Richard Jones).
	  Additional configuration file, command-line handling, and
	  usage (Richard Jones).
	* qemud/conf.c: Remove unnecessary header file.
2007-06-11 12:04:54 +00:00
b4f7816bf4 Mon Jun 11 12:48:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/qemu_internal.c: QEMU client-side modifications to
	  use XDR-based protocol instead of homebrew.  (Dan Berrange)
2007-06-11 11:48:29 +00:00
b9f8610a1e Mon Jun 11 12:45:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/remote.c, qemud/remote_generate_stubs.pl,
	  qemud/remote_dispatch_localvars.h,
	  qemud/remote_dispatch_proc_switch.h,
	  qemud/remote_dispatch_prototypes.h: Server side of
	  the remote patch, deals with call dispatch.
2007-06-11 11:47:01 +00:00
b7c42619e6 Mon Jun 11 12:41:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/remote_internal.c, src/remote_internal.h,
	  src/driver.h, src/libvirt.c, src/Makefile.am: Client side
	  of the remote patch - adds a remote driver.
2007-06-11 11:43:41 +00:00
fc23185e84 Mon Jun 11 12:34:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* qemud/remote_protocol.x qemud/rpcgen_fix.pl
	  qemud/remote_protocol.c qemud/remote_protocol.h: Client/server
	  protocol used by remote.
2007-06-11 11:36:17 +00:00
29e65f9a98 * configure.in libvirt.spec.in include/libvirt/libvirt.h
docs/*: prepared release of 0.2.3
Daniel
2007-06-08 11:11:56 +00:00
c7aae27426 * po/*: new merge of localization strings
Daniel
2007-06-08 09:36:43 +00:00
f404609120 Fixed handling of bridge devices 2007-06-07 18:21:58 +00:00
80b7a7ab4f Ensure build fails if tests fail 2007-06-07 14:48:30 +00:00
2bdf20ba8b Fix boot device tests 2007-06-07 14:09:01 +00:00
de288e8dbc Fix boot device tests 2007-06-07 14:08:35 +00:00
a80faa4bf0 * src/xend_internal.c src/xm_internal.c src/xml.c: add support
for arguments to bootloader, patch from Hugh Brock
* tests/sexpr2xmltest.c tests/xml2sexprtest.c
  tests/sexpr2xmldata/sexpr2xml-pv-bootloader.sexpr
  tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml
  tests/xml2sexprdata/xml2sexpr-pv-bootloader.sexpr
  tests/xml2sexprdata/xml2sexpr-pv-bootloader.xml: add specific
  regression tests
Daniel
2007-06-07 13:50:18 +00:00
2a10972010 * src/libvirt.c: do not die if the daemon is not running on a Xen
system (shows up as root only) and emit a warning instead
* src/virterror.c include/libvirt/virterror.h docs/*: add
  the new warning.
Daniel
2007-06-07 13:05:00 +00:00
41402668f9 * src/xml.c: patch from Saori Fukuta to avoid (type ioemu)
on Xen-3.1 and HVM guests devices to avoid breaking paravirt
  drivers there
Daniel
2007-06-06 14:39:04 +00:00
7eed474dd3 * src/virsh.c: added a logging option to a file based on
Nobuhiro Itou patch
* src/xen_internal.c: small TODO comment from Atsushi SAKAI
Daniel
2007-06-06 12:24:31 +00:00
ec3835d330 * po/*: merge all po from Red Hat/Fedora translations, and
ran 'make update-po'
Daniel
2007-06-06 07:22:02 +00:00
75e63ce86e * src/xen_internal.c: fix from Hugh Brock to allow compiling
with -Werror after the previous patch
Daniel
2007-06-05 20:56:53 +00:00
a62e008365 Oops2, Daniel 2007-06-05 13:11:48 +00:00
3e255474d3 oops, Daniel 2007-06-05 13:10:09 +00:00
652f3bb13b * include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/driver.h src/libvirt.c src/libvirt_sym.version
  src/proxy_internal.c src/qemu_internal.c src/test.c
  src/virsh.c src/xen_internal.c src/xen_internal.h src/xen_unified.c
  src/xend_internal.c src/xm_internal.c src/xs_internal.c:
  Applied patches from Atsushi SAKAI to add the scheduler API,
  with patch from Rich Jones for error handing, and a number
  of cleanups and more error checking from me
Daniel
2007-06-05 12:06:08 +00:00
c6e2ef60df * src/xml.c: apply patch from Masayuki Sunou about an uninitialized
string when attaching a device
Daniel
2007-06-04 08:42:41 +00:00
ae35e97ec8 * src/xml.c: added a comment about (type ioemu) not needed
for interfaces on xen 3.1 as pointed by Saori Fukuta
Daniel
2007-06-01 14:03:24 +00:00
3bcd26e6d2 +Tue May 29 15:56:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
+
+       * python/generator.py, python/libvir.c, python/libvir.py:
+         Wrap the virGetVersion call as Python libvirt.getVersion.
+
+       * src/libvirt.c: Change virGetVersion so that the driver name
+         is case insensitive.
+
2007-05-29 14:58:27 +00:00
0832c58c0a +Tue May 29 15:41:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
+
+       * TODO: Added a note about requiring C++ compiler because of a
+         possible problem with libtool autoconf macros.
+       * docs/examples/Makefile.am, proxy/Makefile.am, qemud/Makefile.am,
+         src/Makefile.am, tests/Makefile.am: Pass $(WARN_CFLAGS) when
+         linking, so if -fstack-protector is there, gcc will link to
+         the stack protector library.
+       * tests/xencapstest.c: Allow this test to compile when Xen
+         libraries are not enabled.
+
2007-05-29 14:44:15 +00:00
c3e814684a oops, Daniel 2007-05-29 14:19:06 +00:00
7b88f59ce4 * src/virsh.c src/xen_internal.c src/xend_internal.c: memory leaks
fixed by a patch from Masayuki Sunou
Daniel
2007-05-29 13:55:19 +00:00
bb5fcd02bc Wed May 23 16:07:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/virsh.c: Add attach-device and detach-device commands to
	virsh, and tidy up the way it reads whole files.  Patch from
	Masayuki Sunou, Mark McLoughlin, Richard Jones.
2007-05-23 15:09:19 +00:00
3b0acf5616 Allow overwrite of existing guest config 2007-05-22 00:39:59 +00:00
f58ac222be Fixed missing return value checks on write 2007-05-18 19:00:37 +00:00
85e9f9fb47 Added per-VM logging 2007-05-18 18:36:24 +00:00
ef38afcfd4 Fixed stack overflow. Fixed bridge network 2007-05-14 15:41:57 +00:00
ac2d00c498 Fix <boot> syntax 2007-05-11 14:24:02 +00:00
99370101de Ignore old style vnc config on xen 3.0.5 2007-05-11 14:21:28 +00:00
538d6e980b Added dep on dnsmasq 2007-05-11 13:35:24 +00:00
cbad699ffe Thu May 11 13:23:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* .cvsignore, qemud/uuid.c: Add some generated files to .cvsignore.
          Remove an unused #include from uuid.c.
2007-05-11 12:28:10 +00:00
1815534ef0 Thu May 10 17:00:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/libvir.html, docs/libvirt.css, docs/remote.html:
	  Added documentation for TLS certificates and libvirtd.conf.
	  CSS changes makes the tables look nicer.  remote.html is
	  a generated file.
2007-05-10 15:55:39 +00:00
0d555708bd Tue May 8 11:49:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/hash.c, src/internal.h, src/libvirt_sym.version: Export
          __virGetDomain and __virGetNetwork for use by the libvirtd.
          The double underscores indicate that these interfaces are
          not officially supported parts of the libvirt API or ABI.
2007-05-08 10:53:27 +00:00
e0e95c53fc Tue May 8 11:14:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/hash.c, src/internal.h, src/xs_internal.c: Remove
	  unused fields from internal _virDomain structure.
2007-05-08 10:22:36 +00:00
6723c50b5c Support <on_reboot> action 2007-05-03 16:10:40 +00:00
3ac6e102da * src/virsh.c: fix help for dumpxml and net-dumpxml commands
based on Chris Wright feedback
Daniel
2007-05-03 16:03:02 +00:00
04231acb2b Thu May 3 15:03:00 BST 2007 Richard Jones <rjones@redhat.com>
* src/virterror.c, include/libvirt/virterror.h: Added
	  VIR_FROM_REMOTE, VIR_ERR_RPC, VIR_ERR_GNUTLS_ERROR
	  for remote errors.
2007-05-03 14:00:18 +00:00
5b74f3c2cd Wed May 2 18:42:00 BST 2007 Richard Jones <rjones@redhat.com>
* src/libvirt.c, src/qemu_internal.c: Allow network
	  drivers to DECLINE to take accept a call.  Only fail
	  outright if the network driver reports an error.
	* src/qemu_internal.c (qemuNetworkOpen): Fix path to
	  driver used in the non-root case.
2007-05-02 17:40:00 +00:00
b15d511db4 Wed May 2 18:38:00 BST 2007 Richard Jones <rjones@redhat.com>
* src/proxy_internal.c, src/qemu_internal.c, src/test.c,
	  src/xen_unified.c, src/xend_internal.c, src/xs_internal.c:
	  During virConnectOpen, be careful to call __virRaiseError
	  with conn = NULL so that the error message is not
	  discarded.
2007-05-02 17:36:25 +00:00
f8fa07c107 Wed May 2 17:55:12 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/libvirtd.in: synchronously restart the daemon in
        order to avoid https://bugzilla.redhat.com/238492
2007-05-02 16:56:03 +00:00
d3e661f745 Disable xm_internal on new xend 2007-05-02 16:17:02 +00:00
6a12fee135 Use --strict-order with dnsmasq 2007-05-02 15:51:14 +00:00
94033dd73f Mon Apr 30 18:33:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c, src/driver.h, src/proxy_internal.c,
	  src/qemu_internal.c, src/test.c, src/xen_internal.c,
	  src/xend_internal.c, src/xs_internal.c,
	  proxy/libvirt_proxy.c: Remove VIR_DRV_OPEN_QUIET.
2007-04-30 17:30:11 +00:00
27151b3d10 Mon Apr 30 18:02:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/proxy_internal.c (xenProxyGetCapabilities): Add support
	  for virConnectGetCapabilities across Xen proxy.
2007-04-30 16:58:26 +00:00
ebd8071688 Mon Apr 30 18:00:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xen_unified.c: In the non-root case keep track of the
	  Xen underlying drivers which opened correctly and only
	  try methods on those opened drivers.
2007-04-30 16:57:15 +00:00
68c6d74fa1 Mon Apr 30 17:58:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/libvirt.c (virConnectNumOfDefinedDomains): Documentation
	  fix (thanks to Jan Michael).
2007-04-30 16:55:34 +00:00
1dca564a64 Regenerated docs, Daniel 2007-04-27 15:39:20 +00:00
b782d66763 * src/virsh.c: fix virshStrdup to not crash if NULL is passed.
Daniel
2007-04-26 10:20:57 +00:00
c847530f97 * src/internal.h src/xend_internal.c: a better fix from Shigeki Sakamoto
and raising errors on memory shortage.
Daniel
2007-04-24 13:44:16 +00:00
b371d037b2 * src/internal.h src/xend_internal.c src/xml.c: applied 2 bug fixes
from Shigeki Sakamoto about large buffers.
Daniel
2007-04-23 07:41:23 +00:00
e826f73647 Thu Apr 19 12:09:15 IST 2007 Mark McLoughlin <markmc@redhat.com>
* docs/libvirt.rng: fix duplicate x86_64 arch
2007-04-19 11:11:06 +00:00
12a60bc433 Thu Apr 19 09:45:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/libvir.html: Change &nbsp; to space.
2007-04-19 08:44:07 +00:00
07f347101c * libvir.rng: applied patch to fix regexp constructs from Robin Green
Daniel
2007-04-19 07:57:06 +00:00
e76632c912 Wed Apr 18 16:16:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* docs/libvir.html: Documentation for the remote patch.
2007-04-18 15:14:32 +00:00
dbcc662ea3 Wed Apr 18 11:12:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/test.c, src/libvirt.c, src/virterror.c,
	  include/libvirt/virterror.h: Add a VIR_FROM_TEST error class
	  and ensure that test driver errors are from this class.
	  Tidy up the error messages generated by the test driver when
	  user doesn't add a path to the URL and avoid open ("/").
2007-04-18 10:14:07 +00:00
435ce72149 * docs/remote.html docs/site.html docs/*.html: added a stub for
the remote page, added it to stylesheet and regenerated
Daniel
2007-04-18 09:58:35 +00:00
9ab00c05bf * docs/* NEWS libvirt.spec.in: prepare release of 0.2.2
* docs/apibuild.py: do not scan xen_unified for APIs.
Daniel
2007-04-17 09:33:51 +00:00
733c5a2350 Check for existance of QEMU binary 2007-04-16 13:14:28 +00:00
0de8efe4a0 Implement driver for virDomainGetOSType in QEMU guests 2007-04-16 13:10:05 +00:00
b4259bbc37 Fixed exception reporting for domain/network operations 2007-04-16 12:37:59 +00:00
cc05eaf803 Fixed integer overflow in QEMU guest CPU time 2007-04-15 19:58:44 +00:00
9e4d606303 Back out accidental commit of code adding an <os> block for dom0 2007-04-13 14:08:38 +00:00
c73708ea46 * src/virsh.c: fixed a bad messaging mechanism preventing localization
and raised by Thomas Canniot
Daniel
2007-04-13 08:04:08 +00:00
42ee7111c3 Fixed up various functions for Xen 3.0.5 2007-04-13 00:43:57 +00:00
dfe570a9ef Thu Apr 12 15:18:00 BST 2007 Richard Jones <rjones@redhat.com>
* src/libvirt.c: set VIR_CONNECT_RO on read-only connections.
          Patch by S.Sakamoto.
2007-04-12 14:18:39 +00:00
1ec25df269 * src/xend_internal.c src/xml.c: applied patch from Nobuhiro Itou
to handle CDRom devices with no device name
* tests/sexpr2xmltest.c tests/xml2sexprtest.c
  tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.sexpr
  tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml
  tests/xml2sexprdata/xml2sexpr-no-source-cdrom.sexpr
  tests/xml2sexprdata/xml2sexpr-no-source-cdrom.xml: added regression
  tests for this case based on Nobuhiro Itou test inputs.
Daniel
2007-04-11 16:06:30 +00:00
19c6ddcce5 Fixed up IPtables rules to be more strict 2007-04-10 23:17:46 +00:00
7fd0878c40 Added vir*GetAutostart APIs to python 2007-04-10 23:15:58 +00:00
634d655c1e * src/virsh.c: fixed some typos reported by translator
Nikolay Sivov should fix #235904
Daniel
2007-04-10 18:40:50 +00:00
1f88a2d031 Tue Apr 10 13:58:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xen_unified.c (xenUnifiedRegister): Comment the
	  xenUnifiedRegister function to avoid error message
	  when building docs/.  Patch from Atsushi SAKAI.
2007-04-10 13:00:26 +00:00
0c52de4d8e Tue Apr 10 12:18:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xen_unified.h, src/xen_unified.c: Fix indentation.
2007-04-10 11:17:34 +00:00
73dd7f0ff5 * src/test.c: converted to new XPath APIs
* src/xml.c: fixed a return comment
Daniel
2007-04-06 15:34:09 +00:00
4bdac20ad6 * src/xml.[ch]: first patch to clean up XPath accesses with new
routines, only xml.c is cleaned up, other modules to follow.
Daniel
2007-04-06 12:28:24 +00:00
18cd1a1e57 Wed Apr 4 15:18:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* src/xen_unified.c et al: Unified Xen driver.  Architecture
	  described here:
	  https://www.redhat.com/archives/libvir-list/2007-March/msg00396.html
2007-04-04 14:19:49 +00:00
ad8bef84d1 Wed Apr 4 10:30:00 BST 2007 Richard W.M. Jones <rjones@redhat.com>
* configure.in, qemud/Makefile.am: Set QEMUD_PID_FILE macro
	  correctly (expand ${prefix} in Makefile).
	* qemud/qemud.c: Add command line help.
	* ChangeLog: Remove a CVS '>>>>' conflict line which had
	  been committed inadvertently.
2007-04-04 09:32:00 +00:00
b5d6258530 * src/virsh.c: applied patch from Atsushi SAKAI to clarify
that memory values are in kilobytes
Daniel
2007-04-02 11:56:38 +00:00
8ba930c380 Wed Mar 30 17:25:33 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/iptables.c: As suggested by danpb, make libvirt_qemud
        handle SIGHUP by re-loading the iptables rules.
2007-03-30 16:25:02 +00:00
812b34fdd8 Wed Mar 30 17:24:48 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/iptables.c: Re-factor things a little so that we
        maintain the rules in memory even when we're not going
        to write them to disk.
2007-03-30 16:24:13 +00:00
42d4b85d86 Wed Mar 30 17:21:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/iptables.c: Remove the target interface parameter
        from iptablesPhysdevForward(). This rule is intended to
        allow frames to be forwarded across the bridge from the
        supplied bridge port. In this context, the --out parameter
        would match the outgoing bridge port, which will never
        be network->def->forwardDev.
2007-03-30 16:23:04 +00:00
27c1d7b9fa Wed Mar 30 17:17:15 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/iptables.c: ensure iptablesContext is zereod out
        when allocating so we don't try and free an invalid pointer.
2007-03-30 16:20:19 +00:00
0ab7cda38c * python/generator.py: Python bindings now throw exceptions
in almost all cases where an error is encountered in the
	  underlying libvirt code.
2007-03-28 11:24:14 +00:00
6ec6b79669 * src/xen_internal.c: applied patch from Masayuki Sunou fixing the
erroneous value of the hypercall XEN_V2_OP_SETMAXMEM
* libvirt.spec.in: applies changes from Jeremy Katz for libvirt
  spec and also another fix from Michael Schwendt fixing rhbz#233874
Daniel
2007-03-28 08:48:52 +00:00
1109ba44e2 Fixed bridge networking for QEMU 2007-03-27 14:46:45 +00:00
348209ca26 Fixed Xen capabilities parsing & added test suite 2007-03-27 14:45:17 +00:00
17d0bf6454 * qemud/qemud.c: If using FORTIFY_SOURCE, remove warning
warn_unused_result by counting errors found in signal
	  handler and logging them in the main loop.
2007-03-27 10:28:45 +00:00
2b233a049e * acinclude.m4: applied patch from Jim Meyering to avoid clobbering
user specified CFLAGS
Daniel
2007-03-26 09:30:36 +00:00
80fb564b0d * TODO qemud/conf.c src/virsh.c src/xend_internal.c src/xs_internal.c:
replaced all sprintf instances by snprintf ones
Daniel
2007-03-23 16:15:07 +00:00
ba83eae40f * src/xen_internal.c: Fix detection of host PAE capabilities,
nul-terminate the token in the output XML and a couple of
  cleanups for determining structure sizes.
2007-03-23 09:18:24 +00:00
fb624fbecf * qemud/iptables.c qemud/qemud.c src/conf.c src/hash.c src/libvirt.c
src/virsh.c src/xm_internal.c: change malloc/memset(0) pairs to
  using calloc()
Daniel
2007-03-22 18:30:57 +00:00
f39faaa708 * docs/*.html: repair the damages made by Amaya on the content
of documentation following feedback from Simon Hernandez
Daniel
2007-03-22 15:17:31 +00:00
3d6dbfeab0 * src/virsh.c: applied patch from Masayuki Sunou to avoid a bug
when using a wrong CPU number in vcpupin and report the error
Daniel
2007-03-22 10:27:54 +00:00
794d6d7a0c * libvirt.spec.in: one more extra fix for autostart dir from
Florian La Roche, should fix #233409
Daniel
2007-03-22 09:39:43 +00:00
07e38ad6e8 Remove realloc call which caused overflow 2007-03-21 15:32:32 +00:00
f2ffea858c * qemud/buf.c src/xml.c: clarified virBufferGrow (and bufferGrow)
routines documentation and fixes a couple of places where this
  was misused as pointed by Daniel Berrange.
Daniel
2007-03-21 15:24:56 +00:00
bcf1632ee6 Fixed typo 2007-03-21 15:22:31 +00:00
1c236e9c25 Enable compiler stack protection flags 2007-03-21 14:52:12 +00:00
07fb9d64b0 Fixed buffer overflow in qemu networking 2007-03-20 16:50:42 +00:00
4ffe066dd8 * src/virsh.c: add error messages for negative memory size as
pointed out by Masayuki Sunou
Daniel
2007-03-20 15:31:46 +00:00
633a3bef0d * src/xen_internal.c: applied patch from Atsushi SAKAI fixing
direct hypervisor calls on some recent Xen versions
Daniel
2007-03-20 15:22:39 +00:00
7c21366518 * libvirt.spec.in: missing /etc/libvirt/qemu/networks/autostart
Daniel
2007-03-20 14:49:43 +00:00
4d5292c4da * src/virsh.c: applied patch from Jim Meyering to add printf-style
function checking in virsh.c and fix one warning raised
Daniel
2007-03-19 14:20:30 +00:00
5af3ccc8f8 * qemud/protocol.h src/internal.h: applied patch from Jim Meyering
removing global variables (using named enum instead).
Daniel
2007-03-19 14:18:05 +00:00
7bdee4adef * src/libvirt.c: patch from Atsushi SAKAI, fixing virsh access
as root when libvirt_qemud is not running
* TODO: updated
Daniel
2007-03-19 10:15:52 +00:00
3edfdbf02d * src/virsh.c: patch from Masayuki Sunou, checking that byte
values passed to virsh memory commands are positive.
Daniel
2007-03-19 09:46:13 +00:00
b50353f80f last changes for 0.2.1, daniel 2007-03-16 22:26:55 +00:00
f162d50399 * NEWS libvirt.spec.in docs/libvir.html docs/news.html: preparing
release of libvirt-0.2.1
Daniel
2007-03-16 19:31:14 +00:00
d1b1545168 * docs/*: updated the format section, augmented Networking with
description provided by Daniel Berrange
* po/*: regenerated
Daniel
2007-03-16 18:33:53 +00:00
9e170a88cd * qemud/conf.c qemud/driver.h qemud/internal.h src/internal.h
src/sexpr.h src/test.c src/xm_internal.c src/xml.c src/xml.h:
  applied patch from Richard Jones adding check to printf-like
  functions and fixing the problems raised
Daniel
2007-03-16 15:03:21 +00:00
d7e1c4fc51 * src/xml.c tests/sexpr2xmltest.c tests/xmconfigtest.c: avoid
warnings when compiling without Xen
Daniel
2007-03-16 14:55:51 +00:00
ccee35cbb0 * python/generator.py: patch from Tatsuro Enokura to fix
virNetworkDefine binding
Daniel
2007-03-16 10:44:44 +00:00
d59c9d2fa8 Fixed use of regexps in capabilities APIs 2007-03-15 18:59:47 +00:00
33134578b3 Fixed two bugs in QEMU impl of capabilities call 2007-03-15 18:23:00 +00:00
6d11322bc7 Fixed uninitialized value warning 2007-03-15 18:15:14 +00:00
3f2184a401 Change installation of default network XML in RPM 2007-03-15 17:51:11 +00:00
d3d6ea5a80 Oops forgot them, daniel 2007-03-15 17:30:04 +00:00
635ae38979 * include/libvirt/libvirt.h[.in] include/libvirt/virterror.h
proxy/libvirt_proxy.c qemud/Makefile.am qemud/conf.c qemud/conf.h
  qemud/dispatch.c qemud/internal.h qemud/protocol.h
  src/driver.h src/internal.h src/libvirt.c src/libvirt_sym.version
  src/proxy_internal.c src/proxy_internal.h src/qemu_internal.c
  src/test.c src/virsh.c src/virterror.c src/xen_internal.c
  src/xen_internal.h src/xend_internal.c src/xm_internal.c
  src/xml.h src/xs_internal.c: applied patch from Richard Jones
  adding virConnectGetCapabilities(), plus various small little
  fixes
* docs/*: fixed the api extractor script and regenerated
Daniel
2007-03-15 17:24:56 +00:00
d59bfbd00e * python/generator.py: fix the python binding generation for
virNetworkLookup...() functions, which were clashing with
  equivalent virConnLookup...() equivalents, as reported by
  Tatsuro Enokura
Daniel
2007-03-15 15:23:21 +00:00
6f7f84a772 * src/virsh.c src/xen_internal.c: applied patch from Atsushi SAKAI
to better handle the case where there is no limit in the domain
  upper memory size
* docs/architecture.html docs/format.html docs/intro.html
  docs/libvir.html: started to update the documentation to reflect
  the current state
Daniel
2007-03-15 14:27:09 +00:00
181ce1fdc6 * configure.in proxy/Makefile.am proxy/libvirt_proxy.c
src/Makefile.am src/libvirt.c src/qemu_internal.c src/test.c
  src/xen_internal.c src/xen_internal.h src/xend_internal.c
  src/xm_internal.c src/xml.c src/xs_internal.c
  tests/Makefile.am tests/sexpr2xmltest.c tests/xmconfigtest.c:
  allow selective compilation of Xen,QEmu/KVM and test support
  in or out at configure time. Also allows to compile on a system
  without Xen development installed. All drivers are selected by
  default.
Daniel
2007-03-15 07:43:16 +00:00
98d3a3f1f8 * src/xend_internal.c: applied patch from Kazuki Mizushima, an
inversion between shutoff and shutdown flags
* po/* doc/*: automatic update
Daniel
2007-03-14 13:14:50 +00:00
a534de5281 Improve support for virtual networking 2007-03-13 22:43:22 +00:00
06b3f3ced3 Fixed generation of UUIDs to work on upgrades 2007-03-13 03:18:52 +00:00
afa1d92a9f Autogenerate UUID for default network 2007-03-12 16:32:43 +00:00
a274fe6574 Generate random UUID for network config 2007-03-12 14:10:14 +00:00
deb5db5e1b Export virConf symbols with leading __ 2007-03-09 20:47:12 +00:00
6a66941843 Added python bindings for networking APIs 2007-03-09 15:42:50 +00:00
b35adb3836 * src/virsh.c: bad pointer/int mismatch fixes from Richard Jones
daniel
2007-03-09 13:44:24 +00:00
03d48a87ed Fix double free in XML parsing 2007-03-09 03:08:34 +00:00
aeccfe85be Make sure to create system socket directory 2007-03-08 23:31:28 +00:00
dc8c7754bb Make compiler warnings fatal errors for automated builds 2007-03-08 21:32:18 +00:00
c992b3f77d Incorporate automated build number if RPM release 2007-03-08 21:31:20 +00:00
102c75057a Fix misc bugs in qemu connection opening 2007-03-08 15:16:01 +00:00
f30b84f901 Refactored driver reg to avoid type-punning 2007-03-08 14:53:41 +00:00
89de0c87ae Oops forgot one part, Daniel 2007-03-08 14:17:32 +00:00
6a1e3d5f36 * src/internal.h src/xend_internal.c src/xm_internal.c src/xml.c:
add a check for minimal size of Xen Dom0, track places where we
  had arbitrary minimal memory requirement and use a predefined
  macro to clean this up.
Daniel
2007-03-08 14:12:06 +00:00
8ebe070edc Don't try to create default.xml autostart link if it already exists 2007-03-08 14:00:00 +00:00
6e5c6bb3d6 Added Nobuhiro Itou and Masayuki Sunou to AUTHORS 2007-03-08 13:49:47 +00:00
b776222049 Added --readonly flag to virsh 2007-03-08 13:48:22 +00:00
1e95c63059 * src/xml.c: applied patch from Nobuhiro Itou to allow the
VNC port 5900 to be used with xend, it's an edge case.
Daniel
2007-03-08 08:55:56 +00:00
b412cfadb5 * include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/driver.h src/libvirt.c src/libvirt_sym.version
  src/proxy_internal.c src/qemu_internal.c src/test.c src/virsh.c
  src/xen_internal.c src/xen_internal.h src/xend_internal.c
  src/xm_internal.c src/xs_internal.c: applied patch from
  Masayuki Sunou to add and entry point to check the maximum
  number of virtual CPU supported by a virtualization mechanism
* doc/*.html doc/libvirt-*.xml: regenerated the interfaces descriptions
  and associated docs.
Daniel
2007-03-08 08:31:07 +00:00
60796a554b Wed Mar 07 11:53:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/default-network.xml: add a default network

        * qemud/Makefile.am: install it, and the autostart symlink

        * libvirt.spec.in: update
2007-03-07 11:54:29 +00:00
5fb88728f0 Remove unused argv/argc 2007-03-06 22:59:03 +00:00
ab1649d367 virGetDomain/Network require non-NULL name & UUID 2007-03-06 22:06:14 +00:00
d6db609d74 Fixed up numerous compiler warnings 2007-03-06 21:55:44 +00:00
955f12037e Added support for keymap in VNC display 2007-03-06 20:00:17 +00:00
8cb208cd57 Fixed unlink of readonly mode socket 2007-03-06 16:51:48 +00:00
e8c6aa703a Remove bogus ATTRIBUTE_UNUSED annotation 2007-03-05 17:20:09 +00:00
b5dfaef4dc Wait for monitor at startup 2007-03-05 17:15:20 +00:00
868bcd72c7 Mon Mar 05 16:39:54 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: don't try and listen to a null socket
        path when run as a session daemon. Noticed by Rich Jones
2007-03-05 16:40:34 +00:00
7911e22ef7 Mon Mar 05 11:33:18 IST 2007 Mark McLoughlin <markmc@redhat.com:
* qemud/driver.c: fix a couple of invalid free() calls
2007-03-05 12:34:27 +00:00
c69c850871 Mon Mar 05 11:07:38 IST 2007 Mark McLoughlin <markmc@redhat.com:
* libvirt.spec.in: BuildRequires: /sbin/iptables and
        run configure with the --with-init-script and
        --with-qemud-pid-file parameters.

        * configure.in: it's --with-qemud-pid-file, not
        --with-pid-file
2007-03-05 11:10:06 +00:00
c486a69a04 Mon Mar 05 10:52:02 IST 2007 Mark McLoughlin <markmc@redhat.com:
* libvirt.spec.in: sync some of the chanes from dist-cvs
        so that this looks pretty much as it should do for the
        next release.
2007-03-05 10:56:02 +00:00
1b36cccb50 Optimize lookup-by-UUID for new XenD 2007-03-02 20:19:08 +00:00
6e760fb6d7 Fix vncdisplay command in virsh 2007-03-02 14:22:33 +00:00
3f9380fdbb Change way we look for xend errors (Kazuki Mizushima ) 2007-03-01 23:24:09 +00:00
51d5609843 Thu Mar 01 16:17:48 EST 2007 Mark McLoughlin <markmc@redhat.com>
* acinclude.m4: add LIBVIRT_COMPILE_WARNINGS, copied from
        GNOME but with a few more flags we'd been using.

        * configure.in: use that instead of setting CFLAGS
        directly.

        * proxy/Makefile.am, python/Makefile.am, qemud/Makefile.am,
          src/Makefile.am, tests/Makefile.am: use $(WARN_CFLAGS)
2007-03-01 16:18:55 +00:00
b48326ecd0 Thu Mar 01 16:00:12 EST 2007 Mark McLoughlin <markmc@redhat.com>
Fix from Richard W.M. Jones <rjones@redhat.com>

        * proxy/libvirt_proxy.c: include locale.h
2007-03-01 16:01:39 +00:00
10732a5071 Added additional check for failure of core dump on domain-0 2007-02-27 15:50:03 +00:00
00602abe00 Fix SEGV in tab completion of virsh commands 2007-02-27 15:35:50 +00:00
a0d210598f Fixed virsh command line arg handling for -t option 2007-02-27 15:32:18 +00:00
02a271f220 Don't hardcode port=5900+domid for new xend 2007-02-27 15:22:13 +00:00
35f911c815 Mon Feb 26 15:33:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/uuid.[ch]: move qemudParseUUID()
        into uuid.c
2007-02-26 15:34:24 +00:00
bce1d26ef3 Mon Feb 26 15:31:23 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/uuid.[ch]: add uuid generation code

        * qemud/Makefile.am: build it

        * qemud/conf.c: generate a UUID if not specified in the XML
2007-02-26 15:32:27 +00:00
d76f6b54a5 Mon Feb 26 15:20:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: qemudAutostartConfigs(): print the detailed
        error message from a guest/network autostart failure.
2007-02-26 15:21:38 +00:00
e0952bad01 Mon Feb 26 14:20:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: check for malloc failure in GenerateXML()
        and GenerateNetworkXML()

        * qemud/driver.c: free the XML output after returning it
        from the DumpXML() commands.
2007-02-26 14:21:21 +00:00
1920ed8a77 Ignore code coverage data files 2007-02-23 17:15:42 +00:00
73048102c0 Autodetect QEMU version and adjust command line arg accordingly 2007-02-23 17:15:18 +00:00
66a55a4d48 Added init script to RPM. Fixup paths to init script & libvirt_qemud 2007-02-23 15:53:56 +00:00
fb9f90c942 Fri Feb 23 14:32:54 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: don't load config files unless they have
        a ".xml" suffix, e.g. backup files ... we spew a warning
        later if we do.
2007-02-23 14:33:37 +00:00
fbcd25d3a7 Fri Feb 23 12:49:11 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/libvirtd.in: add init script for libvirt_qemud

        * qemud/Makefile.am: install it unless we were configured
        with --with-init-scripts=none

        * configure.in: add --with-init-scripts to allow us
        have different flavour init scripts
2007-02-23 12:50:58 +00:00
d758313d67 Fri Feb 23 12:46:44 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: add --pid-file and default to writing
        out a PID file to /var/run/libvirt_qemud.pid in daemon
        mode.

        * configure.in: add --with-pid-file arg
2007-02-23 12:48:36 +00:00
cf0e5df048 Fri Feb 23 12:45:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/Makefile.am: install libvirt_qemud in /usr/sbin
        instead of /usr/libexec

        * src/Makefile.am, src/qemu_internal.c: pass the correct
        path to libvirt
2007-02-23 12:46:35 +00:00
992176b177 Fri Feb 23 10:26:24 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/virsh.c: in "start" and "net-start" use e.g.
        vshCommandOptDomainBy() so that we actually get an
        error message if the domain/network isn't found.
2007-02-23 10:27:53 +00:00
91e461ffdd Fri Feb 23 09:11:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: actually autostart guests/networks at startup
        as appropriate.
2007-02-23 09:11:52 +00:00
08cfcae91b Fri Feb 23 09:03:19 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/internal.h: put the config directory paths in
        an array in order to make them easier to initialize,
        but still expose pointers to each of them as members
        in the server struct.

        * qemud/qemud.c: cleanup the config directory path
        initialization.
2007-02-23 09:10:28 +00:00
56d2857f95 Fri Feb 23 09:03:19 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/driver.c: maintain the autostart flag on disk
        using symlinks from the "autostart" directories to
        the corresponding config files.

        * qemud/internal.h: add paths to the autostart links
        to the vm/network structures and paths to the autostart
        dirs to the server struct.

        * qemud/qemud.c: initialize the server autostart dir
        patches.

        * qemud/conf.h: expose qemudEnsureDir()

        * qemud/conf.c: check the autostart symlinks when
        loading config files at startup.
2007-02-23 09:07:41 +00:00
efe538b709 Fri Feb 23 09:00:13 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/protocol.h: add the (domain/network)(Get/Set)Autostart
        requests and replies to the protocol.

        * src/qemu_internal.c: hookup the qemu driver autostart
        methods

        * qemud/dispatch.c, qemud/driver.[ch], internal.h: add
        the daemon side, but just set an in-memory autostart
        flag for now.
2007-02-23 09:03:25 +00:00
55868d76a7 Fri Feb 23 08:51:05 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/virsh.c: add "autostart" and "net-autostart" commands
        and cleanup the "list" and "net-list" commands a bit.
2007-02-23 08:58:25 +00:00
57a1819881 Fri Feb 23 08:49:12 IST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in, src/libvirt.c add
        virDomainGetAutostart(), virDomainSetAutostart(),
        virNetworkGetAutostart() and virNetworkSetAutostart().

        * src/libvirt_sym.version: export the API

        * src/driver.h: add methods to the driver vtables.

        * src/proxy_internal.c, src/qemu_internal.c,
          src/test.c, src/xen_internal.c, src/xend_internal.c,
          src/xm_internal.c, src/xs_internal.c: set those
        methods to NULL
2007-02-23 08:51:30 +00:00
d954480892 Fri Feb 23 08:41:34 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.[ch]: significantly re-factor qemudLoadConfigXML()
        so that "parse the XML", "assign the def to a VM" and
        "save the XML" operations are in separate functions.
        Add qemudRemoveInactiveVM() and qemudRemoveInactiveNetwork().
        Report errors when loading config files at startup. Check
        that a domain/network's name matches the config filename.

        * qemud/driver.c: update the Create() and Define() functions
        to explicitly parse/assign/save. Also, fix bug where if
        Create() failed, we would free the VM without removing it
        from the inactive list.

        * qemud/qemud.c: use qemudRemoveInactiveVM/Network()
2007-02-23 08:48:02 +00:00
593d20d400 Fri Feb 23 08:40:52 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/driver.[ch], qemud/dispatch.c: fix the fact that
        qemudDispatchDomainStart() doesn't report an error if the uuid
        lookup fails and also move the uuid lookup into the driver
        so that it matches the way we do Destroy().
2007-02-23 08:41:23 +00:00
6ecd4045aa Fri Feb 22 08:37:23 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/driver.c, qemud/internal.h,
        qemud/qemud.c: Merge the ->activevms and ->inactivevms
        into a single ->vms list in order to make things
        easier to manage. Likewise for networks. Also add
        qemudIsActiveVM() and qemudIsActiveNetwork() inline
        functions.
2007-02-23 08:39:49 +00:00
6d6261f4e8 Ensure domains are killed off if hotplug fails. Fix deletion of inactive domains 2007-02-22 19:09:29 +00:00
0f5e637a26 Updated AUTHORS file 2007-02-22 18:56:28 +00:00
b3244072e4 Refuse to run shutdown/reboot on Dom0 2007-02-22 16:49:12 +00:00
68f1003652 Thu Feb 22 10:37:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix another xml property leak.
2007-02-22 10:39:38 +00:00
5687da2c7a Tue Feb 20 19:08:58 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: use strerror(errno) in some error messages
        to make them a bit more useful
2007-02-20 19:09:44 +00:00
4579467783 Fri Feb 20 19:07:12 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: don't free active networks/vms if we
        fail to save the new config
2007-02-20 19:08:09 +00:00
458344c94e Fri Feb 20 18:25:42 IST 2007 Mark McLoughlin <markmc@redhat.com>
* virsh.c: cmdNetworkList() re-indent this.
2007-02-20 18:25:46 +00:00
1e20b80a91 Fri Feb 20 17:49:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
Fix a few leaks

        * qemud/qemud.c: qemudCleanup(): free the socket
        structures

        * qemud/conf.c: fix various leaks in the xml parsing

        * qemud/iptables.c: fix a typo causing a leak
2007-02-20 17:51:41 +00:00
c5b3181ad9 Fri Feb 20 16:49:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/qemud.c: only create config dirs
        when actually trying to write out config.
2007-02-20 16:55:56 +00:00
5ed716484e Fri Feb 20 09:56:35 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/bridge.c: change the fix for the alignment warning
        a little.
2007-02-20 09:57:47 +00:00
28a07e4c80 Fri Feb 20 09:03:05 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: clean up qemudInitialize() and qemudListen()
        so as to coalesce the two "system vs. user" code paths and
        fix up some problems noticed by dan.
2007-02-20 09:04:27 +00:00
96b89415a3 Fri Feb 19 16:59:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: don't shutdown guest and networks on
        SIGHUP
2007-02-19 17:00:05 +00:00
272639aaac Fri Feb 19 16:58:53 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: handle SIGQUIT.
2007-02-19 16:59:15 +00:00
10041b979d Fixed data type casts to address endianness issues on ia64 2007-02-19 15:01:20 +00:00
cfa655f9b8 Fri Feb 16 18:28:32 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c, qemud/dispatch.c, qemud/internal.h
        qemud/conf.c, qemud/driver.c, configure.in: add a
        qemudLog() function which uses syslog() if we're in daemon
        mode, doesn't output INFO/DEBUG messages unless the
        verbose flag is set and doesn't output DEBUG messages
        unless compiled with --enable-debug. Also, make a first
        pass through fatal errors and add error messages for them.
2007-02-16 18:30:55 +00:00
49fe28206a Fri Feb 16 18:26:55 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/internal.h, qemud/qemud.c: improve signal handling
        and handle SIGHUP by shutting down all guests and networks
        and re-loading configs, and handle SIGINT and SIGTERM
        by shutting down cleanly.
2007-02-16 18:28:17 +00:00
49dcc264e5 Fri Feb 16 18:24:08 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c, qemud/bridge.c, qemud/iptables.c: fix
	our FD_CLOEXEC usage so that all fds which should be
	closed on exec are marked as such and that we leave
	exec() to do the actual closing.
2007-02-16 18:26:18 +00:00
80820ec7a9 Fri Feb 16 18:23:15 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/qemud.c: fix qemudEnableIpForwarding() to not leak
        an fd if writing to /proc/sys/net/ipv4/ip_forward fails.
2007-02-16 18:24:14 +00:00
1b350c101b Ignore libvirt-*.tar.gz 2007-02-16 17:06:38 +00:00
7c025f04e8 Remove now redundant BuildRequires on gnutls 2007-02-16 17:04:51 +00:00
44fbfe1d14 Ignore coverage & results.og files 2007-02-16 16:58:46 +00:00
2d0f0ca5bb Ignore autogenerated file remove-potcdate.sed 2007-02-16 16:58:19 +00:00
926950f3eb Fixed test suite linkage 2007-02-16 16:56:47 +00:00
7c24fbb00c Remove init method 2007-02-16 16:04:54 +00:00
9d0fa40919 Remove mistaken includes for gnutls 2007-02-16 15:44:08 +00:00
fb387cbe27 Thu Feb 15 19:07:24 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix <interface type='network'> output
2007-02-15 19:08:08 +00:00
e8f064000d Thu Feb 15 19:06:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix the <graphics> output - we weren't
        handling sdl
2007-02-15 19:07:06 +00:00
4e2fa18166 Thu Feb 15 19:06:22 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix a couple of typos
2007-02-15 19:06:10 +00:00
9839cf3798 Thu Feb 15 19:05:48 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix segfault
2007-02-15 19:05:27 +00:00
7902317a4f Thu Feb 15 19:04:10 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.h: move qemudFreeVMDef() down a bit
2007-02-15 19:04:45 +00:00
ca4553d0e7 Thu Feb 15 16:00:05 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/bridge.c: don't output bridge parameters if they
        are the default.
2007-02-15 16:01:09 +00:00
f9f7aeb4b7 Thu Feb 15 15:56:32 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.[ch], qemud/dispatch.c, qemud/internal.h,
	  qemud/qemud.c, qemud/driver.c: allow re-defining network
	configs; basically copying dan's patch for domains.
2007-02-15 16:00:16 +00:00
f83f9ad351 Thu Feb 15 15:56:32 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.[ch], qemud/dispatch.c, qemud/internal.h,
          qemud/qemud.c, qemud/driver.c: allow re-defining network
        configs; basically copying dan's patch for domains.
2007-02-15 15:57:43 +00:00
bf5fae6a8c Thu Feb 15 15:47:46 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: fix a couple of qemud_vm_def leaks

        * driver.c: simplify qemudDomainDefine()
2007-02-15 15:52:28 +00:00
6ad5b9d5fb Pre-create the toplevel libvirt config directory 2007-02-14 22:01:40 +00:00
31ea5e9733 Fix <features> block. Only include ID & VNC port for active domain XML 2007-02-14 21:47:59 +00:00
8dca13efc1 Fixed path for autostarting daemon 2007-02-14 21:46:06 +00:00
de48dae9f0 * libvirt.spec.in: spec cleanup and missing BuildRequires
* qemud/Makefile.am: avoid -Werror
daniel
2007-02-14 18:54:26 +00:00
2edf53128e * configure.in NEWS include/libvirt/libvirt.h docs/* docs/apibuild.py:
prepare release of 0.2.0, update doc, avoid console module for API.
* po/*: regenerated
Daniel
2007-02-14 18:08:45 +00:00
fd35f8ca58 Added libsysfs-devel dep & pre-create config/socket dir 2007-02-14 17:36:39 +00:00
f9b263118f Moved qemu sockets/configs 2007-02-14 17:35:38 +00:00
a1432a5215 Blacklist vshRunConsole from python 2007-02-14 17:20:27 +00:00
845272d541 Updated po files 2007-02-14 17:19:18 +00:00
2e5e51151c Refactor to allowing changing config of active domains 2007-02-14 17:05:55 +00:00
4ccb9579ff Tue Feb 14 16:53:25 IST 2007 Mark McLoughlin <markmc@redhat.com>
Fix from Richard W.M. Jones <rjones@redhat.com>

        * virsh.c: add a colon after the connect arg to
        getopt_long()
2007-02-14 16:53:55 +00:00
ee310ec815 Tue Feb 14 16:48:24 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/qemu_internal.c: correctly register the network
        driver
2007-02-14 16:48:51 +00:00
081c8d435c Tue Feb 14 16:35:56 IST 2007 Mark McLoughlin <markmc@redhat.com>
* autogen.sh: run autoheader before automake
2007-02-14 16:35:47 +00:00
3ea88b568d Tue Feb 14 16:23:25 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/iptables.[ch]: add code for managing iptables
        rules.

        * qemud/Makefile.am: add iptables.[ch].

        * qemud/qemud.c: add and remove iptables rules as
        appropriate.

        * qemud/conf.c: when starting a guess, add a rule
        allowing it to forward packets across the networks
        bridge.

        * qemud/internal.h: add iptables context ptr

        * configure.in: add --with-iptables-dir and
        --with-iptables-prefix to allow us to put our rules
        in a chain with the given prefix and save the rules
        in files in the given dir so as to integrate with
        the proposed "service iptables restart" solution
        in:

           https://bugzilla.redhat.com/227011
2007-02-14 16:26:42 +00:00
e89a1c33f5 Tue Feb 14 16:21:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/xml.c: with <interface type="network"> connect the
        Xen guest to the appropriate bridge.
2007-02-14 16:22:02 +00:00
8356c43e42 Tue Feb 14 16:17:51 IST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in, src/libvirt.c: add
        virNetworkGetBridgeName() to allow finding out what
        bridge to connect to in order to join a network.

        * src/driver.h: add networkGetBridgeName() to vtable.

        * qemud/protocol.h: add the request and reply to
        the qemud protocol.

        * qemud/dispatch.c, qemud/driver.[ch]: handle them
        here.

        * src/qemu_internal.c: implement GetBridgeName()
        in the qemu driver.

        * src/libvirt_sym.version: add new symbol.
2007-02-14 16:20:38 +00:00
d4a9a0d607 Tue Feb 14 16:14:32 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/xend_internal.c, src/xm_internal.c: pass the
        connection to virDomainParseXMLDesc()

        * src/xml.[ch]: make virDomainParseXMLDesc accept
        a virConnectPtr so that we can use it later to
        lookup the bridge associated with a network

        * tests/xml2sexprtest.c: just pass NULL here, it's
        safe
2007-02-14 16:16:13 +00:00
0c15bd8b87 Tue Feb 14 16:08:55 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c: add support for connecting a qemu
        guest to a bridge using a tap device in order to
        connect it to a virtual network.

        * qemud/internal.h: add <interface type="network">
        config and track tapfds so as to not close them
        on exec.

        * qemud/qemud.c: don't close tapfds on exec and
        disconnect the iface when the guest shuts down.
2007-02-14 16:09:37 +00:00
3fbd82faa0 Tue Feb 14 15:07:26 EST 2007 Mark McLoughlin <markmc@redhat.com>
* src/conf.h: fix merge error - remove the argc argument
        from qemudBuildCommandLine()
2007-02-14 16:07:27 +00:00
ee777358b8 Tue Feb 14 16:04:48 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.c, qemud/internal.h: add dhcp config

        * qemud/qemud.c: start dnsmasq to provide dns/dhcp
        for virtual networks.
2007-02-14 16:05:29 +00:00
c3373b92a0 Tue Feb 14 15:03:22 EST 2007 Mark McLoughlin <markmc@redhat.com>
* src/virsh.c: Re-name some of the VSH_DOMBYFOO stuff
        to VSH_BYFOO in order to re-use it for the network stuff.
2007-02-14 16:04:55 +00:00
4e6c38e10f Tue Feb 14 16:02:23 IST 2007 Mark McLoughlin <markmc@redhat.com>
* configure.in: add --disable-bridge-params, check
        for libsysfs and various kernel headers

        * bridge.[ch]: add code for managing bridges

        * qemud/Makefile.am: add bridge.[ch] and link against
        libsysfs if enabled.

        * qemud/conf.c: add support for bridge config.

        * qemud/internal.h: add various bridging bits

        * qemud/qemud.c: implement qemudStartNetworkDaemon()
        and qemudShutdownNetworkDaemon().
2007-02-14 16:02:40 +00:00
e018cbc74f Tue Feb 14 14:58:35 EST 2007 Mark McLoughlin <markmc@redhat.com
* src/hash.c, src/internal.h: Re-name virConnect->domains_mux
        to virConnect->hashes_mux since it will also be used to
        protect the networks hash.
2007-02-14 15:59:40 +00:00
36d597380e Tue Feb 14 14:57:52 EST 2007 Mark McLoughlin <markmc@redhat.com
* src/conf.c: qemudSaveConfig() will always report a
        more specific error, so we should avoid overwriting
        this error.
2007-02-14 15:58:21 +00:00
2439573270 Tue Feb 14 15:55:02 IST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/conf.[ch]: implement parsing and saving network
        configs.

        * qemud/driver.c: flesh out the stubs

        * qemud/internal.h: add networks list etc. to
        struct qemud_server

        * qemud/qemud.c: add qemudStartNetworkDaemon() and
        qemudShutdownNetworkDaemon() stubs.
2007-02-14 15:58:06 +00:00
db3ad7cba7 Tue Feb 14 14:54:25 EST 2007 Mark McLoughlin <markmc@redhat.com
* qemud/qemud.c: Re-factor out qemudExec() so that it can
        be used to launch dnsmasq.

        * qemud/conf.c: don't return argc from qemudBuildCommandLine()
        as exec() doesn't need it.
2007-02-14 15:54:47 +00:00
f391be00e9 Tue Feb 14 15:52:34 EST 2007 Mark McLoughlin <markmc@redhat.com>
* qemud/protocol.h: add the protocol for virtual networks

        * qemud/dispatch.c: implement the protocol

        * qemud/driver.[ch]: add stubs for the driver

        * qemud/internal.h: add struct qemud_network

        * src/qemu_internal.c: add a virtual networks driver
2007-02-14 15:54:10 +00:00
fbc08f063c Tue Feb 14 14:52:12 EST 2007 Mark McLoughlin <markmc@redhat.com
* qemud/conf.c: Re-factor bits of conf.c so that:

          - qemudMakeConfigPath() can be re-used given another configDir
          - split qemudEnsureConfigDir() out of qemudSaveConfig() so
            that it may be re-used to create another configDir
          - split qemudScanConfigDir() out so that qemudScanConfigs()
            can scan multiple configDirs
2007-02-14 15:53:14 +00:00
bf46e15b2c Tue Feb 14 14:50:22 EST 2007 Mark McLoughlin <markmc@redhat.com
* qemud/conf.c: handle an unspecified MAC address,
        fix the argv freeing code in qemudBuildCommandLine()
        and fix copy and paste error in qemudGenerateXML()
2007-02-14 15:51:53 +00:00
d16a83dd7c Tue Feb 14 14:42:38 EST 2007 Mark McLoughlin <markmc@redhat.com
* src/internal.h: add virConnect->qemud_fd so that
        xen and qemu don't share the handle member.

        * src/hash.c, src/qemu_internal.c: update
2007-02-14 15:45:49 +00:00
c9724cf339 Tue Feb 14 15:43:28 EST 2007 Mark McLoughlin <markmc@redhat.com>
* src/virsh.c: add the net-* commands.
2007-02-14 15:44:58 +00:00
6a639b917f Tue Feb 14 14:40:52 EST 2007 Mark McLoughlin <markmc@redhat.com
* qemud/conf.c, qemud/dispatch.c, qemud/driver.c,
          qemud/qemud.c: include autoconf's config.h
2007-02-14 15:42:55 +00:00
f2041b7c75 Tue Feb 14 14:39:18 EST 2007 Mark McLoughlin <markmc@redhat.com
* conf.[ch]: rename from config.[ch] so we can use
        autoconf's config.h

        * Makefile.am: update

        * driver.c, qemud.c: upd.
2007-02-14 15:41:03 +00:00
8ce3203ad3 Tue Feb 14 15:37:17 EST 2007 Mark McLoughlin <markmc@redhat.com>
Note: potential ABI break here, but people should
        only really be using virError structs returned from
        libvirt itself.

        * include/libvirt/virterror.h: add virNetwork
        to virError

        * src/internal.h, src/virterror.c: add network param
        to __virRaiseError()

        * src/conf.c, src/hash.c, src/libvirt.c, src/proxy_internal.c,
        src/qemu_internal.c, src/sexpr.c, src/test.c, src/xen_internal.c,
        src/xend_internal.c, src/xm_internal.c, src/xml.c, src/xmlrpc.c,
        src/xs_internal.c: update.
2007-02-14 15:40:53 +00:00
5be54b40cb Tue Feb 14 15:33:05 EST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in: add the networks APIs

        * include/libvirt/virterror.h: add some error codes

        * src/driver.h: add network driver vtable

        * src/hash.c: add networks hash

        * src/internal.h: add virNetwork

        * src/libvirt.c: hook up the APIs to the network
        driver

        * src/libvirt_sym.version: add the new APIs

        * src/virterror.c: handle the new error codes
2007-02-14 15:37:18 +00:00
24a92945d3 Tue Feb 14 14:33:22 EST 2007 Mark McLoughlin <markmc@redhat.com
* autogen.sh: run autoheader

        * config.h.in: remove
2007-02-14 15:34:56 +00:00
d09a9a4294 Added m4 scripts to check compiler flags 2007-02-14 02:29:20 +00:00
64325d007f Added libvirt_qemud 2007-02-14 02:27:56 +00:00
26ceeb4e9b Added code coverage testing enabled via --enable-test-coverage 2007-02-14 02:12:41 +00:00
23ad665cb0 Added QEMU support 2007-02-14 01:40:09 +00:00
ed02290129 Removed obsolete / unused code 2007-02-08 19:10:25 +00:00
4f2fcbd905 Added autobuild control file 2007-02-07 17:46:44 +00:00
85535863c5 Whiteclean/indentation cleanup/fixup. No functional change 2007-02-07 13:50:18 +00:00
4a89182077 Fix vcpu info for HVM guests 2007-02-07 13:44:22 +00:00
5e395c2ac9 Conditionally enable XenD tests 2007-02-07 13:41:44 +00:00
9c9e9b79c8 Rename virRunConsole to vshRunConsole 2007-01-28 19:47:36 +00:00
b00f4ceb2b Fixed virsh test suite 2007-01-26 13:10:28 +00:00
786024b7dd Added vncdisplay & console commands to virsh 2007-01-26 11:54:29 +00:00
079dc77af6 * src/virsh.c: Richard W.M. Jones pointed out a missing option
in getopt_long()
Daniel
2007-01-26 11:49:01 +00:00
f873796e20 * autogen.sh: applied patch from Richard W.M. Jones to not
output instructions if configure failed
Daniel
2007-01-26 11:12:56 +00:00
6d153563be Mon Jan 23 14:36:18 IST 2007 Mark McLoughlin <markmc@redhat.com>
* include/libvirt/libvirt.h.in: add VIR_UUID_BUFLEN and
        VIR_UUID_STRING_BUFLEN

        * libvirt/proxy/libvirt_proxy.c, libvirt/src/hash.c,
        libvirt/src/internal.h, libvirt/src/libvirt.c,
        libvirt/src/proxy_internal.c, libvirt/src/test.c,
        libvirt/src/virsh.c, libvirt/src/xend_internal.c,
        libvirt/src/xm_internal.c, libvirt/src/xml.c,
        libvirt/python/libvir.c: use them
2007-01-23 14:39:45 +00:00
dab5d10763 Mon Jan 23 12:28:42 IST 2007 Mark McLoughlin <markmc@redhat.com>
Issues pointed out by Karel Zak <kzak@redhat.com>

        * src/virsh.c: fix up some syntax strings, use BUFSIZ
        and free names returned from virConnectListDefinedDomains()
2007-01-23 12:28:38 +00:00
d042d339d1 Fix crash in virsh connect command 2007-01-22 20:43:02 +00:00
e9371d1a46 Mon Jan 22 16:23:52 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/internal.h: virDomain.handle refers to the "id"
	in the API, so re-name to virDomain.id to avoid
	confusion.

	* src/hash.c, src/libvirt.c, src/proxy_internal.c, src/test.c,
	src/xen_internal.c, src/xend_internal.c, src/xm_internal.c,
	src/xml.c, src/xs_internal.c: update for rename.
2007-01-22 16:25:27 +00:00
26d6bbf3a4 Mon Jan 22 16:17:25 IST 2007 Mark McLoughlin <markmc@redhat.com>
* src/driver.h: remove Free(), GetName(), GetID() and
	GetUUID() driver methods.

	* src/proxy_internal.c,	src/test.c, src/xen_internal.c,
	src/xend_internal.c, src/xm_internal.c,	src/xs_internal.c:
	Update driver vtables.
2007-01-22 16:21:27 +00:00
8f8397df7f * configure.in libvirt.spec.in docs/*.html include/libvirt/libvirt.h:
preparing release of 0.1.11
* docs/Makefile.am libvirt.spec.in: package libvirt.rng in
* po/*: translation update
Daniel
2007-01-22 15:31:00 +00:00
bc073b5a4d Added test suite for the XML <-> XM config file conversion 2007-01-19 20:30:05 +00:00
1b0f541704 Finished off XML parsing & XM config file generation for all supported guest configs 2007-01-19 20:23:37 +00:00
aea00ddb8c Fix memory leaks in config file handling 2007-01-19 20:10:04 +00:00
a15c593c2e Tweak memory settings 2007-01-18 21:13:14 +00:00
5fbd4b15e0 Added inactive domain management support to the test driver 2007-01-18 21:08:21 +00:00
ec329ce910 Disable inactive domain drivers on old XenD 2007-01-18 18:38:09 +00:00
72e8284c1b * docs/libvirt.rng: udated for the upcoming KVM and QEmu support
Daniel
2007-01-10 15:20:46 +00:00
4dce3d8fd4 * docs/libvirt.rng: went through the existing tests with the RNG and
fixed or added a number constructs
Daniel
2007-01-10 10:08:06 +00:00
c642103f6d * docs/libvirt.rng: first version of the Relax-NG schemas to validate
XML instances
Daniel
2007-01-09 16:29:18 +00:00
4a475773f7 * po/*: updated localization files
* configure.in NEWS libvirt.spec.in docs/libvir.html docs/news.html
  include/libvirt/libvirt.h: preparing release of 0.1.10
Daniel
2006-12-20 14:54:25 +00:00
27ef42c6fa Fix handling of config files with duplicate names 2006-12-19 21:54:20 +00:00
5c0546cdae * src/xend_internal.c: Dan Berrange pointed out a ref count bug
rhbz#143946 , patch applied
daniel
2006-12-18 22:08:22 +00:00
884acf563f * po/*.po po/libvirt.pot: merged new ms transations, updated
with the current source.
Daniel
2006-12-14 09:54:36 +00:00
166d499f02 Implement support for inactive domains from Xen 3.0.4 2006-12-14 01:56:14 +00:00
7a9f673e3e Added support for generating new style PV framebuffer. Added vnclisten & vncpasswd handling 2006-12-13 14:08:51 +00:00
804e20e6c3 Add array bounds checking in xendDaemonListDomains 2006-12-07 18:23:19 +00:00
17817e6a3d New style paravirt framebuffer config in xen 3.0.4 2006-12-06 23:44:17 +00:00
98026c6b54 Fix test case for change in bootloader handling 2006-12-06 23:40:08 +00:00
fa76c4fb2c * src/xen_internal.c: the structure passed to the vcpuinfo hypercall
had changed between version 1 and version 2 too, the leading domain
  field disapeared since it goes in the including op. Fixes redhat
  bugs #217370 and #217743
Daniel
2006-12-06 15:02:03 +00:00
e2269580b0 * po/ca.po po/fr.po po/hi.po: merging more localizations coming
from Red Hat
Daniel
2006-12-04 17:34:48 +00:00
91641070d2 * NEWS configure.in libvirt.spec.in docs/libvir.html docs/news.html
include/libvirt/libvirt.h: preparing libvirt-0.1.9 release
* po/*.po: more updates and fix all the .po to not barf when msgfmt
  tries to process them
Daniel
2006-11-29 13:03:24 +00:00
b4c2c01fd0 * configure.in: update for ALL_LINGUAS
* po/*.po: updated with strings from Red Hat translators
Daniel
2006-11-28 13:05:37 +00:00
e1f2b6497e * src/xml.c: patch for rhbz#214741, when using pygrub
do not push the os image information for domain creation
  via xend
Daniel
2006-11-27 23:16:59 +00:00
1bd41d0bab s/interract/interact/ as suggested by kzak 2006-11-22 23:11:11 +00:00
aaeecae745 oops, forgot that too, Daniel 2006-11-22 18:08:08 +00:00
66ab526b3f * docs//*: regenerated
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in src/driver.h
  src/libvirt.c src/proxy_internal.c src/test.c src/virsh.c
  src/xen_internal.c src/xend_internal.c src/xm_internal.c
  src/xs_internal.c: added support for dumping core of domains
  assuming a xend with the latest patch to do so.
Daniel
2006-11-22 17:48:29 +00:00
d5b9a4f3b1 * src/xs_internal.c: Michel Ponceau pointed out a bug in
xenStoreDomainGetNetworkID refactoring
Daniel
2006-11-21 17:55:34 +00:00
2e5d35966e * src/xml.c src/xs_internal.c src/xs_internal.h: cleanup for the
dynamic device code to isolate as a separate function
  xenStoreDomainGetNetworkID() the access to the XenStore
Daniel
2006-11-20 16:42:16 +00:00
35adcfa621 Support device_model & serial config settings for HVM guests 2006-11-17 02:03:18 +00:00
b85e53cc7a Fix various compiler warnings about signed/unsigned types 2006-11-17 00:10:51 +00:00
f991089ce4 Support for inactive domain management 2006-11-16 19:06:13 +00:00
dc28f35f11 * include/libvirt/libvirt.h include/libvirt/libvirt.h.in
src/driver.h src/libvirt.c src/libvirt_sym.version
  src/proxy_internal.c src/test.c src/xen_internal.c
  src/xend_internal.c src/xml.c src/xml.h src/xs_internal.c:
  intagrated patch from Michel Ponceau to add hot-plug devices
  support to the API, integrated in driver API and fixed
  a few small things. Still a TODO in src/xml.c about
  moving xenstore direct accesses to a new routine.
Daniel
2006-11-16 18:11:28 +00:00
df1e7c9967 Added 'reconnect' binary to ignore list 2006-11-16 17:46:54 +00:00
a26b33cb15 Added binding for virConnectListDefinedDomains api 2006-11-16 00:17:10 +00:00
18035eddd3 Don't process inactive domains in regular Xen driver backends 2006-11-15 21:03:34 +00:00
77bcf6b598 Added several iterators to hashtable API 2006-11-15 20:11:56 +00:00
678073a297 Fixed const warning 2006-11-15 20:06:35 +00:00
523389a72b Added virConfNew() and virConfSetValue() apis to virConf object 2006-11-15 19:46:23 +00:00
a3cf19e62a Fix unsigned long wraparound in python binding 2006-11-15 19:40:00 +00:00
6d8b20ce85 Added support for non-bridged networking 2006-11-15 00:38:13 +00:00
caaf9441f3 * src/xend_internal.c src/xml.c: fix for shareable drive support
rhbz#214908
Daniel
2006-11-13 17:09:31 +00:00
c41481197d Fix memory leak of xml parser context 2006-11-10 23:46:12 +00:00
bb1ff5e7f8 Fixed string concatenation in case where there is no lower level error 2006-11-10 19:55:27 +00:00
28a60cbcdb * src/xend_internal.c src/xml.c: add an extra element currentMemory
to the XML description and handle its serialization back and
  forth between XML and S-Expr
* tests/sexpr2xmltest.c tests/xml2sexprtest.c
  tests/sexpr2xmldata/sexpr2xml-curmem.*
  tests/xml2sexprdata/xml2sexpr-curmem.*: added specific regression
  tests for this, this didn't disturb any of the other tests.
Daniel
2006-11-10 11:13:01 +00:00
3869766df9 * python/generator.py: changed the generator to generate a reference
from Domain class instances to the Connect they were issued from
  should fix rhbz#204490
* docs//*: rebuilt
Daniel
2006-11-09 15:32:44 +00:00
4fc5f43399 * tests/reconnect.c: fixed the reconnect test when running as non-root
Daniel
2006-11-09 10:14:01 +00:00
a10b68be0a Reduce RAM in test node to avoid 32-bit wraparound 2006-11-08 18:57:34 +00:00
0c62b5f6d5 Added implementation of GetOSType driver to test backend 2006-11-08 18:54:57 +00:00
892a8c3881 * include/libvirt/virterror.h src/virterror.c src/xend_internal.c
src/xml.c: give proper indication of the failures raised by the
  XML parser on not well formed XML, should fix rhbz#208545
Daniel
2006-11-08 16:55:20 +00:00
515618b907 * src/libvirt.c src/proxy_internal.c src/xs_internal.c: fix the
patch for rhbz#214264 in the case of Domain 0 on Xen and push the
  defaulting to "linux" down to the xen specific parts.
Daniel
2006-11-08 13:53:29 +00:00
e444b199db Propagate libvirt errors back with python exceptions 2006-11-07 23:18:56 +00:00
287e5fe8a7 Ensure connection object gets associated with errors 2006-11-07 21:52:44 +00:00
d762148aaf * libvirt.spec.in: libvirt-devel depends on pkgconfig
* proxy/libvirt_proxy.c src/libvirt.c src/proxy_internal.[ch]
  src/xs_internal.[ch]: the virtGetOsType entry point was calling
  the xenstore directly instead of going though driver, refactored
  and implemented a specific new RPC with the proxy when this is
  called as non-root fixes rhbz#214264 .
Daniel
2006-11-07 16:28:16 +00:00
4a9ce62fe9 * src/xend_internal.c: when getting informations about a non
existant domain, it is not a good idea to raise the HTTP
  404 GET error, the handling is better done somewhere up in
  the stack.
Daniel
2006-10-31 10:25:13 +00:00
9e5645393e Make python bindings threaded, by dropping/acquiring Python GIL where needed 2006-10-24 20:28:16 +00:00
297a77f6da * config.h.in configure.in libvirt.spec.in docs/libvir.html
docs/news.html include/libvirt/libvirt.h: preparing release of
  libvirt-0.1.8
* src/xen_internal.c: fixed a compilation problem
Daniel
2006-10-16 16:04:55 +00:00
5533a01af3 * src/xen_internal.c: one of the fix for system with page size != 4k
was missing
Daniel
2006-10-12 16:25:51 +00:00
321c24bb00 * src/xen_internal.c: applied patch from Philippe Berthault
fixing the vcpu number initialization
Daniel
2006-10-12 12:31:51 +00:00
d9388dbfbd * src/xen_internal.c: applied patch from Peter Vetere so that
crashed domains ain't reported as shut off.
Daniel
2006-10-11 16:11:59 +00:00
1da9cd13af * virsh.1: fixed some typo and unclear language pointed out by
Noriko Mizumoto
Daniel
2006-10-11 15:18:31 +00:00
16a65d1c93 Added support for <driver> element and blktap 2006-10-09 14:32:07 +00:00
a98ac28b16 Added ignore file rules for i18n stuff 2006-10-06 15:35:10 +00:00
8c5ce29411 Fixed multiple memory leaks & make test suite check for leaks with valgrind 2006-10-06 15:32:48 +00:00
18351e0ffc * src/xen_internal.c: Daniel Berrange fixed some mlock size problem
doing a bit of cleanup too
Daniel
2006-10-02 22:13:12 +00:00
cce70e0132 Fix mlock() of getdomaininfolist data buffer 2006-10-02 19:26:39 +00:00
ea541f83b9 * src/virsh.c: add #include <locale.h> to be able to compile without
optimization
Daniel
2006-09-29 16:23:27 +00:00
2c32196a2f * src/xen_internal.c: fix for system with page size != 4k
Daniel
2006-09-29 16:12:08 +00:00
cc3697f722 added too,Daniel 2006-09-29 12:07:52 +00:00
47c23ba3e5 Dohh, Daniel 2006-09-29 12:06:21 +00:00
177cf2edee * docs/bugs.html docs/libvir.html: added pointers on how to report
bugs in bugzilla as suggested by markmc
* src/xend_internal.c: first step for #208545 raise an error at the
  libvirt level
Daniel
2006-09-29 12:00:58 +00:00
be13e2f45d * docs/* libvirt.spec.in configure.in NEWS: preparing release of 0.1.7
Daniel
2006-09-29 10:25:21 +00:00
26d1767317 Really, fixed struct for getdomaininfo to work on both 3.0.2 & 3.0.3 on 32-bit archs this time. 2006-09-28 23:29:25 +00:00
01ae3678f1 Fixed buffer overflow in populating CPU<->VCPU mapping. Cleanup whitespace 2006-09-28 19:20:52 +00:00
2cb26d70d6 * docs/* libvirt.spec.in configure.in NEWS: preparing release of 0.1.6
Daniel
2006-09-22 09:58:17 +00:00
e8e5844089 Added support for i18n translation with gettext 2006-09-21 15:24:37 +00:00
870bf1cdbd Re-generated docs to pull in latest APIs 2006-09-21 15:15:07 +00:00
546026a5be * src/Makefile.am: add a tst target to ease building test progs
* src/xend_internal.c: fix the reconnection problem to xend pointed
  by Philippe Berthault
* tests/Makefile.am tests/reconnect.c: add a specific test case
Daniel
2006-09-21 09:15:33 +00:00
29182e995e * src/xen_internal.c: applied patch from Jim Fehlig, about
one of the content of the hypercall structures in 3.0.2
Daniel
2006-09-19 15:55:57 +00:00
4e7b9aa2e1 Ensure we strip the :disk postfix from disks in Xen 3.0.3 2006-09-14 15:34:50 +00:00
1ed4d29208 Allow setting of VNC port when creating domains 2006-09-12 01:34:26 +00:00
25786cc0db Added files to EXTRA_DIST 2006-09-12 01:21:15 +00:00
3708258fad Added support for XenD 3.0.3 style HVM cdrom config 2006-09-12 01:16:22 +00:00
786e029cd7 * NEWS configure.in docs//* include/libvirt/libvirt.h libvirt.specx.*:
preparing release 0.1.5
* proxy/libvirt_proxy.c src/xen_internal.c: tiny fixes
Daniel
2006-09-05 06:48:44 +00:00
f247adc56c * src/xen_internal.c: finished to convert to the new hypervisor
calls the xenHypervisorGetVcpus entry point, though it is untested
Daniel
2006-09-05 06:19:28 +00:00
903c78f540 Added missing return(-1) to cpu APIs. #ifdef out methods not used by proxy 2006-09-04 19:15:10 +00:00
c63f08e06f Allow trailing ',' in lists, and '_' in names 2006-09-03 17:46:32 +00:00
184c0bba15 Ignore generated files 2006-09-03 17:43:48 +00:00
9302933f09 Several bug fixes to list of domains. Display '-' instead of '-1' for inactive domains 2006-09-03 17:34:04 +00:00
4028abe6b3 Removed debug, oops, Daniel 2006-09-02 21:27:09 +00:00
86247f2c23 * src/xen_internal.c: converting to handle the new incompatible
hypercalls while still able to detect older versions, lot of
  work, seems okay, there is just one function not yet converted
* src/xs_internal.c: dropping virConnectCheckStoreID()
Daniel
2006-09-02 21:23:14 +00:00
6a0c75a7b3 Added new start, define,undefine commands. Added flags to allow list to show inactive domains 2006-08-30 14:32:32 +00:00
941bce224b Fix changelog timestamp/author from previous commit 2006-08-30 14:27:42 +00:00
25726a0ff4 Added driver backends for ListDefinedDomains, NumOfDefinedDomains, DomainStart, DomainDefineXML, DomainUndefine & hooked up all related infrastructure 2006-08-30 14:21:03 +00:00
c0b1a946a6 * src/conf.c: add missing entry point virConfGetValue()
Daniel
2006-08-29 22:45:44 +00:00
5334a0fbcb Oops fixed 'make rpm', daniel 2006-08-29 22:34:42 +00:00
3bbac7cdb6 * TODO libvirt.spec.in: update
* configure.in include/libvirt/virterror.h src/Makefile.am
  src/conf.c src/conf.h src/virterror.c src/xen_internal.c:
  adding a subset of Xen config file parser, and serializer
* tests/Makefile.am tests/conftest.c tests/test_conf.sh
  tests/confdata/Makefile.am tests/confdata/fc4.conf
  tests/confdata/fc4.out: adding test program for config in and out
Daniel
2006-08-29 22:27:07 +00:00
55bf738483 Add handling of error HTTP 500 codes 2006-08-29 18:12:22 +00:00
61e8450f25 * python/libvir.c: Pete Vetere pointed out a bug in string cast
when handling errors in Python
Daniel
2006-08-29 14:39:57 +00:00
ea30f6aa24 * src/sexpr.c src/sexpr.h src/xend_internal.c src/xml.c: applied
patch from Jeremy Katz to add graphical console for PV Xen guests
Daniel
2006-08-26 15:30:44 +00:00
fab8e90e6d * docs/site.xsl docs/*.html: add links to virt-manager
Daniel
2006-08-25 23:16:21 +00:00
18bb75eb84 Allow VIRSH_DEFAULT_CONNECT_URI to override default URI. Don't asusme there is always a domain-0 2006-08-25 22:40:33 +00:00
b1ca7467f4 Added tests for virsh domid, domname, domstat, domuuid, dominfo, list & nodeinfo commands 2006-08-24 21:46:28 +00:00
3c75dc33e4 Added a "make valgrind" test target 2006-08-24 16:00:19 +00:00
441246297e Added tests for the SEXPR<->XML conversion process 2006-08-24 15:05:19 +00:00
0658b086cd Check for failure of virConnectListDomains in 'list' command 2006-08-21 17:58:09 +00:00
129a24ea8c Fix networking in paravirt guests 2006-08-18 20:20:50 +00:00
adec25590c * src/xml.c: fix virParseUUID()
Daniel
2006-08-17 18:39:32 +00:00
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
17af6e0a9b * NEWS libvirt.spec.in docs/*: preparing release of 0.1.1
Daniel
2006-06-21 13:36:07 +00:00
ac4818d05a * src/driver.h src/libvirt.c src/test.c src/xen_internal.c
src/xend_internal.c src/xs_internal.c: add driver numbers and
  tweak a bit suspend/resume/destroy operation to avoid doing
  them directly though the hypervisor if other succeeded first.
Daniel
2006-06-21 12:56:19 +00:00
a2e2e4652f * src/xen_internal.c: try to autodetect the Xen hypervisor version
used and switch automatically. A bit nasty though.
Daniel
2006-06-21 12:15:18 +00:00
801bfd2ec9 * src/xen_internal.c: fix breakage introduced in Xen changeset 10277
Daniel
2006-06-20 16:07:41 +00:00
d455b40712 * src/xen_internal.c src/xen_internal.h src/xs_internal.c: fix
a TODO in xs_internal.c pointed out by Philippe Berthault
Daniel
2006-06-16 15:28:26 +00:00
15b40d295d * src/libvirt.c src/xen_internal.c src/xend_internal.c: more driver
related cleanups, nearly finished
Daniel
2006-06-16 12:36:40 +00:00
442b733e6c * src/libvirt.c src/xend_internal.c src/xend_internal.h
src/xs_internal.c: more cleanups for the driver architecture
Daniel
2006-06-15 14:50:48 +00:00
4ab2646127 Added implementation of shutdown & reboot driver methods 2006-06-14 23:58:34 +00:00
5cc5f540f0 Connect up domain destroy, suspend, resume, reboot, shutdown methods to driver backends 2006-06-14 17:07:00 +00:00
037f413e4e * src/libvirt.c src/xend_internal.c src/xend_internal.h: cleaned up
virConnectListDomains and virConnectNumOfDomains, implemented xend
  driver entry point for them.
daniel
2006-06-14 15:44:14 +00:00
ef61dba0dc * src/libvirt.c: Daniel P. Berrange pointed out a bug in virConnectOpen
Daniel
2006-06-14 13:03:04 +00:00
e85fa600e7 Switch float -> double when calculating CPU time in dominfo command to avoid loss of precision 2006-06-13 19:08:40 +00:00
2bfd45c942 * src/libvirt.c src/xen_internal.c src/xend_internal.c
src/xs_internal.c: fix the connection and GetType initialization.
Daniel
2006-06-13 18:29:42 +00:00
7efa1c11b5 * docs//*: rebuilt the documentation
* src/driver.h src/libvirt.c src/test.c src/xen_internal.c
  src/xend_internal.c src/xs_internal.c: started to fix some of
  the driver related problem raised by Daniel Berrange, added a
  ver version field to drivers.
Daniel
2006-06-13 16:31:44 +00:00
d9bfbfa949 Call xenDeamonClose if ping test fails during open call, to ensure any resources are freed up 2006-06-13 13:45:09 +00:00
1213bedf6d Do a 'ping' test when opening connection to verify XenD really is there & alive 2006-06-12 22:21:04 +00:00
e5bb0cb052 Added 'mock' hypervisor driver for use by unit tests 2006-06-06 03:32:51 +00:00
88e6f39ae6 * src/hash.c, src/internal.h: Switch the uuid parameter in virGetDomain
to be of type 'unsigned char' since its a raw UUID we're passing in,
  not a printable one.
* src/libvirt.c: Remove bogus "unsigned char" -> "char" type casts. Hook
  up the "domainLookupByID", "domainLookupByUUID", "domainLookupByName"
  and "domainGetInfo" driver backend functions.
Daniel
2006-05-29 18:03:27 +00:00
d0f2c663be added Daniel B.'s build system patches 2006-05-29 16:05:05 +00:00
d47ddf5b67 support mock & domuuid for virsh 2006-05-29 15:39:31 +00:00
624505349d UUID utils, virsh cleanup, ... 2006-05-22 14:38:33 +00:00
fd6d06b49d XML-RPC errors checks 2006-05-10 14:48:20 +00:00
0d8e15fa75 added virBufferStrcat 2006-05-10 12:15:49 +00:00
0f579f785c XML-RPC tests 2006-05-09 15:35:46 +00:00
bfee5cd2cd * src/hash.c src/internal.h src/libvirt.c src/virterror.c
src/xml.h include/libvirt.h[.in] include/virterror.h: started
  adding new APIs, some still TODO, and not tested yet
Daniel
2006-04-28 18:29:26 +00:00
7b38f418cb * src/xml.c src/xend_internal.c TODO: added uuid to the XML
serialization
Daniel
2006-04-27 14:14:23 +00:00
1e01848396 * src/xml.c: applied patch from Jeremy Katz to not require a
root entry in XML nor try to extract it from command line
  informations.
Daniel
2006-04-26 07:31:16 +00:00
aa13b2aa79 * docs//* : fixed perl binding URL to point to CPAN as provided by
Daniel P. Berrange.
Daniel
2006-04-26 06:43:42 +00:00
0ea21e5cbd * configure.in: patch for ncurses fallback from Jim Fehlig
Daniel
2006-04-25 16:54:26 +00:00
f7a48c19f1 * configure.in libvirt.spec.in docs/examples/Makefile.am
docs/examples/index.py docs/examples/python/*: integrated
  examples for Python from David Lutterkort
Daniel
2006-04-25 16:08:48 +00:00
be54328be3 * src/xend_internal.c: applied patch from Jim Fehlig when parsing
domain S-Expr the kernel may not be provided (Dom0)
Daniel
2006-04-25 13:33:44 +00:00
91b0ae89dd * src/hash.c src/internal.h: add virGetDomainByID() to speed up
some processing but not used yet
* src/libvirt.c src/xen_internal.c src/xen_internal.h: added domain
  listing and number queries entry points based on the hypervisor
  which should speed up some processing as root.
Daniel
2006-04-24 18:21:29 +00:00
b68bd23d9b * src/xend_internal.c: fix an uninitialized memory access in error
reporting.
Daniel
2006-04-20 14:28:01 +00:00
e081236077 * include/libvirt.h include/libvirt.h.in doc/*: added new entry point
virDomainSetMemory to set up the target memory use for a domain
* src/driver.h src/libvirt.c src/xen_internal.c src/xend_internal.[ch]
  src/xs_internal.[ch]: added a new entry point in the drivers for this,
  also fixed the xen store entry, as changing
  /local/domain/$$/memory/target affects the target memory not the max,
  apparently max is not visible at the xenstore level (or I missed it)
Daniel
2006-04-13 17:18:49 +00:00
cb8f47047b * NEWS configure.in libvirt.spec.in docs/*: documented and
regenerated for release of 0.1.0
* Makefile.am virsh.1: added man page from Andrew Puch
Daniel
2006-04-10 14:15:33 +00:00
7293407295 * src/xend_internal.c src/xml.c: applied patch from Jim Fehlig
for lifecycle events
* docs/format.html docs/libvir.html: added the associated docs for
  the new constructs
* TODO: small update
Daniel
2006-04-10 08:32:34 +00:00
572806a99b * TODO src/hash.[ch] src/internal.h src/libvirt.c src/xend_internal.c
src/xs_internal.c: implementing domain pointers unification, thread
  safety and reference counting for domain and connections, this was
  the last critical change needed before making further progresses at
  the API level. Still a couple fo things TODO for this, unification
  at the Python level and adding UUID to hash. All domain/connect alloc
  and free routines are now centralized in hash.c
* docs/APIchunk1.html docs/libvirt-api.xml docs/libvirt-refs.xml
  docs/html/libvirt-libvirt.html: regenerated the docs, that doesn't
  change the API.
Daniel
2006-04-09 13:11:22 +00:00
1ea832d65b use stdout rather than stderr, improve allocation checks 2006-04-06 10:33:06 +00:00
6bd95bf2a3 * src/hash.c: tiny fix
* src/internal.h: starting to work on reentrancy
* src/libvirt.c: applied patch from Jim Fehlig to fix
  virDomainLookupByID when run as root.
Daniel
2006-04-05 09:31:29 +00:00
48e85b5c41 virsh command names cleanup 2006-04-04 21:52:31 +00:00
f7e40ae879 add nodeinfo, rename dinfo to dominfo, fix libvirt.h typo 2006-04-04 14:37:32 +00:00
831f910e50 * include/libvirt.h[.in] src/driver.h src/libvirt.c
src/libvirt_sym.version src/*_internal.[ch]: added an entry
  point for reboot and corresponding driver plug
* src/virsh.c: added a reboot option using it
* docs/*: regenerated
Daniel
2006-04-03 13:46:43 +00:00
5fff4b0bed * src/xend_internal.c: applied patch from Daniel P. Berrange,
plus a bit of code cleanup
Daniel
2006-03-30 16:37:15 +00:00
2b4566b5b5 * src/virsh.c: allocation check (Jim Meyering) and adding a
new create command
* src/xend_internal.c src/xml.c: trying to cope with the new
  xvda domains states generated on FC5, but Dom0 bootloader
  really break the model, so that doesn't work.
Daniel
2006-03-30 16:08:13 +00:00
c9a8f27380 * src/virsh.c: catching memory allocation error and existing, as
pointed by Jim Meyering
Daniel
2006-03-30 12:14:40 +00:00
85c23ead9e * doc/*: rebuilt
Daniel
2006-03-29 14:35:52 +00:00
880f4e9ae2 * python/libvir.c: fixed a bug in the new wrapper
* python/tests/Makefile.am python/tests/node.py: added a new test for
  the new API
* python/tests/create.py: remove a debug
Daniel
2006-03-29 13:33:37 +00:00
212eaea323 * include/libvirt.h[.in] include/virterror.h src/driver.h
src/internal.h src/libvirt_sym.version src/xen_internal.c
  src/xs_internal.c: added a new entry point to get node hardware
  informations virGetNodeInfo, and associated driver hook.
* src/xend_internal.c: implemented the node and version information
  hooks for the Xen Daemon
* python/libvir.c python/libvirt-python-api.xml python/generator.py:
  also added Python bindings for the new call
Daniel
2006-03-29 12:46:03 +00:00
78de9baafc Fixing the python example, Daniel 2006-03-28 14:48:57 +00:00
538686f9c0 * python/libvir.c: call the initialize entry point
* src/libvirt_sym.version: add initialize entry point
* src/libvirt.c: make sure we always initialize the lib
* python/tests/*.py: start updating exemple for exception
  handling as pointed by Jim Meyering
Daniel
2006-03-28 14:41:04 +00:00
7743c7a7b1 * doc/site.xsl doc/libvir.html doc/*: added informations about
the Perl bindings, regenerated
* python/libvirt_wrap.h: added a missing include.
Daniel
2006-03-28 09:50:17 +00:00
4faeeb1041 * doc/*: updated module list and rebuilt
* include/libvirt.h include/libvirt.h.in: added intialization function
* include/virterror.h src/virterror.c: one more error code
* src/internal.h: first part of Jim's format checking
* src/libvirt.c src/xen_internal.[ch] src/xend_internal.[ch]
  src/xs_internal.[ch]: initialization and registration of drivers
Daniel
2006-03-27 15:24:36 +00:00
a5990ba624 * src/Makefile.am: add driver.h to SOURCES as pointed by Jim Meyering
* doc/*: rebuilt
Daniel
2006-03-25 10:47:41 +00:00
37a91cb049 * src/virterror.c: add message as pointed by Jim Meyering
Daniel
2006-03-25 10:38:30 +00:00
49359cfe63 * include/virterror.h: fix typos pointed by Jim Meyering
Daniel
2006-03-24 22:58:13 +00:00
978115dc04 * include/virterror.h: applied patch from Daniel Berrange for out of
tree compiles.
Daniel
2006-03-24 22:36:47 +00:00
a453b65e09 * libvirt.pc.in: applied patch from Daniel Berrange to fix --cflags
Daniel
2006-03-24 13:18:12 +00:00
561377ab8a * src/Makefile.am: fix out of tree build
Daniel
2006-03-24 13:03:29 +00:00
a21472c0fd * src/xs_internal.c src/xs_internal.h include/virterror.h
src/virterror.c: created a new module related to Xen Store accesses
* src/libvirt.c src/xen_internal.[ch] src/xend_internal.[ch]:
  nearly completed the separation of the code from the different modules
Daniel
2006-03-23 15:42:10 +00:00
faf61d94c1 * python/tests/create.py: add one more image path
* src/libvirt.c src/xend_internal.c src/xend_internal.h: more work
  on the xend refactoring
Daniel
2006-03-22 13:44:01 +00:00
44c2c10ea5 * python/tests/create.py: adapt to new naming scheme in FC5
Daniel
2006-03-22 13:33:20 +00:00
c54ae3f023 * src/driver.h src/xen_internal.c: just add a driver block for
the Xen hypervisor direct access module. Need to convert
  xend_internal.[ch] and make one for the Xenstore now ...
Daniel
2006-03-20 23:42:12 +00:00
de5a1d1dd5 * src/driver.h src/internal.h src/libvirt.c src/xen_internal.c
src/xen_internal.h docs/apibuild.py: starting the refactoring,
  first the direct Xen hypervisor module. New header describing the
  entry points of a driver.
Daniel
2006-03-20 17:49:28 +00:00
247cf7a3b2 * src/hash.c src/hash.h src/internal.h src/libvirt.c src/sexpr.c
src/sexpr.h src/virsh.c src/virterror.c src/xen_internal.c
  src/xen_internal.h src/xend_internal.c src/xend_internal.h
  src/xml.c src/xml.h: applied cb/indent to homogenize the source
  style, as a first pass.
Daniel
2006-03-15 12:13:25 +00:00
cda69700a0 First import of XML-RPC protocol support for newer versions of Xend. I've not
put it in the Makefiles yet as it's not actually being used by anything.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2006-03-10 17:02:25 +00:00
72b838fffc * configure.in: applied patch for --with-xen-distdir option from
Ronald Aigner
* docs/site.xsl docs/*.html: added link to Bugzilla
Daniel
2006-03-10 10:21:41 +00:00
0742c9313e * src/xml.c: another patch from David Lutterkort fixing a typo
when generating physical block devices descriptions.
Daniel
2006-03-04 09:00:15 +00:00
a720116103 * libvirt.spec.in: applied patch from David Lutterkort adding
missing reqs for readline.
Daniel
2006-03-04 08:57:22 +00:00
714532355f * NEWS configure.in libvirt.spec.in include/libvirt.h docs/*:
preparing release 0.0.6
Daniel
2006-02-28 14:22:33 +00:00
6c5a225725 * docs/errors.html docs/libvir.html docs/*: added a page about
error handling and regenerated the docs
Daniel
2006-02-28 13:58:30 +00:00
97e7e798b2 Fixed the test, daniel 2006-02-28 12:56:25 +00:00
65bace1765 * TODO: updated
* python/Makefile.am python/generator.py python/libvir.c
  python/libvir.py: improved python binding, raise exception
  when an instance creation or lookup fails, and add support
  for the global error handler, per conn handler still needed
* python/tests/error.py python/tests/Makefile.am: adding a
  regression test
Daniel
2006-02-28 12:17:00 +00:00
9aba17bd6c * doc//*: rebuilt
Daniel
2006-02-27 22:35:26 +00:00
8bc437e412 * TODO: updated, and added python hooks for error handling
* include/virterror.h src/virterror.c src/xml.c: error interception
  and reporting should be done.
Daniel
2006-02-27 22:32:54 +00:00
5548938d62 * src/libvirt.c src/xen_internal.[ch]: virConnectOpenReadOnly()
should not emit error when failing to open the hypervisor proc
  entry point.
Daniel
2006-02-27 21:42:32 +00:00
87d338374a * include/virterror.h src/libvirt_sym.version: exported
virDefaultErrorFunc()
* src/sexpr.c src/xen_internal.c src/virterror.c include/virterror.h:
  adding more error reporting though the code, nearly complete.
* src/sexpr.c: added specific error function to avoid an error report.
Daniel
2006-02-27 21:34:28 +00:00
739dfb531d * include/virterror.h src/virterror.c src/xend_internal.c: more work
plugging in the error system in the code.
Daniel
2006-02-27 19:56:23 +00:00
596b601021 * TODO: updated
* include/virterror.h src/internal.h src/libvirt.c src/virterror.c
  src/xend_internal.c: commiting a first pass at adding error handling
  in the code, not finished, but it starts to work, need more coverage
  and testing.
Daniel
2006-02-27 16:27:18 +00:00
4d9187a696 Fix search.php, Daniel 2006-02-24 22:43:09 +00:00
7d28bba98d Fixing link to search.php, Daniel 2006-02-24 22:42:27 +00:00
ac6eb960cf missing Daniel 2006-02-24 22:37:23 +00:00
8557bc67a4 * src/Makefile.am src/internal.h src/libvirt.c src/libvirt_sym.version
src/virterror.c include/Makefile.am include/virterror.h: adding
  the public APIs for errors, callbacks and synchronous. The boring
  stuff is still left to do, plugging it. Also need to be exposed
  at the python level.
* doc//*: rebuilt
Daniel
2006-02-24 22:36:10 +00:00
868f93ba8e Tiny fix, Daniel 2006-02-24 21:22:21 +00:00
4750942abe * docs/index.py docs/search.php: fixing the search engine.
Daniel
2006-02-24 21:17:54 +00:00
5800109158 A few libvir->libvirt, Daniel 2006-02-24 13:47:47 +00:00
fd21f1b3ec * python/generator.py python/libvir.c python/libvirt-python-api.xml:
UUID strings can contain zeroes, so the autogenerated conversion
  functions don't work.
Daniel
2006-02-24 12:26:56 +00:00
20cfd0c818 Oops forgot to update the spec file, Daniel 2006-02-23 11:35:37 +00:00
97f9566687 * src/libvirt.c: fixing a bug before the release of 0.0.5
* python/generator.py python/libvir.c python/libvirt-python-api.xml:
  also fixing the binding for getting a domain UUID
* python/tests/Makefile.am python/tests/uuid.py: added a test
  for the new UUID API
Daniel
2006-02-23 11:26:17 +00:00
6eaf35d077 * NEWS configure.in docs/libvir.html docs/news.html: preparing the
release of 0.0.5
* include/libvirt.h.in: fixed APIs definition
Daniel
2006-02-23 10:42:29 +00:00
6ce04643d0 * python/tests/Makefile.am: added the create.py in the regression tests
Daniel
2006-02-23 10:31:23 +00:00
6536c00f25 * include/libvirt.h[.in] src/libvirt.c src/xend_internal.[ch]
src/libvirt_sym.version: added virDomainLookupByUUID and
  virDomainGetUUID to be able to use the persistant UUID names
* docs//*: rebuilt the docs following the API extension
Daniel
2006-02-23 10:13:55 +00:00
21df1e503b * configure.in libvirt.spec.in docs/Makefile.am docs/devhelp/*:
added devhelp docs support, based on libxml2 stylesheets
Daniel
2006-02-22 10:54:54 +00:00
a3512b01f9 * TODO: updated
* libvirt.spec.in: package the examples in the doc
* src/Makefile.am: forgot to add xml.h
Daniel
2006-02-22 08:59:00 +00:00
d02fa086ff TODO update 2006-02-21 21:01:09 +00:00
c509b5cd0b * Makefile.am: extended make tests to run those in docs/examples
* docs/examples/suspend.c docs/examples/*: added an example of
  suspend/resume and regenerated
Daniel
2006-02-21 14:15:32 +00:00
d3a15eb303 * TODO: updated
* python/tests/Makefile.am: fix a small PYTHONPATH bug
* docs//*: fixed the xsl a bit for toc names, added doc for
  the python bindings, regenerated
Daniel
2006-02-21 13:23:16 +00:00
9a2ec00a05 * src/libvirt.c src/xend_internal.c src/xend_internal.h: move the
XML dump function around to make sure all entry points are centralized
  in libvirt.c and also avoid doc generation troubles.
* docs/examples/Makefile.am docs/examples/index.py: fix the makefile
  a bit.
* TODO: updated
* docs/format.html: added a description of the XML used for the
  domains.
* docs//*: rebuilt
Daniel
2006-02-20 23:08:47 +00:00
9c5111b9c9 * docs/examples/examples.xsl docs/examples/index.html
docs/site.xsl: integates the examples page in the web site
* docs//* : fixed generator and rebuilt the docs
* python/tests/basic.py python/tests/create.py: couple cleanups
Daniel
2006-02-20 20:50:48 +00:00
144141872b * TODO: updated
* include/libvirt.h include/libvirt.h.in: cleanup
* src/libvirt.c: remove debugging output
* src/xend_internal.c src/xml.c src/xml.h: reimplement
  virDomainGetXMLDesc() based on xend interface, now work as user too.
Daniel
2006-02-20 17:22:16 +00:00
82402982c8 * python/tests/create.py: trying to make test more generic, but it's
difficult since it requires a system image
* src/libvirt.c src/xend_internal.c: fixed the shutdown API which
  was broken due to a bad reason at the xend level.
Daniel
2006-02-17 13:18:57 +00:00
77e8b6c62c * configure.in src/Makefile.am: adding dependency to libxml2
* include/libvirt.h* src/libvirt.c src/xend_internal.[ch]
  src/xml.[ch]: added XML parsing for Xen domain descriptions
  needed for creates, plugged in a converter to s-exp and
  xend call. Modified the virDomainCreateLinux() to reflect
  that XML based description. Seems to work.
* python/tests/create.py: added a test case which seems to work
  not tested much yet
* docs/*: regenerated
Daniel
2006-02-16 22:50:52 +00:00
2985f0acdb * configure.in libvirt.spec.in include/libvirt.h.in python/Makefile.am
src/Makefile.am: fix rpm packaging problems whith head, more
  LIBVIR -> LIBVIRT changes.
Daniel
2006-02-15 13:21:17 +00:00
f32eee58b0 * Makefile.am configure.in python/Makefile.am python/tests/Makefile.am
python/tests/basic.py: added first python test script and
  a 'make tests' target
Daniel
2006-02-14 14:30:42 +00:00
a5f9391541 * libvirt.pc.in: Karel pointed out the name hadn't been updated
Daniel
2006-02-10 15:46:36 +00:00
04142f1c5e * python/libvir.c: fixed one more problem prior to 0.0.4
Daniel
2006-02-10 10:31:50 +00:00
2a9660e425 * NEWS configure.in docs/libvir.html docs/news.html include/libvirt.h
libvirt.spec.in: preparing 0.0.4 release
Daniel
2006-02-10 10:28:59 +00:00
7191077439 * README TODO config.h.in libvirt.pc.in: more cleanups.
Daniel
2006-02-10 10:11:21 +00:00
60c5aabc5a Adding missing files, Daniel 2006-02-10 08:47:26 +00:00
f2fec34604 * NEWS docs/*: regenerated and updated the docs post 0.0.3 release
Daniel
2006-02-10 08:43:31 +00:00
0b2869fb84 * autogen.sh configure.in: fixed snapshot autogeneration, had to
tweak a few things
Daniel
2006-02-10 08:40:20 +00:00
5fe8d8b3ff Fixing generation, Daniel 2006-02-09 18:03:54 +00:00
8c423e6c83 * //* : renamed the project libvirt , this affects all makefiles,
the specs, the icons, the docs, etc ...
* configure.in: prepare for 0.0.3
Daniel
2006-02-09 17:45:11 +00:00
1c40364403 fixing an error pointed by sct, Daniel 2006-02-03 16:51:36 +00:00
17202ea686 fix visrh "save" cmd 2006-02-03 14:49:41 +00:00
7871d455b3 * configure.in docs/examples/*: starting to add examples. the XSLT
still need to be fixed for web site
Daniel
2006-01-31 18:13:27 +00:00
b6022c2ad3 * python/*: update of the python bindings, fix names, add
missing features like list of domains and domain info extraction
Daniel
2006-01-31 10:24:12 +00:00
ca586e5a80 Release of 0.0.2, daniel 2006-01-31 10:21:10 +00:00
3afad0b2f0 * NEWS docs/news.xsl: added stylesheet to generate NEWS file
* docs/*: updated docs preparing for the release
Daniel
2006-01-29 10:56:15 +00:00
eece06a14f * docs/site.xsl docs/*.html: credits to Diana Fong for graphics
and web site design
Daniel
2006-01-29 08:52:59 +00:00
e9736c7d92 * python/libvir.c: fix a stupid bug in python bindings (DomainDestroy
is still mishandled though)
Daniel
2006-01-28 20:24:55 +00:00
b259e6be88 * src/libvir.c src/xml.c: applied patch from Anthony Liguori
to remove the XenStore transactions as this is not needed
  anymore.
Daniel
2006-01-27 08:59:42 +00:00
b2764c3d94 * TODO: updated
* docs/search.php: use the new web site design
* python/generator.py: fix a generation bug on python keyword
Daniel
2006-01-26 12:11:32 +00:00
b64c353863 add xshandle checks, fix virsh grammar 2006-01-25 09:46:22 +00:00
41e990528a * src/libvir.c: Karel pointed out handle was lost in
virConnectOpenReadOnly()
Daniel
2006-01-24 13:10:39 +00:00
46202b3705 * docs/site.xsl docs/*.png docs/*.html: update the images from Diana,
added favicon to page.
* src/libvir.c: reorganized the include imports.
Daniel
2006-01-23 22:55:41 +00:00
d0a71d23da * doc/*: augment and try to complete the doc in its current state
Daniel
2006-01-23 13:24:07 +00:00
abd2214b44 Updated and fixed a broken link, Daniel 2006-01-22 17:03:48 +00:00
3333cec207 * doc/*: started to augment and update the documentation
Daniel
2006-01-22 16:27:09 +00:00
ff97523083 * doc//*: mostly finished the revamp in the plane, starts to look good
Daniel
2006-01-21 23:34:36 +00:00
76777c51f7 * doc/* : total revamp of the web site based on Diana Fong design
but not completely integrated yet
Daniel
2006-01-20 15:49:04 +00:00
474e4b8425 * include/libvir.h include/libvir.h.in src/libvir.c: revamped the
restore API (though it would be better if it was returning
  a domain pointer in case of success)
* src/virsh.c: added save and restore to the commands, tested,
  the option handling need work though
Daniel
2006-01-20 10:00:08 +00:00
6e9443aeb1 * src/libvir.c src/xend_internal.c src/xend_internal.h: continue
the integration of more xend based accesses, virsh seems to work
  without accessing the xen store now.
Daniel
2006-01-19 10:23:15 +00:00
563d3d06d0 * src/libvir.c: small change w.r.t. reboot.
Daniel
2006-01-18 18:58:35 +00:00
34dee79f1d * include/libvir.h include/libvir.h.in src/libvir.c: more integration
of libxend capabilities, including checkpointing and restoring
  in a file.
* docs//*: regenerated the docs
Daniel
2006-01-18 10:37:08 +00:00
dc08f2d858 oops removing a debug warning, Daniel 2006-01-17 16:57:17 +00:00
f7e03b9312 * include/libvir.h[.in]: added VIR_DOMAIN_CRASHED status, small
doc fix
* src/virsh.c: fix a integer being formatted as %s in idof
* src/internal.h src/libvir.c src/xend_internal.[ch]: started to
  integrated the xend back-end, especially for getting informations
  about a domain.
Daniel
2006-01-17 16:56:17 +00:00
c568ebea25 * include/libvir.h.in include/libvir.h src/internal.h src/libvir.c
src/xend_internal.c src/xend_internal.h: starting to plug the
  xend code in, replacing structures mostly, but not finished.
Daniel
2006-01-13 16:41:01 +00:00
fe64a1d852 * src/Makefile.am src/xend_internal.c src/xend_internal.h:
added more of Anthony Liquori libxend code, commented and reformatted
  this still need to be plugged, it's still dead code ATM.
Daniel
2006-01-12 15:38:07 +00:00
f18b6c0ec6 * docs/libvir.html: grammatical fix
* src/Makefile.am src/sexpr.c src/sexpr.h: starting to integrate
  Anthony Liquori libxend code
* src/libvir.c: fix an uninitialized value
Daniel
2006-01-11 13:58:32 +00:00
2b019dd2f7 * docs/architecture.* docs/*: added a section on the architecture
and regenerated the docs.
Daniel
2005-12-21 16:59:34 +00:00
765 changed files with 491569 additions and 8376 deletions

View File

@ -1,3 +1,4 @@
.git
Makefile
aclocal.m4
autom4te.cache
@ -8,15 +9,23 @@ config.cache
config.h
config.h.in
config.log
config.guess
config.status
config.guess
config.sub
config.rpath
stamp-h
stamp-h1
libtool
ltconfig
ltmain.sh
update.log
libxen.pc
libxen.spec
libvirt.pc
libvirt.spec
COPYING
m4
ABOUT-NLS
coverage
results.log
libvirt-*.tar.gz
INSTALL
ltmain.sh
mkinstalldirs

View File

@ -0,0 +1,5 @@
^gnulib/lib/getaddrinfo\.c$
^gnulib/lib/printf-parse\.c$
^gnulib/lib/vasnprintf\.c$
^build-aux/useless-if-before-free$
^ChangeLog$

3
.x-sc_avoid_write Normal file
View File

@ -0,0 +1,3 @@
^src/util\.c$
^src/xend_internal\.c$
^src/util-lib\.c$

1
.x-sc_no_have_config_h Normal file
View File

@ -0,0 +1 @@
^gnulib/lib/strsep\.c$

6
.x-sc_require_config_h Normal file
View File

@ -0,0 +1,6 @@
^docs/examples/info1\.c$
^docs/examples/suspend\.c$
^gnulib/lib/dummy\.c$
^gnulib/tests/dummy\.c$
^qemud/remote_protocol\.c$
^ChangeLog$

6
.x-sc_trailing_blank Normal file
View File

@ -0,0 +1,6 @@
\.png$
\.fig$
\.gif$
^NEWS$
^ChangeLog$
^docs/.*

49
AUTHORS
View File

@ -1,2 +1,47 @@
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
Karel Zak <kzak@redhat.com>
libvirt Authors
===============
The libvirt project was initiated by:
Daniel Veillard <veillard@redhat.com> or <daniel@veillard.com>
The primary maintainers for various code sub-systems / drivers
are:
Daniel Veillard <veillard@redhat.com> (xen & everything else)
Karel Zak <kzak@redhat.com> (virsh tool)
Daniel Berrange <berrange@redhat.com> (test & qemu drivers)
Mark McLoughlin <markmc@redhat.com> (network driver)
Richard W.M. Jones <rjones@redhat.com> (remote driver)
Patches have also been contributed by:
David Lutterkort <dlutter@redhat.com>
Anthony Liguori <aliguori@us.ibm.com>
Jim Meyering <meyering@redhat.com>
Andrew Puch <apuch@redhat.com>
Jim Fehlig <jfehlig@novell.com>
Philippe Berthault <philippe.berthault@Bull.net>
Hugh Brock <hbrock@redhat.com>
Michel Ponceau <michel.ponceau@bull.net>
Jeremy Katz <katzj@redhat.com>
Pete Vetere <pvetere@redhat.com>
Atsushi SAKAI <sakaia@jp.fujitsu.com>
Kazuki Mizushima <mizushima.kazuk@jp.fujitsu.com>
Saori Fukuta <fukuta.saori@jp.fujitsu.com>
Tatsuro Enokura <fj7716hz@aa.jp.fujitsu.com>
Takahashi Tomohiro <takatom@jp.fujitsu.com>
Nobuhiro Itou <fj0873gn@aa.jp.fujitsu.com>
Masayuki Sunou <fj1826dm@aa.jp.fujitsu.com>
Mark Johnson <johnson.nh@gmail.com>
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Shuveb Hussain <shuveb@binarykarma.com>
Jim Paris <jim@jtan.com>
Chris Lalancette <clalance@redhat.com>
Guido Guenther <agx@sigxcpu.org>
Daniel Hokka Zakrisson <daniel@hozac.com>
[....send patches to get your name here....]
-- End

6918
ChangeLog

File diff suppressed because it is too large Load Diff

58
GNUmakefile Normal file
View File

@ -0,0 +1,58 @@
# Having a separate GNUmakefile lets me `include' the dynamically
# generated rules created via Makefile.maint as well as Makefile.maint itself.
# This makefile is used only if you run GNU Make.
# It is necessary if you want to build targets usually of interest
# only to the maintainer.
# Copyright (C) 2001, 2003, 2006-2007 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Systems where /bin/sh is not the default shell need this. The $(shell)
# command below won't work with e.g. stock DOS/Windows shells.
ifeq ($(wildcard /bin/s[h]),/bin/sh)
SHELL = /bin/sh
else
# will be used only with the next shell-test line, then overwritten
# by a configured-in value
SHELL = sh
endif
have-Makefile := $(shell test -f Makefile && echo yes)
# If the user runs GNU make but has not yet run ./configure,
# give them a diagnostic.
ifeq ($(have-Makefile),yes)
# Make tar archive easier to reproduce.
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
include Makefile
include $(srcdir)/Makefile.cfg
include $(srcdir)/Makefile.maint
else
all:
@echo There seems to be no Makefile in this directory. 1>&2
@echo "You must run ./configure before running \`make'." 1>&2
@exit 1
endif
# Tell version 3.79 and up of GNU make to not build goals in this
# directory in parallel. This is necessary in case someone tries to
# build multiple targets on one command line.
.NOTPARALLEL:

View File

@ -1,13 +1,50 @@
## Process this file with automake to produce Makefile.in
SUBDIRS = src include docs @PYTHON_SUBDIR@
SUBDIRS = gnulib/lib include src qemud proxy docs gnulib/tests \
python tests po scripts
EXTRA_DIST = libvir.spec.in libvir.spec COPYING.LIB \
libvir.pc.in libvir.pc TODO AUTHORS ChangeLog \
NEWS README
ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4
EXTRA_DIST = \
libvirt.spec libvirt.spec.in \
libvirt.pc libvirt.pc.in \
$(man_MANS) autobuild.sh \
.x-sc_avoid_if_before_free \
.x-sc_require_config_h
man_MANS = virsh.1
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libvir.pc
pkgconfig_DATA = libvirt.pc
rpm: clean
@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
check-local: all tests
tests:
@(cd docs/examples ; $(MAKE) MAKEFLAGS+=--silent tests)
@(if [ "$(pythondir)" != "" ] ; then cd python ; \
$(MAKE) MAKEFLAGS+=--silent tests ; fi)
cov: cov-recursive cov-am
clean-cov:
rm -rf $(top_builddir)/coverage
cd src && $(MAKE) $(AM_MAKEFLAGS) clean-cov
cov-recursive:
cd src && $(MAKE) $(AM_MAKEFLAGS) cov
cov-am:
rm -rf $(top_builddir)/coverage
mkdir $(top_builddir)/coverage
perl $(srcdir)/scripts/coverage-report.pl src/*.cov > $(top_builddir)/coverage/index.xml
xsltproc $(srcdir)/scripts/coverage-report.xsl \
$(top_builddir)/coverage/index.xml \
> $(top_builddir)/coverage/index.html
for i in $(top_builddir)/src/*.gcov ; do o=`echo $$i | sed -e 's,$(top_builddir)/src,coverage,'` ; \
perl $(srcdir)/scripts/coverage-report-entry.pl $$i > $$o.html ; done
# disable this check
distuninstallcheck:

58
Makefile.cfg Normal file
View File

@ -0,0 +1,58 @@
# Customize Makefile.maint. -*- makefile -*-
# Copyright (C) 2003-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Use alpha.gnu.org for alpha and beta releases.
# Use ftp.gnu.org for major releases.
gnu_ftp_host-alpha = alpha.gnu.org
gnu_ftp_host-beta = alpha.gnu.org
gnu_ftp_host-major = ftp.gnu.org
gnu_rel_host = $(gnu_ftp_host-$(RELEASE_TYPE))
url_dir_list = \
ftp://$(gnu_rel_host)/gnu/coreutils
# Tests not to run as part of "make distcheck".
local-checks-to-skip = \
makefile_path_separator_check \
makefile-check \
sc_tight_scope \
sc_GPL_version \
sc_always_defined_macros \
sc_cast_of_alloca_return_value \
sc_changelog \
sc_dd_max_sym_length \
sc_error_exit_success \
sc_file_system \
sc_obsolete_symbols \
sc_prohibit_atoi_atof \
sc_prohibit_jm_in_m4 \
sc_prohibit_quote_without_use \
sc_prohibit_quotearg_without_use \
sc_prohibit_strcmp \
sc_root_tests \
sc_space_tab \
sc_sun_os_names \
sc_system_h_headers \
sc_two_space_separator_in_usage \
sc_useless_cpp_parens \
patch-check \
check-AUTHORS \
changelog-check
useless_free_options = \
--name=sexpr_free \
--name=xmlXPathFreeContext \
--name=xmlXPathFreeObject

539
Makefile.maint Normal file
View File

@ -0,0 +1,539 @@
# This is reported not to work with make-3.79.1
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
ME := Makefile.maint
# Do not save the original name or timestamp in the .tar.gz file.
# Use --rsyncable if available.
gzip_rsyncable := \
$(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
CVS_LIST = build-aux/vc-list-files
CVS_LIST_EXCEPT = \
$(CVS_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
# Prevent programs like 'sort' from considering distinct strings to be equal.
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
export LC_ALL = C
# Collect the names of rules starting with `sc_'.
syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' $(ME))
.PHONY: $(syntax-check-rules)
# Checks that don't require cvs.
# Run `changelog-check' last, as previous test may reveal problems requiring
# new ChangeLog entries.
local-checks-available = \
po-check copyright-check m4-check author_mark_check \
changelog-check patch-check strftime-check $(syntax-check-rules) \
makefile_path_separator_check \
makefile-check check-AUTHORS
.PHONY: $(local-checks-available)
local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available))
syntax-check: $(local-check)
## --------------- ##
## Sanity checks. ##
## --------------- ##
sc_avoid_if_before_free:
@$(srcdir)/build-aux/useless-if-before-free \
$(useless_free_options) \
$$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found useless "if" before "free" above' 1>&2; \
exit 1; } || :
# Avoid uses of write(2). Either switch to streams (fwrite), or use
# the safewrite wrapper.
sc_avoid_write:
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
grep '\<write *(' $$($(CVS_LIST_EXCEPT) | grep '\.c$$') && \
{ echo "$(ME): the above files use write;" \
" consider using the safewrite wrapper instead" \
1>&2; exit 1; } || :; \
else :; \
fi
sc_cast_of_argument_to_free:
@grep -nE '\<free \(\(' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): don'\''t cast free argument' 1>&2; \
exit 1; } || :
sc_cast_of_x_alloc_return_value:
@grep -nE '\*\) *x(m|c|re)alloc\>' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): don'\''t cast x*alloc return value' 1>&2; \
exit 1; } || :
sc_cast_of_alloca_return_value:
@grep -nE '\*\) *alloca\>' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): don'\''t cast alloca return value' 1>&2; \
exit 1; } || :
sc_space_tab:
@grep -n '[ ] ' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found SPACE-TAB sequence; remove the SPACE' \
1>&2; exit 1; } || :
# Don't use *scanf or the old ato* functions in `real' code.
# They provide no error checking mechanism.
# Instead, use strto* functions.
sc_prohibit_atoi_atof:
@grep -nE '\<([fs]?scanf|ato([filq]|ll))\>' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): do not use *scan''f, ato''f, ato''i, ato''l, ato''ll, ato''q, or ss''canf' \
1>&2; exit 1; } || :
# Use STREQ rather than comparing strcmp == 0, or != 0.
sc_prohibit_strcmp:
@grep -nE '! *str''cmp \(|\<str''cmp \([^)]+\) *==' \
$$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): use STREQ in place of the above uses of str''cmp' \
1>&2; exit 1; } || :
# Using EXIT_SUCCESS as the first argument to error is misleading,
# since when that parameter is 0, error does not exit. Use `0' instead.
sc_error_exit_success:
@grep -nF 'error (EXIT_SUCCESS,' \
$$(find -type f -name '*.[chly]') && \
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; \
exit 1; } || :
sc_file_system:
@grep -ni 'file''system' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found use of "file''system";' \
'rewrite to use "file system"' 1>&2; \
exit 1; } || :
sc_no_have_config_h:
@grep -n '^# *if.*HAVE''_CONFIG_H' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found use of HAVE''_CONFIG_H; remove' \
1>&2; exit 1; } || :
# Nearly all .c files must include <config.h>.
sc_require_config_h:
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
grep -L '^# *include <config\.h>' \
$$($(CVS_LIST_EXCEPT) | grep '\.c$$') \
| grep . && \
{ echo '$(ME): the above files do not include <config.h>' \
1>&2; exit 1; } || :; \
else :; \
fi
# Prohibit the inclusion of assert.h without an actual use of assert.
sc_prohibit_assert_without_use:
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
files=$$(grep -l '# *include <assert\.h>' \
$$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
grep -L '\<assert (' $$files \
| grep . && \
{ echo "$(ME): the above files include <assert.h> but don't use it" \
1>&2; exit 1; } || :; \
else :; \
fi
# Don't include quotearg.h unless you use one of its functions.
sc_prohibit_quotearg_without_use:
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
files=$$(grep -l '# *include "quotearg\.h"' \
$$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
grep -LE '\<quotearg(_[^ ]+)? \(' $$files \
| grep . && \
{ echo "$(ME): the above files include "quotearg.h" but don't use it" \
1>&2; exit 1; } || :; \
else :; \
fi
# Don't include quote.h unless you use one of its functions.
sc_prohibit_quote_without_use:
@if $(CVS_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
files=$$(grep -l '# *include "quote\.h"' \
$$($(CVS_LIST_EXCEPT) | grep '\.c$$')) && \
grep -LE '\<quote(_n)? \(' $$files \
| grep . && \
{ echo "$(ME): the above files include "quote.h" but don't use it" \
1>&2; exit 1; } || :; \
else :; \
fi
sc_obsolete_symbols:
@grep -nE '\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
$$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): do not use HAVE''_FCNTL_H or O''_NDELAY' \
1>&2; exit 1; } || :
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
# Each nonempty line must start with a year number, or a TAB.
sc_changelog:
@grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
exit 1; } || :
# Ensure that dd's definition of LONGEST_SYMBOL stays in sync
# with the strings from the two affected variables.
dd_c = $(srcdir)/src/dd.c
sc_dd_max_sym_length:
ifneq ($(wildcard $(dd_c)),)
@len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
|sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
| wc --max-line-length); \
max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
|tr -d '"' | wc --max-line-length); \
if test "$$len" = "$$max"; then :; else \
echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
exit 1; \
fi
endif
# Many m4 macros names once began with `jm_'.
# On 2004-04-13, they were all changed to start with gl_ instead.
# Make sure that none are inadvertently reintroduced.
sc_prohibit_jm_in_m4:
@grep -nE 'jm_[A-Z]' \
$$($(CVS_LIST) m4 |grep '\.m4$$'; echo /dev/null) && \
{ echo '$(ME): do not use jm_ in m4 macro names' \
1>&2; exit 1; } || :
sc_root_tests:
@if test -d tests \
&& grep check-root tests/Makefile.am>/dev/null 2>&1; then \
t1=sc-root.expected; t2=sc-root.actual; \
grep -nl '^PRIV_CHECK_ARG=require-root' \
$$($(CVS_LIST) tests) |sed s,tests,., |sort > $$t1; \
sed -n 's, cd \([^ ]*\) .*MAKE..check TESTS=\(.*\),./\1/\2,p' \
$(srcdir)/tests/Makefile.am |sort > $$t2; \
diff -u $$t1 $$t2 || diff=1; \
rm -f $$t1 $$t2; \
test "$$diff" \
&& { echo 'tests/Makefile.am: missing check-root action'>&2; \
exit 1; } || :; \
fi
headers_with_interesting_macro_defs = \
exit.h \
fcntl_.h \
fnmatch_.h \
intprops.h \
inttypes_.h \
lchown.h \
openat.h \
stat-macros.h \
stdint_.h
# Create a list of regular expressions matching the names
# of macros that are guaranteed by parts of gnulib to be defined.
.re-defmac:
@(cd $(srcdir)/lib; \
for f in $(headers_with_interesting_macro_defs); do \
test -f $$f && \
sed -n '/^# *define \([^_ (][^ (]*\)[ (].*/s//\1/p' $$f; \
done; \
) | sort -u \
| grep -Ev 'ATTRIBUTE_NORETURN|SIZE_MAX' \
| sed 's/^/^# *define /' \
> $@-t
@mv $@-t $@
# Don't define macros that we already get from gnulib header files.
sc_always_defined_macros: .re-defmac
@if test -f $(srcdir)/src/system.h; then \
trap 'rc=$$?; rm -f .re-defmac; exit $$rc' 0 1 2 3 15; \
grep -f .re-defmac $$($(CVS_LIST)) \
&& { echo '$(ME): define the above via some gnulib .h file' \
1>&2; exit 1; } || :; \
fi
# Create a list of regular expressions matching the names
# of files included from system.h. Exclude a couple.
.re-list:
@sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
| grep -Ev 'sys/(param|file)\.h' \
| sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
> $@-t
@mv $@-t $@
# Files in src/ should not include directly any of
# the headers already included via system.h.
sc_system_h_headers: .re-list
@if test -f $(srcdir)/src/system.h; then \
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
grep -nE -f .re-list \
$$($(CVS_LIST) src | \
grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \
&& { echo '$(ME): the above are already included via system.h'\
1>&2; exit 1; } || :; \
fi
sc_sun_os_names:
@grep -nEi \
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
$$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
exit 1; } || :
sc_the_the:
@grep -ni '\<the ''the\>' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found use of "the ''the";' 1>&2; \
exit 1; } || :
sc_tight_scope:
$(MAKE) -C src $@
sc_trailing_blank:
@grep -n '[ ]$$' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found trailing blank(s)' \
1>&2; exit 1; } || :
# Match lines like the following, but where there is only one space
# between the options and the description:
# -D, --all-repeated[=delimit-method] print all duplicate lines\n
longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)?
sc_two_space_separator_in_usage:
@grep -nE '^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
$$($(CVS_LIST_EXCEPT)) && \
{ echo "$(ME): help2man requires at least two spaces between"; \
echo "$(ME): an option and its description"; \
1>&2; exit 1; } || :
err_func_re = \
(DISABLE_fprintf|qemudLog|(xmlRpc|vir(Xend|XML|Hash|Conf|Test|LibConn|StorageReport))Error)
# Look for diagnostics that aren't marked for translation.
# This won't find any for which error's format string is on a separate line.
# The sed filters eliminate false-positives like these:
# _("...: "
# "%s", _("no storage vol w..."
sc_unmarked_diagnostics:
@grep -nE \
'\<(vshError|error) \([^"]*"[^"]*[a-z]{3}' $$($(CVS_LIST_EXCEPT)) \
| grep -v '_''(' && \
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :
@{ grep -nE '\<$(err_func_re) *\(.*;$$' $$($(CVS_LIST_EXCEPT)); \
grep -A1 -nE '\<$(err_func_re) *\(.*,$$' $$($(CVS_LIST_EXCEPT)); } \
| sed 's/_("[^"][^"]*"//;s/[ ]"%s"//' \
| grep '[ ]"' && \
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
exit 1; } || :
sc_prohibit_virBufferAdd_with_string_literal:
@grep -nE '\<virBufferAdd *\([^,]+, *"[^"]' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): use virBufferAddLit, not virBufferAdd,' \
'with a string literal' 1>&2; exit 1; } || :
# Avoid useless parentheses like those in this example:
# #if defined (SYMBOL) || defined (SYM2)
sc_useless_cpp_parens:
@grep -n '^# *if .*defined *(' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): found useless parentheses in cpp directive' \
1>&2; exit 1; } || :
# Require the latest GPL.
sc_GPL_version:
@grep -n 'either ''version [^3]' $$($(CVS_LIST_EXCEPT)) && \
{ echo '$(ME): GPL vN, N!=3' 1>&2; exit 1; } || :
# Ensure that the c99-to-c89 patch applies cleanly.
patch-check:
rm -rf src-c89 $@.1 $@.2
cp -a src src-c89
(cd src-c89; patch -p1 -V never --fuzz=0) < src/c99-to-c89.diff \
> $@.1 2>&1
if test "$$REGEN_PATCH" = yes; then \
diff -upr src src-c89 | sed 's,src-c89/,src/,' \
| grep -v '^Only in' > new-diff || : ; fi
grep -v '^patching file ' $@.1 > $@.2 || :
msg=ok; test -s $@.2 && msg='fuzzy patch' || : ; \
rm -f src-c89/*.o || msg='rm failed'; \
$(MAKE) -C src-c89 CFLAGS='-Wdeclaration-after-statement -Werror' \
|| msg='compile failure with extra options'; \
test "$$msg" = ok && rm -rf src-c89 $@.1 $@.2 || echo "$$msg" 1>&2; \
test "$$msg" = ok
# Ensure that date's --help output stays in sync with the info
# documentation for GNU strftime. The only exception is %N,
# which date accepts but GNU strftime does not.
extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
strftime-check:
if test -f $(srcdir)/src/date.c; then \
grep '^ %. ' $(srcdir)/src/date.c | sort \
| $(extract_char) > $@-src; \
{ echo N; \
info libc date calendar format | grep '^ `%.'\' \
| $(extract_char); } | sort > $@-info; \
diff -u $@-src $@-info || exit 1; \
rm -f $@-src $@-info; \
fi
check-AUTHORS:
$(MAKE) -C src $@
# Ensure that we use only the standard $(VAR) notation,
# not @...@ in Makefile.am, now that we can rely on automake
# to emit a definition for each substituted variable.
makefile-check:
grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
&& { echo 'Makefile.maint: use $$(...), not @...@' 1>&2; exit 1; } || :
news-date-check: NEWS
today=`date +%Y-%m-%d`; \
if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
>/dev/null; then \
:; \
else \
echo "version or today's date is not in NEWS" 1>&2; \
exit 1; \
fi
changelog-check:
if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \
>/dev/null; then \
:; \
else \
echo "$(VERSION) not in ChangeLog" 1>&2; \
exit 1; \
fi
m4-check:
@grep -n 'AC_DEFUN([^[]' m4/*.m4 \
&& { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \
exit 1; } || :
# Verify that all source files using _() are listed in po/POTFILES.in.
# FIXME: don't hard-code file names below; use a more general mechanism.
po-check:
if test -f po/POTFILES.in; then \
grep -E -v '^(#|$$)' po/POTFILES.in \
| grep -v '^src/false\.c$$' | sort > $@-1; \
files=; \
for file in $$($(CVS_LIST_EXCEPT)); do \
case $$file in \
*.[ch]) \
base=`expr " $$file" : ' \(.*\)\..'`; \
{ test -f $$base.l || test -f $$base.y; } && continue;; \
*) continue;; \
esac; \
files="$$files $$file"; \
done; \
grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
| sort -u > $@-2; \
diff -u $@-1 $@-2 || exit 1; \
rm -f $@-1 $@-2; \
fi
# In a definition of #define AUTHORS "... and ..." where the RHS contains
# the English word `and', the string must be marked with `N_ (...)' so that
# gettext recognizes it as a string requiring translation.
author_mark_check:
@grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
{ echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
exit 1; } || :
# Sometimes it is useful to change the PATH environment variable
# in Makefiles. When doing so, it's better not to use the Unix-centric
# path separator of `:', but rather the automake-provided `@PATH_SEPARATOR@'.
# It'd be better to use `find -print0 ...|xargs -0 ...', but less portable,
# and there probably aren't many projects with so many Makefile.am files
# that we'd have to worry about limits on command line length.
msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
makefile_path_separator_check:
@grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
&& { echo $(msg) 1>&2; exit 1; } || :
# Check that `make alpha' will not fail at the end of the process.
writable-files:
if test -d $(release_archive_dir); then :; else \
mkdir $(release_archive_dir); \
fi
for file in $(distdir).tar.gz $(xd-delta) \
$(release_archive_dir)/$(distdir).tar.gz \
$(release_archive_dir)/$(xd-delta); do \
test -e $$file || continue; \
test -w $$file \
|| { echo ERROR: $$file is not writable; fail=1; }; \
done; \
test "$$fail" && exit 1 || :
v_etc_file = lib/version-etc.c
sample-test = tests/sample-test
texi = doc/$(PACKAGE).texi
# Make sure that the copyright date in $(v_etc_file) is up to date.
# Do the same for the $(sample-test) and the main doc/.texi file.
copyright-check:
@if test -f $(v_etc_file); then \
grep 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \
>/dev/null \
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
exit 1; }; \
fi
@if test -f $(sample-test); then \
grep '# Copyright (C) '$$(date +%Y)' Free' $(sample-test) \
>/dev/null \
|| { echo 'out of date copyright in $(sample-test); update it' 1>&2; \
exit 1; }; \
fi
@if test -f $(texi); then \
grep 'Copyright @copyright{} .*'$$(date +%Y)' Free' $(texi) \
>/dev/null \
|| { echo 'out of date copyright in $(texi); update it' 1>&2; \
exit 1; }; \
fi
vc-diff-check:
$(VC) diff > vc-diffs || :
if test -s vc-diffs; then \
cat vc-diffs; \
echo "Some files are locally modified:" 1>&2; \
exit 1; \
else \
rm vc-diffs; \
fi
cvs-check: vc-diff-check
maintainer-distcheck:
$(MAKE) distcheck
$(MAKE) my-distcheck
# Use -Wformat -Werror to detect format-string/arg-list mismatches.
# Also, check for shadowing problems with -Wshadow, and for pointer
# arithmetic problems with -Wpointer-arith.
# These CFLAGS are pretty strict. If you build this target, you probably
# have to have a recent version of gcc and glibc headers.
# The for-loop below ensures that there is a bin/ directory full of all
# of the programs under test (except the few that are required for basic
# Makefile rules), all symlinked to the just-built "false" program.
# This is to ensure that if ever a test neglects to make PATH include
# the build srcdir, these always-failing programs will run.
# Otherwise, it is too easy to test the wrong programs.
# Note that "false" itself is a symlink to true, so it too will malfunction.
TMPDIR ?= /tmp
t=$(TMPDIR)/$(PACKAGE)/test
my-distcheck: $(local-check) check
-rm -rf $(t)
mkdir -p $(t)
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
cd $(t)/$(distdir) \
&& ./configure --disable-nls \
&& $(MAKE) CFLAGS='$(warn_cflags)' \
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
&& $(MAKE) dvi \
&& $(MAKE) distclean
(cd $(t) && mv $(distdir) $(distdir).old \
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
if test -f $(srcdir)/src/c99-to-c89.diff; then \
cd $(t)/$(distdir) \
&& (cd src && patch -V never --fuzz=0 <c99-to-c89.diff) \
&& ./configure --disable-largefile \
CFLAGS='-Werror -ansi -Wno-long-long' \
&& $(MAKE); \
fi
-rm -rf $(t)
@echo "========================"; \
echo "$(distdir).tar.gz is ready for distribution"; \
echo "========================"

568
NEWS
View File

@ -1,8 +1,564 @@
Mon Dec 19 2005
- first release 0.0.1
Thu Dec 15 2005
- project announced publicly
NEWS file for libvirt
Note that this is automatically generated from the news webpage at:
http://libvirt.org/news.html
Releases
0.4.1: Mar 3 2008:
- New features: build on MacOSX (Richard Jones), storage management
(Daniel Berrange), Xenner - Xen on KVM - support (Daniel Berrange)
- Documentation: Fix of various typos (Atsushi SAKAI), memory and
vcpu settings details (Richard Jones), ethernet bridging typo
(Maxwell Bottiger), add storage APIs documentation (Daniel Berrange)
- Bug fixes: OpenVZ code compilation (Mikhail Pokidko), crash in
policykit auth handling (Daniel Berrange), large config files
(Daniel Berrange), cpumap hypercall size (Saori Fukuta), crash
in remote auth (Daniel Berrange), ssh args error (Daniel Berrange),
preserve vif order from config files (Hiroyuki Kaguchi), invalid
pointer access (Jim Meyering), virDomainGetXMLDesc flag handling,
device name conversion on stats (Daniel Berrange), double mutex lock
(Daniel Berrange), config file reading crashes (Guido Guenther),
xenUnifiedDomainSuspend bug (Marcus Meissner), do not crash if
/sys/hypervisor/capabilities is missing (Mark McLoughlin),
virHashRemoveSet bug (Hiroyuki Kaguchi), close-on-exec flag for
qemud signal pipe (Daniel Berrange), double free in OpenVZ
(Anton Protopopov), handle mac without addresses (Shigeki Sakamoto),
MAC addresses checks (Shigeki Sakamoto and Richard Jones)
- Improvements: Windows build (Richard Jones), KVM/QEmu shutdown
(Guido Guenther), catch virExec output on debug (Mark McLoughlin),
integration of iptables and lokkit (Mark McLoughlin), keymap
parameter for VNC servers (Daniel Hokka Zakrisson), enable debug
by default using VIR_DEBUG (Daniel Berrange), xen 3.2 fixes
(Daniel Berrange), Python bindings for VCPU and scheduling
(Daniel Berrange), framework for automatic code syntax checks
(Jim Meyering), allow kernel+initrd setup in Xen PV (Daniel Berrange),
allow change of Disk/NIC of an inactive domains (Shigeki Sakamoto),
virsh commands to manipulate and create storage(Daniel Berrange),
update use of PolicyKit APIs, better detection of fedault hypervisor,
block device statistics for QEmu/KVM (Richard Jones), various improvements
for Xenner (Daniel Berrange)
- Code cleanups: avoid warnings (Daniel Berrange), virRun helper
function (Dan Berrange), iptable code fixes (Mark McLoughlin),
static and const cleanups (Jim Meyering), malloc and python cleanups
(Jim Meyering), xstrtol_ull and xstrtol_ll functions (Daniel Berrange),
remove no-op networking from OpenVZ (Daniel Berrange), python generator
cleanups (Daniel Berrange), cleanup ref counting (Daniel Berrange),
remove uninitialized warnings (Jim Meyering), cleanup configure
for RHEL4 (Daniel Berrange), CR/LF cleanups (Richard Jones),
various automatic code check and associated cleanups (Jim Meyering),
various memory leaks (Jim Meyering), fix compilation when building
without Xen (Guido Guenther), mark translatables strings (Jim Meyering),
use virBufferAddLit for constant strings (Jim Meyering), fix
make distcheck (Jim Meyering), return values for python bindings (Cole
Robinson), trailing blanks fixes (Jim Meyering), gcc-4.3.0 fixes
(Mark McLoughlin), use safe read and write routines (Jim Meyering),
refactoring of code dealing with hypervisor capabilities (Daniel
Berrange), qemudReportError to use virErrorMsg (Cole Robinson),
intemediate library and Makefiles for compiling static and coverage
rule support (Jim Meyering), cleanup of various leaks (Jim Meyering)
0.4.0: Dec 18 2007:
- New features: Compilation on Windows cygwin/mingw (Richard Jones),
Ruby bindings (David Lutterkort), SASL based authentication for
libvirt remote support (Daniel Berrange), PolicyKit authentication
(Daniel Berrange)
- Documentation: example files for QEMU and libvirtd configuations
(Daniel Berrange), english cleanups (Jim Paris), CIM and OpenVZ
references, document <shareable/>, daemon startup when using
QEMU/KVM, document HV support for new NUMA calls (Richard Jones),
various english fixes (Bruce Montague), OCaml docs links (Richard Jones),
describe the various bindings add Ruby link, Windows support page
(Richard Jones), authentication documentation updates (Daniel Berrange)
- Bug fixes: NUMA topology error handling (Beth Kon), NUMA topology
cells without CPU (Beth Kon), XML to/from XM bridge config (Daniel
Berrange), XM processing of vnc parameters (Daniel Berrange), Reset
migration source after failure (Jim Paris), negative integer in config
(Tatsuro Enokura), zero terminating string buffer, detect integer
overflow (Jim Meyering), QEmu command line ending fixes (Daniel Berrange),
recursion problem in the daemon (Daniel Berrange), HVM domain with CDRom
(Masayuki Sunou), off by one error in NUMA cpu count (Beth Kon),
avoid xend errors when adding disks (Masayuki Sunou), compile error
(Chris Lalancette), transposed fwrite args (Jim Meyering), compile
without xen and on solaris (Jim Paris), parsing of interface names
(Richard Jones), overflow for starts on 32bits (Daniel Berrange),
fix problems in error reporting (Saori Fukuta), wrong call to
brSetForwardDelay changed to brSetEnableSTP (Richard Jones),
allow shareable disk in old Xen, fix wrong certificate file (Jim
Meyering), avoid some startup error when non-root, off-by-1 buffer
NULL termination (Daniel Berrange), various string allocation fixes
(Daniel Berrange), avoid problems with vnetXXX interfaces in domain dumps
(Daniel Berrange), build fixes for RHEL (Daniel Berrange), virsh prompt
should not depend on uid (Richard Jones), fix scaping of '<' (Richard
Jones), fix detach-disk on Xen tap devices (Saori Fukuta), CPU
parameter setting in XM config (Saori Fukuta), credential handling
fixes (Daniel Berrange), fix compatibility with Xen 3.2.0 (Daniel
Berrange)
- Improvements: /etc/libvirt/qemu.conf configuration for QEMU driver
(Daniel Berrange), NUMA cpu pinning in config files (DV and Saori Fukuta),
CDRom media change in KVM/QEMU (Daniel Berrange), tests for
<shareable/> in configs, pinning inactive domains for Xen 3.0.3
(Saori Fukuta), use gnulib for portability enhancement (Jim Meyering),
--without-libvirtd config option (Richard Jones), Python bindings for
NUMA, add extra utility functions to buffer (Richard Jones),
separate qparams module for handling query parameters (Richard Jones)
- Code cleanups: remove virDomainRestart from API as it was never used
(Richard Jones), constify params for attach/detach APIs (Daniel Berrange),
gcc printf attribute checkings (Jim Meyering), refactoring of device
parsing code and shell escaping (Daniel Berrange), virsh schedinfo
parameters validation (Masayuki Sunou), Avoid risk of format string abuse
(Jim Meyering), integer parsing cleanups (Jim Meyering), build out
of the source tree (Jim Meyering), URI parsing refactoring (Richard
Jones), failed strdup/malloc handling (Jim Meyering), Make "make
distcheck" work (Jim Meyering), improve xen internall error reports
(Richard Jones), cleanup of the daemon remote code (Daniel Berrange),
rename error VIR_FROM_LINUX to VIR_FROM_STATS_LINUX (Richard Jones),
don't compile the proxy if without Xen (Richard Jones), fix paths when
configuring for /usr prefix, improve error reporting code (Jim Meyering),
detect heap allocation failure (Jim Meyering), disable xen sexpr parsing
code if Xen is disabled (Daniel Berrange), cleanup of the GetType
entry point for Xen drivers, move some QEmu path handling to generic
module (Daniel Berrange), many code cleanups related to the Windows
port (Richard Jones), disable the proxy if using PolicyKit, readline
availability detection, test libvirtd's config-processing code (Jim
Meyering), use a variable name as sizeof argument (Jim Meyering)
0.3.3: Sep 30 2007:
- New features: Avahi mDNS daemon export (Daniel Berrange),
NUMA support (Beth Kan)
- Documentation: cleanups (Toth Istvan), typos (Eduardo Pereira),
- Bug fixes: memory corruption on large dumps (Masayuki Sunou), fix
virsh vncdisplay command exit (Masayuki Sunou), Fix network stats
TX/RX result (Richard Jones), warning on Xen 3.0.3 (Richard Jones),
missing buffer check in virDomainXMLDevID (Hugh Brock), avoid zombies
when using remote (Daniel Berrange), xend connection error message
(Richard Jones), avoid ssh tty prompt (Daniel Berrange), username
handling for remote URIs (Fabian Deutsch), fix potential crash
on multiple input XML tags (Daniel Berrange), Solaris Xen hypercalls
fixup (Mark Johnson)
- Improvements: OpenVZ support (Shuveb Hussain and Anoop Cyriac),
CD-Rom reload on XEn (Hugh Brock), PXE boot got QEmu/KVM (Daniel
Berrange), QEmu socket permissions customization (Daniel Berrange),
more QEmu support (Richard Jones), better path detection for qemu and
dnsmasq (Richard Jones), QEmu flags are per-Domain (Daniel Berrange),
virsh freecell command, Solaris portability fixes (Mark Johnson),
default bootloader support (Daniel Berrange), new virNodeGetFreeMemory
API, vncpasswd extraction in configuration files if secure (Mark
Johnson and Daniel Berrange), Python bindings for block and interface
statistics
- Code cleanups: virDrvOpenRemoteFlags definition (Richard Jones),
configure tests and output (Daniel Berrange)
0.3.2: Aug 21 2007:
- New features: KVM migration and save/restore (Jim Paris),
added API for migration (Richard Jones), added APIs for block device and
interface statistic (Richard Jones).
- Documentation: examples for XML network APIs,
fix typo and schedinfo synopsis in man page (Atsushi SAKAI),
hypervisor support page update (Richard Jones).
- Bug fixes: remove a couple of leaks in QEmu/KVM backend(Daniel berrange),
fix GnuTLS 1.0 compatibility (Richard Jones), --config/-f option
mistake for libvirtd (Richard Jones), remove leak in QEmu backend
(Jim Paris), fix some QEmu communication bugs (Jim Paris), UUID
lookup though proxy fix, setvcpus checking bugs (with Atsushi SAKAI),
int checking in virsh parameters (with Masayuki Sunou), deny devices
attach/detach for < Xen 3.0.4 (Masayuki Sunou), XenStore query
memory leak (Masayuki Sunou), virsh schedinfo cleanup (Saori Fukuta).
- Improvement: virsh new ttyconsole command, networking API implementation
for test driver (Daniel berrange), qemu/kvm feature reporting of
ACPI/APIC (David Lutterkort), checking of QEmu architectures (Daniel
berrange), improve devices XML errors reporting (Masayuki Sunou),
speedup of domain queries on Xen (Daniel berrange), augment XML dumps
with interface devices names (Richard Jones), internal API to query
drivers for features (Richard Jones).
- Cleanups: Improve virNodeGetInfo implentation (Daniel berrange),
general UUID code cleanup (Daniel berrange), fix API generator
file selection.
0.3.1: Jul 24 2007:
- Documentation: index to remote page, script to test certificates,
IPv6 remote support docs (Daniel Berrange), document
VIRSH_DEFAULT_CONNECT_URI in virsh man page (David Lutterkort),
Relax-NG early grammar for the network XML (David Lutterkort)
- Bug fixes: leaks in disk XML parsing (Masayuki Sunou), hypervisor
alignment call problems on PPC64 (Christian Ehrhardt), dead client
registration in daemon event loop (Daniel Berrange), double free
in error handling (Daniel Berrange), close on exec for log file
descriptors in the daemon (Daniel Berrange), avoid caching problem
in remote daemon (Daniel Berrange), avoid crash after QEmu domain
failure (Daniel Berrange)
- Improvements: checks of x509 certificates and keys (Daniel Berrange),
error reports in the daemon (Daniel Berrange), checking of Ethernet MAC
addresses in XML configs (Masayuki Sunou), support for a new
clock switch between UTC and localtime (Daniel Berrange), early
version of OpenVZ support (Shuveb Hussain), support for input devices
on PS/2 and USB buses (Daniel Berrange), more tests especially
the QEmu support (Daniel Berrange), range check in credit scheduler
(with Saori Fukuta and Atsushi Sakai), add support for listen VNC
parameter un QEmu and fix command line arg (Daniel Berrange)
- Cleanups: debug tracing (Richard Jones), removal of --with-qemud-pid-file
(Richard Jones), remove unused virDeviceMode, new util module for
code shared between drivers (Shuveb Hussain), xen header location
detection (Richard Jones)
0.3.0: Jul 9 2007:
- Secure Remote support (Richard Jones).
See the remote page
of the documentation
- Documentation: remote support (Richard Jones), description of
the URI connection strings (Richard Jones), update of virsh man
page, matrix of libvirt API/hypervisor support with version
informations (Richard Jones)
- Bug fixes: examples Makefile.am generation (Richard Jones),
SetMem fix (Mark Johnson), URI handling and ordering of
drivers (Daniel Berrange), fix virsh help without hypervisor (Richard
Jones), id marshalling fix (Daniel Berrange), fix virConnectGetMaxVcpus
on remote (Richard Jones), avoid a realloc leak (Jim Meyering), scheduler
parameters handling for Xen (Richard Jones), various early remote
bug fixes (Richard Jones), remove virsh leaks of domains references
(Masayuki Sunou), configCache refill bug (Richard Jones), fix
XML serialization bugs
- Improvements: QEmu switch to XDR-based protocol (Dan Berrange),
device attach/detach commands (Masayuki Sunou), OCaml bindings
(Richard Jones), new entry points virDomainGetConnect and
virNetworkGetConnect useful for bindings (Richard Jones),
reunitifaction of remote and qemu daemon under a single libvirtd
with a config file (Daniel Berrange)
- Cleanups: parsing of connection URIs (Richard Jones), messages
from virsh (Saori Fukuta), Coverage files (Daniel Berrange),
Solaris fixes (Mark Johnson), avoid [r]index calls (Richard Jones),
release information in Xen backend, virsh cpupin command cleanups
(Masayuki Sunou), xen:/// suppport as standard Xen URI (Richard Jones and
Daniel Berrange), improve driver selection/decline mechanism (Richard
Jones), error reporting on XML dump (Richard Jones), Remove unused
virDomainKernel structure (Richard Jones), daemon event loop event
handling (Daniel Berrange), various unifications cleanup in the daemon
merging (Daniel Berrange), internal file and timer monitoring API
(Daniel Berrange), remove libsysfs dependancy, call brctl program
directly (Daniel Berrange), virBuffer functions cleanups (Richard Jones),
make init script LSB compliant, error handling on lookup functions
(Richard Jones), remove internal virGetDomainByID (Richard Jones),
revamp of xen subdrivers interfaces (Richard Jones)
- Localization updates
0.2.3: Jun 8 2007:
- Documentation: documentation for upcoming remote access (Richard Jones),
virConnectNumOfDefinedDomains doc (Jan Michael), virsh help messages
for dumpxml and net-dumpxml (Chris Wright),
- Bug fixes: RelaxNG schemas regexp fix (Robin Green), RelaxNG arch bug
(Mark McLoughlin), large buffers bug fixes (Shigeki Sakamoto), error
on out of memory condition (Shigeki Sakamoto), virshStrdup fix, non-root
driver when using Xen bug (Richard Jones), use --strict-order when
running dnsmasq (Daniel Berrange), virbr0 weirdness on restart (Mark
McLoughlin), keep connection error messages (Richard Jones), increase
QEmu read buffer on help (Daniel Berrange), rpm dependance on
dnsmasq (Daniel Berrange), fix XML boot device syntax (Daniel Berrange),
QEmu memory bug (Daniel Berrange), memory leak fix (Masayuki Sunou),
fix compiler flags (Richard Jones), remove type ioemu on recent Xen
HVM for paravirt drivers (Saori Fukuta), uninitialized string bug
(Masayuki Sunou), allow init even if the daemon is not running,
XML to config fix (Daniel Berrange)
- Improvements: add a special error class for the test module (Richard
Jones), virConnectGetCapabilities on proxy (Richard Jones), allow
network driver to decline usage (Richard Jones), extend error messages
for upcoming remote access (Richard Jones), on_reboot support for QEmu
(Daniel Berrange), save daemon output in a log file (Daniel Berrange),
xenXMDomainDefineXML can override guest config (Hugh Brock),
add attach-device and detach-device commands to virsh (Masayuki Sunou
and Mark McLoughlin and Richard Jones), make virGetVersion case
insensitive and Python bindings (Richard Jones), new scheduler API
(Atsushi SAKAI), localizations updates, add logging option for virsh
(Nobuhiro Itou), allow arguments to be passed to bootloader (Hugh Brock),
increase the test suite (Daniel Berrange and Hugh Brock)
- Cleanups: Remove VIR_DRV_OPEN_QUIET (Richard Jones), disable xm_internal.c
for Xen > 3.0.3 (Daniel Berrange), unused fields in _virDomain (Richard
Jones), export __virGetDomain and __virGetNetwork for libvirtd only
(Richard Jones), ignore old VNC config for HVM on recent Xen (Daniel
Berrange), various code cleanups, -Werror cleanup (Hugh Brock)
0.2.2: Apr 17 2007:
- Documentation: fix errors due to Amaya (with Simon Hernandez),
virsh uses kB not bytes (Atsushi SAKAI), add command line help to
qemud (Richard Jones), xenUnifiedRegister docs (Atsushi SAKAI),
strings typos (Nikolay Sivov), ilocalization probalem raised by
Thomas Canniot
- Bug fixes: virsh memory values test (Masayuki Sunou), operations without
libvirt_qemud (Atsushi SAKAI), fix spec file (Florian La Roche, Jeremy
Katz, Michael Schwendt),
direct hypervisor call (Atsushi SAKAI), buffer overflow on qemu
networking command (Daniel Berrange), buffer overflow in quemud (Daniel
Berrange), virsh vcpupin bug (Masayuki Sunou), host PAE detections
and strcuctures size (Richard Jones), Xen PAE flag handling (Daniel
Berrange), bridged config configuration (Daniel Berrange), erroneous
XEN_V2_OP_SETMAXMEM value (Masayuki Sunou), memory free error (Mark
McLoughlin), set VIR_CONNECT_RO on read-only connections (S.Sakamoto),
avoid memory explosion bug (Daniel Berrange), integer overflow
for qemu CPU time (Daniel Berrange), QEMU binary path check (Daniel
Berrange)
- Cleanups: remove some global variables (Jim Meyering), printf-style
functions checks (Jim Meyering), better virsh error messages, increase
compiler checkings and security (Daniel Berrange), virBufferGrow usage
and docs, use calloc instead of malloc/memset, replace all sprintf by
snprintf, avoid configure clobbering user's CTAGS (Jim Meyering),
signal handler error cleanup (Richard Jones), iptables internal code
claenup (Mark McLoughlin), unified Xen driver (Richard Jones),
cleanup XPath libxml2 calls, IPTables rules tightening (Daniel
Berrange),
- Improvements: more regression tests on XML (Daniel Berrange), Python
bindings now generate exception in error cases (Richard Jones),
Python bindings for vir*GetAutoStart (Daniel Berrange),
handling of CD-Rom device without device name (Nobuhiro Itou),
fix hypervisor call to work with Xen 3.0.5 (Daniel Berrange),
DomainGetOSType for inactive domains (Daniel Berrange), multiple boot
devices for HVM (Daniel Berrange),
0.2.1: Mar 16 2007:
- Various internal cleanups (Richard Jones,Daniel Berrange,Mark McLoughlin)
- Bug fixes: libvirt_qemud daemon path (Daniel Berrange), libvirt
config directory (Daniel Berrange and Mark McLoughlin), memory leak
in qemud (Mark), various fixes on network support (Mark), avoid Xen
domain zombies on device hotplug errors (Daniel Berrange), various
fixes on qemud (Mark), args parsing (Richard Jones), virsh -t argument
(Saori Fukuta), avoid virsh crash on TAB key (Daniel Berrange), detect
xend operation failures (Kazuki Mizushima), don't listen on null socket
(Rich Jones), read-only socket cleanup (Rich Jones), use of vnc port 5900
(Nobuhiro Itou), assorted networking fixes (Daniel Berrange), shutoff and
shutdown mismatches (Kazuki Mizushima), unlimited memory handling
(Atsushi SAKAI), python binding fixes (Tatsuro Enokura)
- Build and portability fixes: IA64 fixes (Atsushi SAKAI), dependancies
and build (Daniel Berrange), fix xend port detection (Daniel
Berrange), icompile time warnings (Mark), avoid const related
compiler warnings (Daniel Berrange), automated builds (Daniel
Berrange), pointer/int mismatch (Richard Jones), configure time
selection of drivers, libvirt spec hacking (Daniel Berrange)
- Add support for network autostart and init scripts (Mark McLoughlin)
- New API virConnectGetCapabilities() to detect the virtualization
capabilities of a host (Richard Jones)
- Minor improvements: qemud signal handling (Mark), don't shutdown or reboot
domain0 (Kazuki Mizushima), QEmu version autodetection (Daniel Berrange),
network UUIDs (Mark), speed up UUID domain lookups (Tatsuro Enokura and
Daniel Berrange), support for paused QEmu CPU (Daniel Berrange), keymap
VNC attribute support (Takahashi Tomohiro and Daniel Berrange), maximum
number of virtual CPU (Masayuki Sunou), virtsh --readonly option (Rich
Jones), python bindings for new functions (Daniel Berrange)
- Documentation updates especially on the XML formats
0.2.0: Feb 14 2007:
- Various internal cleanups (Mark McLoughlin, Richard Jones,
Daniel Berrange, Karel Zak)
- Bug fixes: avoid a crash in connect (Daniel Berrange), virsh args
parsing (Richard Jones)
- Add support for QEmu and KVM virtualization (Daniel Berrange)
- Add support for network configuration (Mark McLoughlin)
- Minor improvements: regression testing (Daniel Berrange),
localization string updates
0.1.11: Jan 22 2007:
- Finish XML <-> XM config files support
- Remove memory leak when freeing virConf objects
- Finishing inactive domain support (Daniel Berrange)
- Added a Relax-NG schemas to check XML instances
0.1.10: Dec 20 2006:
- more localizations
- bug fixes: VCPU info breakages on xen 3.0.3, xenDaemonListDomains buffer overflow (Daniel Berrange), reference count bug when creating Xen domains (Daniel Berrange).
- improvements: support graphic framebuffer for Xen paravirt (Daniel Berrange), VNC listen IP range support (Daniel Berrange), support for default Xen config files and inactive domains of 3.0.4 (Daniel Berrange).
0.1.9: Nov 29 2006:
- python bindings: release interpeter lock when calling C (Daniel Berrange)
- don't raise HTTP error when looking informations for a domain
- some refactoring to use the driver for all entry points
- better error reporting (Daniel Berrange)
- fix OS reporting when running as non-root
- provide XML parsing errors
- extension of the test framework (Daniel Berrange)
- fix the reconnect regression test
- python bindings: Domain instances now link to the Connect to avoid garbage collection and disconnect
- separate the notion of maximum memory and current use at the XML level
- Fix a memory leak (Daniel Berrange)
- add support for shareable drives
- add support for non-bridge style networking configs for guests(Daniel Berrange)
- python bindings: fix unsigned long marshalling (Daniel Berrange)
- new config APIs virConfNew() and virConfSetValue() to build configs from scratch
- hot plug device support based on Michel Ponceau patch
- added support for inactive domains, new APIs, various associated cleanup (Daniel Berrange)
- special device model for HVM guests (Daniel Berrange)
- add API to dump core of domains (but requires a patched xend)
- pygrub bootloader informations take over <os> informations
- updated the localization strings
0.1.8: Oct 16 2006:
- Bug for system with page size != 4k
- vcpu number initialization (Philippe Berthault)
- don't label crashed domains as shut off (Peter Vetere)
- fix virsh man page (Noriko Mizumoto)
- blktapdd support for alternate drivers like blktap (Daniel Berrange)
- memory leak fixes (xend interface and XML parsing) (Daniel Berrange)
- compile fix
- mlock/munlock size fixes (Daniel Berrange)
- improve error reporting
0.1.7: Sep 29 2006:
- fix a memory bug on getting vcpu informations from xend (Daniel Berrange)
- fix another problem in the hypercalls change in Xen changeset
86d26e6ec89b when getting domain informations (Daniel Berrange)
0.1.6: Sep 22 2006:
- Support for localization of strings using gettext (Daniel Berrange)
- Support for new Xen-3.0.3 cdrom and disk configuration (Daniel Berrange)
- Support for setting VNC port when creating domains with new
xend config files (Daniel Berrange)
- Fix bug when running against xen-3.0.2 hypercalls (Jim Fehlig)
- Fix reconnection problem when talking directly to http xend
0.1.5: Sep 5 2006:
- Support for new hypercalls change in Xen changeset 86d26e6ec89b
- bug fixes: virParseUUID() was wrong, netwoking for paravirt guestsi
(Daniel Berrange), virsh on non-existent domains (Daniel Berrange),
string cast bug when handling error in python (Pete Vetere), HTTP
500 xend error code handling (Pete Vetere and Daniel Berrange)
- improvements: test suite for SEXPR <-> XML format conversions (Daniel
Berrange), virsh output regression suite (Daniel Berrange), new environ
variable VIRSH_DEFAULT_CONNECT_URI for the default URI when connecting
(Daniel Berrange), graphical console support for paravirt guests
(Jeremy Katz), parsing of simple Xen config files (with Daniel Berrange),
early work on defined (not running) domains (Daniel Berrange),
virsh output improvement (Daniel Berrange
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
build and pkginfo cflag fix (Daniel Berrange)
- enhancement and fixes of the XML description format (David Lutterkort
and Jim Fehlig)
- new APIs: for Node information and Reboot
- internal code cleanup: refactoring internals into a driver model, more
error handling, structure sharing, thread safety and ref counting
- bug fixes: error message (Jim Meyering), error allocation in virsh (Jim
Meyering), virDomainLookupByID (Jim Fehlig),
- documentation: updates on architecture, and format, typo fix (Jim
Meyering)
- bindings: exception handling in examples (Jim Meyering), perl ones out
of tree (Daniel Berrange)
- virsh: more options, create, nodeinfo (Karel Zak), renaming of some
options (Karel Zak), use stderr only for errors (Karel Zak), man page
(Andrew Puch)
0.0.6: Feb 28 2006:
- add UUID lookup and extract API
- add error handling APIs both synchronous and asynchronous
- added minimal hook for error handling at the python level, improved the
python bindings
- augment the documentation and tests to cover error handling
0.0.5: Feb 23 2006:
- Added XML description parsing, dependance to libxml2, implemented the
creation API virDomainCreateLinux()
- new APIs to lookup and name domain by UUID
- fixed the XML dump when using the Xend access
- Fixed a few more problem related to the name change
- Adding regression tests in python and examples in C
- web site improvement, extended the documentation to cover the XML
format and Python API
- Added devhelp help for Gnome/Gtk programmers
0.0.4: Feb 10 2006:
- Fix various bugs introduced in the name change
0.0.3: Feb 9 2006:
- Switch name from from 'libvir' to libvirt
- Starting infrastructure to add code examples
- Update of python bindings for completeness
0.0.2: Jan 29 2006:
- Update of the documentation, web site redesign (Diana Fong)
- integration of HTTP xend RPC based on libxend by Anthony Liquori for
most operations
- Adding Save and Restore APIs
- extended the virsh command line tool (Karel Zak)
- remove xenstore transactions (Anthony Liguori)
- fix the Python bindings bug when domain and connections where freed
0.0.1: Dec 19 2005:
- First release
- Basic management of existing Xen domains
- Minimal autogenerated Python bindings
Wed Nov 2 2005
- the very first work was checked in a CVS on veillard.com

12
README
View File

@ -1,7 +1,13 @@
LibVir : simple library to use the Xen hypervisor
LibVirt : simple API for virtualization
As of Wed Nov 2 2005, this is a completely new project, it is not
usable in any way yet.
Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software
available under the GNU Lesser General Public License. Virtualization of
the Linux Operating System means the ability to run multiple instances of
Operating Systems concurrently on a single hardware system where the basic
resources are driven by a Linux instance. The library aim at providing
long term stable C API initially for the Xen paravirtualization but
should be able to integrate other virtualization mechanisms if needed.
Daniel Veillard <veillard@redhat.com>

32
RENAMES Normal file
View File

@ -0,0 +1,32 @@
# Suggested list of file renames.
#
# File renames don't normally go into patches because they make
# the patches much harder to read, so list them here instead.
#
# $Id$
# Clearer naming scheme after Xen-unified patch went in.
src/xen_internal.c src/xen_internal_hv.c
src/xen_internal.h src/xen_internal_hv.h
src/proxy_internal.c src/xen_internal_proxy.c
src/proxy_internal.h src/xen_internal_proxy.h
src/xend_internal.c src/xen_internal_xend.c
src/xend_internal.h src/xen_internal_xend.h
src/xm_internal.c src/xen_internal_inactive.c
src/xm_internal.h src/xen_internal_inactive.h
src/xs_internal.c src/xen_internal_xenstore.c
src/xs_internal.h src/xen_internal_xenstore.h
src/xen_unified.c src/xen_internal.c
src/xen_unified.h src/xen_internal.h
# Test driver should really be called test_internal.
src/test.c src/test_internal.c
src/test.h src/test_internal.h
# This would be better:
src/*_internal*.c src/*_driver*.c
src/*_internal*.h src/*_driver*.h
# Qemud is now the qemud + remote driver.
qemud/protocol.x qemud/qemud_protocol.x
qemud/* remote/*

32
TODO
View File

@ -1,5 +1,29 @@
- nearly everything at this point
TODO:
- libvirt_virDomainSetMemory should check memory is > 0
- check how to better handle renaming of domains (xm rename and cache)
Done:
- make dist and make rpm targets
- set a no public by default policy for libvir symbols
- UUID lookup in hash.c
Other environment:
- support for UML
+ UML control layer should be easy at least for one user but incomplete
Probable TODOs:
- event on big domain state change (create, crashed, paused, shutdown, destroy)
- bindings for more languages
Would-be-nice TODO:
- man page for virsh and the libraries entry points
- more documentation and examples on using the toolkit
- examples for the error handling code
Cleanup:
- now that libxml2 is linked in, drop hash.[ch] and get back to libxml2 ones ?
same for the buffers
Autoconf:
- On Debian and other platforms, C++ compiler is required because
autoconf macros to detect libtool depend on it. (This is probably
an autoconf or libtool m4 macro bug, and the fact that it happens
on Debian is a red herring).

116
acinclude.m4 Normal file
View File

@ -0,0 +1,116 @@
dnl
dnl Taken from gnome-common/macros2/gnome-compiler-flags.m4
dnl
dnl We've added:
dnl -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls
dnl We've removed
dnl CFLAGS="$realsave_CFLAGS"
dnl to avoid clobbering user-specified CFLAGS
dnl
AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
dnl ******************************
dnl More compiler warnings
dnl ******************************
AC_ARG_ENABLE(compile-warnings,
AC_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
[Turn on compiler warnings]),,
[enable_compile_warnings="m4_default([$1],[maximum])"])
warnCFLAGS=
common_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables"
case "$enable_compile_warnings" in
no)
try_compiler_flags=""
;;
minimum)
try_compiler_flags="-Wall -Wformat -Wformat-security $common_flags"
;;
yes)
try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes $common_flags"
;;
maximum|error)
try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return"
try_compiler_flags="$try_compiler_flags -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare"
try_compiler_flags="$try_compiler_flags $common_flags"
if test "$enable_compile_warnings" = "error" ; then
try_compiler_flags="$try_compiler_flags -Werror"
fi
;;
*)
AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
;;
esac
compiler_flags=
for option in $try_compiler_flags; do
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $option"
AC_MSG_CHECKING([whether gcc understands $option])
AC_TRY_LINK([], [],
has_option=yes,
has_option=no,)
CFLAGS="$SAVE_CFLAGS"
AC_MSG_RESULT($has_option)
if test $has_option = yes; then
compiler_flags="$compiler_flags $option"
fi
unset has_option
unset SAVE_CFLAGS
done
unset option
unset try_compiler_flags
AC_ARG_ENABLE(iso-c,
AC_HELP_STRING([--enable-iso-c],
[Try to warn if code is not ISO C ]),,
[enable_iso_c=no])
AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
complCFLAGS=
if test "x$enable_iso_c" != "xno"; then
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-ansi[\ \ ]*) ;;
*) complCFLAGS="$complCFLAGS -ansi" ;;
esac
case " $CFLAGS " in
*[\ \ ]-pedantic[\ \ ]*) ;;
*) complCFLAGS="$complCFLAGS -pedantic" ;;
esac
fi
fi
AC_MSG_RESULT($complCFLAGS)
WARN_CFLAGS="$compiler_flags $complCFLAGS"
AC_SUBST(WARN_CFLAGS)
])
dnl
dnl To support the old pkg-config from RHEL4 vintage, we need
dnl to define the PKG_PROG_PKG_CONFIG macro if its not already
dnl present
m4_ifndef([PKG_PROG_PKG_CONFIG],
[AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])])

40
autobuild.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/sh
set -e
set -v
# Make things clean.
test -n "$1" && RESULTS="$1" || RESULTS="results.log"
test -f Makefile && make -k distclean || :
rm -rf coverage
#rm -rf build
#mkdir build
#cd build
./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT \
--enable-test-coverage \
--enable-compile-warnings=error
make
make install
set -o pipefail
make check 2>&1 | tee $RESULTS
make syntax-check 2>&1 | tee -a $RESULTS
make cov
rm -f *.tar.gz
make dist
if [ -f /usr/bin/rpmbuild ]; then
if [ -n "$AUTOBUILD_COUNTER" ]; then
EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
else
NOW=`date +"%s"`
EXTRA_RELEASE=".$USER$NOW"
fi
rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean *.tar.gz
fi

View File

@ -2,15 +2,23 @@
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
test -z "$srcdir" && srcdir=.
THEDIR=`pwd`
cd $srcdir
DIE=0
(autopoint --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "You must have autopoint installed to compile libvirt."
echo "Download the appropriate package for your distribution,"
echo "or see http://www.gnu.org/software/gettext"
DIE=1
}
(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 +26,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 +35,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"
}
@ -36,8 +44,8 @@ if test "$DIE" -eq 1; then
exit 1
fi
test -f src/libvir.c || {
echo "You must run this script in the top-level libxen directory"
test -f src/libvirt.c || {
echo "You must run this script in the top-level libvirt directory"
exit 1
}
@ -46,8 +54,11 @@ if test -z "$*"; then
echo "to pass any to it, please specify them on the $0 command line."
fi
autopoint --force
#rm -rf m4
libtoolize --copy --force
aclocal $ACLOCAL_FLAGS
aclocal -I m4 -I gnulib/m4
autoheader
automake --add-missing
autoconf
@ -58,7 +69,7 @@ if test x$OBJ_DIR != x; then
cd "$OBJ_DIR"
fi
$srcdir/configure "$@"
echo
echo "Now type 'make' to compile libvir."
$srcdir/configure "$@" && {
echo
echo "Now type 'make' to compile libvirt."
}

92
bootstrap Executable file
View File

@ -0,0 +1,92 @@
#!/bin/sh
# Run this after autogen.sh, to pull in all of the gnulib-related bits.
# It's important to run *after* autogen.sh, since it updates some of
# the same files autogen.sh does, yet those from gnulib are newer,
# and match the tests. So if a gnulib bug has been fixed since the
# snapshot taken for whatever gettext release you're using, yet you
# run "make check" against the wrong version, the corresponding unit
# test in gl-tests/ may well fail.
usage() {
echo >&2 "\
Usage: $0 [OPTION]...
Bootstrap this package from the checked-out sources.
Options:
--gnulib-srcdir=DIRNAME Specify the local directory where gnulib
sources reside. Use this if you already
have gnulib sources on your machine, and
do not want to waste your bandwidth downloading
them again.
If the file bootstrap.conf exists in the current working directory, its
contents are read as shell variables to configure the bootstrap.
Running without arguments will suffice in most cases.
"
}
for option
do
case $option in
--help)
usage
exit;;
--gnulib-srcdir=*)
GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;;
*)
echo >&2 "$0: $option: unknown option"
exit 1;;
esac
done
cleanup_gnulib() {
st=$?
rm -fr .gnulib
exit $st
}
case ${GNULIB_SRCDIR--} in
-)
if [ ! -d gnulib ]; then
echo "$0: getting gnulib files..."
trap cleanup_gnulib 1 2 13 15
git clone --depth 1 git://git.sv.gnu.org/gnulib .gnulib ||
cleanup_gnulib
trap - 1 2 13 15
fi
GNULIB_SRCDIR=.gnulib
esac
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
<$gnulib_tool || exit
# Tell gnulib to:
# require LGPLv2+
# put *.m4 files in new gnulib/m4/ dir
# put *.[ch] files in new gnulib/lib/ dir.
$gnulib_tool \
--lgpl=2 \
--with-tests \
--m4-base=gnulib/m4 \
--source-base=gnulib/lib \
--tests-base=gnulib/tests \
--import physmem getaddrinfo \
sys_stat vasprintf strndup \
strsep poll gettext getpass \
useless-if-before-free \
vc-list-files
rm -f \
.gitignore \
gnulib/lib/.gitignore \
gnulib/m4/.gitignore \
gnulib/tests/.gitignore
(cd gnulib/lib &&
(cat .cvsignore; \
ls -1 *.in.h|sed 's/\.in\.h/.h/') | sort -u > .t; mv .t .cvsignore)

9
build-aux/.cvsignore Normal file
View File

@ -0,0 +1,9 @@
compile
config.guess
config.rpath
config.sub
depcomp
install-sh
ltmain.sh
missing
mkinstalldirs

28
build-aux/link-warning.h Normal file
View File

@ -0,0 +1,28 @@
/* GL_LINK_WARNING("literal string") arranges to emit the literal string as
a linker warning on most glibc systems.
We use a linker warning rather than a preprocessor warning, because
#warning cannot be used inside macros. */
#ifndef GL_LINK_WARNING
/* This works on platforms with GNU ld and ELF object format.
Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
Testing __ELF__ guarantees the ELF object format.
Testing __GNUC__ is necessary for the compound expression syntax. */
# if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
# define GL_LINK_WARNING(message) \
GL_LINK_WARNING1 (__FILE__, __LINE__, message)
# define GL_LINK_WARNING1(file, line, message) \
GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */
# define GL_LINK_WARNING2(file, line, message) \
GL_LINK_WARNING3 (file ":" #line ": warning: " message)
# define GL_LINK_WARNING3(message) \
({ static const char warning[sizeof (message)] \
__attribute__ ((__unused__, \
__section__ (".gnu.warning"), \
__aligned__ (1))) \
= message "\n"; \
(void)0; \
})
# else
# define GL_LINK_WARNING(message) ((void) 0)
# endif
#endif

172
build-aux/useless-if-before-free Executable file
View File

@ -0,0 +1,172 @@
#!/usr/bin/perl -T
# Detect instances of "if (p) free (p);".
# Likewise for "if (p != NULL) free (p);". And with braces.
my $VERSION = '2008-02-11 08:08'; # UTC
# The definition above must lie within the first 8 lines in order
# for the Emacs time-stamp write hook (at end) to update it.
# If you change this file with Emacs, please let the write hook
# do its job. Otherwise, update this string manually.
# Copyright (C) 2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Written by Jim Meyering
use strict;
use warnings;
use Getopt::Long;
(my $ME = $0) =~ s|.*/||;
# use File::Coda; # http://meyering.net/code/Coda/
END {
defined fileno STDOUT or return;
close STDOUT and return;
warn "$ME: failed to close standard output: $!\n";
$? ||= 1;
}
sub usage ($)
{
my ($exit_code) = @_;
my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
if ($exit_code != 0)
{
print $STREAM "Try `$ME --help' for more information.\n";
}
else
{
print $STREAM <<EOF;
Usage: $ME [OPTIONS] FILE...
Detect any instance in FILE of a useless "if" test before a free call, e.g.,
"if (p) free (p);". Any such test may be safely removed without affecting
the semantics of the C code in FILE. Use --name=FOO --name=BAR to also
detect free-like functions named FOO and BAR.
OPTIONS:
--list print only the name of each matching FILE (\0-terminated)
--name=N add name N to the list of `free'-like functions to detect;
may be repeated
--help display this help and exit
--version output version information and exit
Exit status:
0 no match
1 one or more matches
2 an error
EXAMPLE:
For example, this command prints all removable "if" tests before "free"
and "kfree" calls in the linux kernel sources:
git ls-files -z |xargs -0 $ME --name=kfree
EOF
}
exit $exit_code;
}
{
sub EXIT_MATCH {0}
sub EXIT_NO_MATCH {1}
sub EXIT_ERROR {2}
my $err = EXIT_NO_MATCH;
my $list;
my @name = qw(free);
GetOptions
(
help => sub { usage 0 },
version => sub { print "$ME version $VERSION\n"; exit },
list => \$list,
'name=s@' => \@name,
) or usage 1;
# Make sure we have the right number of non-option arguments.
# Always tell the user why we fail.
@ARGV < 1
and (warn "$ME: missing FILE argument\n"), usage EXIT_ERROR;
my $or = join '|', @name;
my $regexp = qr/(?:$or)/;
# Set the input record separator.
# Note: this makes it impractical to print line numbers.
$/ = '"';
my $found_match = 0;
FILE:
foreach my $file (@ARGV)
{
open FH, '<', $file
or (warn "$ME: can't open `$file' for reading: $!\n"),
$err = EXIT_ERROR, next;
while (defined (my $line = <FH>))
{
if ($line =~
/\b(if\s*\(\s*(\S+?)(?:\s*!=\s*NULL)?\s*\)
(?: \s*$regexp\s*\(\s*\2\s*\)|
\s*\{\s*$regexp\s*\(\s*\2\s*\)\s*;\s*\}))/sx)
{
$found_match = 1;
$list
and (print "$file\0"), next FILE;
print "$file: $1\n";
}
}
}
continue
{
close FH;
}
$found_match && $err == EXIT_NO_MATCH
and $err = EXIT_MATCH;
exit $err;
}
my $foo = <<'EOF';
# The above is to *find* them.
# This adjusts them, removing the unnecessary "if (p)" part.
# FIXME: do something like this as an option (doesn't do braces):
git ls-files -z |xargs -0 \
perl -0x3b -pi -e 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*NULL)?\s*\)\s+(k?free\s*\(\s*\1\s*\))/$2/s'
useless-if-before-free -l $(lid -knone free) | xargs -0 \
perl -0x3b -pi -e \
's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*NULL)?\s*\)\s+(free\s*\(\s*\1\s*\))/$2/s'
Be careful that the result of the above transformation is valid.
If the matched string is followed by "else", then obviously, it won't be.
When modifying files, refuse to process anything other than a regular file.
EOF
## Local Variables:
## indent-tabs-mode: nil
## eval: (add-hook 'write-file-hooks 'time-stamp)
## time-stamp-start: "my $VERSION = '"
## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
## time-stamp-time-zone: "UTC"
## time-stamp-end: "'; # UTC"
## End:

57
build-aux/vc-list-files Executable file
View File

@ -0,0 +1,57 @@
#!/bin/sh
# List version-controlled file names.
# Copyright (C) 2006-2008 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# List the specified version-controlled files.
# With no argument, list them all. With a single DIRECTORY argument,
# list the version-controlled files in that directory.
# This script must be run solely from the top of a $srcdir build directory.
# If there's an argument, it must be a single, "."-relative directory name.
# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
dir=
case $# in
0) ;;
1) dir=$1 ;;
*) echo "$0: too many arguments" 1>&2
echo "Usage: $0 [DIR]" 1>&2; exit 1;;
esac
test "x$dir" = x && dir=.
if test -d .git; then
exec git ls-files "$dir"
elif test -d .hg; then
exec hg locate "$dir/*"
elif test -d CVS; then
if test -x build-aux/cvsu; then
build-aux/cvsu --find --types=AFGM "$dir"
else
awk -F/ '{ \
if (!$1 && $3 !~ /^-/) { \
f=FILENAME; \
sub(/CVS\/Entries/, "", f); \
print f $2; \
}}' \
$(find ${*-*} -name Entries -print) /dev/null;
fi
else
echo "$0: Failed to determine type of version control used in "`pwd` 1>&2
exit 1
fi

View File

@ -1,61 +0,0 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if the C compiler supports function prototypes. */
#undef PROTOTYPES
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define like PROTOTYPES; this can be used by system headers. */
#undef __PROTOTYPES

File diff suppressed because it is too large Load Diff

View File

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

BIN
docs/16favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

BIN
docs/32favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

View File

@ -1,239 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>API Alphabetic Index A-f for libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>API Alphabetic Index A-f for libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="libvir.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-f</a>
<a href="APIchunk1.html">g-s</a>
<a href="APIchunk2.html">t-z</a>
</h2><h2>Letter A:</h2><dl><dt>ABI</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>API</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>APIs</dt><dd><a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd></dl><h2>Letter C:</h2><dl><dt>CPU</dt><dd><a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>Collect</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
</dd></dl><h2>Letter D:</h2><dl><dt>Destroy</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>Domain0</dt><dd><a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>Dynamically</dt><dd><a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd></dl><h2>Letter E:</h2><dl><dt>Extract</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd></dl><h2>Letter F:</h2><dl><dt>Free</dt><dd><a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
</dd></dl><h2>Letter G:</h2><dl><dt>Get</dt><dd><a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd></dl><h2>Letter H:</h2><dl><dt>Hypervisor</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
</dd></dl><h2>Letter I:</h2><dl><dt>IDs</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
</dd><dt>Informations</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd></dl><h2>Letter K:</h2><dl><dt>KBytes</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd></dl><h2>Letter L:</h2><dl><dt>Launch</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>Linux</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd></dl><h2>Letter M:</h2><dl><dt>Macro</dt><dd><a href="html/libvir-libvir.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
</dd></dl><h2>Letter N:</h2><dl><dt>NOTE:</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>NULL</dt><dd><a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>Note</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd></dl><h2>Letter O:</h2><dl><dt>OUT</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter P:</h2><dl><dt>Provide</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>Provides</dt><dd><a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter R:</h2><dl><dt>Read-Only</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>Resume</dt><dd><a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
</dd><dt>Retrieve</dt><dd><a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
</dd></dl><h2>Letter S:</h2><dl><dt>Shutdown</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>Suspends</dt><dd><a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd></dl><h2>Letter T:</h2><dl><dt>TODO:</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>This</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>Try</dt><dd><a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd></dl><h2>Letter U:</h2><dl><dt>UTF-8</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>Use</dt><dd><a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd></dl><h2>Letter X:</h2><dl><dt>XML</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>Xen</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter a:</h2><dl><dt>about</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>access</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>active</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>add</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>after</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>against</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>alive</dt><dd><a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
</dd><dt>all</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>allocated</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>allowed</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>already</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>amount</dt><dd><a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>application</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>are</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>argument</dt><dd><a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>array</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
</dd><dt>assumed</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>available</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>availble</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter b:</h2><dl><dt>back</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>based</dt><dd><a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>being</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>below</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>but</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd></dl><h2>Letter c:</h2><dl><dt>call</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>called</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>caller</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>calling</dt><dd><a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
</dd><dt>can</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>capacities</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>change</dt><dd><a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>changes</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>check</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>clients</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>closes</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
</dd><dt>code</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>collect</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
</dd><dt>command</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>compiled</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>connection</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>currently</dt><dd><a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd></dl><h2>Letter d:</h2><dl><dt>data</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
</dd><dt>deallocated</dt><dd><a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>defined</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>description</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>doable</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>does</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>domains</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
</dd><dt>down</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
</dd></dl><h2>Letter e:</h2><dl><dt>encoded</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>error</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>especially</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
</dd><dt>extracted</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>extraction</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd></dl><h2>Letter f:</h2><dl><dt>failure</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>file</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>find</dt><dd><a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
</dd><dt>first</dt><dd><a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>flags</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>for</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>format</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>found</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
</dd><dt>free</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>freed</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
</dd><dt>from</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
</dd><dt>frozen</dt><dd><a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>full</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>function</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>further</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-f</a>
<a href="APIchunk1.html">g-s</a>
<a href="APIchunk2.html">t-z</a>
</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

View File

@ -1,245 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>API Alphabetic Index g-s for libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>API Alphabetic Index g-s for libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="libvir.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-f</a>
<a href="APIchunk1.html">g-s</a>
<a href="APIchunk2.html">t-z</a>
</h2><h2>Letter g:</h2><dl><dt>general</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>get</dt><dd><a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
</dd><dt>given</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>guest</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd></dl><h2>Letter h:</h2><dl><dt>have</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>hypervisor</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter i:</h2><dl><dt>image</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>information</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>informations</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>initrd</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>instance</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>int</dt><dd><a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
</dd><dt>interaction</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
</dd><dt>its</dt><dd><a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd></dl><h2>Letter k:</h2><dl><dt>kept</dt><dd><a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
</dd><dt>kernel</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>kilobytes</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>knowing</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd></dl><h2>Letter l:</h2><dl><dt>lack</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>level</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>library</dt><dd><a href="html/libvir-libvir.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>lifetime</dt><dd><a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>limited</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>line</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>list</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
</dd><dt>long</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>lookup</dt><dd><a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd></dl><h2>Letter m:</h2><dl><dt>major</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>maximum</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>may</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>memory</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>micro</dt><dd><a href="html/libvir-libvir.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
</dd><dt>minor</dt><dd><a href="html/libvir-libvir.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>monitoring</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
</dd><dt>must</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd></dl><h2>Letter n:</h2><dl><dt>name</dt><dd><a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>need</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>needed</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
</dd><dt>new</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>not</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>number</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
</dd></dl><h2>Letter o:</h2><dl><dt>object</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>one</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>only</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>operation</dt><dd><a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd><dt>option</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>optional</dt><dd><a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>otherwise</dt><dd><a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter p:</h2><dl><dt>padding</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>parameters</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>partial</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>pass</dt><dd><a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>path</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>physical</dt><dd><a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>pointer</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</dd><dt>private</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>priviledged</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>process</dt><dd><a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>protection</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>providing</dt><dd><a href="html/libvir-libvir.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
</dd><dt>public</dt><dd><a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>publicly</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd></dl><h2>Letter r:</h2><dl><dt>reactivate</dt><dd><a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>read-only</dt><dd><a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>reboot</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>release</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>requires</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>reserved</dt><dd><a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>resources</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>restarted</dt><dd><a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
</dd><dt>restricted</dt><dd><a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>return</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>returned</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>returns</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>running</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
</dd><dt>runs</dt><dd><a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd></dl><h2>Letter s:</h2><dl><dt>same</dt><dd><a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>set</dt><dd><a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>should</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>shutdown</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
</dd><dt>size</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>software</dt><dd><a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
</dd><dt>state</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
</dd><dt>static</dt><dd><a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
</dd><dt>stay</dt><dd><a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>still</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>stopped</dt><dd><a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>store</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>string</dt><dd><a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd><dt>structure</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>subject</dt><dd><a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>success</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>suspended</dt><dd><a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
</dd><dt>system</dt><dd><a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-f</a>
<a href="APIchunk1.html">g-s</a>
<a href="APIchunk2.html">t-z</a>
</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

View File

@ -1,87 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>API Alphabetic Index t-z for libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>API Alphabetic Index t-z for libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="libvir.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2 align="center"><a href="APIchunk0.html">A-f</a>
<a href="APIchunk1.html">g-s</a>
<a href="APIchunk2.html">t-z</a>
</h2><h2>Letter t:</h2><dl><dt>term</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>terminated</dt><dd><a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd><dt>that</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
</dd><dt>their</dt><dd><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
</dd><dt>then</dt><dd><a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>there</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>thereafter</dt><dd><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
</dd><dt>this</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>two</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>type</dt><dd><a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd></dl><h2>Letter u:</h2><dl><dt>unimplemented</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>unknown</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>unsigned</dt><dd><a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
</dd><dt>unused</dt><dd><a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>usable</dt><dd><a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
</dd><dt>used</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>user</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd></dl><h2>Letter v:</h2><dl><dt>value</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>values</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>version</dt><dd><a href="html/libvir-libvir.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>virDomainFlags</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd><dt>virDomainInfo</dt><dd><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</dd><dt>virDomainResume</dt><dd><a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>virSuspendDomain</dt><dd><a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
</dd></dl><h2>Letter w:</h2><dl><dt>was</dt><dd><a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>what</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd><dt>where</dt><dd><a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</dd><dt>which</dt><dd><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>while</dt><dd><a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>will</dt><dd><a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</dd><dt>with</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>without</dt><dd><a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</dd><dt>work</dt><dd><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
</dd><dt>would</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</dd></dl><h2>Letter x:</h2><dl><dt>xen</dt><dd><a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</dd><dt>xenstore</dt><dd><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</dd></dl><h2>Letter y:</h2><dl><dt>yet</dt><dd><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
</dd></dl><h2>Letter z:</h2><dl><dt>zero</dt><dd><a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
</dd></dl><h2 align="center"><a href="APIchunk0.html">A-f</a>
<a href="APIchunk1.html">g-s</a>
<a href="APIchunk2.html">t-z</a>
</h2><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>List of constructors for libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>List of constructors for libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="libvir.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Type unsigned int:</h2><p><a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
</p><h2>Type unsigned long:</h2><p><a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
</p><h2>Type virConnectPtr:</h2><p><a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
</p><h2>Type virDomainPtr:</h2><p><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>List of Symbols per Module for libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>List of Symbols per Module for libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="libvir.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2><a name="libvir" id="libvir">Module libvir</a>:</h2><p><a href="html/libvir-libvir.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_BLOCKED">VIR_DOMAIN_BLOCKED</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_NOSTATE">VIR_DOMAIN_NOSTATE</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_PAUSED">VIR_DOMAIN_PAUSED</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a><br />
<a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virConnect">virConnect</a><br />
<a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virConnectPtr">virConnectPtr</a><br />
<a href="html/libvir-libvir.html#virDomain">virDomain</a><br />
<a href="html/libvir-libvir.html#virDomainCreateFlags">virDomainCreateFlags</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virDomainInfo">virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainInfoPtr">virDomainInfoPtr</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvir-libvir.html#virDomainPtr">virDomainPtr</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvir-libvir.html#virDomainState">virDomainState</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

View File

@ -1,37 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>List of function manipulating types in libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>List of function manipulating types in libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="libvir.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Type int *:</h2><p><a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
</p><h2>Type unsigned int:</h2><p><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
</p><h2>Type unsigned long:</h2><p><a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
</p><h2>Type unsigned long *:</h2><p><a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</p><h2>Type virConnectPtr:</h2><p><a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
</p><h2>Type virDomainInfoPtr:</h2><p><a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
</p><h2>Type virDomainPtr:</h2><p><a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>Alphabetic List of Symbols in libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>Alphabetic List of Symbols in libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="libvir.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Letter L:</h2><p><a href="html/libvir-libvir.html#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a><br />
</p><h2>Letter V:</h2><p><a href="html/libvir-libvir.html#VIR_DOMAIN_BLOCKED">VIR_DOMAIN_BLOCKED</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_NOSTATE">VIR_DOMAIN_NOSTATE</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_PAUSED">VIR_DOMAIN_PAUSED</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a><br />
<a href="html/libvir-libvir.html#VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a><br />
</p><h2>Letter _:</h2><p><a href="html/libvir-libvir.html#_virDomainInfo">_virDomainInfo</a><br />
</p><h2>Letter v:</h2><p><a href="html/libvir-libvir.html#virConnect">virConnect</a><br />
<a href="html/libvir-libvir.html#virConnectClose">virConnectClose</a><br />
<a href="html/libvir-libvir.html#virConnectGetType">virConnectGetType</a><br />
<a href="html/libvir-libvir.html#virConnectGetVersion">virConnectGetVersion</a><br />
<a href="html/libvir-libvir.html#virConnectListDomains">virConnectListDomains</a><br />
<a href="html/libvir-libvir.html#virConnectNumOfDomains">virConnectNumOfDomains</a><br />
<a href="html/libvir-libvir.html#virConnectOpen">virConnectOpen</a><br />
<a href="html/libvir-libvir.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a><br />
<a href="html/libvir-libvir.html#virConnectPtr">virConnectPtr</a><br />
<a href="html/libvir-libvir.html#virDomain">virDomain</a><br />
<a href="html/libvir-libvir.html#virDomainCreateFlags">virDomainCreateFlags</a><br />
<a href="html/libvir-libvir.html#virDomainCreateLinux">virDomainCreateLinux</a><br />
<a href="html/libvir-libvir.html#virDomainDestroy">virDomainDestroy</a><br />
<a href="html/libvir-libvir.html#virDomainFree">virDomainFree</a><br />
<a href="html/libvir-libvir.html#virDomainGetID">virDomainGetID</a><br />
<a href="html/libvir-libvir.html#virDomainGetInfo">virDomainGetInfo</a><br />
<a href="html/libvir-libvir.html#virDomainGetMaxMemory">virDomainGetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainGetName">virDomainGetName</a><br />
<a href="html/libvir-libvir.html#virDomainGetOSType">virDomainGetOSType</a><br />
<a href="html/libvir-libvir.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a><br />
<a href="html/libvir-libvir.html#virDomainInfo">virDomainInfo</a><br />
<a href="html/libvir-libvir.html#virDomainInfoPtr">virDomainInfoPtr</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByID">virDomainLookupByID</a><br />
<a href="html/libvir-libvir.html#virDomainLookupByName">virDomainLookupByName</a><br />
<a href="html/libvir-libvir.html#virDomainPtr">virDomainPtr</a><br />
<a href="html/libvir-libvir.html#virDomainResume">virDomainResume</a><br />
<a href="html/libvir-libvir.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a><br />
<a href="html/libvir-libvir.html#virDomainShutdown">virDomainShutdown</a><br />
<a href="html/libvir-libvir.html#virDomainState">virDomainState</a><br />
<a href="html/libvir-libvir.html#virDomainSuspend">virDomainSuspend</a><br />
<a href="html/libvir-libvir.html#virGetVersion">virGetVersion</a><br />
</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

View File

@ -7,7 +7,7 @@ function translate(str) {
sub(/[0-9][0-9][0-9][0-9][0-9]+/, "<bug number='&'/>", str)
return(str)
}
BEGIN {
BEGIN {
nb_entry = 0
in_entry = 0
in_item = 0
@ -20,7 +20,7 @@ END {
print "</log>"
}
/^[ \t]*$/ { next }
/^[A-Za-z0-9]/ {
/^[A-Za-z0-9]/ {
match($0, "\(.*\) \([A-Z]+\) \([0-9][0-9][0-9][0-9]\) \(.*\) <\(.*\)>", loge)
if (in_item == 1) printf("%s</item>\n", translate(item))
if (in_entry == 1) print " </entry>"
@ -41,7 +41,7 @@ END {
match($0, "[ \t]*. *\(.*\)", loge)
item = loge[1]
}
/^[ \t]*[a-zA-Z0-9\#]/ {
/^[ \t]*[a-zA-Z0-9\#]/ {
if (in_item == 1) {
match($0, "[ \t]*\(.*\)[ \t]*", loge)
item = sprintf("%s %s", item, loge[1])

View File

@ -11,7 +11,7 @@
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:param name="module">libvir</xsl:param>
<xsl:param name="module">libvirt</xsl:param>
<!-- The table of content for the HTML page -->
<xsl:variable name="menu_name">API Menu</xsl:variable>
@ -24,7 +24,7 @@
<ul><!-- style="margin-left: -1em" -->
<li><a style="font-weight:bold"
href="{$href_base}index.html">Main Menu</a></li>
<li><a style="font-weight:bold"
<li><a style="font-weight:bold"
href="{$href_base}html/index.html">Modules Index</a></li>
<li><a style="font-weight:bold"
href="index.html">API Menu</a></li>
@ -35,13 +35,13 @@
<a href="https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id={@number}">
<xsl:value-of select="@number"/></a>
</xsl:template>
<xsl:template match="item">
<li><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="entry">
<p>
<b><xsl:value-of select="@who"/></b>
<xsl:text> </xsl:text>
@ -58,51 +58,27 @@
<xsl:variable name="title">ChangeLog last entries of <xsl:value-of select="$module"/></xsl:variable>
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates select="entry"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<body>
<div id="container">
<div id="intro">
<div id="adjustments"/>
<div id="pageHeader"/>
<div id="content2">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<xsl:apply-templates select="entry"/>
</div>
</div>
<xsl:call-template name="linkList2"/>
<xsl:call-template name="bottom"/>
</div>
</body>
</html>
</xsl:template>

View File

@ -1,56 +1,58 @@
<?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="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>FAQ</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>FAQ</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><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="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>Table of Contents:</p><ul><li><a href="FAQ.html#License">License(s)</a></li>
<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>FAQ</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">FAQ</h1><p>Table of Contents:</p><ul><li><a href="FAQ.html#License">License(s)</a></li>
<li><a href="FAQ.html#Installati">Installation</a></li>
<li><a href="FAQ.html#Compilatio">Compilation</a></li>
<li><a href="FAQ.html#Developer">Developer corner</a></li>
</ul><h3><a name="License" id="License">License</a>(s)</h3><ol><li><em>Licensing Terms for libvir</em>
<p>libvir is released under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU Lesser
</ul><h3><a name="License" id="License">License</a>(s)</h3><ol><li><em>Licensing Terms for libvirt</em>
<p>libvirt is released under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU Lesser
General Public License</a>, see the file COPYING.LIB in the distribution
for the precise wording. The only library that libvir depends upon is the
Xen store access library which is also licenced under the LGPL.</p>
for the precise wording. The only library that libvirt depends upon is
the Xen store access library which is also licenced under the LGPL.</p>
</li>
<li><em>Can I embed libvir in a proprietary application ?</em>
<p>Yes. The LGPL allows you to embed libvir into a proprietary
<li><em>Can I embed libvirt in a proprietary application ?</em>
<p>Yes. The LGPL allows you to embed libvirt into a proprietary
application. It would be graceful to send-back bug fixes and improvements
as patches for possible incorporation in the main development tree. It
will decrease your maintainance costs anyway if you do so.</p>
</li>
</ol><h3><a name="Installati" id="Installati">Installation</a></h3><ol><li><em>Where can I get libvir</em> ?
<p>The original distribution comes from <a href="ftp://libvir.org/libvir/">ftp://libvir.org/libvir/</a>.</p>
</ol><h3><a name="Installati" id="Installati">Installation</a></h3><ol><li><em>Where can I get libvirt</em> ?
<p>The original distribution comes from <a href="ftp://libvirt.org/libvirt/">ftp://libvirt.org/libvirt/</a>.</p>
</li>
<li><em>I can't install the libvir/libvir-devel RPM packages due to failed
dependencies</em>
<li><em>I can't install the libvirt/libvirt-devel RPM packages due to
failed dependencies</em>
<p>The most generic solution is to re-fetch the latest src.rpm , and
rebuild it locally with</p>
<p><code>rpm --rebuild libvir-xxx.src.rpm</code>.</p>
<p><code>rpm --rebuild libvirt-xxx.src.rpm</code>.</p>
<p>If everything goes well it will generate two binary rpm packages (one
providing the shared libs and virsh, and the other one, the -devel
package, providing includes, static libraries and scripts needed to build
applications with libvir that you can install locally.</p>
applications with libvirt that you can install locally.</p>
<p>One can also rebuild the RPMs from a tarball:</p>
<p><code>rpmbuild -ta libdir-xxx.tar.gz</code></p>
<p>Or from a configured tree with:</p>
<p><code>make rpm</code></p>
</li>
<li><em>Failure to use the API for non-root users</em>
<p>Large parts of the API are only accessible as root, however the read
only access to the xenstore data doesnot have to be forbidden to user, at
least for monitoring purposes. If "virsh info" fails to run as an user,
change the mode of the xenstore read-only socket with:</p>
<p>Large parts of the API may only be accessible with root priviledges,
however the read only access to the xenstore data doesnot have to be
forbidden to user, at least for monitoring purposes. If "virsh dominfo"
fails to run as an user, change the mode of the xenstore read-only socket
with:</p>
<p><code>chmod 666 /var/run/xenstored/socket_ro</code></p>
<p>and also make sure that the Xen Daemon is running correctly with local
HTTP server enabled, this is defined in
<code>/etc/xen/xend-config.sxp</code> which need the following line to be
enabled:</p>
<p><code>(xend-http-server yes)</code></p>
<p>If needed restart the xend daemon after making the change with the
following command run as root:</p>
<p><code>service xend restart</code></p>
</li>
</ol><h3><a name="Compilatio" id="Compilatio">Compilation</a></h3><ol><li><em>What is the process to compile libvir ?</em>
<p>As most UNIX libraries libvir follows the "standard":</p>
<p><code>gunzip -c libvir-xxx.tar.gz | tar xvf -</code></p>
<p><code>cd libvir-xxxx</code></p>
</ol><h3><a name="Compilatio" id="Compilatio">Compilation</a></h3><ol><li><em>What is the process to compile libvirt ?</em>
<p>As most UNIX libraries libvirt follows the "standard":</p>
<p><code>gunzip -c libvirt-xxx.tar.gz | tar xvf -</code></p>
<p><code>cd libvirt-xxxx</code></p>
<p><code>./configure --help</code></p>
<p>to see the options, then the compilation/installation proper</p>
<p><code>./configure [possible options]</code></p>
@ -59,8 +61,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<p>At that point you may have to rerun ldconfig or a similar utility to
update your list of installed shared libs.</p>
</li>
<li><em>What other libraries are needed to compile/install libvir ?</em>
<p>Libvir requires libxenstore, which is usually provided by the xen
<li><em>What other libraries are needed to compile/install libvirt ?</em>
<p>Libvirt requires libxenstore, which is usually provided by the xen
packages as well as the public headers to compile against libxenstore.</p>
</li>
<li><em>I use the CVS version and there is no configure script</em>
@ -69,10 +71,10 @@ A:link, A:visited, A:active { text-decoration: underline }
like:</p>
<p><code>./autogen.sh --prefix=/usr --disable-shared</code></p>
</li>
</ol><h3><a name="Developer" id="Developer">Developer</a> corner</h3><ol><li><em>Troubles compiling or linking programs using libvir</em>
<p>To simplify the process of reusing the library, libvir comes with
</ol><h3><a name="Developer" id="Developer">Developer</a> corner</h3><ol><li><em>Troubles compiling or linking programs using libvirt</em>
<p>To simplify the process of reusing the library, libvirt comes with
pkgconfig support, which can be used directly from autoconf support or
via the pkg-config command line tool, like:</p>
<p><code>pkg-config libvir --libs</code></p>
<p><code>pkg-config libvirt --libs</code></p>
</li>
</ol><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
</ol></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Bindings for other languages</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="windows.html">Windows support</a></li><li><a href="remote.html">Remote support</a></li><li><a href="auth.html">Access control</a></li><li><a href="uri.html">Connection URIs</a></li><li><a href="hvsupport.html">Hypervisor support</a></li><li><a href="storage.html">Storage Management</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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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,22 +1,76 @@
## Process this file with automake to produce Makefile.in
SUBDIRS=
SUBDIRS= . examples devhelp
# The directory containing the source code (if it contains documentation).
DOC_SOURCE_DIR=../src
PAGES= index.html bugs.html FAQ.html
APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \
APIsymbols.html APIchunk0.html
EXTRA_DIST= \
libvir-api.xml libxen-refs.xml apibuild.py \
*.xsl *.html *.gif html/*.html html/*.png
PAGES= index.html bugs.html FAQ.html remote.html
man_MANS=
all: web $(man_MANS)
html = \
book1.html \
index.html \
libvirt-conf.html \
libvirt-lib.html \
libvirt-libvirt.html \
libvirt-virterror.html
api: libvir-api.xml libvir-refs.xml $(APIPAGES) $(srcdir)/html/index.html
png = \
left.png \
up.png \
home.png \
right.png
gif = \
Libxml2-Logo-90x34.gif \
architecture.gif \
node.gif \
redhat.gif
dot_html = \
FAQ.html \
architecture.html \
bugs.html \
downloads.html \
errors.html \
format.html \
hvsupport.html \
index.html \
intro.html \
libvir.html \
news.html \
python.html \
remote.html \
uri.html
xml = \
libvirt-api.xml \
libvirt-refs.xml \
testdomfc4.xml \
testdomfv0.xml \
testnetdef.xml \
testnetpriv.xml \
testnode.xml
rng = \
libvirt.rng \
network.rng
EXTRA_DIST= \
libvirt-api.xml libvirt-refs.xml apibuild.py \
site.xsl newapi.xsl news.xsl \
$(dot_html) $(gif) html \
$(xml) $(rng)
all: web $(top_builddir)/NEWS $(man_MANS)
virsh.1: virsh.pod
pod2man -c "Virtualization Support" $(srcdir)/virsh.pod > $@-t
mv $@-t $@
cp $@ $(top_builddir)
api: libvirt-api.xml libvirt-refs.xml $(srcdir)/html/index.html
web: $(PAGES)
@ -29,38 +83,42 @@ $(PAGES): libvir.html site.xsl
$(XMLLINT) --nonet --valid --noout $(PAGES) ; fi );
$(APIPAGES): libvir-api.xml libvir-refs.xml $(top_srcdir)/docs/site.xsl $(top_srcdir)/docs/api.xsl
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the HTML API pages from libvir-refs.xml" ; \
$(XSLTPROC) --nonet --html $(top_srcdir)/docs/api.xsl \
$(top_srcdir)/docs/libvir.html ; fi );
-@(if [ -x $(XMLLINT) ] ; then \
echo "Validating the HTML API pages" ; \
$(XMLLINT) --nonet --valid --noout API*.html ; fi );
$(srcdir)/html/index.html: libvir-api.xml $(srcdir)/newapi.xsl
$(srcdir)/html/index.html: libvirt-api.xml $(srcdir)/newapi.xsl
-@(if [ -x $(XSLTPROC) ] ; then \
echo "Rebuilding the HTML pages from the XML API" ; \
$(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvir-api.xml ; fi )
$(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
-@(if [ -x $(XMLLINT) ] ; then \
echo "Validating the resulting XHTML pages" ; \
$(XMLLINT) --nonet --valid --noout html/*.html ; fi );
libvir-api.xml libvir-refs.xml: apibuild.py ../include/*.h ../src/*.h ../src/*.c
libvirt-api.xml libvirt-refs.xml: apibuild.py \
$(srcdir)/../include/libvirt/*.h \
$(srcdir)/../src/*.h $(srcdir)/../src/*.c
-(./apibuild.py)
$(top_builddir)/NEWS: $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html
-@(if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) --nonet $(top_srcdir)/docs/news.xsl $(top_srcdir)/docs/news.html > $(top_builddir)/NEWS ; fi );
clean-local:
rm -f *~ *.bak *.hierarchy *.signals *-unused.txt
maintainer-clean-local: clean-local
rm -rf libvir-api.xml libvir-refs.xml
rm -rf libvirt-api.xml libvirt-refs.xml
rebuild: api all
install-data-local:
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html $(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif $(DESTDIR)$(HTML_DIR)
-@INSTALL@ -m 0644 $(srcdir)/libvir.html $(srcdir)/FAQ.html \
$(srcdir)/redhat.gif $(srcdir)/Libxml2-Logo-90x34.gif \
$(DESTDIR)$(HTML_DIR)
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)/html
-@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(HTML_DIR)/html
-@INSTALL@ -m 0644 $(srcdir)/html/*.png $(DESTDIR)$(HTML_DIR)/html
for h in $(html); do \
$(INSTALL) -m 0644 $(srcdir)/html/$$h $(DESTDIR)$(HTML_DIR)/html; done
for p in $(png); do \
$(INSTALL) -m 0644 $(srcdir)/html/$$p $(DESTDIR)$(HTML_DIR)/html; done
uninstall-local:
for h in $(html); do rm $(DESTDIR)$(HTML_DIR)/html/$$h; done
for p in $(png); do rm $(DESTDIR)$(HTML_DIR)/html/$$p; done

View File

@ -1,394 +0,0 @@
<?xml version="1.0"?>
<!-- this stylesheet builds the API*.html , it works based on libvir-refs.xml
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
exclude-result-prefixes="exsl">
<!-- Import the rest of the site stylesheets -->
<xsl:import href="site.xsl"/>
<!-- Generate XHTML-1.0 transitional -->
<xsl:output method="xml" encoding="ISO-8859-1" indent="yes"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
<xsl:variable name="href_base" select="''"/>
<xsl:variable name="apirefs" select="document('libvir-refs.xml')"/>
<xsl:variable name="module" select="$apirefs/apirefs/@name"/>
<xsl:key name="refhref" match="reference" use="@name"/>
<xsl:template match="ref" mode="anchor">
<xsl:variable name="name" select="@name"/>
<xsl:for-each select="document('libvir-refs.xml')">
<a href="{key('refhref', $name)/@href}"><xsl:value-of select="$name"/></a><br/>
</xsl:for-each>
</xsl:template>
<xsl:template match="type" mode="reflist">
<h2>Type <xsl:value-of select="@name"/>:</h2>
<p>
<xsl:for-each select="ref">
<xsl:apply-templates mode="anchor" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</p>
</xsl:template>
<xsl:template match="letter" mode="reflist">
<h2>Letter <xsl:value-of select="@name"/>:</h2>
<p>
<xsl:for-each select="ref">
<xsl:apply-templates mode="anchor" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</p>
</xsl:template>
<xsl:template match="file" mode="reflist">
<h2><a name="{@name}">Module <xsl:value-of select="@name"/></a>:</h2>
<p>
<xsl:for-each select="ref">
<xsl:apply-templates mode="anchor" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</p>
</xsl:template>
<xsl:template match="letter" mode="wordlist">
<h2>Letter <xsl:value-of select="@name"/>:</h2>
<dl>
<xsl:for-each select="word">
<dt><xsl:value-of select="@name"/></dt>
<dd>
<xsl:for-each select="ref">
<xsl:apply-templates mode="anchor" select="."/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</dd>
</xsl:for-each>
</dl>
</xsl:template>
<xsl:template match="constructors">
<xsl:message>Generating API Constructors</xsl:message>
<xsl:variable name="title">List of constructors for <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="APIconstructors.html" method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates mode="reflist" select="type"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="files">
<xsl:message>Generating API List of synbols per file</xsl:message>
<xsl:variable name="title">List of Symbols per Module for <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="APIfiles.html" method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates mode="reflist" select="file"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="functions">
<xsl:message>Generating API Functions by Type</xsl:message>
<xsl:variable name="title">List of function manipulating types in <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="APIfunctions.html" method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates mode="reflist" select="type"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="alpha">
<xsl:message>Generating API Alphabetic list</xsl:message>
<xsl:variable name="title">Alphabetic List of Symbols in <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="APIsymbols.html" method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:apply-templates mode="reflist" select="letter"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template name="apichunks">
<h2 align="center">
<xsl:for-each select="/apirefs/index/chunks/chunk">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="start" select="@start"/>
<xsl:variable name="end" select="@end"/>
<xsl:variable name="block" select="concat($start, '-', $end)"/>
<a href="API{$name}.html"><xsl:value-of select="$block"/></a>
<xsl:text>
</xsl:text>
</xsl:for-each>
</h2>
</xsl:template>
<xsl:template match="chunk">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="start" select="@start"/>
<xsl:variable name="end" select="@end"/>
<xsl:variable name="block" select="concat($start, '-', $end)"/>
<xsl:variable name="target" select="/apirefs/index/chunk[@name = $name]"/>
<xsl:variable name="title">API Alphabetic Index <xsl:value-of select="$block"/> for <xsl:value-of select="$module"/></xsl:variable>
<xsl:document href="API{$name}.html" method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<xsl:call-template name="develtoc"/>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<xsl:call-template name="apichunks"/>
<xsl:apply-templates mode="wordlist"
select="$target/letter"/>
<xsl:call-template name="apichunks"/>
<p><a href="{$href_base}bugs.html">Daniel Veillard</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
</xsl:document>
</xsl:template>
<xsl:template match="index">
<xsl:message>Generating API Index</xsl:message>
<xsl:apply-templates select="chunks/chunk"/>
</xsl:template>
<xsl:template match="apirefs">
<xsl:message>Generating API Cross References</xsl:message>
<xsl:apply-templates select="constructors"/>
<xsl:apply-templates select="functions"/>
<xsl:apply-templates select="alpha"/>
<xsl:apply-templates select="files"/>
<xsl:apply-templates select="index"/>
</xsl:template>
<xsl:template match="/">
<xsl:apply-templates select="$apirefs/apirefs"/>
</xsl:template>
</xsl:stylesheet>

View File

@ -17,11 +17,11 @@ debugsym=None
#
# C parser analysis code
#
ignored_files = {
"virsh.c": "testing tool",
"hash.c": "internal hash table stuff",
"hash.h": "internal hash table stuff",
"internal.h": "internal includes and defines",
included_files = {
"libvirt.h": "header with general libvirt API definitions",
"virterror.h": "header with error specific API definitions",
"libvirt.c": "Main interfaces for the libvirt library",
"virterror.c": "implements error handling and reporting code for libvirt",
}
ignored_words = {
@ -311,7 +311,7 @@ class index:
self.analyze_dict("structs", self.structs)
self.analyze_dict("typedefs", self.typedefs)
self.analyze_dict("macros", self.macros)
class CLexer:
"""A lexer for the C language, tokenize the input by reading and
analyzing it line by line"""
@ -343,7 +343,7 @@ class CLexer:
else:
line = line + n
return line
def getlineno(self):
return self.lineno
@ -512,12 +512,12 @@ class CLexer:
else:
break
self.tokens.append(('name', line[s:i]))
tok = self.tokens[0]
self.tokens = self.tokens[1:]
self.last = tok
return tok
class CParser:
"""The C module parser"""
def __init__(self, filename, idx = None):
@ -672,7 +672,7 @@ class CParser:
l = string.strip(l)
desc = desc + " " + l
del lines[0]
desc = string.strip(desc)
if quiet == 0:
@ -742,7 +742,7 @@ class CParser:
l = string.strip(l)
desc = desc + " " + l
del lines[0]
desc = string.strip(desc)
if quiet == 0:
@ -843,7 +843,7 @@ class CParser:
else:
desc = desc + " " + l
del lines[0]
retdesc = string.strip(retdesc)
desc = string.strip(desc)
@ -921,7 +921,7 @@ class CParser:
try:
self.defines.append(apstr)
if string.find(apstr, 'ENABLED') != -1:
self.conditionals.append("defined(%s)" % apstr)
self.conditionals.append("defined(%s)" % apstr)
except:
pass
elif name == "#ifndef":
@ -929,7 +929,7 @@ class CParser:
try:
self.defines.append(apstr)
if string.find(apstr, 'ENABLED') != -1:
self.conditionals.append("!defined(%s)" % apstr)
self.conditionals.append("!defined(%s)" % apstr)
except:
pass
elif name == "#if":
@ -1054,7 +1054,7 @@ class CParser:
return token
token = self.token()
return token
#
# Parse a C code block, used for functions it parse till
# the balancing } included
@ -1089,7 +1089,7 @@ class CParser:
elif oldtok[0] == "name" and oldtok[1][0:7] == "LIBXEN_":
self.index_add_ref(oldtok[1], self.filename,
0, "typedef")
else:
token = self.token()
return token
@ -1222,7 +1222,7 @@ class CParser:
if token == None:
return token
while token[0] == "name" and (
while token[0] == "name" and (
token[1] == "const" or \
token[1] == "unsigned" or \
token[1] == "signed"):
@ -1238,7 +1238,7 @@ class CParser:
else:
self.type = self.type + " " + token[1]
# some read ahead for long long
# some read ahead for long long
oldtmp = token
token = self.token()
if token[0] == "name" and token[1] == "long":
@ -1263,7 +1263,7 @@ class CParser:
self.type = tmp[1]
else:
self.type = self.type + " " + tmp[1]
elif token[0] == "name" and token[1] == "struct":
if self.type == "":
self.type = token[1]
@ -1553,7 +1553,7 @@ class CParser:
token = self.token()
else:
break
return token
def parse(self):
@ -1569,14 +1569,14 @@ class CParser:
return
self.parseTopComment(self.top_comment)
return self.index
class docBuilder:
"""A documentation builder"""
def __init__(self, name, directories=['.'], excludes=[]):
def __init__(self, name, directories=['.'], includes=[]):
self.name = name
self.directories = directories
self.excludes = excludes + ignored_files.keys()
self.includes = includes + included_files.keys()
self.modules = {}
self.headers = {}
self.idx = index()
@ -1645,25 +1645,25 @@ class docBuilder:
for directory in self.directories:
files = glob.glob(directory + "/*.c")
for file in files:
skip = 0
for excl in self.excludes:
if string.find(file, excl) != -1:
skip = 1;
skip = 1
for incl in self.includes:
if string.find(file, incl) != -1:
skip = 0;
break
if skip == 0:
self.modules[file] = None;
files = glob.glob(directory + "/*.h")
for file in files:
skip = 0
for excl in self.excludes:
if string.find(file, excl) != -1:
skip = 1;
skip = 1
for incl in self.includes:
if string.find(file, incl) != -1:
skip = 0;
break
if skip == 0:
self.headers[file] = None;
self.scanHeaders()
self.scanModules()
def modulename_file(self, file):
module = os.path.basename(file)
if module[-2:] == '.h':
@ -1757,7 +1757,7 @@ class docBuilder:
else:
output.write(" <variable name='%s' file='%s'/>\n" % (
name, self.modulename_file(id.header)))
def serialize_function(self, output, name):
id = self.idx.functions[name]
if name == debugsym:
@ -2069,13 +2069,13 @@ class docBuilder:
def rebuild():
builder = None
if glob.glob("../src/libvir.c") != [] :
print "Rebuilding API description for libvir"
builder = docBuilder("libvir", ["../src", "../include"],
if glob.glob("../src/libvirt.c") != [] :
print "Rebuilding API description for libvirt"
builder = docBuilder("libvirt", ["../src", "../include/libvirt"],
[])
elif glob.glob("src/parser.c") != [] :
elif glob.glob("src/libvirt.c") != [] :
print "Rebuilding API description for libvir"
builder = docBuilder("libvir", ["src", "include"],
builder = docBuilder("libvirt", ["src", "include/libvirt"],
[])
else:
print "rebuild() failed, unable to guess the module"

87
docs/architecture.fig Normal file
View File

@ -0,0 +1,87 @@
#FIG 3.2
Landscape
Center
Inches
Letter
100.00
Single
-2
1200 2
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
1050 7500 9375 7500 9375 8700 1050 8700 1050 7500
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
3525 7275 3525 4125 1050 4125 1050 7275 3525 7275
2 1 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
1050 6540 3540 6525
2 4 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
1590 6900 1590 6645 1140 6645 1140 6900 1590 6900
2 4 0 1 0 7 50 -1 -1 4.000 0 0 7 0 0 5
1590 7185 1590 6930 1140 6930 1140 7185 1590 7185
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 1 2
1 1 2.00 120.00 240.00
1 1 2.00 120.00 240.00
1875 7725 8625 7725
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
1650 5625 3000 5625 3000 6375 1650 6375 1650 5625
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
2850 7725 2850 6375
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
6450 7275 6450 4125 3975 4125 3975 7275 6450 7275
2 4 0 1 0 7 50 -1 -1 0.000 0 0 7 0 0 5
9300 7275 9300 4125 6825 4125 6825 7275 9300 7275
2 1 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
3975 6540 6465 6525
2 1 1 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2
6825 6540 9315 6525
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
5400 7725 5400 7050
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
8025 7725 8025 7050
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
1050 8925 9375 8925 9375 9900 1050 9900 1050 8925
2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5
2100 4575 3450 4575 3450 5325 2100 5325 2100 4575
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
3225 5325 3225 8325
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
6225 6900 6225 8250
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
8925 6900 8925 8250
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
1725 7125 1725 8325
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 1 2
1 1 2.00 120.00 240.00
1 1 2.00 120.00 240.00
2850 5850 2850 5025
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
5175 8475 5175 9375
2 1 1 3 0 7 50 -1 -1 2.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
1350 7125 1350 9450
2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 2.00 120.00 240.00
2325 7725 2325 7200
2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 1
900 3975
2 1 1 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 1
9525 9975
4 0 0 50 -1 0 18 0.0000 4 195 870 4350 7980 XenBus\001
4 0 0 50 -1 0 18 0.0000 4 195 780 1680 6870 drivers\001
4 0 0 50 -1 0 18 0.0000 4 195 1050 1800 6075 XenStore\001
4 0 0 50 -1 0 18 0.0000 4 195 900 1875 7125 Kernel0\001
4 0 0 50 -1 0 18 0.0000 4 195 960 4875 6975 KernelU\001
4 0 0 50 -1 0 18 0.0000 4 195 960 7650 6975 KernelU\001
4 0 0 50 -1 0 18 0.0000 4 255 1740 4050 8400 Xen Hypervisor\001
4 0 0 50 -1 0 18 0.0000 4 195 585 2325 4950 Xend\001
4 0 0 50 -1 0 18 0.0000 4 195 690 1200 4725 Dom0\001
4 0 0 50 -1 0 18 0.0000 4 195 750 4875 5325 DomU\001
4 0 0 50 -1 0 18 0.0000 4 195 750 7650 5325 DomU\001
4 0 0 50 -1 0 18 0.0000 4 195 1080 3750 9450 Hardware\001

BIN
docs/architecture.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -1,10 +1,67 @@
<?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="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>libvir architecture</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>libvir architecture</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">ChangeLog</a></li><li><a href="architecture.html">libvir architecture</a></li><li><a href="libvir.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>libvirt architecture</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">libvirt architecture</h1><p>Currently libvirt supports 2 kind of virtualization, and its
internal structure is based on a driver model which simplifies adding new
engines:</p><ul><li><a href="#Xen">Xen hypervisor</a></li>
<li><a href="#QEmu">QEmu and KVM based virtualization</a></li>
<li><a href="#drivers">the driver architecture</a></li>
</ul><h3><a name="Xen" id="Xen">Libvirt Xen support</a></h3><p>When running in a Xen environment, programs using libvirt have to execute
in "Domain 0", which is the primary Linux OS loaded on the machine. That OS
kernel provides most if not all of the actual drivers used by the set of
domains. It also runs the Xen Store, a database of informations shared by the
hypervisor, the kernels, the drivers and the xen daemon. Xend. The xen daemon
supervise the control and execution of the sets of domains. The hypervisor,
drivers, kernels and daemons communicate though a shared system bus
implemented in the hypervisor. The figure below tries to provide a view of
this environment:</p><img src="architecture.gif" alt="The Xen architecture" /><p>The library can be initialized in 2 ways depending on the level of
priviledge of the embedding program. If it runs with root access,
virConnectOpen() can be used, it will use three different ways to connect to
the Xen infrastructure:</p><ul><li>a connection to the Xen Daemon though an HTTP RPC layer</li>
<li>a read/write connection to the Xen Store</li>
<li>use Xen Hypervisor calls</li>
<li>when used as non-root libvirt connect to a proxy daemon running
as root and providing read-only support</li>
</ul><p>The library will usually interact with the Xen daemon for any operation
changing the state of the system, but for performance and accuracy reasons
may talk directly to the hypervisor when gathering state informations at
least when possible (i.e. when the running program using libvirt has root
priviledge access).</p><p>If it runs without root access virConnectOpenReadOnly() should be used to
connect to initialize the library. It will then fork a libvirt_proxy
program running as root and providing read_only access to the API, this is
then only useful for reporting and monitoring.</p><h3><a name="QEmu" id="QEmu">Libvirt QEmu and KVM support</a></h3><p>The model for QEmu and KVM is completely similar, basically KVM is based
on QEmu for the process controlling a new domain, only small details differs
between the two. In both case the libvirt API is provided by a controlling
process forked by libvirt in the background and which launch and control the
QEmu or KVM process. That program called libvirt_qemud talks though a specific
protocol to the library, and connects to the console of the QEmu process in
order to control and report on its status. Libvirt tries to expose all the
emulations models of QEmu, the selection is done when creating the new
domain, by specifying the architecture and machine type targetted.</p><p>The code controlling the QEmu process is available in the
<code>qemud/</code> directory.</p><h3><a name="drivers" id="drivers">the driver based architecture</a></h3><p>As the previous section explains, libvirt can communicate using different
channels with the current hypervisor, and should also be able to use
different kind of hypervisor. To simplify the internal design, code, ease
maintainance and simplify the support of other virtualization engine the
internals have been structured as one core component, the libvirt.c module
acting as a front-end for the library API and a set of hypvisor drivers
defining a common set of routines. That way the Xen Daemon accces, the Xen
Store one, the Hypervisor hypercall are all isolated in separate C modules
implementing at least a subset of the common operations defined by the
drivers present in driver.h:</p><ul><li>xend_internal: implements the driver functions though the Xen
Daemon</li>
<li>xs_internal: implements the subset of the driver available though the
Xen Store</li>
<li>xen_internal: provide the implementation of the functions possible via
direct hypervisor access</li>
<li>proxy_internal: provide read-only Xen access via a proxy, the proxy code
is in the <code>proxy/</code>directory.</li>
<li>xm_internal: provide support for Xen defined but not running
domains.</li>
<li>qemu_internal: implement the driver functions for QEmu and
KVM virtualization engines. It also uses a qemud/ specific daemon
which interacts with the QEmu process to implement libvirt API.</li>
<li>test: this is a test driver useful for regression tests of the
front-end part of libvirt.</li>
</ul><p>Note that a given driver may only implement a subset of those functions,
(for example saving a Xen domain state to disk and restoring it is only
possible though the Xen Daemon), in that case the driver entry points for
unsupported functions are initialized to NULL.</p><p></p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Bindings for other languages</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="windows.html">Windows support</a></li><li><a href="remote.html">Remote support</a></li><li><a href="auth.html">Access control</a></li><li><a href="uri.html">Connection URIs</a></li><li><a href="hvsupport.html">Hypervisor support</a></li><li><a href="storage.html">Storage Management</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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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>

143
docs/auth.html Normal file
View File

@ -0,0 +1,143 @@
<?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>Access control</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Access control</h1><p>
When connecting to libvirt, some connections may require client
authentication before allowing use of the APIs. The set of possible
authentication mechanisms is administrator controlled, independant
of applications using libvirt.
</p><ul><li><a href="#ACL_server_config">Server configuration</a></li>
<li><a href="#ACL_server_unix_perms">UNIX socket permissions/group</a></li>
<li><a href="#ACL_server_polkit">UNIX socket PolicyKit auth</a></li>
<li><a href="#ACL_server_username">Username/password auth</a></li>
<li><a href="#ACL_server_kerberos">Kerberos auth</a></li>
</ul><h3 name="ACL_server_config">Server configuration</h3><p>
The libvirt daemon allows the adminstrator to choose the authentication
mechanisms used for client connections on each network socket independantly.
This is primarily controlled via the libvirt daemon master config file in
<code>/etc/libvirt/libvirtd.conf</code>. Each of the libvirt sockets can
have its authentication mechanism configured independantly. There is
currently a choice of <code>none</code>, <code>polkit</code>, and <code>sasl</code>.
The SASL scheme can be further configured to choose between a large
number of different mechanisms.
</p><h3 name="ACL_server_unix_perms">UNIX socket permissions/group</h3><p>
If libvirt does not contain support for PolicyKit, then access control for
the UNIX domain socket is done using traditional file user/group ownership
and permissions. There are 2 sockets, one for full read-write access, the
other for read-only access. The RW socket will be restricted (mode 0700) to
only allow the <code>root</code> user to connect. The read-only socket will
be open access (mode 0777) to allow any user to connect.
</p><p>
To allow non-root users greater access, the <code>libvirtd.conf</code> file
can be edited to change the permissions via the <code>unix_sock_rw_perms</code>,
config parameter and to set a user group via the <code>unix_sock_group</code>
parameter. For example, setting the former to mode <code>0770</code> and the
latter <code>wheel</code> would let any user in the wheel group connect to
the libvirt daemon.
</p><h3 name="ACL_server_polkit">UNIX socket PolicyKit auth</h3><p>
If libvirt contains support for PolicyKit, then access control options are
more advanced. The <code>unix_sock_auth</code> parameter will default to
<code>polkit</code>, and the file permissions will default to <code>0777</code>
even on the RW socket. Upon connecting to the socket, the client application
will be required to identify itself with PolicyKit. The default policy for the
RW daemon socket will require any application running in the current desktop
session to authenticate using the user's password. This is akin to <code>sudo</code>
auth, but does not require that the client application ultimately run as root.
Default policy will still allow any application to connect to the RO socket.
</p><p>
The default policy can be overriden by the adminstrator using the PolicyKit
master configuration file in <code>/etc/PolicyKit/PolicyKit.conf</code>. The
<code>PolicyKit.conf(5)</code> manual page provides details on the syntax
available. The two libvirt daemon actions available are named <code>org.libvirt.unix.monitor</code>
for the RO socket, and <code>org.libvirt.unix.manage</code> for the RW socket.
</p><p>
As an example, to allow a user <code>fred</code>full access to the RW socket,
while requiring <code>joe</code> to authenticate with the admin password,
would require adding the following snippet to <code>PolicyKit.conf</code>.
</p><pre>
&lt;match action="org.libvirt.unix.manage" user="fred"&gt;
&lt;return result="yes"/&gt;
&lt;/match&gt;
&lt;match action="org.libvirt.unix.manage" user="joe"&gt;
&lt;return result="auth_admin"/&gt;
&lt;/match&gt;
</pre><h3 name="ACL_server_username">Username/password auth</h3><p>
The plain TCP socket of the libvirt daemon defaults to using SASL for authentication.
The SASL mechanism configured by default is DIGEST-MD5, which provides a basic
username+password style authentication. It also provides for encryption of the data
stream, so the security of the plain TCP socket is on a par with that of the TLS
socket. If desired the UNIX socket and TLS socket can also have SASL enabled by
setting the <code>auth_unix_ro</code>, <code>auth_unix_rw</code>, <code>auth_tls</code>
config params in <code>libvirt.conf</code>.
</p><p>
Out of the box, no user accounts are defined, so no clients will be able to authenticate
on the TCP socket. Adding users and setting their passwords is done with the <code>saslpasswd2</code>
command. When running this command it is important to tell it that the appname is <code>libvirt</code>.
As an example, to add a user <code>fred</code>, run
</p><pre>
# saslpasswd2 -a libvirt fred
Password: xxxxxx
Again (for verification): xxxxxx
</pre><p>
To see a list of all accounts the <code>sasldblistusers2</code> command can be used.
This command expects to be given the path to the libvirt user database, which is kept
in <code>/etc/libvirt/passwd.db</code>
</p><pre>
# sasldblistusers2 -f /etc/libvirt/passwd.db
fred@t60wlan.home.berrange.com: userPassword
</pre><p>
Finally, to disable a user's access, the <code>saslpasswd2</code> command can be used
again:
</p><pre>
# saslpasswd2 -a libvirt -d fred
</pre><h3 name="ACL_server_kerberos">Kerberos auth</h3><p>
The plain TCP socket of the libvirt daemon defaults to using SASL for authentication.
The SASL mechanism configured by default is DIGEST-MD5, which provides a basic
username+password style authentication. To enable Kerberos single-sign-on instead,
the libvirt SASL configuration file must be changed. This is <code>/etc/sasl2/libvirt.conf</code>.
The <code>mech_list</code> parameter must first be changed to <code>gssapi</code>
instead of the default <code>digest-md5</code>. If SASL is enabled on the UNIX
and/or TLS sockets, Kerberos will also be used for them. Like DIGEST-MD5, the Kerberos
mechanism provides data encryption of the session.
</p><p>
Some operating systems do not install the SASL kerberos plugin by default. It
may be neccessary to install a sub-package such as <code>cyrus-sasl-gssapi</code>.
To check whether the Kerberos plugin is installed run the <code>pluginviewer</code>
program and verify that <code>gssapi</code> is listed,eg:
</p><pre>
# pluginviewer
...snip...
Plugin "gssapiv2" [loaded], API version: 4
SASL mechanism: GSSAPI, best SSF: 56
security flags: NO_ANONYMOUS|NO_PLAINTEXT|NO_ACTIVE|PASS_CREDENTIALS|MUTUAL_AUTH
features: WANT_CLIENT_FIRST|PROXY_AUTHENTICATION|NEED_SERVER_FQDN
</pre><p>
Next is is neccessary for the adminsitrator of the Kerberos realm to issue a principle
for the libvirt server. There needs to be one principle per host running the libvirt
daemon. The principle should be named <code>libvirt/full.hostname@KERBEROS.REALM</code>.
This is typically done by running the <code>kadmin.local</code> command on the Kerberos
server, though some Kerberos servers have alternate ways of setting up service principles.
Once created, the principle should be exported to a keytab, copied to the host running
the libvirt daemon and placed in <code>/etc/libvirt/krb5.tab</code>
</p><pre>
# kadmin.local
kadmin.local: add_principal libvirt/foo.example.com
Enter password for principal "libvirt/foo.example.com@EXAMPLE.COM":
Re-enter password for principal "libvirt/foo.example.com@EXAMPLE.COM":
Principal "libvirt/foo.example.com@EXAMPLE.COM" created.
kadmin.local: ktadd -k /root/libvirt-foo-example.tab libvirt/foo.example.com@EXAMPLE.COM
Entry for principal libvirt/foo.example.com@EXAMPLE.COM with kvno 4, encryption type Triple DES cbc mode with HMAC/sha1 added to keytab WRFILE:/root/libvirt-foo-example.tab.
Entry for principal libvirt/foo.example.com@EXAMPLE.COM with kvno 4, encryption type ArcFour with HMAC/md5 added to keytab WRFILE:/root/libvirt-foo-example.tab.
Entry for principal libvirt/foo.example.com@EXAMPLE.COM with kvno 4, encryption type DES with HMAC/sha1 added to keytab WRFILE:/root/libvirt-foo-example.tab.
Entry for principal libvirt/foo.example.com@EXAMPLE.COM with kvno 4, encryption type DES cbc mode with RSA-MD5 added to keytab WRFILE:/root/libvirt-foo-example.tab.
kadmin.local: quit
# scp /root/libvirt-foo-example.tab root@foo.example.com:/etc/libvirt/krb5.tab
# rm /root/libvirt-foo-example.tab
</pre><p>
Any client application wishing to connect to a Kerberos enabled libvirt server
merely needs to run <code>kinit</code> to gain a user principle. This may well
be done automatically when a user logs into a desktop session, if PAM is setup
to authenticate against Kerberos.
</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">Bindings for other languages</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="windows.html">Windows support</a></li><li><a href="remote.html">Remote support</a></li><li><a href="auth.html">Access control</a></li><li><a href="uri.html">Connection URIs</a></li><li><a href="hvsupport.html">Hypervisor support</a></li><li><a href="storage.html">Storage Management</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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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>

BIN
docs/background.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

View File

@ -1,17 +1,17 @@
<?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="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><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="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>There is a mailing-list <a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a> for libvir,
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reporting bugs and getting help</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reporting bugs and getting help</h1><p>There is a mailing-list <a href="mailto:libvir-list@redhat.com">libvir-list@redhat.com</a> for libvirt,
with an <a href="https://www.redhat.com/archives/libvir-list/">on-line
archive</a>. Please subscribe to this list before posting by visiting the <a href="https://www.redhat.com/mailman/listinfo/libvir-list">associated Web</a>
page and follow the instructions. Patches with explanations and provided as
attachments are really appreciated and will be discussed on the mailing list.
If possible generate the patches by using cvs diff -u in a CVS checkout.</p><p>We expect to use <a href="https://bugzilla.redhat.com/">Red Hat
Bugzilla</a> to track bugs for libvir, though there isn't yet a libvir
software module.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
If possible generate the patches by using cvs diff -u in a CVS checkout.</p><p>We use Red Hat Bugzilla to track bugs and new feature requests to libvirt.
If you want to report a bug or ask for a feature, please check <a href="http://bugzilla.redhat.com/bugzilla/buglist.cgi?component=libvirt&amp;component=libvirt-devel&amp;component=libvirt-python&amp;bug_status=ASSIGNED&amp;bug_status=INVESTIGATE&amp;bug_status=NEW&amp;bug_status=REOPENED&amp;bug_status=VERIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;Search=Search">the existing open bugs</a>, then if yours isn't a duplicate of
an existing bug, <a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora%20Core&amp;component=libvirt">log a new bug</a> and attach any patch or extra data that you may have available. It is always a good idea to also
to post to the <a href="mailto:libvir-list@redhat.com">mailing-list</a>
too, so that everybody working on the project can see it, thanks !</p><p>Some of the libvirt developpers may be found on IRC on the OFTC
network. Use the settings:</p><ul><li>server: irc.oftc.net</li>
<li>port: 6667 (the usual IRC port)</li>
<li>channel: #virt</li>
</ul><p> But there is no guarantee that someone will be watching or able to reply,
use the mailing-list if you don't get an answer there.</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">Bindings for other languages</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="windows.html">Windows support</a></li><li><a href="remote.html">Remote support</a></li><li><a href="auth.html">Access control</a></li><li><a href="uri.html">Connection URIs</a></li><li><a href="hvsupport.html">Hypervisor support</a></li><li><a href="storage.html">Storage Management</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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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>

3
docs/devhelp/.cvsignore Normal file
View File

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

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

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

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

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

38
docs/devhelp/general.html Normal file
View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>libvirt: </title>
<meta name="generator" content="Libvirt devhelp stylesheet"/>
<link rel="start" href="index.html" title="libvirt Reference Manual"/>
<link rel="up" href="index.html" title="libvirt Reference Manual"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="index.html" title="libvirt Reference Manual"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="u" href="index.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="libvirt-libvirt.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libvirt Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">libvirt API Modules</span>
</h2>
<p><a href="libvirt-libvirt.html">libvirt</a> - core interfaces for the libvirt library<br/><a href="libvirt-virterror.html">virterror</a> - error handling interfaces for the libvirt library<br/></p>
</body>
</html>

BIN
docs/devhelp/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 654 B

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

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

43
docs/devhelp/index.html Normal file
View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>libvirt Reference Manual</title>
<meta name="generator" content="Libvirt devhelp stylesheet"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<td>
<a accesskey="n" href="general.html">
<img src="right.png" width="24" height="24" border="0" alt="Next"/>
</a>
</td>
<th width="100%" align="center">libvirt Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">libvirt Reference Manual</span>
</h2>
<p>Libvir is a C toolkit to interact with the virtualization capabilities of
recent versions of Linux (and other OSes). It is free software available
under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
Lesser General Public License</a>. Virtualization of the Linux Operating
System means the ability to run multiple instances of Operating Systems
concurrently on a single hardware system where the basic resources are driven
by a Linux instance. The library aim at providing long term stable C API
initially for the <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen
paravirtualization</a> but should be able to integrate other virtualization
mechanisms if needed.</p>
<p> If you get lost searching for some specific API use, try
<a href="http://libvirt.org/search.php">the online search
engine</a> hosted on <a href="http://libvirt.org/">libvirt.org</a>
it indexes the project page, the APIs as well as the mailing-list archives. </p>
</body>
</html>

BIN
docs/devhelp/left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>conf: </title>
<meta name="generator" content="Libvirt devhelp stylesheet"/>
<link rel="start" href="index.html" title="libvirt Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="p" href="libvirt-virterror.html">
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
</a>
</td>
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<th width="100%" align="center">libvirt Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">conf</span>
</h2>
<p>conf - </p>
<p></p>
<p>Author(s): </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">typedef <a href="libvirt-conf.html#virConfValue">virConfValue</a> * <a href="#virConfValuePtr">virConfValuePtr</a>;
typedef enum <a href="#virConfType">virConfType</a>;
typedef struct _virConfValue <a href="#virConfValue">virConfValue</a>;
typedef struct _virConf <a href="#virConf">virConf</a>;
typedef <a href="libvirt-conf.html#virConf">virConf</a> * <a href="#virConfPtr">virConfPtr</a>;
int <a href="#virConfWriteFile">virConfWriteFile</a> (const char * filename, <br/> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf);
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> <a href="#virConfGetValue">virConfGetValue</a> (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf, <br/> const char * setting);
<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> <a href="#virConfReadMem">virConfReadMem</a> (const char * memory, <br/> int len);
int <a href="#virConfFree">virConfFree</a> (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf);
<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> <a href="#virConfReadFile">virConfReadFile</a> (const char * filename);
int <a href="#virConfWriteMem">virConfWriteMem</a> (char * memory, <br/> int * len, <br/> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="virConf">Structure </a>virConf</h3><pre class="programlisting">struct _virConf {
The content of this structure is not made public by the API.
} virConf;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfPtr">Typedef </a>virConfPtr</h3><pre class="programlisting"><a href="libvirt-conf.html#virConf">virConf</a> * virConfPtr;
</pre><p>a pointer to a parsed configuration file</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfType">Enum </a>virConfType</h3><pre class="programlisting">enum <a href="#virConfType">virConfType</a> {
<a name="VIR_CONF_NONE">VIR_CONF_NONE</a> = 0 /* undefined */
<a name="VIR_CONF_LONG">VIR_CONF_LONG</a> = 1 /* a long int */
<a name="VIR_CONF_STRING">VIR_CONF_STRING</a> = 2 /* a string */
<a name="VIR_CONF_LIST">VIR_CONF_LIST</a> = 3 /* a list */
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfValue">Structure </a>virConfValue</h3><pre class="programlisting">struct _virConfValue {
<a href="libvirt-conf.html#virConfType">virConfType</a> type : the <a href="libvirt-conf.html#virConfType">virConfType</a>
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> next : next element if in a list
long l : long integer
char * str : pointer to 0 terminated string
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> list : list of a list
} virConfValue;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfValuePtr">Typedef </a>virConfValuePtr</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfValue">virConfValue</a> * virConfValuePtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfFree"/>virConfFree ()</h3><pre class="programlisting">int virConfFree (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br/>
</pre><p>Frees all data associated to the handle</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfGetValue"/>virConfGetValue ()</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> virConfGetValue (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf, <br/> const char * setting)<br/>
</pre><p>Lookup the value associated to this entry in the configuration file</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><span class="term"><i><tt>setting</tt></i>:</span></td><td/></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the value or NULL if the lookup failed, the data associated will be freed when virConfFree() is called</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfReadFile"/>virConfReadFile ()</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadFile (const char * filename)<br/>
</pre><p>Reads a configuration file.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to read or parse the file, use virConfFree() to free the data.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfReadMem"/>virConfReadMem ()</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadMem (const char * memory, <br/> int len)<br/>
</pre><p>Reads a configuration file loaded in memory. The string can be zero terminated in which case @len can be 0</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the content of the configuration file</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>lenght in byte</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to parse the content, use virConfFree() to free the data.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfWriteFile"/>virConfWriteFile ()</h3><pre class="programlisting">int virConfWriteFile (const char * filename, <br/> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br/>
</pre><p>Writes a configuration file back to a file.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConfWriteMem"/>virConfWriteMem ()</h3><pre class="programlisting">int virConfWriteMem (char * memory, <br/> int * len, <br/> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br/>
</pre><p>Writes a configuration file back to a memory area. @len is an IN/OUT parameter, it indicates the size available in bytes, and on output the size required for the configuration file (even if the call fails due to insufficient space).</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the memory to store the config file</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the lenght in byte of the store, on output the size</td></tr><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="UTF-8"?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>virterror: error handling interfaces for the libvirt library</title>
<meta name="generator" content="Libvirt devhelp stylesheet"/>
<link rel="start" href="index.html" title="libvirt Reference Manual"/>
<link rel="up" href="general.html" title="API"/>
<link rel="stylesheet" href="style.css" type="text/css"/>
<link rel="chapter" href="general.html" title="API"/>
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td>
<a accesskey="p" href="libvirt-libvirt.html">
<img src="left.png" width="24" height="24" border="0" alt="Prev"/>
</a>
</td>
<td>
<a accesskey="u" href="general.html">
<img src="up.png" width="24" height="24" border="0" alt="Up"/>
</a>
</td>
<td>
<a accesskey="h" href="index.html">
<img src="home.png" width="24" height="24" border="0" alt="Home"/>
</a>
</td>
<th width="100%" align="center">libvirt Reference Manual</th>
</tr>
</table>
<h2>
<span class="refentrytitle">virterror</span>
</h2>
<p>virterror - error handling interfaces for the libvirt library</p>
<p>Provides the interfaces of the libvirt library to handle errors raised while using the library. </p>
<p>Author(s): Daniel Veillard &lt;veillard@redhat.com&gt; </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">typedef <a href="libvirt-virterror.html#virError">virError</a> * <a href="#virErrorPtr">virErrorPtr</a>;
typedef enum <a href="#virErrorLevel">virErrorLevel</a>;
typedef enum <a href="#virErrorDomain">virErrorDomain</a>;
typedef enum <a href="#virErrorNumber">virErrorNumber</a>;
typedef struct _virError <a href="#virError">virError</a>;
int <a href="#virCopyLastError">virCopyLastError</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to);
void <a href="#virConnSetErrorFunc">virConnSetErrorFunc</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> void * userData, <br/> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler);
void <a href="#virResetLastError">virResetLastError</a> (void);
typedef void <a href="#virErrorFunc">virErrorFunc</a> (void * userData, <br/> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> error);
void <a href="#virResetError">virResetError</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err);
<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> <a href="#virConnGetLastError">virConnGetLastError</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
void <a href="#virDefaultErrorFunc">virDefaultErrorFunc</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err);
<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> <a href="#virGetLastError">virGetLastError</a> (void);
void <a href="#virSetErrorFunc">virSetErrorFunc</a> (void * userData, <br/> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler);
int <a href="#virConnCopyLastError">virConnCopyLastError</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to);
void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
</pre>
</div>
<div class="refsect1" lang="en">
<h2>Description</h2>
</div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en"><h3><a name="virError">Structure </a>virError</h3><pre class="programlisting">struct _virError {
int code : The error code, a <a href="libvirt-virterror.html#virErrorNumber">virErrorNumber</a>
int domain : What part of the library raised this error
char * message : human-readable informative error message
<a href="libvirt-virterror.html#virErrorLevel">virErrorLevel</a> level : how consequent is the error
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn : the connection if available
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom : the domain if available
char * str1 : extra string information
char * str2 : extra string information
char * str3 : extra string information
int int1 : extra number information
int int2 : extra number information
<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> net : the network if available
} virError;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virErrorDomain">Enum </a>virErrorDomain</h3><pre class="programlisting">enum <a href="#virErrorDomain">virErrorDomain</a> {
<a name="VIR_FROM_NONE">VIR_FROM_NONE</a> = 0
<a name="VIR_FROM_XEN">VIR_FROM_XEN</a> = 1 /* Error at Xen hypervisor layer */
<a name="VIR_FROM_XEND">VIR_FROM_XEND</a> = 2 /* Error at connection with xend daemon */
<a name="VIR_FROM_XENSTORE">VIR_FROM_XENSTORE</a> = 3 /* Error at connection with xen store */
<a name="VIR_FROM_SEXPR">VIR_FROM_SEXPR</a> = 4 /* Error in the S-Expression 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_PROXY">VIR_FROM_PROXY</a> = 8 /* Error in the proxy code */
<a name="VIR_FROM_CONF">VIR_FROM_CONF</a> = 9 /* Error in the configuration file handling */
<a name="VIR_FROM_QEMU">VIR_FROM_QEMU</a> = 10 /* Error at the QEMU daemon */
<a name="VIR_FROM_NET">VIR_FROM_NET</a> = 11 /* Error when operating on a network */
<a name="VIR_FROM_TEST">VIR_FROM_TEST</a> = 12 /* Error from test driver */
<a name="VIR_FROM_REMOTE">VIR_FROM_REMOTE</a> = 13 /* Error from remote driver */
<a name="VIR_FROM_OPENVZ">VIR_FROM_OPENVZ</a> = 14 /* Error from OpenVZ driver */
<a name="VIR_FROM_XENXM">VIR_FROM_XENXM</a> = 15 /* Error at Xen XM layer */
<a name="VIR_FROM_STATS_LINUX">VIR_FROM_STATS_LINUX</a> = 16 /* Error in the Linux Stats code */
<a name="VIR_FROM_STORAGE">VIR_FROM_STORAGE</a> = 17 /* Error from storage driver */
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virErrorLevel">Enum </a>virErrorLevel</h3><pre class="programlisting">enum <a href="#virErrorLevel">virErrorLevel</a> {
<a name="VIR_ERR_NONE">VIR_ERR_NONE</a> = 0
<a name="VIR_ERR_WARNING">VIR_ERR_WARNING</a> = 1 /* A simple warning */
<a name="VIR_ERR_ERROR">VIR_ERR_ERROR</a> = 2 /* An error */
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virErrorNumber">Enum </a>virErrorNumber</h3><pre class="programlisting">enum <a href="#virErrorNumber">virErrorNumber</a> {
<a name="VIR_ERR_OK">VIR_ERR_OK</a> = 0
<a name="VIR_ERR_INTERNAL_ERROR">VIR_ERR_INTERNAL_ERROR</a> = 1 /* internal error */
<a name="VIR_ERR_NO_MEMORY">VIR_ERR_NO_MEMORY</a> = 2 /* memory allocation failure */
<a name="VIR_ERR_NO_SUPPORT">VIR_ERR_NO_SUPPORT</a> = 3 /* no support for this function */
<a name="VIR_ERR_UNKNOWN_HOST">VIR_ERR_UNKNOWN_HOST</a> = 4 /* could not resolve hostname */
<a name="VIR_ERR_NO_CONNECT">VIR_ERR_NO_CONNECT</a> = 5 /* can't connect to hypervisor */
<a name="VIR_ERR_INVALID_CONN">VIR_ERR_INVALID_CONN</a> = 6 /* invalid connection object */
<a name="VIR_ERR_INVALID_DOMAIN">VIR_ERR_INVALID_DOMAIN</a> = 7 /* invalid domain object */
<a name="VIR_ERR_INVALID_ARG">VIR_ERR_INVALID_ARG</a> = 8 /* invalid function argument */
<a name="VIR_ERR_OPERATION_FAILED">VIR_ERR_OPERATION_FAILED</a> = 9 /* a command to hypervisor failed */
<a name="VIR_ERR_GET_FAILED">VIR_ERR_GET_FAILED</a> = 10 /* a HTTP GET command to failed */
<a name="VIR_ERR_POST_FAILED">VIR_ERR_POST_FAILED</a> = 11 /* a HTTP POST command to failed */
<a name="VIR_ERR_HTTP_ERROR">VIR_ERR_HTTP_ERROR</a> = 12 /* unexpected HTTP error code */
<a name="VIR_ERR_SEXPR_SERIAL">VIR_ERR_SEXPR_SERIAL</a> = 13 /* failure to serialize an S-Expr */
<a name="VIR_ERR_NO_XEN">VIR_ERR_NO_XEN</a> = 14 /* could not open Xen hypervisor control */
<a name="VIR_ERR_XEN_CALL">VIR_ERR_XEN_CALL</a> = 15 /* failure doing an hypervisor call */
<a name="VIR_ERR_OS_TYPE">VIR_ERR_OS_TYPE</a> = 16 /* unknown OS type */
<a name="VIR_ERR_NO_KERNEL">VIR_ERR_NO_KERNEL</a> = 17 /* missing kernel information */
<a name="VIR_ERR_NO_ROOT">VIR_ERR_NO_ROOT</a> = 18 /* missing root device information */
<a name="VIR_ERR_NO_SOURCE">VIR_ERR_NO_SOURCE</a> = 19 /* missing source device information */
<a name="VIR_ERR_NO_TARGET">VIR_ERR_NO_TARGET</a> = 20 /* missing target device information */
<a name="VIR_ERR_NO_NAME">VIR_ERR_NO_NAME</a> = 21 /* missing domain name information */
<a name="VIR_ERR_NO_OS">VIR_ERR_NO_OS</a> = 22 /* missing domain OS information */
<a name="VIR_ERR_NO_DEVICE">VIR_ERR_NO_DEVICE</a> = 23 /* missing domain devices information */
<a name="VIR_ERR_NO_XENSTORE">VIR_ERR_NO_XENSTORE</a> = 24 /* could not open Xen Store control */
<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 (DEPRECATED) */
<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_OPERATION_DENIED">VIR_ERR_OPERATION_DENIED</a> = 29 /* operation forbidden on read-only connections */
<a name="VIR_ERR_OPEN_FAILED">VIR_ERR_OPEN_FAILED</a> = 30 /* failed to open a conf file */
<a name="VIR_ERR_READ_FAILED">VIR_ERR_READ_FAILED</a> = 31 /* failed to read a conf file */
<a name="VIR_ERR_PARSE_FAILED">VIR_ERR_PARSE_FAILED</a> = 32 /* failed to parse a conf file */
<a name="VIR_ERR_CONF_SYNTAX">VIR_ERR_CONF_SYNTAX</a> = 33 /* failed to parse the syntax of a conf file */
<a name="VIR_ERR_WRITE_FAILED">VIR_ERR_WRITE_FAILED</a> = 34 /* failed to write a conf file */
<a name="VIR_ERR_XML_DETAIL">VIR_ERR_XML_DETAIL</a> = 35 /* detail of an XML error */
<a name="VIR_ERR_INVALID_NETWORK">VIR_ERR_INVALID_NETWORK</a> = 36 /* invalid network object */
<a name="VIR_ERR_NETWORK_EXIST">VIR_ERR_NETWORK_EXIST</a> = 37 /* the network already exist */
<a name="VIR_ERR_SYSTEM_ERROR">VIR_ERR_SYSTEM_ERROR</a> = 38 /* general system call failure */
<a name="VIR_ERR_RPC">VIR_ERR_RPC</a> = 39 /* some sort of RPC error */
<a name="VIR_ERR_GNUTLS_ERROR">VIR_ERR_GNUTLS_ERROR</a> = 40 /* error from a GNUTLS call */
<a name="VIR_WAR_NO_NETWORK">VIR_WAR_NO_NETWORK</a> = 41 /* failed to start network */
<a name="VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> = 42 /* domain not found or unexpectedly disappeared */
<a name="VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> = 43 /* network not found */
<a name="VIR_ERR_INVALID_MAC">VIR_ERR_INVALID_MAC</a> = 44 /* invalid MAC address */
<a name="VIR_ERR_AUTH_FAILED">VIR_ERR_AUTH_FAILED</a> = 45 /* authentication failed */
<a name="VIR_ERR_INVALID_STORAGE_POOL">VIR_ERR_INVALID_STORAGE_POOL</a> = 46 /* invalid storage pool object */
<a name="VIR_ERR_INVALID_STORAGE_VOL">VIR_ERR_INVALID_STORAGE_VOL</a> = 47 /* invalid storage vol object */
<a name="VIR_WAR_NO_STORAGE">VIR_WAR_NO_STORAGE</a> = 48 /* failed to start storage */
<a name="VIR_ERR_NO_STORAGE_POOL">VIR_ERR_NO_STORAGE_POOL</a> = 49 /* storage pool not found */
<a name="VIR_ERR_NO_STORAGE_VOL">VIR_ERR_NO_STORAGE_VOL</a> = 50 /* storage pool not found */
};
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virErrorPtr">Typedef </a>virErrorPtr</h3><pre class="programlisting"><a href="libvirt-virterror.html#virError">virError</a> * virErrorPtr;
</pre><p/>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virErrorFunc"/>Function type virErrorFunc</h3><pre class="programlisting">void virErrorFunc (void * userData, <br/> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> error)<br/>
</pre><p>Signature of a function to use when there is an error raised by the library.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>user provided data for the error callback</td></tr><tr><td><span class="term"><i><tt>error</tt></i>:</span></td><td>the error being raised.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConnCopyLastError"/>virConnCopyLastError ()</h3><pre class="programlisting">int virConnCopyLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br/>
</pre><p>Copy the content of the last error caught on that connection One will need to free the result with virResetError()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no error was found and the error code otherwise and -1 in case of parameter error.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConnGetLastError"/>virConnGetLastError ()</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> virConnGetLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br/>
</pre><p>Provide a pointer to the last error caught on that connection Simpler but may not be suitable for multithreaded accesses, in which case use virConnCopyLastError()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the last error or NULL if none occurred.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConnResetLastError"/>virConnResetLastError ()</h3><pre class="programlisting">void virConnResetLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br/>
</pre><p>Reset the last error caught on that connection</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virConnSetErrorFunc"/>virConnSetErrorFunc ()</h3><pre class="programlisting">void virConnSetErrorFunc (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> void * userData, <br/> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)<br/>
</pre><p>Set a connection error handling function, if @handler is NULL it will reset to default which is to pass error back to the global library handler.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virCopyLastError"/>virCopyLastError ()</h3><pre class="programlisting">int virCopyLastError (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br/>
</pre><p>Copy the content of the last error caught at the library level One will need to free the result with virResetError()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no error was found and the error code otherwise and -1 in case of parameter error.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virDefaultErrorFunc"/>virDefaultErrorFunc ()</h3><pre class="programlisting">void virDefaultErrorFunc (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br/>
</pre><p>Default routine reporting an error to stderr.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the error.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virGetLastError"/>virGetLastError ()</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> virGetLastError (void)<br/>
</pre><p>Provide a pointer to the last error caught at the library level Simpler but may not be suitable for multithreaded accesses, in which case use virCopyLastError()</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the last error or NULL if none occurred.</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virResetError"/>virResetError ()</h3><pre class="programlisting">void virResetError (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br/>
</pre><p>Reset the error being pointed to</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the <a href="libvirt-virterror.html#virError">virError</a> to clean up</td></tr></tbody></table></div></div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virResetLastError"/>virResetLastError ()</h3><pre class="programlisting">void virResetLastError (void)<br/>
</pre><p>Reset the last error caught at the library level.</p>
</div>
<hr/>
<div class="refsect2" lang="en"><h3><a name="virSetErrorFunc"/>virSetErrorFunc ()</h3><pre class="programlisting">void virSetErrorFunc (void * userData, <br/> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)<br/>
</pre><p>Set a library global error handling function, if @handler is NULL, it will reset to default printing on stderr. The error raised there are those for which no handler at the connection level could caught.</p>
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</td></tr></tbody></table></div></div>
<hr/>
</div>
</div>
</body>
</html>

BIN
docs/devhelp/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

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

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

BIN
docs/devhelp/up.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

View File

@ -1,16 +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="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>Downloads</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><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="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p>The latest versions of libvir can be found on the <a href="ftp://libvir.org/libvir/">libvir.org</a> server ( <a href="http://libvir.org/sources/">HTTP</a>, <a href="ftp://libvir.org/libvir/">FTP</a>). You will find there the released
versions as well as <a href="http://libvir.org/sources/libvir-cvs-snapshot.tar.gz">snapshot
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Downloads</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Downloads</h1><p>The latest versions of libvirt can be found on the <a href="ftp://libvirt.org/libvirt/">libvirt.org</a> server ( <a href="http://libvirt.org/sources/">HTTP</a>, <a href="ftp://libvirt.org/libvirt/">FTP</a>). You will find there the released
versions as well as <a href="http://libvirt.org/sources/libvirt-cvs-snapshot.tar.gz">snapshot
tarballs</a> updated from CVS head every hour</p><p>Anonymous <a href="http://ximbiot.com/cvs/cvshome/docs/">CVS</a> is also
available, first register onto the server:</p><p><code>cvs -d :pserver:anoncvs@libvir.org:2401/data/cvs login</code></p><p>it will request a password, enter <strong>anoncvs</strong>. Then you can
checkout the development tree with:</p><p><code>cvs -d :pserver:anoncvs@libvir.org:2401/data/cvs co libvir</code></p><p>Use ./autogen.sh to configure the local checkout, then <code>make</code>
available, first register onto the server:</p><p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs login</code></p><p>it will request a password, enter <strong>anoncvs</strong>. Then you can
checkout the development tree with:</p><p><code>cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co
libvirt</code></p><p>Use ./autogen.sh to configure the local checkout, then <code>make</code>
and <code>make install</code>, as usual. All normal cvs commands are now
available except commiting to the base.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
available except commiting to the base.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Bindings for other languages</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="windows.html">Windows support</a></li><li><a href="remote.html">Remote support</a></li><li><a href="auth.html">Access control</a></li><li><a href="uri.html">Connection URIs</a></li><li><a href="hvsupport.html">Hypervisor support</a></li><li><a href="storage.html">Storage Management</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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

69
docs/errors.html Normal file
View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Handling of errors</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Handling of errors</h1><p>The main goals of libvirt when it comes to error handling are:</p><ul><li>provide as much detail as possible</li>
<li>provide the informations as soon as possible</li>
<li>dont force the library user into one style of error handling</li>
</ul><p>As result the library provide both synchronous, callback based and
asynchronous error reporting. When an error happens in the library code the
error is logged, allowing to retrieve it later and if the user registered an
error callback it will be called synchronously. Once the call to libvirt ends
the error can be detected by the return value and the full information for
the last logged error can be retrieved.</p><p>To avoid as much as prossible troubles with a global variable in a
multithreaded environment, libvirt will associate when possible the errors to
the current connection they are related to, that way the error is stored in a
dynamic structure which can be made thread specific. Error callback can be
set specifically to a connection with</p><p>So error handling in the code is the following:</p><ol><li>if the error can be associated to a connection for example when failing
to look up a domain
<ol><li>if there is a callback associated to the connection set with <a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a>,
call it with the error informations</li>
<li>otherwise if there is a global callback set with <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a>,
call it with the error information</li>
<li>otherwise call <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
on stderr</li>
<li>save the error in the connection for later retrieval with <a href="html/libvirt-virterror.html#virConnGetLastError">virConnGetLastError</a></li>
</ol></li>
<li>otherwise like when failing to create an hypervisor connection:
<ol><li>if there is a global callback set with <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a>,
call it with the error information</li>
<li>otherwise call <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>
which is the default error function of the library issuing the error
on stderr</li>
<li>save the error in the connection for later retrieval with <a href="html/libvirt-virterror.html#virGetLastError">virGetLastError</a></li>
</ol></li>
</ol><p>In all cases the error informations are provided as a <a href="html/libvirt-virterror.html#virErrorPtr">virErrorPtr</a> pointer to
read-only structure <a href="html/libvirt-virterror.html#virError">virError</a> containing the
following fields:</p><ul><li>code: an error number from the <a href="html/libvirt-virterror.html#virErrorNumber">virErrorNumber</a>
enum</li>
<li>domain: an enum indicating which part of libvirt raised the error see
<a href="html/libvirt-virterror.html#virErrorDomain">virErrorDomain</a></li>
<li>level: the error level, usually VIR_ERR_ERROR, though there is room for
warnings like VIR_ERR_WARNING</li>
<li>message: the full human-readable formatted string of the error</li>
<li>conn: if available a pointer to the <a href="html/libvirt-libvirt.html#virConnectPtr">virConnectPtr</a>
connection to the hypervisor where this happened</li>
<li>dom: if available a pointer to the <a href="html/libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain
targetted in the operation</li>
</ul><p>and then extra raw informations about the error which may be initialized
to 0 or NULL if unused</p><ul><li>str1, str2, str3: string informations, usually str1 is the error
message format</li>
<li>int1, int2: integer informations</li>
</ul><p>So usually, setting up specific error handling with libvirt consist of
registering an handler with with <a href="html/libvirt-virterror.html#virSetErrorFunc">virSetErrorFunc</a> or
with <a href="html/libvirt-virterror.html#virConnSetErrorFunc">virConnSetErrorFunc</a>,
chech the value of the code value, take appropriate action, if needed let
libvirt print the error on stderr by calling <a href="html/libvirt-virterror.html#virDefaultErrorFunc">virDefaultErrorFunc</a>.
For asynchronous error handing, set such a function doing nothing to avoid
the error being reported on stderr, and call virConnGetLastError or
virGetLastError when an API call returned an error value. It can be a good
idea to use <a href="html/libvirt-virterror.html#virResetLastError">virResetError</a> or <a href="html/libvirt-virterror.html#virConnResetLastError">virConnResetLastError</a>
once an error has been processed fully.</p><p>At the python level, there only a global reporting callback function at
this point, see the error.py example about it:</p><pre>def handler(ctxt, err):
global errno
#print "handler(%s, %s)" % (ctxt, err)
errno = err
libvirt.registerErrorHandler(handler, 'context') </pre><p>the second argument to the registerErrorHandler function is passed as the
first argument of the callback like in the C version. The error is a tuple
containing the same field as a virError in C, but cast to Python.</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="index.html">Home</a></li><li><a href="news.html">Releases</a></li><li><a href="intro.html">Introduction</a></li><li><a href="architecture.html">libvirt architecture</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="format.html">XML Format</a></li><li><a href="python.html">Bindings for other languages</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="windows.html">Windows support</a></li><li><a href="remote.html">Remote support</a></li><li><a href="auth.html">Access control</a></li><li><a href="uri.html">Connection URIs</a></li><li><a href="hvsupport.html">Hypervisor support</a></li><li><a href="storage.html">Storage Management</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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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>

7
docs/examples/.cvsignore Normal file
View File

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

45
docs/examples/Makefile.am Normal file
View File

@ -0,0 +1,45 @@
# -*- buffer-read-only: t -*- vi: set ro:
# Beware this is autogenerated by index.py
SUBDIRS=python
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
DEPS = $(top_builddir)/src/libvirt.la
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la $(COVERAGE_LDFLAGS)
rebuild: examples.xml index.html
examples.xml: index.py info1.c suspend.c
-@($(srcdir)/index.py)
index.html: examples.xml examples.xsl $(top_srcdir)/docs/site.xsl
-@(if [ -x $(XSLTPROC) ] ; then \
$(XSLTPROC) examples.xsl examples.xml \
&& echo "Rebuilt web page" \
&& xmllint --valid --noout index.html; \
fi)
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml \
$(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
EXTRA_DIST=examples.xsl index.py examples.xml
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) ./info1)
@($(CHECKER) ./suspend)

View File

@ -0,0 +1,86 @@
<examples>
<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>
<usage>info1</usage>
<test>info1</test>
<author>Daniel Veillard</author>
<copy>see Copyright for the status of this software. </copy>
<section>Informations</section>
<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'/>
</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' file='libvirt' name='virDomainGetInfo'/>
<function line='111' file='libvirt' name='virConnectListDomains'/>
<function line='93' file='libvirt' name='virDomainFree'/>
<function line='73' file='libvirt' name='virDomainResume'/>
<function line='50' file='libvirt' name='virDomainLookupByID'/>
<function line='132' file='libvirt' name='virConnectClose'/>
<struct line='28' file='libvirt' name='virDomainInfo'/>
<function line='62' file='libvirt' name='virDomainSuspend'/>
<function line='100' file='libvirt' name='virConnectOpenReadOnly'/>
</uses>
</example>
<symbols>
<symbol name='virConnectClose'>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virConnectListDomains'>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virConnectOpenReadOnly'>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainFree'>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainGetInfo'>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainInfo'>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainLookupByID'>
<ref filename='info1.c'/>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainResume'>
<ref filename='suspend.c'/>
</symbol>
<symbol name='virDomainSuspend'>
<ref filename='suspend.c'/>
</symbol>
</symbols>
<sections>
<section name='Informations'>
<example filename='info1.c'/>
</section>
<section name='Scheduling'>
<example filename='suspend.c'/>
</section>
</sections>
</examples>

144
docs/examples/examples.xsl Normal file
View File

@ -0,0 +1,144 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
exclude-result-prefixes="exsl">
<xsl:import href="../site.xsl"/>
<xsl:variable name="href_base">../</xsl:variable>
<xsl:variable name="menu_name">Examples Menu</xsl:variable>
<xsl:variable name="toc">
<form action="../search.php"
enctype="application/x-www-form-urlencoded" method="get">
<input name="query" type="text" size="20" value=""/>
<input name="submit" type="submit" value="Search ..."/>
</form>
<ul><!-- style="margin-left: -1em" -->
<li><a href="{$href_base}index.html">Home</a></li>
<li><a style="font-weight:bold"
href="{$href_base}docs.html">Developer Menu</a></li>
<li><a style="font-weight:bold"
href="{$href_base}html/index.html">API Menu</a></li>
<xsl:for-each select="/examples/sections/section">
<li><a href="#{@name}"><xsl:value-of select="@name"/> Examples</a></li>
</xsl:for-each>
<li><a href="{$href_base}guidelines.html">XML Guidelines</a></li>
</ul>
</xsl:variable>
<xsl:template match="include">
<xsl:variable name="header" select="substring-before(substring-after(., '/'), '&gt;')"/>
<xsl:variable name="doc" select="concat('../html/libvirt-', $header, 'tml')"/>
<li><a href="{$doc}"><xsl:value-of select="."/></a></li>
</xsl:template>
<xsl:template match="typedef">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="header" select="concat(@file, '.h')"/>
<xsl:variable name="doc" select="concat('../html/libvirt-', @file, '.html#', $name)"/>
<li> line <xsl:value-of select="@line"/>: Type <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
</xsl:template>
<xsl:template match="function">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="header" select="concat(@file, '.h')"/>
<xsl:variable name="doc" select="concat('../html/libvirt-', @file, '.html#', $name)"/>
<li> line <xsl:value-of select="@line"/>: Function <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
</xsl:template>
<xsl:template match="macro">
<xsl:variable name="name" select="@name"/>
<xsl:variable name="header" select="concat(@file, '.h')"/>
<xsl:variable name="doc" select="concat('../html/libvirt-', @file, '.html#', $name)"/>
<li> line <xsl:value-of select="@line"/>: Macro <a href="{$doc}"><xsl:value-of select="$name"/></a> from <xsl:value-of select="$header"/></li>
</xsl:template>
<xsl:template match="example">
<xsl:variable name="filename" select="string(@filename)"/>
<h3><a name="{$filename}" href="{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="synopsis"/></h3>
<p><xsl:value-of select="purpose"/></p>
<p>Uses:</p>
<ul>
<xsl:for-each select="uses/*">
<xsl:sort select="@line" data-type="number"/>
<xsl:apply-templates select='.'/>
</xsl:for-each>
</ul>
<p>Usage:</p>
<p><xsl:value-of select="usage"/></p>
<p>Author: <xsl:value-of select="author"/></p>
</xsl:template>
<xsl:template match="section">
<li><p> <a href="#{@name}"><xsl:value-of select="@name"/></a> :</p>
<ul>
<xsl:for-each select="example">
<xsl:sort select='.'/>
<xsl:variable name="filename" select="@filename"/>
<li> <a href="#{$filename}"><xsl:value-of select="$filename"/></a>: <xsl:value-of select="/examples/example[@filename = $filename]/synopsis"/></li>
</xsl:for-each>
</ul>
</li>
</xsl:template>
<xsl:template match="sections">
<p> The examples are stored per section depending on the main focus
of the example:</p>
<ul>
<xsl:for-each select="section">
<xsl:sort select='.'/>
<xsl:apply-templates select='.'/>
</xsl:for-each>
</ul>
<p> Getting the compilation options and libraries dependancies needed
to generate binaries from the examples is best done on Linux/Unix by using
the pkg-config data which should have been installed as part of <i>make
install</i> step or when installing the libvirt development package:</p>
<pre>gcc -o example example.c `pkg-config libvirt --libs`</pre>
</xsl:template>
<xsl:template name="sections-list">
<xsl:for-each select="sections/section">
<xsl:variable name="section" select="@name"/>
<h2> <a name="{$section}"></a><xsl:value-of select="$section"/> Examples</h2>
<xsl:apply-templates select='/examples/example[section = $section]'/>
</xsl:for-each>
</xsl:template>
<xsl:template match="examples">
<xsl:variable name="title">Libvirt set of C code examples</xsl:variable>
<xsl:document href="index.html" method="xml" encoding="ISO-8859-1"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<xsl:call-template name="style"/>
<xsl:element name="title">
<xsl:value-of select="$title"/>
</xsl:element>
</head>
<body>
<div id="container">
<div id="intro">
<div id="adjustments"/>
<div id="pageHeader"/>
<div id="content2">
<xsl:call-template name="titlebox">
<xsl:with-param name="title" select="$title"/>
</xsl:call-template>
<xsl:apply-templates select="sections"/>
<xsl:call-template name="sections-list"/>
</div>
</div>
<xsl:call-template name="linkList2"/>
<xsl:call-template name="bottom"/>
</div>
</body>
</html>
</xsl:document>
</xsl:template>
</xsl:stylesheet>

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

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Libvirt set of C code examples</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Libvirt set of C code examples</h1><p> The examples are stored per section depending on the main focus
of the example:</p><ul><li><p><a href="#Informations">Informations</a> :</p><ul><li><a href="#info1.c">info1.c</a>: Extract informations about Xen domain 0</li></ul></li><li><p><a href="#Scheduling">Scheduling</a> :</p><ul><li><a href="#suspend.c">suspend.c</a>: Suspend a domain and then resume its execution</li></ul></li></ul><p> Getting the compilation options and libraries dependancies needed
to generate binaries from the examples is best done on Linux/Unix by using
the pkg-config data which should have been installed as part of <i>make
install</i> step or when installing the libvirt development package:</p><pre>gcc -o example example.c `pkg-config libvirt --libs`</pre><h2><a name="Informations" id="Informations"></a>Informations Examples</h2><h3><a name="info1.c" href="info1.c" id="info1.c">info1.c</a>: Extract informations about Xen domain 0</h3><p>Demonstrate the basic use of the library to connect to the hypervisor and extract domain informations.</p><p>Uses:</p><ul><li> line 29: Function <a href="../html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a> from libvirt.h</li><li> line 36: Function <a href="../html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a> from libvirt.h</li><li> line 43: Function <a href="../html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a> from libvirt.h</li><li> line 53: Function <a href="../html/libvirt-libvirt.html#virDomainFree">virDomainFree</a> from libvirt.h</li><li> line 55: Function <a href="../html/libvirt-libvirt.html#virConnectClose">virConnectClose</a> from libvirt.h</li></ul><p>Usage:</p><p>info1</p><p>Author: Daniel Veillard</p><h2><a name="Scheduling" id="Scheduling"></a>Scheduling Examples</h2><h3><a name="suspend.c" href="suspend.c" id="suspend.c">suspend.c</a>: Suspend a domain and then resume its execution</h3><p>Demonstrate the basic use of the library to suspend and resume a domain. If no id is given on the command line this script will suspend and resume the first domain found which is not Domain 0.</p><p>Uses:</p><ul><li> line 31: Function <a href="../html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a> from libvirt.h</li><li> line 50: Function <a href="../html/libvirt-libvirt.html#virDomainLookupByID">virDomainLookupByID</a> from libvirt.h</li><li> line 62: Function <a href="../html/libvirt-libvirt.html#virDomainSuspend">virDomainSuspend</a> from libvirt.h</li><li> line 73: Function <a href="../html/libvirt-libvirt.html#virDomainResume">virDomainResume</a> from libvirt.h</li><li> line 93: Function <a href="../html/libvirt-libvirt.html#virDomainFree">virDomainFree</a> from libvirt.h</li><li> line 100: Function <a href="../html/libvirt-libvirt.html#virConnectOpenReadOnly">virConnectOpenReadOnly</a> from libvirt.h</li><li> line 111: Function <a href="../html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a> from libvirt.h</li><li> line 132: Function <a href="../html/libvirt-libvirt.html#virConnectClose">virConnectClose</a> from libvirt.h</li></ul><p>Usage:</p><p>suspend [id]</p><p>Author: Daniel Veillard</p></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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>

307
docs/examples/index.py Executable file
View File

@ -0,0 +1,307 @@
#!/usr/bin/python -u
#
# Indexes the examples and build an XML description
#
import string
import glob
import sys
try:
import libxml2
except:
sys.exit(1)
sys.path.insert(0, "..")
from apibuild import CParser, escape
examples = []
extras = ['examples.xsl', 'index.py']
tests = []
sections = {}
symbols = {}
api_dict = None
api_doc = None
def load_api():
global api_dict
global api_doc
if api_dict != None:
return
api_dict = {}
try:
print "loading ../libvirt-api.xml"
api_doc = libxml2.parseFile("../libvirt-api.xml")
except:
print "failed to parse ../libvirt-api.xml"
sys.exit(1)
def find_symbol(name):
global api_dict
global api_doc
if api_doc == None:
load_api()
if name == None:
return
if api_dict.has_key(name):
return api_dict[name]
ctxt = api_doc.xpathNewContext()
res = ctxt.xpathEval("/api/symbols/*[@name = '%s']" % (name))
if type(res) == type([]) and len(res) >= 1:
if len(res) > 1:
print "Found %d references to %s in the API" % (len(res), name)
node = res[0]
typ = node.name
file = node.xpathEval("string(@file)")
info = node.xpathEval("string(info)")
else:
print "Reference %s not found in the API" % (name)
return None
ret = (typ, file, info)
api_dict[name] = ret
return ret
def parse_top_comment(filename, comment):
res = {}
lines = string.split(comment, "\n")
item = None
for line in lines:
while line != "" and (line[0] == ' ' or line[0] == '\t'):
line = line[1:]
while line != "" and line[0] == '*':
line = line[1:]
while line != "" and (line[0] == ' ' or line[0] == '\t'):
line = line[1:]
try:
(it, line) = string.split(line, ":", 1)
item = it
while line != "" and (line[0] == ' ' or line[0] == '\t'):
line = line[1:]
if res.has_key(item):
res[item] = res[item] + " " + line
else:
res[item] = line
except:
if item != None:
if res.has_key(item):
res[item] = res[item] + " " + line
else:
res[item] = line
return res
def parse(filename, output):
global symbols
global sections
parser = CParser(filename)
parser.collect_references()
idx = parser.parse()
info = parse_top_comment(filename, parser.top_comment)
output.write(" <example filename='%s'>\n" % filename)
try:
synopsis = info['synopsis']
output.write(" <synopsis>%s</synopsis>\n" % escape(synopsis));
except:
print "Example %s lacks a synopsis description" % (filename)
try:
purpose = info['purpose']
output.write(" <purpose>%s</purpose>\n" % escape(purpose));
except:
print "Example %s lacks a purpose description" % (filename)
try:
usage = info['usage']
output.write(" <usage>%s</usage>\n" % escape(usage));
except:
print "Example %s lacks an usage description" % (filename)
try:
test = info['test']
output.write(" <test>%s</test>\n" % escape(test));
progname=filename[0:-2]
command=string.replace(test, progname, './' + progname, 1)
tests.append(command)
except:
pass
try:
author = info['author']
output.write(" <author>%s</author>\n" % escape(author));
except:
print "Example %s lacks an author description" % (filename)
try:
copy = info['copy']
output.write(" <copy>%s</copy>\n" % escape(copy));
except:
print "Example %s lacks a copyright description" % (filename)
try:
section = info['section']
output.write(" <section>%s</section>\n" % escape(section));
if sections.has_key(section):
sections[section].append(filename)
else:
sections[section] = [filename]
except:
print "Example %s lacks a section description" % (filename)
for topic in info.keys():
if topic != "purpose" and topic != "usage" and \
topic != "author" and topic != "copy" and \
topic != "section" and topic != "synopsis" and topic != "test":
str = info[topic]
output.write(" <extra topic='%s'>%s</extra>\n" % (
escape(topic), escape(str)))
output.write(" <includes>\n")
for include in idx.includes.keys():
if include.find("libxml") != -1:
output.write(" <include>%s</include>\n" % (escape(include)))
output.write(" </includes>\n")
output.write(" <uses>\n")
for ref in idx.references.keys():
id = idx.references[ref]
name = id.get_name()
line = id.get_lineno()
if symbols.has_key(name):
sinfo = symbols[name]
refs = sinfo[0]
# gather at most 5 references per symbols
if refs > 5:
continue
sinfo.append(filename)
sinfo[0] = refs + 1
else:
symbols[name] = [1, filename]
info = find_symbol(name)
if info != None:
type = info[0]
file = info[1]
output.write(" <%s line='%d' file='%s' name='%s'/>\n" % (type,
line, file, name))
else:
type = id.get_type()
output.write(" <%s line='%d' name='%s'/>\n" % (type,
line, name))
output.write(" </uses>\n")
output.write(" </example>\n")
return idx
def dump_symbols(output):
global symbols
output.write(" <symbols>\n")
keys = symbols.keys()
keys.sort()
for symbol in keys:
output.write(" <symbol name='%s'>\n" % (symbol))
info = symbols[symbol]
i = 1
while i < len(info):
output.write(" <ref filename='%s'/>\n" % (info[i]))
i = i + 1
output.write(" </symbol>\n")
output.write(" </symbols>\n")
def dump_sections(output):
global sections
output.write(" <sections>\n")
keys = sections.keys()
keys.sort()
for section in keys:
output.write(" <section name='%s'>\n" % (section))
info = sections[section]
i = 0
while i < len(info):
output.write(" <example filename='%s'/>\n" % (info[i]))
i = i + 1
output.write(" </section>\n")
output.write(" </sections>\n")
def dump_Makefile():
for file in glob.glob('*.xml'):
extras.append(file)
for file in glob.glob('*.res'):
extras.append(file)
Makefile="""# -*- buffer-read-only: t -*- vi: set ro:
# Beware this is autogenerated by index.py
SUBDIRS=python
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include -I@srcdir@/include
DEPS = $(top_builddir)/src/libvirt.la
LDADDS = @STATIC_BINARIES@ $(WARN_CFLAGS) $(top_builddir)/src/libvirt.la \
$(COVERAGE_LDFLAGS)
rebuild: examples.xml index.html
examples.xml: index.py __C_SOURCES__
-@($(srcdir)/index.py)
index.html: examples.xml examples.xsl $(top_srcdir)/docs/site.xsl
-@(if [ -x $(XSLTPROC) ] ; then \\
$(XSLTPROC) examples.xsl examples.xml \\
&& echo "Rebuilt web page" \\
&& xmllint --valid --noout index.html; \\
fi)
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
-@INSTALL@ -m 0644 $(srcdir)/*.html $(srcdir)/*.c $(srcdir)/*.xml \\
$(srcdir)/*.xsl $(srcdir)/*.res $(DESTDIR)$(HTML_DIR)
"""
EXTRA_DIST= string.join(extras, ' ')
Makefile = Makefile + "EXTRA_DIST=%s\n\n" % (EXTRA_DIST)
noinst_PROGRAMS= string.join(examples, ' ')
Makefile = Makefile + "noinst_PROGRAMS=%s\n\n" % (noinst_PROGRAMS)
for example in examples:
Makefile = Makefile + "%s_SOURCES=%s.c\n%s_LDFLAGS=\n%s_DEPENDENCIES= $(DEPS)\n%s_LDADD= $(LDADDS)\n\n" % (example, example, example,
example, example)
Makefile = Makefile + "valgrind:\n\t$(MAKE) CHECKER='valgrind' tests\n\n"
Makefile = Makefile + "tests: $(noinst_PROGRAMS)\n"
Makefile = Makefile + "\t@(echo '## examples regression tests')\n"
# Makefile = Makefile + "\t@(echo > .memdump)\n"
for test in tests:
Makefile = Makefile + "\t@($(CHECKER) %s)\n" % (test)
# Makefile = Makefile + '\t@(grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" ; exit 0)\n'
c_src = [("%s.c" % x) for x in examples]
Makefile = Makefile.replace("__C_SOURCES__", string.join(c_src, ' '))
try:
old = open("Makefile.am", "r").read()
if old != Makefile:
n = open("Makefile.am", "w").write(Makefile)
print "Updated Makefile.am"
except:
print "Failed to read or save Makefile.am"
#
# Autogenerate the .cvsignore too ...
#
ignore = """.memdump
Makefile.in
Makefile
.deps
.libs
"""
for example in examples:
ignore = ignore + "%s\n" % (example)
try:
old = open(".cvsignore", "r").read()
if old != ignore:
n = open(".cvsignore", "w").write(ignore)
print "Updated .cvsignore"
except:
print "Failed to read or save .cvsignore"
if __name__ == "__main__":
load_api()
output = open("examples.xml", "w")
output.write("<examples>\n")
c_src = glob.glob('*.c')
c_src.sort()
for file in c_src:
parse(file, output)
examples.append(file[:-2])
dump_symbols(output)
dump_sections(output)
output.write("</examples>\n")
output.close()
dump_Makefile()

63
docs/examples/info1.c Normal file
View File

@ -0,0 +1,63 @@
/**
* section: Informations
* synopsis: Extract informations about Xen domain 0
* purpose: Demonstrate the basic use of the library to connect to the
* hypervisor and extract domain informations.
* usage: info1
* test: info1
* author: Daniel Veillard
* copy: see Copyright for the status of this software.
*/
#include <stdio.h>
#include <libvirt/libvirt.h>
/**
* getDomainInfo:
* @id: the id of the domain
*
* extract the domain 0 informations
*/
static void
getDomainInfo(int id) {
virConnectPtr conn = NULL; /* the hypervisor connection */
virDomainPtr dom = NULL; /* the domain being checked */
virDomainInfo info; /* the informations being fetched */
int ret;
/* NULL means connect to local Xen hypervisor */
conn = virConnectOpenReadOnly(NULL);
if (conn == NULL) {
fprintf(stderr, "Failed to connect to hypervisor\n");
goto error;
}
/* Find the domain of the given id */
dom = virDomainLookupByID(conn, id);
if (dom == NULL) {
fprintf(stderr, "Failed to find Domain %d\n", id);
goto error;
}
/* Get the informations */
ret = virDomainGetInfo(dom, &info);
if (ret < 0) {
fprintf(stderr, "Failed to get informations for Domain %d\n", id);
goto error;
}
printf("Domains %d: %d CPUs\n", id, info.nrVirtCpu);
error:
if (dom != NULL)
virDomainFree(dom);
if (conn != NULL)
virConnectClose(conn);
}
int main() {
getDomainInfo(0);
return(0);
}

View File

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

View File

@ -0,0 +1,4 @@
EXTRA_DIST= \
README \
dominfo.py domrestore.py domsave.py domstart.py \
guava.xml papaya.xml

View File

@ -0,0 +1,15 @@
Some simple examples on how to use the Python API for libvirt
The examples are:
dominfo.py - print information about a running domU based on the results of
virDomainGetInfo and virDomainGetXMLDesc
domstart.py - create a domU from an XML description if the domU isn't
running yet
domsave.py - save all running domU's into a directory
domrestore.py - restore domU's from their saved files in a directory
The XML files in this directory are examples of the XML format that libvirt
expects, and will have to be adapted for your setup. They are only needed
for domstart.py

86
docs/examples/python/dominfo.py Executable file
View File

@ -0,0 +1,86 @@
#! /usr/bin/python
# dominfo - print some information about a domain
import libvirt
import sys
import os
import libxml2
import pdb
def usage():
print 'Usage: %s DOMAIN' % sys.argv[0]
print ' Print information about the domain DOMAIN'
def print_section(title):
print "\n%s" % title
print "=" * 60
def print_entry(key, value):
print "%-10s %-10s" % (key, value)
def print_xml(key, ctx, path):
res = ctx.xpathEval(path)
if res is None or len(res) == 0:
value="Unknown"
else:
value = res[0].content
print_entry(key, value)
return value
if not os.access("/proc/xen", os.R_OK):
print 'System is not running a Xen kernel'
sys.exit(1)
if len(sys.argv) != 2:
usage()
sys.exit(2)
name = sys.argv[1]
# Connect to libvirt
conn = libvirt.openReadOnly(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
try:
dom = conn.lookupByName(name)
# Annoyiingly, libvirt prints its own error message here
except libvirt.libvirtError:
print "Domain %s is not runing" % name
sys.exit(0)
info = dom.info()
print_section("Domain info")
print_entry("State:", info[0])
print_entry("MaxMem:", info[1])
print_entry("UsedMem:", info[2])
print_entry("VCPUs:", info[3])
# Read some info from the XML desc
xmldesc = dom.XMLDesc(0)
doc = libxml2.parseDoc(xmldesc)
ctx = doc.xpathNewContext()
print_section("Kernel")
print_xml("Type:", ctx, "/domain/os/type")
print_xml("Kernel:", ctx, "/domain/os/kernel")
print_xml("initrd:", ctx, "/domain/os/initrd")
print_xml("cmdline:", ctx, "/domain/os/cmdline")
print_section("Devices")
devs = ctx.xpathEval("/domain/devices/*")
for d in devs:
ctx.setContextNode(d)
#pdb.set_trace()
type = print_xml("Type:", ctx, "@type")
if type == "file":
print_xml("Source:", ctx, "source/@file")
print_xml("Target:", ctx, "target/@dev")
elif type == "block":
print_xml("Source:", ctx, "source/@dev")
print_xml("Target:", ctx, "target/@dev")
elif type == "bridge":
print_xml("Source:", ctx, "source/@bridge")
print_xml("MAC Addr:", ctx, "mac/@address")

View File

@ -0,0 +1,36 @@
#! /usr/bin/python
# domstart - make sure a given domU is running, if not start it
import libvirt
import sys
import os
import libxml2
import pdb
def usage():
print 'Usage: %s DIR' % sys.argv[0]
print ' Restore all the domains contained in DIR'
print ' It is assumed that all files in DIR are'
print ' images of domU\'s previously created with save'
if len(sys.argv) != 2:
usage()
sys.exit(2)
dir = sys.argv[1]
imgs = os.listdir(dir)
conn = libvirt.open(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
for img in imgs:
file = os.path.join(dir, img)
print "Restoring %s ... " % img,
sys.stdout.flush()
ret = conn.restore(file)
if ret == 0:
print "done"
else:
print "error %d" % ret

40
docs/examples/python/domsave.py Executable file
View File

@ -0,0 +1,40 @@
#! /usr/bin/python
# domstart - make sure a given domU is running, if not start it
import libvirt
import sys
import os
import libxml2
import pdb
def usage():
print 'Usage: %s DIR' % sys.argv[0]
print ' Save all currently running domU\'s into DIR'
print ' DIR must exist and be writable by this process'
if len(sys.argv) != 2:
usage()
sys.exit(2)
dir = sys.argv[1]
conn = libvirt.open(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
doms = conn.listDomainsID()
for id in doms:
if id == 0:
continue
dom = conn.lookupByID(id)
print "Saving %s[%d] ... " % (dom.name(), id),
sys.stdout.flush()
path = os.path.join(dir, dom.name())
ret = dom.save(path)
if ret == 0:
print "done"
else:
print "error %d" % ret
#pdb.set_trace()

View File

@ -0,0 +1,50 @@
#! /usr/bin/python
# domstart - make sure a given domU is running, if not start it
import libvirt
import sys
import os
import libxml2
import pdb
# Parse the XML description of domU from FNAME
# and return a tuple (name, xmldesc) where NAME
# is the name of the domain, and xmldesc is the contetn of FNAME
def read_domain(fname):
fp = open(fname, "r")
xmldesc = fp.read()
fp.close()
doc = libxml2.parseDoc(xmldesc)
name = doc.xpathNewContext().xpathEval("/domain/name")[0].content
return (name, xmldesc)
def usage():
print 'Usage: %s domain.xml' % sys.argv[0]
print ' Check that the domain described by DOMAIN.XML is running'
print ' If the domain is not running, create it'
print ' DOMAIN.XML must be a XML description of the domain'
print ' in libvirt\'s XML format'
if len(sys.argv) != 2:
usage()
sys.exit(2)
(name, xmldesc) = read_domain(sys.argv[1])
conn = libvirt.openReadOnly(None)
if conn == None:
print 'Failed to open connection to the hypervisor'
sys.exit(1)
try:
dom = conn.lookupByName(name)
except libvirt.libvirtError:
print "Starting domain %s ... " % name,
sys.stdout.flush()
dom = conn.createLinux(xmldesc, 0)
if dom == None:
print "failed"
sys.exit(1)
else:
print "done"

View File

@ -0,0 +1,22 @@
<domain type='xen'>
<name>guava</name>
<os>
<type>linux</type>
<kernel>/var/xen/boot/vmlinuz-2.6.15-1.33_FC5guest</kernel>
<initrd>/var/xen/boot/initrd-2.6.15-1.33_FC5guest.img</initrd>
<cmdline>ro root=/dev/VolGroup00/LogVol00 rhgb quiet</cmdline>
</os>
<memory>262144</memory>
<vcpu>1</vcpu>
<devices>
<disk type='file'>
<source file='/var/xen/guava'/>
<target dev='xvda'/>
</disk>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='00:16:3e:78:a2:42'/>
<script path='/etc/xen/scripts/vif-bridge'/>
</interface>
</devices>
</domain>

View File

@ -0,0 +1,26 @@
<domain type='xen'>
<name>papaya</name>
<os>
<type>linux</type>
<kernel>/var/xen/boot/vmlinuz-2.6.15-1.33_FC5guest</kernel>
<initrd>/var/xen/boot/initrd-2.6.15-1.33_FC5guest.img</initrd>
<cmdline>ro root=/dev/VolGroup00/LogVol00 rhgb quiet single</cmdline>
</os>
<memory>262144</memory>
<vcpu>1</vcpu>
<devices>
<disk type='file'>
<source file='/var/xen/papaya'/>
<target dev='xvda'/>
</disk>
<disk type='block'>
<source dev='/dev/mapper/vg00-lv02'/>
<target dev='sda1'/>
</disk>
<interface type='bridge'>
<source bridge='xenbr0'/>
<mac address='00:16:3e:78:a2:0c'/>
<script path='/etc/xen/scripts/vif-bridge'/>
</interface>
</devices>
</domain>

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

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

421
docs/format.html Normal file
View File

@ -0,0 +1,421 @@
<?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>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><ul><li><a href="#Normal1">Normal paravirtualized Xen domains</a></li>
<li><a href="#Fully1">Fully virtualized Xen domains</a></li>
<li><a href="#KVM1">KVM domains</a></li>
<li><a href="#Net1">Networking options for QEmu and KVM</a></li>
<li><a href="#QEmu1">QEmu domains</a></li>
<li><a href="#Capa1">Discovering virtualization capabilities</a></li>
</ul><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;
&lt;name&gt;fc4&lt;/name&gt;
<span style="color: #00B200; background-color: #FFFFFF">&lt;os&gt;
&lt;type&gt;linux&lt;/type&gt;
&lt;kernel&gt;/boot/vmlinuz-2.6.15-1.43_FC5guest&lt;/kernel&gt;
&lt;initrd&gt;/boot/initrd-2.6.15-1.43_FC5guest.img&lt;/initrd&gt;
&lt;root&gt;/dev/sda1&lt;/root&gt;
&lt;cmdline&gt; ro selinux=0 3&lt;/cmdline&gt;
&lt;/os&gt;</span>
&lt;memory&gt;131072&lt;/memory&gt;
&lt;vcpu&gt;1&lt;/vcpu&gt;
&lt;devices&gt;
<span style="color: #FF0080; background-color: #FFFFFF">&lt;disk type='file'&gt;
&lt;source file='/u/fc4.img'/&gt;
&lt;target dev='sda1'/&gt;
&lt;/disk&gt;</span>
<span style="color: #0000FF; background-color: #FFFFFF">&lt;interface type='bridge'&gt;
&lt;source bridge='xenbr0'/&gt;
&lt;mac address='</span><span style="color: #0000FF; background-color: #FFFFFF"></span><span style="color: #0000FF; background-color: #FFFFFF">aa:00:00:00:00:11'/&gt;
&lt;script path='/etc/xen/scripts/vif-bridge'/&gt;
&lt;/interface&gt;</span>
<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
the default value. The <code>id</code> attribute gives the domain id at
runtime (not however that this may change, for example if the domain is saved
to disk and restored). The domain has a few children whose order is not
significant:</p><ul><li>name: the domain name, preferably ASCII based</li>
<li>memory: the maximum memory allocated to the domain in kilobytes</li>
<li>vcpu: the number of virtual cpu configured for the domain</li>
<li>os: a block describing the Operating System, its content will be
dependant on the OS type
<ul><li>type: indicate the OS type, always linux at this point</li>
<li>kernel: path to the kernel on the Domain 0 filesystem</li>
<li>initrd: an optional path for the init ramdisk on the Domain 0
filesystem</li>
<li>cmdline: optional command line to the kernel</li>
<li>root: the root filesystem from the guest viewpoint, it may be
passed as part of the cmdline content too</li>
</ul></li>
<li>devices: a list of <code>disk</code>, <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 <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 available 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>
<li>shareable an optional empty element indicating the device
can be used read/write with other domains</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 interface in the Domain 0</li>
<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><ul><li>destroy: The domain is cleaned up (that's the default normal processing
in Xen)</li>
<li>restart: A new domain is started in place of the old one with the same
configuration parameters</li>
<li>preserve: The domain will remain in memory until it is destroyed
manually, it won't be running but allows for post-mortem debugging</li>
<li>rename-restart: a variant of the previous one but where the old domain
is renamed before being saved to allow a restart</li>
</ul><p>The following could be used for a Xen production system:</p><pre>&lt;domain&gt;
...
&lt;on_reboot&gt;restart&lt;/on_reboot&gt;
&lt;on_poweroff&gt;destroy&lt;/on_poweroff&gt;
&lt;on_crash&gt;rename-restart&lt;/on_crash&gt;
...
&lt;/domain&gt;</pre><p>While the format may be extended in various ways as support for more
hypervisor types and features are added, it is expected that this core subset
will remain functional in spite of the evolution of the library.</p><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;
<span style="color: #0000E5; background-color: #FFFFFF">&lt;clock sync="localtime"/&gt;</span>
&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 optional <code>&lt;clock&gt;</code> element is used to specify
whether the emulated BIOS clock in the guest is synced to either
<code>localtime</code> or <code>utc</code>. In general Windows will
want <code>localtime</code> while all other operating systems will
want <code>utc</code>. The default is thus <code>utc</code></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><h3><a name="KVM1" id="KVM1">KVM domain (added in 0.2.0)</a></h3><p>Support for the <a href="http://kvm.qumranet.com/">KVM virtualization</a>
is provided in recent Linux kernels (2.6.20 and onward). This requires
specific hardware with acceleration support and the availability of the
special version of the <a href="http://fabrice.bellard.free.fr/qemu/">QEmu</a> binary. Since this
relies on QEmu for the machine emulation like fully virtualized guests the
XML description is quite similar, here is a simple example:</p><pre>&lt;domain <span style="color: #FF0000; background-color: #FFFFFF">type='kvm'</span>&gt;
&lt;name&gt;demo2&lt;/name&gt;
&lt;uuid&gt;4dea24b3-1d52-d8f3-2516-782e98a23fa0&lt;/uuid&gt;
&lt;memory&gt;131072&lt;/memory&gt;
&lt;vcpu&gt;1&lt;/vcpu&gt;
&lt;os&gt;
&lt;type&gt;hvm&lt;/type&gt;
&lt;/os&gt;
<span style="color: #0000E5; background-color: #FFFFFF">&lt;clock sync="localtime"/&gt;</span>
&lt;devices&gt;
<span style="color: #FF0000; background-color: #FFFFFF">&lt;emulator&gt;/home/user/usr/kvm-devel/bin/qemu-system-x86_64&lt;/emulator&gt;</span>
&lt;disk type='file' device='disk'&gt;
&lt;source file='/home/user/fedora/diskboot.img'/&gt;
&lt;target dev='hda'/&gt;
&lt;/disk&gt;
&lt;interface <span style="color: #FF0000; background-color: #FFFFFF">type='user'</span>&gt;
&lt;mac address='24:42:53:21:52:45'/&gt;
&lt;/interface&gt;
&lt;graphics type='vnc' port='-1'/&gt;
&lt;/devices&gt;
&lt;/domain&gt;</pre><p>The specific points to note if using KVM are:</p><ul><li>the top level domain element carries a type of 'kvm'</li>
<li>the &lt;clock&gt; optional is supported as with Xen HVM</li>
<li>the &lt;devices&gt; emulator points to the special qemu binary required
for KVM</li>
<li>networking interface definitions definitions are somewhat different due
to a different model from Xen see below</li>
</ul><p>except those points the options should be quite similar to Xen HVM
ones.</p><h3><a name="Net1" id="Net1">Networking options for QEmu and KVM (added in 0.2.0)</a></h3><p>The networking support in the QEmu and KVM case is more flexible, and
support a variety of options:</p><ol><li>Userspace SLIRP stack
<p>Provides a virtual LAN with NAT to the outside world. The virtual
network has DHCP &amp; DNS services and will give the guest VM addresses
starting from <code>10.0.2.15</code>. The default router will be
<code>10.0.2.2</code> and the DNS server will be <code>10.0.2.3</code>.
This networking is the only option for unprivileged users who need their
VMs to have outgoing access. Example configs are:</p>
<pre>&lt;interface type='user'/&gt;</pre>
<pre>
&lt;interface type='user'&gt;
&lt;mac address="11:22:33:44:55:66"/&gt;
&lt;/interface&gt;
</pre>
</li>
<li>Virtual network
<p>Provides a virtual network using a bridge device in the host.
Depending on the virtual network configuration, the network may be
totally isolated, NAT'ing to an explicit network device, or NAT'ing to
the default route. DHCP and DNS are provided on the virtual network in
all cases and the IP range can be determined by examining the virtual
network config with '<code>virsh net-dumpxml &lt;network
name&gt;</code>'. There is one virtual network called 'default' setup out
of the box which does NAT'ing to the default route and has an IP range of
<code>192.168.22.0/255.255.255.0</code>. Each guest will have an
associated tun device created with a name of vnetN, which can also be
overriden with the &lt;target&gt; element. Example configs are:</p>
<pre>&lt;interface type='network'&gt;
&lt;source network='default'/&gt;
&lt;/interface&gt;
&lt;interface type='network'&gt;
&lt;source network='default'/&gt;
&lt;target dev='vnet7'/&gt;
&lt;mac address="11:22:33:44:55:66"/&gt;
&lt;/interface&gt;
</pre>
</li>
<li>Bridge to to LAN
<p>Provides a bridge from the VM directly onto the LAN. This assumes
there is a bridge device on the host which has one or more of the hosts
physical NICs enslaved. The guest VM will have an associated tun device
created with a name of vnetN, which can also be overriden with the
&lt;target&gt; element. The tun device will be enslaved to the bridge.
The IP range / network configuration is whatever is used on the LAN. This
provides the guest VM full incoming &amp; outgoing net access just like a
physical machine. Examples include:</p>
<pre>&lt;interface type='bridge'&gt;
&lt;source bridge='br0'/&gt;
&lt;/interface&gt;
&lt;interface type='bridge'&gt;
&lt;source bridge='br0'/&gt;
&lt;target dev='vnet7'/&gt;
&lt;mac address="11:22:33:44:55:66"/&gt;
&lt;/interface&gt;</pre>
</li>
<li>Generic connection to LAN
<p>Provides a means for the administrator to execute an arbitrary script
to connect the guest's network to the LAN. The guest will have a tun
device created with a name of vnetN, which can also be overriden with the
&lt;target&gt; element. After creating the tun device a shell script will
be run which is expected to do whatever host network integration is
required. By default this script is called /etc/qemu-ifup but can be
overriden.</p>
<pre>&lt;interface type='ethernet'/&gt;
&lt;interface type='ethernet'&gt;
&lt;target dev='vnet7'/&gt;
&lt;script path='/etc/qemu-ifup-mynet'/&gt;
&lt;/interface&gt;</pre>
</li>
<li>Multicast tunnel
<p>A multicast group is setup to represent a virtual network. Any VMs
whose network devices are in the same multicast group can talk to each
other even across hosts. This mode is also available to unprivileged
users. There is no default DNS or DHCP support and no outgoing network
access. To provide outgoing network access, one of the VMs should have a
2nd NIC which is connected to one of the first 4 network types and do the
appropriate routing. The multicast protocol is compatible with that used
by user mode linux guests too. The source address used must be from the
multicast address block.</p>
<pre>&lt;interface type='mcast'&gt;
&lt;source address='230.0.0.1' port='5558'/&gt;
&lt;/interface&gt;</pre>
</li>
<li>TCP tunnel
<p>A TCP client/server architecture provides a virtual network. One VM
provides the server end of the network, all other VMS are configured as
clients. All network traffic is routed between the VMs via the server.
This mode is also available to unprivileged users. There is no default
DNS or DHCP support and no outgoing network access. To provide outgoing
network access, one of the VMs should have a 2nd NIC which is connected
to one of the first 4 network types and do the appropriate routing.</p>
<p>Example server config:</p>
<pre>&lt;interface type='server'&gt;
&lt;source address='192.168.0.1' port='5558'/&gt;
&lt;/interface&gt;</pre>
<p>Example client config:</p>
<pre>&lt;interface type='client'&gt;
&lt;source address='192.168.0.1' port='5558'/&gt;
&lt;/interface&gt;</pre>
</li>
</ol><p>To be noted, options 2, 3, 4 are also supported by Xen VMs, so it is
possible to use these configs to have networking with both Xen &amp;
QEMU/KVMs connected to each other.</p><h3>Q<a name="QEmu1" id="QEmu1">Emu domain (added in 0.2.0)</a></h3><p>Libvirt support for KVM and QEmu is the same code base with only minor
changes. The configuration is as a result nearly identical, the only changes
are related to QEmu ability to emulate <a href="http://www.qemu.org/status.html">various CPU type and hardware
platforms</a>, and kqemu support (QEmu own kernel accelerator when the
emulated CPU is i686 as well as the target machine):</p><pre>&lt;domain <span style="color: #FF0000; background-color: #FFFFFF">type='qemu'</span>&gt;
&lt;name&gt;QEmu-fedora-i686&lt;/name&gt;
&lt;uuid&gt;c7a5fdbd-cdaf-9455-926a-d65c16db1809&lt;/uuid&gt;
&lt;memory&gt;219200&lt;/memory&gt;
&lt;currentMemory&gt;219200&lt;/currentMemory&gt;
&lt;vcpu&gt;2&lt;/vcpu&gt;
&lt;os&gt;
<span style="color: #FF0000; background-color: #FFFFFF">&lt;type arch='i686' machine='pc'&gt;hvm&lt;/type&gt;</span>
&lt;boot dev='cdrom'/&gt;
&lt;/os&gt;
&lt;devices&gt;
<span style="color: #FF0000; background-color: #FFFFFF">&lt;emulator&gt;/usr/bin/qemu&lt;/emulator&gt;</span>
&lt;disk type='file' device='cdrom'&gt;
&lt;source file='/home/user/boot.iso'/&gt;
&lt;target dev='hdc'/&gt;
&lt;readonly/&gt;
&lt;/disk&gt;
&lt;disk type='file' device='disk'&gt;
&lt;source file='/home/user/fedora.img'/&gt;
&lt;target dev='hda'/&gt;
&lt;/disk&gt;
&lt;interface type='network'&gt;
&lt;source name='default'/&gt;
&lt;/interface&gt;
&lt;graphics type='vnc' port='-1'/&gt;
&lt;/devices&gt;
&lt;/domain&gt;</pre><p>The difference here are:</p><ul><li>the value of type on top-level domain, it's 'qemu' or kqemu if asking
for <a href="http://www.qemu.org/kqemu-tech.html">kernel assisted
acceleration</a></li>
<li>the os type block defines the architecture to be emulated, and
optionally the machine type, see the discovery API below</li>
<li>the emulator string must point to the right emulator for that
architecture</li>
</ul><h3><a name="Capa1" id="Capa1">Discovering virtualization capabilities (Added in 0.2.1)</a></h3><p>As new virtualization engine support gets added to libvirt, and to handle
cases like QEmu supporting a variety of emulations, a query interface has
been added in 0.2.1 allowing to list the set of supported virtualization
capabilities on the host:</p><pre> char * virConnectGetCapabilities (virConnectPtr conn);</pre><p>The value returned is an XML document listing the virtualization
capabilities of the host and virtualization engine to which
<code>@conn</code> is connected. One can test it using <code>virsh</code>
command line tool command '<code>capabilities</code>', it dumps the XML
associated to the current connection. For example in the case of a 64 bits
machine with hardware virtualization capabilities enabled in the chip and
BIOS you will see</p><pre>&lt;capabilities&gt;
<span style="color: #E50000; background-color: #FFFFFF">&lt;host&gt;
&lt;cpu&gt;
&lt;arch&gt;x86_64&lt;/arch&gt;
&lt;features&gt;
&lt;vmx/&gt;
&lt;/features&gt;
&lt;/cpu&gt;
&lt;/host&gt;</span>
&lt;!-- xen-3.0-x86_64 --&gt;
<span style="color: #0000E5; background-color: #FFFFFF">&lt;guest&gt;
&lt;os_type&gt;xen&lt;/os_type&gt;
&lt;arch name="x86_64"&gt;
&lt;wordsize&gt;64&lt;/wordsize&gt;
&lt;domain type="xen"&gt;&lt;/domain&gt;
&lt;emulator&gt;/usr/lib64/xen/bin/qemu-dm&lt;/emulator&gt;
&lt;/arch&gt;
&lt;features&gt;
&lt;/features&gt;
&lt;/guest&gt;</span>
&lt;!-- hvm-3.0-x86_32 --&gt;
<span style="color: #00B200; background-color: #FFFFFF">&lt;guest&gt;
&lt;os_type&gt;hvm&lt;/os_type&gt;
&lt;arch name="i686"&gt;
&lt;wordsize&gt;32&lt;/wordsize&gt;
&lt;domain type="xen"&gt;&lt;/domain&gt;
&lt;emulator&gt;/usr/lib/xen/bin/qemu-dm&lt;/emulator&gt;
&lt;machine&gt;pc&lt;/machine&gt;
&lt;machine&gt;isapc&lt;/machine&gt;
&lt;loader&gt;/usr/lib/xen/boot/hvmloader&lt;/loader&gt;
&lt;/arch&gt;
&lt;features&gt;
&lt;/features&gt;
&lt;/guest&gt;</span>
...
&lt;/capabilities&gt;</pre><p>The first block (in red) indicates the host hardware capbilities, currently
it is limited to the CPU properties but other information may be available,
it shows the CPU architecture, and the features of the chip (the feature
block is similar to what you will find in a Xen fully virtualized domain
description).</p><p>The second block (in blue) indicates the paravirtualization support of the
Xen support, you will see the os_type of xen to indicate a paravirtual
kernel, then architecture informations and potential features.</p><p>The third block (in green) gives similar informations but when running a
32 bit OS fully virtualized with Xen using the hvm support.</p><p>This section is likely to be updated and augmented in the future, see <a href="https://www.redhat.com/archives/libvir-list/2007-March/msg00215.html">the
discussion</a> which led to the capabilities format in the mailing-list
archives.</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">Bindings for other languages</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="windows.html">Windows support</a></li><li><a href="remote.html">Remote support</a></li><li><a href="auth.html">Access control</a></li><li><a href="uri.html">Connection URIs</a></li><li><a href="hvsupport.html">Hypervisor support</a></li><li><a href="storage.html">Storage Management</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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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,13 +1,3 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><style type="text/css">
div.deprecated pre.programlisting {border-style: double;border-color:red}
pre.programlisting {border-style: double;background: #EECFA1}
</style><title>Reference Manual for libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libvir-libvir.html">libvir</a>: core interfaces for the libvir library</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li><li><a href="libvirt-virterror.html">virterror</a>: error handling interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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,13 +1,3 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><style type="text/css">
div.deprecated pre.programlisting {border-style: double;border-color:red}
pre.programlisting {border-style: double;background: #EECFA1}
</style><title>Reference Manual for libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libvir-libvir.html">libvir</a>: core interfaces for the libvir library</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Reference Manual for libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Reference Manual for libvirt</h1><h2>Table of Contents</h2><ul><li><a href="libvirt-libvirt.html">libvirt</a>: core interfaces for the libvirt library</li><li><a href="libvirt-virterror.html">virterror</a>: error handling interfaces for the libvirt library</li></ul></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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,13 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><style type="text/css">
div.deprecated pre.programlisting {border-style: double;border-color:red}
pre.programlisting {border-style: double;background: #EECFA1}
</style><title>Reference Manual for libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Reference Manual for libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><h2>Table of Contents</h2><ul><li><a href="libvir-libvir.html">libvir</a>: core interfaces for the libvir library</li></ul><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

View File

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><style type="text/css">
div.deprecated pre.programlisting {border-style: double;border-color:red}
pre.programlisting {border-style: double;background: #EECFA1}
</style><title>Module libvir from libvir</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="../redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1></h1><h2>Module libvir from libvir</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a style="font-weight:bold" href="../index.html">Main Menu</a></li><li><a style="font-weight:bold" href="index.html">API Menu</a></li><li><a href="../ChangeLog.html">ChangeLog</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="../APIchunk0.html">Alphabetic</a></li><li><a href="../APIconstructors.html">Constructors</a></li><li><a href="../APIfunctions.html">Functions/Types</a></li><li><a href="../APIfiles.html">Modules</a></li><li><a href="../APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The virtualization API</a></th></tr></table><p>Provides the interfaces of the libvir library to handle Xen domains from a process running in domain 0 </p><h2>Table of Contents</h2><pre class="programlisting">#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a></pre><pre class="programlisting">Structure <a href="#virConnect">virConnect</a><br />struct _virConnect
The content of this structure is not made public by the API.
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virConnect">virConnect</a> * <a name="virConnectPtr" id="virConnectPtr">virConnectPtr</a>
</pre><pre class="programlisting">Structure <a href="#virDomain">virDomain</a><br />struct _virDomain
The content of this structure is not made public by the API.
</pre><pre class="programlisting">Enum <a href="#virDomainCreateFlags">virDomainCreateFlags</a>
</pre><pre class="programlisting">Structure <a href="#virDomainInfo">virDomainInfo</a><br />struct _virDomainInfo
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virDomainInfo">virDomainInfo</a> * <a name="virDomainInfoPtr" id="virDomainInfoPtr">virDomainInfoPtr</a>
</pre><pre class="programlisting">Typedef <a href="libvir-libvir.html#virDomain">virDomain</a> * <a name="virDomainPtr" id="virDomainPtr">virDomainPtr</a>
</pre><pre class="programlisting">Enum <a href="#virDomainState">virDomainState</a>
</pre><pre class="programlisting">int <a href="#virConnectClose">virConnectClose</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">const char * <a href="#virConnectGetType">virConnectGetType</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virConnectGetVersion">virConnectGetVersion</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)</pre>
<pre class="programlisting">int <a href="#virConnectListDomains">virConnectListDomains</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)</pre>
<pre class="programlisting">int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpenReadOnly">virConnectOpenReadOnly</a> (const char * name)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateLinux">virDomainCreateLinux</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * kernel_path, <br /> const char * initrd_path, <br /> const char * cmdline, <br /> unsigned long memory, <br /> unsigned int flags)</pre>
<pre class="programlisting">int <a href="#virDomainDestroy">virDomainDestroy</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainFree">virDomainFree</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">unsigned int <a href="#virDomainGetID">virDomainGetID</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainGetInfo">virDomainGetInfo</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvir-libvir.html#virDomainInfoPtr">virDomainInfoPtr</a> info)</pre>
<pre class="programlisting">unsigned long <a href="#virDomainGetMaxMemory">virDomainGetMaxMemory</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">char * <a href="#virDomainGetOSType">virDomainGetOSType</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">char * <a href="#virDomainGetXMLDesc">virDomainGetXMLDesc</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByID">virDomainLookupByID</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)</pre>
<pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainLookupByName">virDomainLookupByName</a> (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)</pre>
<pre class="programlisting">int <a href="#virDomainResume">virDomainResume</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)</pre>
<pre class="programlisting">int <a href="#virDomainShutdown">virDomainShutdown</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainSuspend">virDomainSuspend</a> (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virGetVersion">virGetVersion</a> (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)</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="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>
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.
<h3><a name="virDomain" id="virDomain">Structure virDomain</a></h3><pre class="programlisting">Structure virDomain<br />struct _virDomain {
The content of this structure is not made public by the API.
}</pre><h3>Enum <a name="virDomainCreateFlags" id="virDomainCreateFlags">virDomainCreateFlags</a></h3><pre class="programlisting">Enum virDomainCreateFlags {
<a name="VIR_DOMAIN_NONE" id="VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a> = 0
}
</pre><h3><a name="virDomainInfo" id="virDomainInfo">Structure virDomainInfo</a></h3><pre class="programlisting">Structure virDomainInfo<br />struct _virDomainInfo {
unsigned char state : the running state, one of virDomainFlag
unsigned long maxMem : the maximum memory in KBytes allowed
unsigned long memory : the memory in KBytes used by the domain
unsigned short nrVirtCpu : * Informations below are only available
unsigned long long cpuTime : * TODO: * - check what can be extracted
}</pre>
a virDomainInfoPtr is a pointer to a virDomainInfo structure.
a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a Xen domain in the API.
<h3>Enum <a name="virDomainState" id="virDomainState">virDomainState</a></h3><pre class="programlisting">Enum virDomainState {
<a name="VIR_DOMAIN_NOSTATE" id="VIR_DOMAIN_NOSTATE">VIR_DOMAIN_NOSTATE</a> = 0 : no state
<a name="VIR_DOMAIN_RUNNING" id="VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a> = 1 : the domain is running
<a name="VIR_DOMAIN_BLOCKED" id="VIR_DOMAIN_BLOCKED">VIR_DOMAIN_BLOCKED</a> = 2 : the domain is blocked on resource
<a name="VIR_DOMAIN_PAUSED" id="VIR_DOMAIN_PAUSED">VIR_DOMAIN_PAUSED</a> = 3 : the domain is paused by user
<a name="VIR_DOMAIN_SHUTDOWN" id="VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a> = 4 : the domain is being shut down
<a name="VIR_DOMAIN_SHUTOFF" id="VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a> = 5 : the domain is shut off
}
</pre><h3><a name="virConnectClose" id="virConnectClose"></a>Function: virConnectClose</h3><pre class="programlisting">int virConnectClose (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConnectGetType" id="virConnectGetType"></a>Function: virConnectGetType</h3><pre class="programlisting">const char * virConnectGetType (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Get the name of the Hypervisor software used.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a static zero terminated string otherwise.</td></tr></tbody></table></div><h3><a name="virConnectGetVersion" id="virConnectGetVersion"></a>Function: virConnectGetVersion</h3><pre class="programlisting">int virConnectGetVersion (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)<br />
</pre><p>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>hvVer</tt></i>:</span></td><td>return value for the version of the running hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release</td></tr></tbody></table></div><h3><a name="virConnectListDomains" id="virConnectListDomains"></a>Function: virConnectListDomains</h3><pre class="programlisting">int virConnectListDomains (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)<br />
</pre><p>Collect the list of active domains, and store their ID in @maxids</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><span class="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDomains" id="virConnectNumOfDomains"></a>Function: virConnectNumOfDomains</h3><pre class="programlisting">int virConnectNumOfDomains (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provides the number of active domains.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpen" id="virConnectOpen"></a>Function: virConnectOpen</h3><pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> virConnectOpen (const char * name)<br />
</pre><p>This function should be called first to get a connection to the Hypervisor and xen store</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virConnectOpenReadOnly" id="virConnectOpenReadOnly"></a>Function: virConnectOpenReadOnly</h3><pre class="programlisting"><a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> virConnectOpenReadOnly (const char * name)<br />
</pre><p>This function should be called first to get a read-only connection to the xen store. The set of APIs usable are then restricted.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>optional argument currently unused, pass NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error</td></tr></tbody></table></div><h3><a name="virDomainCreateLinux" id="virDomainCreateLinux"></a>Function: virDomainCreateLinux</h3><pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> virDomainCreateLinux (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * kernel_path, <br /> const char * initrd_path, <br /> const char * cmdline, <br /> unsigned long memory, <br /> unsigned int flags)<br />
</pre><p>Launch a new Linux guest domain, unimplemented yet, API to be defined. This would 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>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>kernel_path</tt></i>:</span></td><td>the file path to the kernel image</td></tr><tr><td><span class="term"><i><tt>initrd_path</tt></i>:</span></td><td>an optional file path to an initrd</td></tr><tr><td><span class="term"><i><tt>cmdline</tt></i>:</span></td><td>optional command line parameters for the kernel</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>an optional set of virDomainFlags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainDestroy" id="virDomainDestroy"></a>Function: virDomainDestroy</h3><pre class="programlisting">int virDomainDestroy (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function 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</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainFree" id="virDomainFree"></a>Function: virDomainFree</h3><pre class="programlisting">int virDomainFree (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetID" id="virDomainGetID"></a>Function: virDomainGetID</h3><pre class="programlisting">unsigned int virDomainGetID (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Get the hypervisor ID number for the domain</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the domain ID number or (unsigned int) -1 in case of error</td></tr></tbody></table></div><h3><a name="virDomainGetInfo" id="virDomainGetInfo"></a>Function: virDomainGetInfo</h3><pre class="programlisting">int virDomainGetInfo (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvir-libvir.html#virDomainInfoPtr">virDomainInfoPtr</a> info)<br />
</pre><p>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the informations can be extracted.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <a href="libvir-libvir.html#virDomainInfo">virDomainInfo</a> structure allocated by the user</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainGetMaxMemory" id="virDomainGetMaxMemory"></a>Function: virDomainGetMaxMemory</h3><pre class="programlisting">unsigned long virDomainGetMaxMemory (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the memory size in kilobytes or 0 in case of error.</td></tr></tbody></table></div><h3><a name="virDomainGetName" id="virDomainGetName"></a>Function: virDomainGetName</h3><pre class="programlisting">const char * virDomainGetName (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Get the public name for that domain</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.</td></tr></tbody></table></div><h3><a name="virDomainGetOSType" id="virDomainGetOSType"></a>Function: virDomainGetOSType</h3><pre class="programlisting">char * virDomainGetOSType (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Get the type of domain operation system.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL in case of error</td></tr></tbody></table></div><h3><a name="virDomainGetXMLDesc" id="virDomainGetXMLDesc"></a>Function: virDomainGetXMLDesc</h3><pre class="programlisting">char * virDomainGetXMLDesc (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)<br />
</pre><p>Provide an XML description of the domain. NOTE: this API is subject to changes.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virDomainLookupByID" id="virDomainLookupByID"></a>Function: virDomainLookupByID</h3><pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> virDomainLookupByID (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> int id)<br />
</pre><p>Try to find a domain based on the hypervisor ID number</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>id</tt></i>:</span></td><td>the domain ID number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainLookupByName" id="virDomainLookupByName"></a>Function: virDomainLookupByName</h3><pre class="programlisting"><a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> virDomainLookupByName (<a href="libvir-libvir.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
</pre><p>Try to lookup a domain on the given hypervisor based on its name.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainResume" id="virDomainResume"></a>Function: virDomainResume</h3><pre class="programlisting">int virDomainResume (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function 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</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSetMaxMemory" id="virDomainSetMaxMemory"></a>Function: virDomainSetMaxMemory</h3><pre class="programlisting">int virDomainSetMaxMemory (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)<br />
</pre><p>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainShutdown" id="virDomainShutdown"></a>Function: virDomainShutdown</h3><pre class="programlisting">int virDomainShutdown (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. TODO: should we add an option for reboot, knowing it may not be doable in the general case ?</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSuspend" id="virDomainSuspend"></a>Function: virDomainSuspend</h3><pre class="programlisting">int virDomainSuspend (<a href="libvir-libvir.html#virDomainPtr">virDomainPtr</a> domain)<br />
</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 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</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virGetVersion" id="virGetVersion"></a>Function: virGetVersion</h3><pre class="programlisting">int virGetVersion (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)<br />
</pre><p>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>libVer</tt></i>:</span></td><td>return value for the library version (OUT)</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>hypervisor type</td></tr><tr><td><span class="term"><i><tt>typeVer</tt></i>:</span></td><td>return value for the version of the hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.</td></tr></tbody></table></div><p><a href="../bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>

View File

@ -0,0 +1,44 @@
<?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 conf 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 conf from libvirt</h1><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libvirt-virterror.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libvirt-virterror.html">virterror</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The virtualization API</a></th></tr></table><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#virConf">virConf</a><br />struct _virConf
The content of this structure is not made public by the API.
</pre><pre class="programlisting">Typedef <a href="libvirt-conf.html#virConf">virConf</a> * <a name="virConfPtr" id="virConfPtr">virConfPtr</a>
</pre><pre class="programlisting">Enum <a href="#virConfType">virConfType</a>
</pre><pre class="programlisting">Structure <a href="#virConfValue">virConfValue</a><br />struct _virConfValue
</pre><pre class="programlisting">Typedef <a href="libvirt-conf.html#virConfValue">virConfValue</a> * <a name="virConfValuePtr" id="virConfValuePtr">virConfValuePtr</a>
</pre><pre class="programlisting">int <a href="#virConfFree">virConfFree</a> (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)</pre>
<pre class="programlisting"><a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> <a href="#virConfGetValue">virConfGetValue</a> (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf, <br /> const char * setting)</pre>
<pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> <a href="#virConfReadFile">virConfReadFile</a> (const char * filename)</pre>
<pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> <a href="#virConfReadMem">virConfReadMem</a> (const char * memory, <br /> int len)</pre>
<pre class="programlisting">int <a href="#virConfWriteFile">virConfWriteFile</a> (const char * filename, <br /> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)</pre>
<pre class="programlisting">int <a href="#virConfWriteMem">virConfWriteMem</a> (char * memory, <br /> int * len, <br /> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)</pre>
<h2>Description</h2>
<h3><a name="virConf" id="virConf">Structure virConf</a></h3><pre class="programlisting">Structure virConf<br />struct _virConf {
The content of this structure is not made public by the API.
}</pre>
a pointer to a parsed configuration file
<h3>Enum <a name="virConfType" id="virConfType">virConfType</a></h3><pre class="programlisting">Enum virConfType {
<a name="VIR_CONF_NONE" id="VIR_CONF_NONE">VIR_CONF_NONE</a> = 0 : undefined
<a name="VIR_CONF_LONG" id="VIR_CONF_LONG">VIR_CONF_LONG</a> = 1 : a long int
<a name="VIR_CONF_STRING" id="VIR_CONF_STRING">VIR_CONF_STRING</a> = 2 : a string
<a name="VIR_CONF_LIST" id="VIR_CONF_LIST">VIR_CONF_LIST</a> = 3 : a list
}
</pre><h3><a name="virConfValue" id="virConfValue">Structure virConfValue</a></h3><pre class="programlisting">Structure virConfValue<br />struct _virConfValue {
<a href="libvirt-conf.html#virConfType">virConfType</a> type : the <a href="libvirt-conf.html#virConfType">virConfType</a>
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> next : next element if in a list
long l : long integer
char * str : pointer to 0 terminated string
<a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> list : list of a list
}</pre><h3><a name="virConfFree" id="virConfFree"></a>Function: virConfFree</h3><pre class="programlisting">int virConfFree (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br />
</pre><p>Frees all data associated to the handle</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConfGetValue" id="virConfGetValue"></a>Function: virConfGetValue</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfValuePtr">virConfValuePtr</a> virConfGetValue (<a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf, <br /> const char * setting)<br />
</pre><p>Lookup the value associated to this entry in the configuration file</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>a configuration file handle</td></tr><tr><td><span class="term"><i><tt>setting</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the value or NULL if the lookup failed, the data associated will be freed when virConfFree() is called</td></tr></tbody></table></div><h3><a name="virConfReadFile" id="virConfReadFile"></a>Function: virConfReadFile</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadFile (const char * filename)<br />
</pre><p>Reads a configuration file.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to read or parse the file, use virConfFree() to free the data.</td></tr></tbody></table></div><h3><a name="virConfReadMem" id="virConfReadMem"></a>Function: virConfReadMem</h3><pre class="programlisting"><a href="libvirt-conf.html#virConfPtr">virConfPtr</a> virConfReadMem (const char * memory, <br /> int len)<br />
</pre><p>Reads a configuration file loaded in memory. The string can be zero terminated in which case @len can be 0</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the content of the configuration file</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>lenght in byte</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an handle to lookup settings or NULL if it failed to parse the content, use virConfFree() to free the data.</td></tr></tbody></table></div><h3><a name="virConfWriteFile" id="virConfWriteFile"></a>Function: virConfWriteFile</h3><pre class="programlisting">int virConfWriteFile (const char * filename, <br /> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br />
</pre><p>Writes a configuration file back to a file.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the path to the configuration file.</td></tr><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virConfWriteMem" id="virConfWriteMem"></a>Function: virConfWriteMem</h3><pre class="programlisting">int virConfWriteMem (char * memory, <br /> int * len, <br /> <a href="libvirt-conf.html#virConfPtr">virConfPtr</a> conf)<br />
</pre><p>Writes a configuration file back to a memory area. @len is an IN/OUT parameter, it indicates the size available in bytes, and on output the size required for the configuration file (even if the call fails due to insufficient space).</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>memory</tt></i>:</span></td><td>pointer to the memory to store the config file</td></tr><tr><td><span class="term"><i><tt>len</tt></i>:</span></td><td>pointer to the lenght in byte of the store, on output the size</td></tr><tr><td><span class="term"><i><tt>conf</tt></i>:</span></td><td>the conf</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error.</td></tr></tbody></table></div></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</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

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

View File

@ -0,0 +1,590 @@
<?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">#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_DOMAIN_SCHED_FIELD_LENGTH">VIR_DOMAIN_SCHED_FIELD_LENGTH</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">#define <a href="#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a></pre><pre class="programlisting">#define <a href="#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</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">Structure <a href="#virConnectAuth">virConnectAuth</a><br />struct _virConnectAuth
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virConnectAuth">virConnectAuth</a> * <a name="virConnectAuthPtr" id="virConnectAuthPtr">virConnectAuthPtr</a>
</pre><pre class="programlisting">Structure <a href="#virConnectCredential">virConnectCredential</a><br />struct _virConnectCredential
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virConnectCredential">virConnectCredential</a> * <a name="virConnectCredentialPtr" id="virConnectCredentialPtr">virConnectCredentialPtr</a>
</pre><pre class="programlisting">Enum <a href="#virConnectCredentialType">virConnectCredentialType</a>
</pre><pre class="programlisting">Enum <a href="#virConnectFlags">virConnectFlags</a>
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virConnect">virConnect</a> * <a name="virConnectPtr" id="virConnectPtr">virConnectPtr</a>
</pre><pre class="programlisting">Structure <a href="#virDomain">virDomain</a><br />struct _virDomain
The content of this structure is not made public by the API.
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomainBlockStatsStruct">virDomainBlockStatsStruct</a> * <a name="virDomainBlockStatsPtr" id="virDomainBlockStatsPtr">virDomainBlockStatsPtr</a>
</pre><pre class="programlisting">Structure <a href="#virDomainBlockStatsStruct">virDomainBlockStatsStruct</a><br />struct _virDomainBlockStats
</pre><pre class="programlisting">Enum <a href="#virDomainCreateFlags">virDomainCreateFlags</a>
</pre><pre class="programlisting">Structure <a href="#virDomainInfo">virDomainInfo</a><br />struct _virDomainInfo
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomainInfo">virDomainInfo</a> * <a name="virDomainInfoPtr" id="virDomainInfoPtr">virDomainInfoPtr</a>
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomainInterfaceStatsStruct">virDomainInterfaceStatsStruct</a> * <a name="virDomainInterfaceStatsPtr" id="virDomainInterfaceStatsPtr">virDomainInterfaceStatsPtr</a>
</pre><pre class="programlisting">Structure <a href="#virDomainInterfaceStatsStruct">virDomainInterfaceStatsStruct</a><br />struct _virDomainInterfaceStats
</pre><pre class="programlisting">Enum <a href="#virDomainMigrateFlags">virDomainMigrateFlags</a>
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virDomain">virDomain</a> * <a name="virDomainPtr" id="virDomainPtr">virDomainPtr</a>
</pre><pre class="programlisting">Enum <a href="#virDomainState">virDomainState</a>
</pre><pre class="programlisting">Enum <a href="#virDomainXMLFlags">virDomainXMLFlags</a>
</pre><pre class="programlisting">Structure <a href="#virNetwork">virNetwork</a><br />struct _virNetwork
The content of this structure is not made public by the API.
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virNetwork">virNetwork</a> * <a name="virNetworkPtr" id="virNetworkPtr">virNetworkPtr</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="#virSchedParameter">virSchedParameter</a><br />struct _virSchedParameter
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virSchedParameter">virSchedParameter</a> * <a name="virSchedParameterPtr" id="virSchedParameterPtr">virSchedParameterPtr</a>
</pre><pre class="programlisting">Enum <a href="#virSchedParameterType">virSchedParameterType</a>
</pre><pre class="programlisting">Structure <a href="#virStoragePool">virStoragePool</a><br />struct _virStoragePool
The content of this structure is not made public by the API.
</pre><pre class="programlisting">Enum <a href="#virStoragePoolBuildFlags">virStoragePoolBuildFlags</a>
</pre><pre class="programlisting">Enum <a href="#virStoragePoolDeleteFlags">virStoragePoolDeleteFlags</a>
</pre><pre class="programlisting">Structure <a href="#virStoragePoolInfo">virStoragePoolInfo</a><br />struct _virStoragePoolInfo
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virStoragePoolInfo">virStoragePoolInfo</a> * <a name="virStoragePoolInfoPtr" id="virStoragePoolInfoPtr">virStoragePoolInfoPtr</a>
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virStoragePool">virStoragePool</a> * <a name="virStoragePoolPtr" id="virStoragePoolPtr">virStoragePoolPtr</a>
</pre><pre class="programlisting">Enum <a href="#virStoragePoolState">virStoragePoolState</a>
</pre><pre class="programlisting">Structure <a href="#virStorageVol">virStorageVol</a><br />struct _virStorageVol
The content of this structure is not made public by the API.
</pre><pre class="programlisting">Enum <a href="#virStorageVolDeleteFlags">virStorageVolDeleteFlags</a>
</pre><pre class="programlisting">Structure <a href="#virStorageVolInfo">virStorageVolInfo</a><br />struct _virStorageVolInfo
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virStorageVolInfo">virStorageVolInfo</a> * <a name="virStorageVolInfoPtr" id="virStorageVolInfoPtr">virStorageVolInfoPtr</a>
</pre><pre class="programlisting">Typedef <a href="libvirt-libvirt.html#virStorageVol">virStorageVol</a> * <a name="virStorageVolPtr" id="virStorageVolPtr">virStorageVolPtr</a>
</pre><pre class="programlisting">Enum <a href="#virStorageVolType">virStorageVolType</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">Function type: <a href="#virConnectAuthCallbackPtr">virConnectAuthCallbackPtr</a>
int <a href="#virConnectAuthCallbackPtr">virConnectAuthCallbackPtr</a> (<a href="libvirt-libvirt.html#virConnectCredentialPtr">virConnectCredentialPtr</a> cred, <br /> unsigned int ncred, <br /> void * cbdata)
</pre>
<pre class="programlisting">int <a href="#virConnectClose">virConnectClose</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">char * <a href="#virConnectGetCapabilities">virConnectGetCapabilities</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">char * <a href="#virConnectGetHostname">virConnectGetHostname</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virConnectGetMaxVcpus">virConnectGetMaxVcpus</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * type)</pre>
<pre class="programlisting">const char * <a href="#virConnectGetType">virConnectGetType</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">char * <a href="#virConnectGetURI">virConnectGetURI</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>
<pre class="programlisting">int <a href="#virConnectListDefinedDomains">virConnectListDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)</pre>
<pre class="programlisting">int <a href="#virConnectListDefinedNetworks">virConnectListDefinedNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)</pre>
<pre class="programlisting">int <a href="#virConnectListDefinedStoragePools">virConnectListDefinedStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)</pre>
<pre class="programlisting">int <a href="#virConnectListDomains">virConnectListDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)</pre>
<pre class="programlisting">int <a href="#virConnectListNetworks">virConnectListNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)</pre>
<pre class="programlisting">int <a href="#virConnectListStoragePools">virConnectListStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)</pre>
<pre class="programlisting">int <a href="#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virConnectNumOfDefinedNetworks">virConnectNumOfDefinedNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virConnectNumOfDefinedStoragePools">virConnectNumOfDefinedStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virConnectNumOfNetworks">virConnectNumOfNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virConnectNumOfStoragePools">virConnectNumOfStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpenAuth">virConnectOpenAuth</a> (const char * name, <br /> <a href="libvirt-libvirt.html#virConnectAuthPtr">virConnectAuthPtr</a> auth, <br /> int flags)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpenReadOnly">virConnectOpenReadOnly</a> (const char * name)</pre>
<pre class="programlisting">int <a href="#virDomainAttachDevice">virDomainAttachDevice</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * xml)</pre>
<pre class="programlisting">int <a href="#virDomainBlockStats">virDomainBlockStats</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> const char * path, <br /> <a href="libvirt-libvirt.html#virDomainBlockStatsPtr">virDomainBlockStatsPtr</a> stats, <br /> size_t size)</pre>
<pre class="programlisting">int <a href="#virDomainCoreDump">virDomainCoreDump</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to, <br /> int flags)</pre>
<pre class="programlisting">int <a href="#virDomainCreate">virDomainCreate</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateLinux">virDomainCreateLinux</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)</pre>
<pre class="programlisting"><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)</pre>
<pre class="programlisting">int <a href="#virDomainDestroy">virDomainDestroy</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainDetachDevice">virDomainDetachDevice</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * xml)</pre>
<pre class="programlisting">int <a href="#virDomainFree">virDomainFree</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainGetAutostart">virDomainGetAutostart</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int * autostart)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virDomainGetConnect">virDomainGetConnect</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom)</pre>
<pre class="programlisting">unsigned int <a href="#virDomainGetID">virDomainGetID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainGetInfo">virDomainGetInfo</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a> info)</pre>
<pre class="programlisting">unsigned long <a href="#virDomainGetMaxMemory">virDomainGetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">int <a href="#virDomainGetMaxVcpus">virDomainGetMaxVcpus</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<pre class="programlisting">const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)</pre>
<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="#virDomainGetSchedulerParameters">virDomainGetSchedulerParameters</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br /> int * nparams)</pre>
<pre class="programlisting">char * <a href="#virDomainGetSchedulerType">virDomainGetSchedulerType</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int * nparams)</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">int <a href="#virDomainInterfaceStats">virDomainInterfaceStats</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> const char * path, <br /> <a href="libvirt-libvirt.html#virDomainInterfaceStatsPtr">virDomainInterfaceStatsPtr</a> stats, <br /> size_t size)</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"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainMigrate">virDomainMigrate</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> dconn, <br /> unsigned long flags, <br /> const char * dname, <br /> const char * uri, <br /> unsigned long bandwidth)</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="#virDomainSetAutostart">virDomainSetAutostart</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int autostart)</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="#virDomainSetSchedulerParameters">virDomainSetSchedulerParameters</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br /> int nparams)</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>
<pre class="programlisting">int <a href="#virGetVersion">virGetVersion</a> (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)</pre>
<pre class="programlisting">int <a href="#virInitialize">virInitialize</a> (void)</pre>
<pre class="programlisting">int <a href="#virNetworkCreate">virNetworkCreate</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkCreateXML">virNetworkCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkDefineXML">virNetworkDefineXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml)</pre>
<pre class="programlisting">int <a href="#virNetworkDestroy">virNetworkDestroy</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)</pre>
<pre class="programlisting">int <a href="#virNetworkFree">virNetworkFree</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)</pre>
<pre class="programlisting">int <a href="#virNetworkGetAutostart">virNetworkGetAutostart</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int * autostart)</pre>
<pre class="programlisting">char * <a href="#virNetworkGetBridgeName">virNetworkGetBridgeName</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virNetworkGetConnect">virNetworkGetConnect</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> net)</pre>
<pre class="programlisting">const char * <a href="#virNetworkGetName">virNetworkGetName</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)</pre>
<pre class="programlisting">int <a href="#virNetworkGetUUID">virNetworkGetUUID</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> unsigned char * uuid)</pre>
<pre class="programlisting">int <a href="#virNetworkGetUUIDString">virNetworkGetUUIDString</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> char * buf)</pre>
<pre class="programlisting">char * <a href="#virNetworkGetXMLDesc">virNetworkGetXMLDesc</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int flags)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkLookupByName">virNetworkLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkLookupByUUID">virNetworkLookupByUUID</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> <a href="#virNetworkLookupByUUIDString">virNetworkLookupByUUIDString</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * uuidstr)</pre>
<pre class="programlisting">int <a href="#virNetworkSetAutostart">virNetworkSetAutostart</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int autostart)</pre>
<pre class="programlisting">int <a href="#virNetworkUndefine">virNetworkUndefine</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)</pre>
<pre class="programlisting">int <a href="#virNodeGetCellsFreeMemory">virNodeGetCellsFreeMemory</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long long * freeMems, <br /> int startCell, <br /> int maxCells)</pre>
<pre class="programlisting">unsigned long long <a href="#virNodeGetFreeMemory">virNodeGetFreeMemory</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">int <a href="#virNodeGetInfo">virNodeGetInfo</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> info)</pre>
<pre class="programlisting">int <a href="#virStoragePoolBuild">virStoragePoolBuild</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)</pre>
<pre class="programlisting">int <a href="#virStoragePoolCreate">virStoragePoolCreate</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolCreateXML">virStoragePoolCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolDefineXML">virStoragePoolDefineXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml, <br /> unsigned int flags)</pre>
<pre class="programlisting">int <a href="#virStoragePoolDelete">virStoragePoolDelete</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)</pre>
<pre class="programlisting">int <a href="#virStoragePoolDestroy">virStoragePoolDestroy</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)</pre>
<pre class="programlisting">int <a href="#virStoragePoolFree">virStoragePoolFree</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)</pre>
<pre class="programlisting">int <a href="#virStoragePoolGetAutostart">virStoragePoolGetAutostart</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int * autostart)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virStoragePoolGetConnect">virStoragePoolGetConnect</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)</pre>
<pre class="programlisting">int <a href="#virStoragePoolGetInfo">virStoragePoolGetInfo</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> <a href="libvirt-libvirt.html#virStoragePoolInfoPtr">virStoragePoolInfoPtr</a> info)</pre>
<pre class="programlisting">const char * <a href="#virStoragePoolGetName">virStoragePoolGetName</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)</pre>
<pre class="programlisting">int <a href="#virStoragePoolGetUUID">virStoragePoolGetUUID</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned char * uuid)</pre>
<pre class="programlisting">int <a href="#virStoragePoolGetUUIDString">virStoragePoolGetUUIDString</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> char * buf)</pre>
<pre class="programlisting">char * <a href="#virStoragePoolGetXMLDesc">virStoragePoolGetXMLDesc</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)</pre>
<pre class="programlisting">int <a href="#virStoragePoolListVolumes">virStoragePoolListVolumes</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> char ** const names, <br /> int maxnames)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolLookupByName">virStoragePoolLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolLookupByUUID">virStoragePoolLookupByUUID</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolLookupByUUIDString">virStoragePoolLookupByUUIDString</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * uuidstr)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolLookupByVolume">virStoragePoolLookupByVolume</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)</pre>
<pre class="programlisting">int <a href="#virStoragePoolNumOfVolumes">virStoragePoolNumOfVolumes</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)</pre>
<pre class="programlisting">int <a href="#virStoragePoolRefresh">virStoragePoolRefresh</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)</pre>
<pre class="programlisting">int <a href="#virStoragePoolSetAutostart">virStoragePoolSetAutostart</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int autostart)</pre>
<pre class="programlisting">int <a href="#virStoragePoolUndefine">virStoragePoolUndefine</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolCreateXML">virStorageVolCreateXML</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> unsigned int flags)</pre>
<pre class="programlisting">int <a href="#virStorageVolDelete">virStorageVolDelete</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)</pre>
<pre class="programlisting">int <a href="#virStorageVolFree">virStorageVolFree</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virStorageVolGetConnect">virStorageVolGetConnect</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)</pre>
<pre class="programlisting">int <a href="#virStorageVolGetInfo">virStorageVolGetInfo</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> <a href="libvirt-libvirt.html#virStorageVolInfoPtr">virStorageVolInfoPtr</a> info)</pre>
<pre class="programlisting">const char * <a href="#virStorageVolGetKey">virStorageVolGetKey</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)</pre>
<pre class="programlisting">const char * <a href="#virStorageVolGetName">virStorageVolGetName</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)</pre>
<pre class="programlisting">char * <a href="#virStorageVolGetPath">virStorageVolGetPath</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)</pre>
<pre class="programlisting">char * <a href="#virStorageVolGetXMLDesc">virStorageVolGetXMLDesc</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolLookupByKey">virStorageVolLookupByKey</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * key)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolLookupByName">virStorageVolLookupByName</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * name)</pre>
<pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolLookupByPath">virStorageVolLookupByPath</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * path)</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 conjunction 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 conjunction 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 conjunction 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_DOMAIN_SCHED_FIELD_LENGTH" id="VIR_DOMAIN_SCHED_FIELD_LENGTH"></a>Macro: VIR_DOMAIN_SCHED_FIELD_LENGTH</h3><pre>#define VIR_DOMAIN_SCHED_FIELD_LENGTH</pre><p>Macro providing the field length of <a href="libvirt-libvirt.html#virSchedParameter">virSchedParameter</a></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 conjunction 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 necessary 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 conjunction 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 conjunction with virDomainPinVcpu() API. USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.</p>
<h3><a name="VIR_UUID_BUFLEN" id="VIR_UUID_BUFLEN"></a>Macro: VIR_UUID_BUFLEN</h3><pre>#define VIR_UUID_BUFLEN</pre><p>This macro provides the length of the buffer required for virDomainGetUUID()</p>
<h3><a name="VIR_UUID_STRING_BUFLEN" id="VIR_UUID_STRING_BUFLEN"></a>Macro: VIR_UUID_STRING_BUFLEN</h3><pre>#define VIR_UUID_STRING_BUFLEN</pre><p>This macro provides the length of the buffer required for virDomainGetUUIDString()</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><h3><a name="virConnectAuth" id="virConnectAuth">Structure virConnectAuth</a></h3><pre class="programlisting">Structure virConnectAuth<br />struct _virConnectAuth {
int * credtype : List of supported virConnectCredentialT
unsigned int ncredtype
<a href="libvirt-libvirt.html#virConnectAuthCallbackPtr">virConnectAuthCallbackPtr</a> cb : Callback used to collect credentials
void * cbdata
}</pre><h3><a name="virConnectCredential" id="virConnectCredential">Structure virConnectCredential</a></h3><pre class="programlisting">Structure virConnectCredential<br />struct _virConnectCredential {
int type : One of <a href="libvirt-libvirt.html#virConnectCredentialType">virConnectCredentialType</a> constan
const char * prompt : Prompt to show to user
const char * challenge : Additional challenge to show
const char * defresult : Optional default result
char * result : Result to be filled with user response
unsigned int resultlen : Length of the result
}</pre><h3>Enum <a name="virConnectCredentialType" id="virConnectCredentialType">virConnectCredentialType</a></h3><pre class="programlisting">Enum virConnectCredentialType {
<a name="VIR_CRED_USERNAME" id="VIR_CRED_USERNAME">VIR_CRED_USERNAME</a> = 1 : Identity to act as
<a name="VIR_CRED_AUTHNAME" id="VIR_CRED_AUTHNAME">VIR_CRED_AUTHNAME</a> = 2 : Identify to authorize as
<a name="VIR_CRED_LANGUAGE" id="VIR_CRED_LANGUAGE">VIR_CRED_LANGUAGE</a> = 3 : RFC 1766 languages, comma separated
<a name="VIR_CRED_CNONCE" id="VIR_CRED_CNONCE">VIR_CRED_CNONCE</a> = 4 : client supplies a nonce
<a name="VIR_CRED_PASSPHRASE" id="VIR_CRED_PASSPHRASE">VIR_CRED_PASSPHRASE</a> = 5 : Passphrase secret
<a name="VIR_CRED_ECHOPROMPT" id="VIR_CRED_ECHOPROMPT">VIR_CRED_ECHOPROMPT</a> = 6 : Challenge response
<a name="VIR_CRED_NOECHOPROMPT" id="VIR_CRED_NOECHOPROMPT">VIR_CRED_NOECHOPROMPT</a> = 7 : Challenge response
<a name="VIR_CRED_REALM" id="VIR_CRED_REALM">VIR_CRED_REALM</a> = 8 : Authentication realm
<a name="VIR_CRED_EXTERNAL" id="VIR_CRED_EXTERNAL">VIR_CRED_EXTERNAL</a> = 9 : Externally managed credential More may be added - expect the unexpected
}
</pre><h3>Enum <a name="virConnectFlags" id="virConnectFlags">virConnectFlags</a></h3><pre class="programlisting">Enum virConnectFlags {
<a name="VIR_CONNECT_RO" id="VIR_CONNECT_RO">VIR_CONNECT_RO</a> = 1 : A readonly connection
}
</pre>
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.
<h3><a name="virDomain" id="virDomain">Structure virDomain</a></h3><pre class="programlisting">Structure virDomain<br />struct _virDomain {
The content of this structure is not made public by the API.
}</pre>
A pointer to a virDomainBlockStats structure
<h3><a name="virDomainBlockStatsStruct" id="virDomainBlockStatsStruct">Structure virDomainBlockStatsStruct</a></h3><pre class="programlisting">Structure virDomainBlockStatsStruct<br />struct _virDomainBlockStats {
long long rd_req : number of read requests
long long rd_bytes : number of read bytes
long long wr_req : number of write requests
long long wr_bytes : numbber of written bytes
long long errs : In Xen this returns the mysterious 'oo_
}</pre><h3>Enum <a name="virDomainCreateFlags" id="virDomainCreateFlags">virDomainCreateFlags</a></h3><pre class="programlisting">Enum virDomainCreateFlags {
<a name="VIR_DOMAIN_NONE" id="VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a> = 0
}
</pre><h3><a name="virDomainInfo" id="virDomainInfo">Structure virDomainInfo</a></h3><pre class="programlisting">Structure virDomainInfo<br />struct _virDomainInfo {
unsigned char state : the running state, one of virDomainFlag
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 doma
unsigned long long cpuTime : the CPU time used in nanoseconds
}</pre>
a virDomainInfoPtr is a pointer to a virDomainInfo structure.
A pointer to a virDomainInterfaceStats structure
<h3><a name="virDomainInterfaceStatsStruct" id="virDomainInterfaceStatsStruct">Structure virDomainInterfaceStatsStruct</a></h3><pre class="programlisting">Structure virDomainInterfaceStatsStruct<br />struct _virDomainInterfaceStats {
long long rx_bytes
long long rx_packets
long long rx_errs
long long rx_drop
long long tx_bytes
long long tx_packets
long long tx_errs
long long tx_drop
}</pre><h3>Enum <a name="virDomainMigrateFlags" id="virDomainMigrateFlags">virDomainMigrateFlags</a></h3><pre class="programlisting">Enum virDomainMigrateFlags {
<a name="VIR_MIGRATE_LIVE" id="VIR_MIGRATE_LIVE">VIR_MIGRATE_LIVE</a> = 1 : live migration
}
</pre>
a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a Xen domain in the API.
<h3>Enum <a name="virDomainState" id="virDomainState">virDomainState</a></h3><pre class="programlisting">Enum virDomainState {
<a name="VIR_DOMAIN_NOSTATE" id="VIR_DOMAIN_NOSTATE">VIR_DOMAIN_NOSTATE</a> = 0 : no state
<a name="VIR_DOMAIN_RUNNING" id="VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a> = 1 : the domain is running
<a name="VIR_DOMAIN_BLOCKED" id="VIR_DOMAIN_BLOCKED">VIR_DOMAIN_BLOCKED</a> = 2 : the domain is blocked on resource
<a name="VIR_DOMAIN_PAUSED" id="VIR_DOMAIN_PAUSED">VIR_DOMAIN_PAUSED</a> = 3 : the domain is paused by user
<a name="VIR_DOMAIN_SHUTDOWN" id="VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a> = 4 : the domain is being shut down
<a name="VIR_DOMAIN_SHUTOFF" id="VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a> = 5 : the domain is shut off
<a name="VIR_DOMAIN_CRASHED" id="VIR_DOMAIN_CRASHED">VIR_DOMAIN_CRASHED</a> = 6 : the domain is crashed
}
</pre><h3>Enum <a name="virDomainXMLFlags" id="virDomainXMLFlags">virDomainXMLFlags</a></h3><pre class="programlisting">Enum virDomainXMLFlags {
<a name="VIR_DOMAIN_XML_SECURE" id="VIR_DOMAIN_XML_SECURE">VIR_DOMAIN_XML_SECURE</a> = 1 : dump security sensitive informations too
<a name="VIR_DOMAIN_XML_INACTIVE" id="VIR_DOMAIN_XML_INACTIVE">VIR_DOMAIN_XML_INACTIVE</a> = 2 : dump inactive domain informations
}
</pre><h3><a name="virNetwork" id="virNetwork">Structure virNetwork</a></h3><pre class="programlisting">Structure virNetwork<br />struct _virNetwork {
The content of this structure is not made public by the API.
}</pre>
a virNetworkPtr is pointer to a virNetwork private structure, this is the type used to reference a virtual network in the API.
<h3><a name="virNodeInfo" id="virNodeInfo">Structure virNodeInfo</a></h3><pre class="programlisting">Structure virNodeInfo<br />struct _virNodeInfo {
charmodel[32] model : string indicating the CPU model
unsigned long memory : memory size in kilobytes
unsigned int cpus : the number of active CPUs
unsigned int mhz : expected CPU frequency
unsigned int nodes : the number of NUMA cell, 1 for uniform
unsigned int sockets : number of CPU socket per node
unsigned int cores : number of core per socket
unsigned int threads : number of threads per core
}</pre>
a virNodeInfoPtr is a pointer to a virNodeInfo structure.
<h3><a name="virSchedParameter" id="virSchedParameter">Structure virSchedParameter</a></h3><pre class="programlisting">Structure virSchedParameter<br />struct _virSchedParameter {
charfield[VIR_DOMAIN_SCHED_FIELD_LENGTH] field : parameter name
int type : parameter type
}</pre>
a virSchedParameterPtr is a pointer to a virSchedParameter structure.
<h3>Enum <a name="virSchedParameterType" id="virSchedParameterType">virSchedParameterType</a></h3><pre class="programlisting">Enum virSchedParameterType {
<a name="VIR_DOMAIN_SCHED_FIELD_INT" id="VIR_DOMAIN_SCHED_FIELD_INT">VIR_DOMAIN_SCHED_FIELD_INT</a> = 1 : integer case
<a name="VIR_DOMAIN_SCHED_FIELD_UINT" id="VIR_DOMAIN_SCHED_FIELD_UINT">VIR_DOMAIN_SCHED_FIELD_UINT</a> = 2 : unsigned integer case
<a name="VIR_DOMAIN_SCHED_FIELD_LLONG" id="VIR_DOMAIN_SCHED_FIELD_LLONG">VIR_DOMAIN_SCHED_FIELD_LLONG</a> = 3 : long long case
<a name="VIR_DOMAIN_SCHED_FIELD_ULLONG" id="VIR_DOMAIN_SCHED_FIELD_ULLONG">VIR_DOMAIN_SCHED_FIELD_ULLONG</a> = 4 : unsigned long long case
<a name="VIR_DOMAIN_SCHED_FIELD_DOUBLE" id="VIR_DOMAIN_SCHED_FIELD_DOUBLE">VIR_DOMAIN_SCHED_FIELD_DOUBLE</a> = 5 : double case
<a name="VIR_DOMAIN_SCHED_FIELD_BOOLEAN" id="VIR_DOMAIN_SCHED_FIELD_BOOLEAN">VIR_DOMAIN_SCHED_FIELD_BOOLEAN</a> = 6 : boolean(character) case
}
</pre><h3><a name="virStoragePool" id="virStoragePool">Structure virStoragePool</a></h3><pre class="programlisting">Structure virStoragePool<br />struct _virStoragePool {
The content of this structure is not made public by the API.
}</pre><h3>Enum <a name="virStoragePoolBuildFlags" id="virStoragePoolBuildFlags">virStoragePoolBuildFlags</a></h3><pre class="programlisting">Enum virStoragePoolBuildFlags {
<a name="VIR_STORAGE_POOL_BUILD_NEW" id="VIR_STORAGE_POOL_BUILD_NEW">VIR_STORAGE_POOL_BUILD_NEW</a> = 0 : Regular build from scratch
<a name="VIR_STORAGE_POOL_BUILD_REPAIR" id="VIR_STORAGE_POOL_BUILD_REPAIR">VIR_STORAGE_POOL_BUILD_REPAIR</a> = 1 : Repair / reinitialize
<a name="VIR_STORAGE_POOL_BUILD_RESIZE" id="VIR_STORAGE_POOL_BUILD_RESIZE">VIR_STORAGE_POOL_BUILD_RESIZE</a> = 2 : Extend existing pool
}
</pre><h3>Enum <a name="virStoragePoolDeleteFlags" id="virStoragePoolDeleteFlags">virStoragePoolDeleteFlags</a></h3><pre class="programlisting">Enum virStoragePoolDeleteFlags {
<a name="VIR_STORAGE_POOL_DELETE_NORMAL" id="VIR_STORAGE_POOL_DELETE_NORMAL">VIR_STORAGE_POOL_DELETE_NORMAL</a> = 0 : Delete metadata only (fast)
<a name="VIR_STORAGE_POOL_DELETE_ZEROED" id="VIR_STORAGE_POOL_DELETE_ZEROED">VIR_STORAGE_POOL_DELETE_ZEROED</a> = 1 : Clear all data to zeros (slow)
}
</pre><h3><a name="virStoragePoolInfo" id="virStoragePoolInfo">Structure virStoragePoolInfo</a></h3><pre class="programlisting">Structure virStoragePoolInfo<br />struct _virStoragePoolInfo {
int state : <a href="libvirt-libvirt.html#virStoragePoolState">virStoragePoolState</a> flags
unsigned long long capacity : Logical size bytes
unsigned long long allocation : Current allocation bytes
unsigned long long available : Remaining free space bytes
}</pre>
a virStoragePoolPtr is pointer to a virStoragePool private structure, this is the type used to reference a storage pool in the API.
<h3>Enum <a name="virStoragePoolState" id="virStoragePoolState">virStoragePoolState</a></h3><pre class="programlisting">Enum virStoragePoolState {
<a name="VIR_STORAGE_POOL_INACTIVE" id="VIR_STORAGE_POOL_INACTIVE">VIR_STORAGE_POOL_INACTIVE</a> = 0 : Not running
<a name="VIR_STORAGE_POOL_BUILDING" id="VIR_STORAGE_POOL_BUILDING">VIR_STORAGE_POOL_BUILDING</a> = 1 : Initializing pool, not available
<a name="VIR_STORAGE_POOL_RUNNING" id="VIR_STORAGE_POOL_RUNNING">VIR_STORAGE_POOL_RUNNING</a> = 2 : Running normally
<a name="VIR_STORAGE_POOL_DEGRADED" id="VIR_STORAGE_POOL_DEGRADED">VIR_STORAGE_POOL_DEGRADED</a> = 3 : Running degraded
}
</pre><h3><a name="virStorageVol" id="virStorageVol">Structure virStorageVol</a></h3><pre class="programlisting">Structure virStorageVol<br />struct _virStorageVol {
The content of this structure is not made public by the API.
}</pre><h3>Enum <a name="virStorageVolDeleteFlags" id="virStorageVolDeleteFlags">virStorageVolDeleteFlags</a></h3><pre class="programlisting">Enum virStorageVolDeleteFlags {
<a name="VIR_STORAGE_VOL_DELETE_NORMAL" id="VIR_STORAGE_VOL_DELETE_NORMAL">VIR_STORAGE_VOL_DELETE_NORMAL</a> = 0 : Delete metadata only (fast)
<a name="VIR_STORAGE_VOL_DELETE_ZEROED" id="VIR_STORAGE_VOL_DELETE_ZEROED">VIR_STORAGE_VOL_DELETE_ZEROED</a> = 1 : Clear all data to zeros (slow)
}
</pre><h3><a name="virStorageVolInfo" id="virStorageVolInfo">Structure virStorageVolInfo</a></h3><pre class="programlisting">Structure virStorageVolInfo<br />struct _virStorageVolInfo {
int type : <a href="libvirt-libvirt.html#virStorageVolType">virStorageVolType</a> flags
unsigned long long capacity : Logical size bytes
unsigned long long allocation : Current allocation bytes
}</pre>
a virStorageVolPtr is pointer to a virStorageVol private structure, this is the type used to reference a storage volume in the API.
<h3>Enum <a name="virStorageVolType" id="virStorageVolType">virStorageVolType</a></h3><pre class="programlisting">Enum virStorageVolType {
<a name="VIR_STORAGE_VOL_FILE" id="VIR_STORAGE_VOL_FILE">VIR_STORAGE_VOL_FILE</a> = 0 : Regular file based volumes
<a name="VIR_STORAGE_VOL_BLOCK" id="VIR_STORAGE_VOL_BLOCK">VIR_STORAGE_VOL_BLOCK</a> = 1 : Block based volumes
}
</pre><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="virConnectAuthCallbackPtr" id="virConnectAuthCallbackPtr"></a>Function type: virConnectAuthCallbackPtr</h3><pre class="programlisting">Function type: virConnectAuthCallbackPtr
int virConnectAuthCallbackPtr (<a href="libvirt-libvirt.html#virConnectCredentialPtr">virConnectCredentialPtr</a> cred, <br /> unsigned int ncred, <br /> void * cbdata)
</pre><p></p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>cred</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>ncred</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>cbdata</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><br />
<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="virConnectGetCapabilities" id="virConnectGetCapabilities"></a>Function: virConnectGetCapabilities</h3><pre class="programlisting">char * virConnectGetCapabilities (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provides capabilities of the hypervisor / driver.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, or an XML string defining the capabilities. The client must free the returned string after use.</td></tr></tbody></table></div><h3><a name="virConnectGetHostname" id="virConnectGetHostname"></a>Function: virConnectGetHostname</h3><pre class="programlisting">char * virConnectGetHostname (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>This returns the system hostname on which the hypervisor is running (the result of the gethostname(2) system call). If we are connected to a remote system, then this returns the hostname of the remote system.</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 a hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the hostname which must be freed by the caller, or NULL if there was an error.</td></tr></tbody></table></div><h3><a name="virConnectGetMaxVcpus" id="virConnectGetMaxVcpus"></a>Function: virConnectGetMaxVcpus</h3><pre class="programlisting">int virConnectGetMaxVcpus (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * type)<br />
</pre><p>Provides the maximum number of virtual CPUs supported for a guest VM of a specific type. The 'type' parameter here corresponds to the 'type' attribute in the &lt;domain&gt; element of the XML.</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>type</tt></i>:</span></td><td>value of the 'type' attribute in the &lt;domain&gt; element</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the maximum of virtual CPU 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>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a static zero terminated string otherwise. See also: http://www.redhat.com/archives/libvir-list/2007-February/msg00096.html</td></tr></tbody></table></div><h3><a name="virConnectGetURI" id="virConnectGetURI"></a>Function: virConnectGetURI</h3><pre class="programlisting">char * virConnectGetURI (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>This returns the URI (name) of the hypervisor connection. Normally this is the same as or similar to the string passed to the virConnectOpen/virConnectOpenReadOnly call, but the driver may make the URI canonical. If name == NULL was passed to virConnectOpen, then the driver will return a non-NULL URI which can be used to connect to the same hypervisor later.</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 a hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the URI string which must be freed by the caller, or NULL if there was an error.</td></tr></tbody></table></div><h3><a name="virConnectGetVersion" id="virConnectGetVersion"></a>Function: virConnectGetVersion</h3><pre class="programlisting">int virConnectGetVersion (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)<br />
</pre><p>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>hvVer</tt></i>:</span></td><td>return value for the version of the running hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release</td></tr></tbody></table></div><h3><a name="virConnectListDefinedDomains" id="virConnectListDefinedDomains"></a>Function: virConnectListDefinedDomains</h3><pre class="programlisting">int virConnectListDefinedDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
</pre><p>list the defined domains, stores the pointers to the names in @names</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>names</tt></i>:</span></td><td>pointer to an array to store the names</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of names provided in the array or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListDefinedNetworks" id="virConnectListDefinedNetworks"></a>Function: virConnectListDefinedNetworks</h3><pre class="programlisting">int virConnectListDefinedNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
</pre><p>list the inactive networks, stores the pointers to the names in @names</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>names</tt></i>:</span></td><td>pointer to an array to store the names</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of names provided in the array or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListDefinedStoragePools" id="virConnectListDefinedStoragePools"></a>Function: virConnectListDefinedStoragePools</h3><pre class="programlisting">int virConnectListDefinedStoragePools (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
</pre><p>Provides the list of names of inactive storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array of char * to fill with pool names (allocated by caller)</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the names array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on error</td></tr></tbody></table></div><h3><a name="virConnectListDomains" id="virConnectListDomains"></a>Function: virConnectListDomains</h3><pre class="programlisting">int virConnectListDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)<br />
</pre><p>Collect the list of active domains, and store their ID in @maxids</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><span class="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListNetworks" id="virConnectListNetworks"></a>Function: virConnectListNetworks</h3><pre class="programlisting">int virConnectListNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
</pre><p>Collect the list of active networks, and store their names in @names</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>names</tt></i>:</span></td><td>array to collect the list of names of active networks</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of @names</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of networks found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListStoragePools" id="virConnectListStoragePools"></a>Function: virConnectListStoragePools</h3><pre class="programlisting">int virConnectListStoragePools (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
</pre><p>Provides the list of names of active storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array of char * to fill with pool names (allocated by caller)</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the names array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDefinedDomains" id="virConnectNumOfDefinedDomains"></a>Function: virConnectNumOfDefinedDomains</h3><pre class="programlisting">int virConnectNumOfDefinedDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provides the number of inactive domains.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDefinedNetworks" id="virConnectNumOfDefinedNetworks"></a>Function: virConnectNumOfDefinedNetworks</h3><pre class="programlisting">int virConnectNumOfDefinedNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provides the number of inactive networks.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of networks found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDefinedStoragePools" id="virConnectNumOfDefinedStoragePools"></a>Function: virConnectNumOfDefinedStoragePools</h3><pre class="programlisting">int virConnectNumOfDefinedStoragePools (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provides the number of inactive storage pools</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of pools found, or -1 on error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDomains" id="virConnectNumOfDomains"></a>Function: virConnectNumOfDomains</h3><pre class="programlisting">int virConnectNumOfDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provides the number of active domains.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfNetworks" id="virConnectNumOfNetworks"></a>Function: virConnectNumOfNetworks</h3><pre class="programlisting">int virConnectNumOfNetworks (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provides the number of active networks.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of network found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfStoragePools" id="virConnectNumOfStoragePools"></a>Function: virConnectNumOfStoragePools</h3><pre class="programlisting">int virConnectNumOfStoragePools (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provides the number of active storage pools</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of pools found, or -1 on error</td></tr></tbody></table></div><h3><a name="virConnectOpen" id="virConnectOpen"></a>Function: virConnectOpen</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpen (const char * name)<br />
</pre><p>This function should be called first to get a connection to the Hypervisor and xen store</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>URI of the hypervisor</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div><h3><a name="virConnectOpenAuth" id="virConnectOpenAuth"></a>Function: virConnectOpenAuth</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpenAuth (const char * name, <br /> <a href="libvirt-libvirt.html#virConnectAuthPtr">virConnectAuthPtr</a> auth, <br /> int flags)<br />
</pre><p>This function should be called first to get a connection to the Hypervisor. If neccessary, authentication will be performed fetching credentials via the callback</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>URI of the hypervisor</td></tr><tr><td><span class="term"><i><tt>auth</tt></i>:</span></td><td>Authenticate callback parameters</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>Open flags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div><h3><a name="virConnectOpenReadOnly" id="virConnectOpenReadOnly"></a>Function: virConnectOpenReadOnly</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virConnectOpenReadOnly (const char * name)<br />
</pre><p>This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>URI of the hypervisor</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div><h3><a name="virDomainAttachDevice" id="virDomainAttachDevice"></a>Function: virDomainAttachDevice</h3><pre class="programlisting">int virDomainAttachDevice (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * xml)<br />
</pre><p>Create a virtual device attachment to backend.</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</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>pointer to XML description of one device</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="virDomainBlockStats" id="virDomainBlockStats"></a>Function: virDomainBlockStats</h3><pre class="programlisting">int virDomainBlockStats (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> const char * path, <br /> <a href="libvirt-libvirt.html#virDomainBlockStatsPtr">virDomainBlockStatsPtr</a> stats, <br /> size_t size)<br />
</pre><p>This function returns block device (disk) stats for block devices attached to the domain. The path parameter is the name of the block device. Get this by calling <a href="libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a> and finding the &lt;target dev='...'&gt; attribute within //domain/devices/disk. (For example, "xvda"). Domains may have more than one block device. To get stats for each you should make multiple calls to this function. Individual fields within the stats structure may be returned as -1, which indicates that the hypervisor does not support that particular statistic.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dom</tt></i>:</span></td><td>pointer to the domain object</td></tr><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>path to the block device</td></tr><tr><td><span class="term"><i><tt>stats</tt></i>:</span></td><td>block device stats (returned)</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>size of stats structure</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 failure.</td></tr></tbody></table></div><h3><a name="virDomainCoreDump" id="virDomainCoreDump"></a>Function: virDomainCoreDump</h3><pre class="programlisting">int virDomainCoreDump (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to, <br /> int flags)<br />
</pre><p>This method will dump the core of a domain on a given file for analysis. Note that for remote Xen Daemon the file path will be interpreted in the remote host.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>path for the core file</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>extra flags, currently unused</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="virDomainCreate" id="virDomainCreate"></a>Function: virDomainCreate</h3><pre class="programlisting">int virDomainCreate (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>launch a defined domain. If the call succeed the domain moves from the defined to the running domains pools.</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 a defined 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 error</td></tr></tbody></table></div><h3><a name="virDomainCreateLinux" id="virDomainCreateLinux"></a>Function: virDomainCreateLinux</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainCreateLinux (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)<br />
</pre><p>Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires priviledged access to the hypervisor.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xmlDesc</tt></i>:</span></td><td>an XML description of the domain</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>an optional set of virDomainFlags</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainDefineXML" id="virDomainDefineXML"></a>Function: virDomainDefineXML</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml)<br />
</pre><p>define a domain, but does not start it</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>xml</tt></i>:</span></td><td>the XML description for the domain, preferably in UTF-8</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the domain otherwise</td></tr></tbody></table></div><h3><a name="virDomainDestroy" id="virDomainDestroy"></a>Function: virDomainDestroy</h3><pre class="programlisting">int virDomainDestroy (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access</p>
<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="virDomainDetachDevice" id="virDomainDetachDevice"></a>Function: virDomainDetachDevice</h3><pre class="programlisting">int virDomainDetachDevice (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * xml)<br />
</pre><p>Destroy a virtual device attachment to backend.</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</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>pointer to XML description of one device</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="virDomainFree" id="virDomainFree"></a>Function: virDomainFree</h3><pre class="programlisting">int virDomainFree (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p>
<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="virDomainGetAutostart" id="virDomainGetAutostart"></a>Function: virDomainGetAutostart</h3><pre class="programlisting">int virDomainGetAutostart (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int * autostart)<br />
</pre><p>Provides a boolean value indicating whether the domain configured to be automatically started when the host machine boots.</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>autostart</tt></i>:</span></td><td>the value returned</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="virDomainGetConnect" id="virDomainGetConnect"></a>Function: virDomainGetConnect</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virDomainGetConnect (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom)<br />
</pre><p>Provides the connection pointer associated with a domain. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the domain object together.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dom</tt></i>:</span></td><td>pointer to a domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL 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 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="virDomainGetMaxVcpus" id="virDomainGetMaxVcpus"></a>Function: virDomainGetMaxVcpus</h3><pre class="programlisting">int virDomainGetMaxVcpus (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Provides the maximum number of virtual CPUs supported for the guest VM. If the guest is inactive, this is basically the same as virConnectGetMaxVcpus. If the guest is running this will reflect the maximum number of virtual CPUs the guest was booted with.</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</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the maximum of virtual CPU or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virDomainGetName" id="virDomainGetName"></a>Function: virDomainGetName</h3><pre class="programlisting">const char * virDomainGetName (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Get the public name for that domain</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.</td></tr></tbody></table></div><h3><a name="virDomainGetOSType" id="virDomainGetOSType"></a>Function: virDomainGetOSType</h3><pre class="programlisting">char * virDomainGetOSType (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Get the type of domain operation system.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL in case of error, the string must be freed by the caller.</td></tr></tbody></table></div><h3><a name="virDomainGetSchedulerParameters" id="virDomainGetSchedulerParameters"></a>Function: virDomainGetSchedulerParameters</h3><pre class="programlisting">int virDomainGetSchedulerParameters (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br /> int * nparams)<br />
</pre><p>Get the scheduler parameters, the @params array will be filled with the values.</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</td></tr><tr><td><span class="term"><i><tt>params</tt></i>:</span></td><td>pointer to scheduler parameter object (return value)</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>pointer to number of scheduler parameter (this value should be same than the returned value nparams of virDomainGetSchedulerType)</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="virDomainGetSchedulerType" id="virDomainGetSchedulerType"></a>Function: virDomainGetSchedulerType</h3><pre class="programlisting">char * virDomainGetSchedulerType (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int * nparams)<br />
</pre><p>Get the scheduler type.</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</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>number of scheduler parameters(return value)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error. The caller must free the returned string.</td></tr></tbody></table></div><h3><a name="virDomainGetUUID" id="virDomainGetUUID"></a>Function: virDomainGetUUID</h3><pre class="programlisting">int virDomainGetUUID (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned char * uuid)<br />
</pre><p>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 <a href="libvirt-libvirt.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> 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 <a href="libvirt-libvirt.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> 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>an OR'ed set of <a href="libvirt-libvirt.html#virDomainXMLFlags">virDomainXMLFlags</a></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="virDomainInterfaceStats" id="virDomainInterfaceStats"></a>Function: virDomainInterfaceStats</h3><pre class="programlisting">int virDomainInterfaceStats (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> const char * path, <br /> <a href="libvirt-libvirt.html#virDomainInterfaceStatsPtr">virDomainInterfaceStatsPtr</a> stats, <br /> size_t size)<br />
</pre><p>This function returns network interface stats for interfaces attached to the domain. The path parameter is the name of the network interface. Domains may have more than network interface. To get stats for each you should make multiple calls to this function. Individual fields within the stats structure may be returned as -1, which indicates that the hypervisor does not support that particular statistic.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dom</tt></i>:</span></td><td>pointer to the domain object</td></tr><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>path to the interface</td></tr><tr><td><span class="term"><i><tt>stats</tt></i>:</span></td><td>network interface stats (returned)</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>size of stats structure</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 failure.</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>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>id</tt></i>:</span></td><td>the domain ID number</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure. If the domain cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> error is raised.</td></tr></tbody></table></div><h3><a name="virDomainLookupByName" id="virDomainLookupByName"></a>Function: virDomainLookupByName</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
</pre><p>Try to lookup a domain on the given hypervisor based on its name.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the domain</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure. If the domain cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> error is raised.</td></tr></tbody></table></div><h3><a name="virDomainLookupByUUID" id="virDomainLookupByUUID"></a>Function: virDomainLookupByUUID</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainLookupByUUID (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)<br />
</pre><p>Try to lookup a domain on the given hypervisor based on its UUID.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>uuid</tt></i>:</span></td><td>the 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. If the domain cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> error is raised.</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. If the domain cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> error is raised.</td></tr></tbody></table></div><h3><a name="virDomainMigrate" id="virDomainMigrate"></a>Function: virDomainMigrate</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainMigrate (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> dconn, <br /> unsigned long flags, <br /> const char * dname, <br /> const char * uri, <br /> unsigned long bandwidth)<br />
</pre><p>Migrate the domain object from its current host to the destination host given by dconn (a connection to the destination host). Flags may be one of more of the following: <a href="libvirt-libvirt.html#VIR_MIGRATE_LIVE">VIR_MIGRATE_LIVE</a> Attempt a live migration. If a hypervisor supports renaming domains during migration, then you may set the dname parameter to the new name (otherwise it keeps the same name). If this is not supported by the hypervisor, dname must be NULL or else you will get an error. Since typically the two hypervisors connect directly to each other in order to perform the migration, you may need to specify a path from the source to the destination. This is the purpose of the uri parameter. If uri is NULL, then libvirt will try to find the best method. Uri may specify the hostname or IP address of the destination host as seen from the source. Or uri may be a URI giving transport, hostname, user, port, etc. in the usual form. Refer to driver documentation for the particular URIs supported. The maximum bandwidth (in Mbps) that will be used to do migration can be specified with the bandwidth parameter. If set to 0, libvirt will choose a suitable default. Some hypervisors do not support this feature and will return an error if bandwidth is not 0. To see which features are supported by the current hypervisor, see virConnectGetCapabilities, /capabilities/host/migration_features. There are many limitations on migration imposed by the underlying technology - for example it may not be possible to migrate between different processors even with the same architecture, or between different types of 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</td></tr><tr><td><span class="term"><i><tt>dconn</tt></i>:</span></td><td>destination host (a connection object)</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags</td></tr><tr><td><span class="term"><i><tt>dname</tt></i>:</span></td><td>(optional) rename domain to this at destination</td></tr><tr><td><span class="term"><i><tt>uri</tt></i>:</span></td><td>(optional) dest hostname/URI as seen from the source host</td></tr><tr><td><span class="term"><i><tt>bandwidth</tt></i>:</span></td><td>(optional) specify migration bandwidth limit in Mbps</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the new domain object if the migration was successful, or NULL in case of error. Note that the new domain object exists in the scope of the destination connection (dconn).</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>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>from</tt></i>:</span></td><td>path to the</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainResume" id="virDomainResume"></a>Function: virDomainResume</h3><pre class="programlisting">int virDomainResume (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSave" id="virDomainSave"></a>Function: virDomainSave</h3><pre class="programlisting">int virDomainSave (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)<br />
</pre><p>This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>path for the output file</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virDomainSetAutostart" id="virDomainSetAutostart"></a>Function: virDomainSetAutostart</h3><pre class="programlisting">int virDomainSetAutostart (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int autostart)<br />
</pre><p>Configure the domain to be automatically started when the host machine boots.</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>autostart</tt></i>:</span></td><td>whether the domain should be automatically started 0 or 1</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="virDomainSetMaxMemory" id="virDomainSetMaxMemory"></a>Function: virDomainSetMaxMemory</h3><pre class="programlisting">int virDomainSetMaxMemory (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)<br />
</pre><p>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.</p>
<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="virDomainSetSchedulerParameters" id="virDomainSetSchedulerParameters"></a>Function: virDomainSetSchedulerParameters</h3><pre class="programlisting">int virDomainSetSchedulerParameters (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br /> int nparams)<br />
</pre><p>Change the scheduler parameters</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</td></tr><tr><td><span class="term"><i><tt>params</tt></i>:</span></td><td>pointer to scheduler parameter objects</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>number of scheduler parameter (this value should be same or less than the returned value nparams of virDomainGetSchedulerType)</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="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>
<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="virDomainUndefine" id="virDomainUndefine"></a>Function: virDomainUndefine</h3><pre class="programlisting">int virDomainUndefine (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
</pre><p>undefine a domain but does not stop it if it is running</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 a defined 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 error</td></tr></tbody></table></div><h3><a name="virGetVersion" id="virGetVersion"></a>Function: virGetVersion</h3><pre class="programlisting">int virGetVersion (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)<br />
</pre><p>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>libVer</tt></i>:</span></td><td>return value for the library version (OUT)</td></tr><tr><td><span class="term"><i><tt>type</tt></i>:</span></td><td>the type of connection/driver looked at</td></tr><tr><td><span class="term"><i><tt>typeVer</tt></i>:</span></td><td>return value for the version of the hypervisor (OUT)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.</td></tr></tbody></table></div><h3><a name="virInitialize" id="virInitialize"></a>Function: virInitialize</h3><pre class="programlisting">int virInitialize (void)<br />
</pre><p>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNetworkCreate" id="virNetworkCreate"></a>Function: virNetworkCreate</h3><pre class="programlisting">int virNetworkCreate (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
</pre><p>Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>pointer to a defined network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNetworkCreateXML" id="virNetworkCreateXML"></a>Function: virNetworkCreateXML</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> virNetworkCreateXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc)<br />
</pre><p>Create and start a new virtual network, based on an XML description similar to the one returned by virNetworkGetXMLDesc()</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>xmlDesc</tt></i>:</span></td><td>an XML description of the network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virNetworkDefineXML" id="virNetworkDefineXML"></a>Function: virNetworkDefineXML</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> virNetworkDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml)<br />
</pre><p>Define a network, but does not create it</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>xml</tt></i>:</span></td><td>the XML description for the network, preferably in UTF-8</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the network otherwise</td></tr></tbody></table></div><h3><a name="virNetworkDestroy" id="virNetworkDestroy"></a>Function: virNetworkDestroy</h3><pre class="programlisting">int virNetworkDestroy (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
</pre><p>Destroy the network object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires priviledged access</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>a network 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="virNetworkFree" id="virNetworkFree"></a>Function: virNetworkFree</h3><pre class="programlisting">int virNetworkFree (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
</pre><p>Free the network object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>a network 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="virNetworkGetAutostart" id="virNetworkGetAutostart"></a>Function: virNetworkGetAutostart</h3><pre class="programlisting">int virNetworkGetAutostart (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int * autostart)<br />
</pre><p>Provides a boolean value indicating whether the network configured to be automatically started when the host machine boots.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><span class="term"><i><tt>autostart</tt></i>:</span></td><td>the value returned</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="virNetworkGetBridgeName" id="virNetworkGetBridgeName"></a>Function: virNetworkGetBridgeName</h3><pre class="programlisting">char * virNetworkGetBridgeName (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
</pre><p>Provides a bridge interface name to which a domain may connect a network interface in order to join the network.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated interface name, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virNetworkGetConnect" id="virNetworkGetConnect"></a>Function: virNetworkGetConnect</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virNetworkGetConnect (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> net)<br />
</pre><p>Provides the connection pointer associated with a network. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the network object together.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>net</tt></i>:</span></td><td>pointer to a network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div><h3><a name="virNetworkGetName" id="virNetworkGetName"></a>Function: virNetworkGetName</h3><pre class="programlisting">const char * virNetworkGetName (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
</pre><p>Get the public name for that network</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the network object.</td></tr></tbody></table></div><h3><a name="virNetworkGetUUID" id="virNetworkGetUUID"></a>Function: virNetworkGetUUID</h3><pre class="programlisting">int virNetworkGetUUID (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> unsigned char * uuid)<br />
</pre><p>Get the UUID for a network</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><span class="term"><i><tt>uuid</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> 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="virNetworkGetUUIDString" id="virNetworkGetUUIDString"></a>Function: virNetworkGetUUIDString</h3><pre class="programlisting">int virNetworkGetUUIDString (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> char * buf)<br />
</pre><p>Get the UUID for a network 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>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> 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="virNetworkGetXMLDesc" id="virNetworkGetXMLDesc"></a>Function: virNetworkGetXMLDesc</h3><pre class="programlisting">char * virNetworkGetXMLDesc (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int flags)<br />
</pre><p>Provide an XML description of the network. The description may be reused later to relaunch the network with virNetworkCreateXML().</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>a network 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="virNetworkLookupByName" id="virNetworkLookupByName"></a>Function: virNetworkLookupByName</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> virNetworkLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
</pre><p>Try to lookup a network on the given hypervisor based on its name.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name for the network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure. If the network cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</td></tr></tbody></table></div><h3><a name="virNetworkLookupByUUID" id="virNetworkLookupByUUID"></a>Function: virNetworkLookupByUUID</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> virNetworkLookupByUUID (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)<br />
</pre><p>Try to lookup a network 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 network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure. If the network cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</td></tr></tbody></table></div><h3><a name="virNetworkLookupByUUIDString" id="virNetworkLookupByUUIDString"></a>Function: virNetworkLookupByUUIDString</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> virNetworkLookupByUUIDString (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * uuidstr)<br />
</pre><p>Try to lookup a network 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 network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure. If the network cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</td></tr></tbody></table></div><h3><a name="virNetworkSetAutostart" id="virNetworkSetAutostart"></a>Function: virNetworkSetAutostart</h3><pre class="programlisting">int virNetworkSetAutostart (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int autostart)<br />
</pre><p>Configure the network to be automatically started when the host machine boots.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><span class="term"><i><tt>autostart</tt></i>:</span></td><td>whether the network should be automatically started 0 or 1</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="virNetworkUndefine" id="virNetworkUndefine"></a>Function: virNetworkUndefine</h3><pre class="programlisting">int virNetworkUndefine (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
</pre><p>Undefine a network but does not stop it if it is running</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>pointer to a defined network</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virNodeGetCellsFreeMemory" id="virNodeGetCellsFreeMemory"></a>Function: virNodeGetCellsFreeMemory</h3><pre class="programlisting">int virNodeGetCellsFreeMemory (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long long * freeMems, <br /> int startCell, <br /> int maxCells)<br />
</pre><p>This call returns the amount of free memory in one or more NUMA cells. The @freeMems array must be allocated by the caller and will be filled with the amount of free memory in kilobytes for each cell requested, starting with startCell (in freeMems[0]), up to either (startCell + maxCells), or the number of additional cells in the node, whichever is smaller.</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>freeMems</tt></i>:</span></td><td>pointer to the array of unsigned long long</td></tr><tr><td><span class="term"><i><tt>startCell</tt></i>:</span></td><td>index of first cell to return freeMems info on.</td></tr><tr><td><span class="term"><i><tt>maxCells</tt></i>:</span></td><td>Maximum number of cells for which freeMems information can be returned.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries filled in freeMems, or -1 in case of error.</td></tr></tbody></table></div><h3><a name="virNodeGetFreeMemory" id="virNodeGetFreeMemory"></a>Function: virNodeGetFreeMemory</h3><pre class="programlisting">unsigned long long virNodeGetFreeMemory (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>provides the free memory availble on the Node</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the available free memory in kilobytes or 0 in case of error</td></tr></tbody></table></div><h3><a name="virNodeGetInfo" id="virNodeGetInfo"></a>Function: virNodeGetInfo</h3><pre class="programlisting">int virNodeGetInfo (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> info)<br />
</pre><p>Extract hardware information about the node.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> structure allocated by the user</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virStoragePoolBuild" id="virStoragePoolBuild"></a>Function: virStoragePoolBuild</h3><pre class="programlisting">int virStoragePoolBuild (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)<br />
</pre><p>Build the underlying storage pool</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 upon failure</td></tr></tbody></table></div><h3><a name="virStoragePoolCreate" id="virStoragePoolCreate"></a>Function: virStoragePoolCreate</h3><pre class="programlisting">int virStoragePoolCreate (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)<br />
</pre><p>Starts an inactive storage pool</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 if it could not be started</td></tr></tbody></table></div><h3><a name="virStoragePoolCreateXML" id="virStoragePoolCreateXML"></a>Function: virStoragePoolCreateXML</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> virStoragePoolCreateXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)<br />
</pre><p>Create a new storage based on its XML description. The pool is not persitent, so its definition will disappear when it is destroyed, or if the host is restarted</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xmlDesc</tt></i>:</span></td><td>XML description for new pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if creation failed</td></tr></tbody></table></div><h3><a name="virStoragePoolDefineXML" id="virStoragePoolDefineXML"></a>Function: virStoragePoolDefineXML</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> virStoragePoolDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml, <br /> unsigned int flags)<br />
</pre><p>Define a new inactive storage pool based on its XML description. The pool is persitent, until explicitly undefined.</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>XML description for new pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if creation failed</td></tr></tbody></table></div><h3><a name="virStoragePoolDelete" id="virStoragePoolDelete"></a>Function: virStoragePoolDelete</h3><pre class="programlisting">int virStoragePoolDelete (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)<br />
</pre><p>Delete the underlying pool resources. This is a non-recoverable operation. The <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object itself is not free'd.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for obliteration process</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 if it could not be obliterate</td></tr></tbody></table></div><h3><a name="virStoragePoolDestroy" id="virStoragePoolDestroy"></a>Function: virStoragePoolDestroy</h3><pre class="programlisting">int virStoragePoolDestroy (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
</pre><p>Destroy an active storage pool. This will deactivate the pool on the host, but keep any persistent config associated with it. If it has a persistent config it can later be restarted with virStoragePoolCreate(). This does not free the associated <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 if it could not be destroyed</td></tr></tbody></table></div><h3><a name="virStoragePoolFree" id="virStoragePoolFree"></a>Function: virStoragePoolFree</h3><pre class="programlisting">int virStoragePoolFree (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
</pre><p>Free a storage pool object, releasing all memory associated with it. Does not change the state of the pool on the host.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 if it could not be free'd.</td></tr></tbody></table></div><h3><a name="virStoragePoolGetAutostart" id="virStoragePoolGetAutostart"></a>Function: virStoragePoolGetAutostart</h3><pre class="programlisting">int virStoragePoolGetAutostart (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int * autostart)<br />
</pre><p>Fetches the value of the autostart flag, which determines whether the pool is automatically started at boot time</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>autostart</tt></i>:</span></td><td>location in which to store autostart flag</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on failure</td></tr></tbody></table></div><h3><a name="virStoragePoolGetConnect" id="virStoragePoolGetConnect"></a>Function: virStoragePoolGetConnect</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virStoragePoolGetConnect (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
</pre><p>Provides the connection pointer associated with a storage pool. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the pool object together.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to a poool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div><h3><a name="virStoragePoolGetInfo" id="virStoragePoolGetInfo"></a>Function: virStoragePoolGetInfo</h3><pre class="programlisting">int virStoragePoolGetInfo (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> <a href="libvirt-libvirt.html#virStoragePoolInfoPtr">virStoragePoolInfoPtr</a> info)<br />
</pre><p>Get volatile information about the storage pool such as free space / usage summary</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer at which to store info</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on failure.</td></tr></tbody></table></div><h3><a name="virStoragePoolGetName" id="virStoragePoolGetName"></a>Function: virStoragePoolGetName</h3><pre class="programlisting">const char * virStoragePoolGetName (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
</pre><p>Fetch the locally unique name of the storage pool</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the name of the pool, or NULL on error</td></tr></tbody></table></div><h3><a name="virStoragePoolGetUUID" id="virStoragePoolGetUUID"></a>Function: virStoragePoolGetUUID</h3><pre class="programlisting">int virStoragePoolGetUUID (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned char * uuid)<br />
</pre><p>Fetch the globally unique ID of the storage pool</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>uuid</tt></i>:</span></td><td>buffer of <a href="libvirt-libvirt.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> bytes in size</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error;</td></tr></tbody></table></div><h3><a name="virStoragePoolGetUUIDString" id="virStoragePoolGetUUIDString"></a>Function: virStoragePoolGetUUIDString</h3><pre class="programlisting">int virStoragePoolGetUUIDString (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> char * buf)<br />
</pre><p>Fetch the globally unique ID of the storage pool as a string</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>buffer of <a href="libvirt-libvirt.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> bytes in size</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error;</td></tr></tbody></table></div><h3><a name="virStoragePoolGetXMLDesc" id="virStoragePoolGetXMLDesc"></a>Function: virStoragePoolGetXMLDesc</h3><pre class="programlisting">char * virStoragePoolGetXMLDesc (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)<br />
</pre><p>Fetch an XML document describing all aspects of the storage pool. This is suitable for later feeding back into the <a href="libvirt-libvirt.html#virStoragePoolCreateXML">virStoragePoolCreateXML</a> method.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for XML format options (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a XML document, or NULL on error</td></tr></tbody></table></div><h3><a name="virStoragePoolListVolumes" id="virStoragePoolListVolumes"></a>Function: virStoragePoolListVolumes</h3><pre class="programlisting">int virStoragePoolListVolumes (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> char ** const names, <br /> int maxnames)<br />
</pre><p>Fetch list of storage volume names, limiting to at most maxnames.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array in which to storage volume names</td></tr><tr><td><span class="term"><i><tt>maxnames</tt></i>:</span></td><td>size of names array</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of names fetched, or -1 on error</td></tr></tbody></table></div><h3><a name="virStoragePoolLookupByName" id="virStoragePoolLookupByName"></a>Function: virStoragePoolLookupByName</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> virStoragePoolLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
</pre><p>Fetch a storage pool based on its unique name</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of pool to fetch</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div><h3><a name="virStoragePoolLookupByUUID" id="virStoragePoolLookupByUUID"></a>Function: virStoragePoolLookupByUUID</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> virStoragePoolLookupByUUID (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)<br />
</pre><p>Fetch a storage pool based on its globally unique id</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>uuid</tt></i>:</span></td><td>globally unique id of pool to fetch</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div><h3><a name="virStoragePoolLookupByUUIDString" id="virStoragePoolLookupByUUIDString"></a>Function: virStoragePoolLookupByUUIDString</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> virStoragePoolLookupByUUIDString (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * uuidstr)<br />
</pre><p>Fetch a storage pool based on its globally unique id</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>uuidstr</tt></i>:</span></td><td>globally unique id of pool to fetch</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div><h3><a name="virStoragePoolLookupByVolume" id="virStoragePoolLookupByVolume"></a>Function: virStoragePoolLookupByVolume</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> virStoragePoolLookupByVolume (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
</pre><p>Fetch a storage pool which contains a particular volume</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div><h3><a name="virStoragePoolNumOfVolumes" id="virStoragePoolNumOfVolumes"></a>Function: virStoragePoolNumOfVolumes</h3><pre class="programlisting">int virStoragePoolNumOfVolumes (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
</pre><p>Fetch the number of storage volumes within a pool</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of storage pools, or -1 on failure</td></tr></tbody></table></div><h3><a name="virStoragePoolRefresh" id="virStoragePoolRefresh"></a>Function: virStoragePoolRefresh</h3><pre class="programlisting">int virStoragePoolRefresh (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)<br />
</pre><p>Request that the pool refresh its list of volumes. This may involve communicating with a remote server, and/or initializing new devices at the OS layer</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags to control refresh behaviour (currently unused, use 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the volume list was refreshed, -1 on failure</td></tr></tbody></table></div><h3><a name="virStoragePoolSetAutostart" id="virStoragePoolSetAutostart"></a>Function: virStoragePoolSetAutostart</h3><pre class="programlisting">int virStoragePoolSetAutostart (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int autostart)<br />
</pre><p>Sets the autostart flag</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>autostart</tt></i>:</span></td><td>new flag setting</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on failure</td></tr></tbody></table></div><h3><a name="virStoragePoolUndefine" id="virStoragePoolUndefine"></a>Function: virStoragePoolUndefine</h3><pre class="programlisting">int virStoragePoolUndefine (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
</pre><p>Undefine an inactive storage pool</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if creation failed</td></tr></tbody></table></div><h3><a name="virStorageVolCreateXML" id="virStorageVolCreateXML"></a>Function: virStorageVolCreateXML</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXML (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> unsigned int flags)<br />
</pre><p>Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolDelete" id="virStorageVolDelete"></a>Function: virStorageVolDelete</h3><pre class="programlisting">int virStorageVolDelete (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)<br />
</pre><p>Delete the storage volume from the pool</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error</td></tr></tbody></table></div><h3><a name="virStorageVolFree" id="virStorageVolFree"></a>Function: virStorageVolFree</h3><pre class="programlisting">int virStorageVolFree (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
</pre><p>Release the storage volume handle. The underlying storage volume contains to exist</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error</td></tr></tbody></table></div><h3><a name="virStorageVolGetConnect" id="virStorageVolGetConnect"></a>Function: virStorageVolGetConnect</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virStorageVolGetConnect (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
</pre><p>Provides the connection pointer associated with a storage volume. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the volume object together.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to a poool</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the <a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div><h3><a name="virStorageVolGetInfo" id="virStorageVolGetInfo"></a>Function: virStorageVolGetInfo</h3><pre class="programlisting">int virStorageVolGetInfo (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> <a href="libvirt-libvirt.html#virStorageVolInfoPtr">virStorageVolInfoPtr</a> info)<br />
</pre><p>Fetches volatile information about the storage volume such as its current allocation</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>info</tt></i>:</span></td><td>pointer at which to store info</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on failure</td></tr></tbody></table></div><h3><a name="virStorageVolGetKey" id="virStorageVolGetKey"></a>Function: virStorageVolGetKey</h3><pre class="programlisting">const char * virStorageVolGetKey (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
</pre><p>Fetch the storage volume key. This is globally unique, so the same volume will hve the same key no matter what host it is accessed from</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the volume key, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolGetName" id="virStorageVolGetName"></a>Function: virStorageVolGetName</h3><pre class="programlisting">const char * virStorageVolGetName (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
</pre><p>Fetch the storage volume name. This is unique within the scope of a pool</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the volume name, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolGetPath" id="virStorageVolGetPath"></a>Function: virStorageVolGetPath</h3><pre class="programlisting">char * virStorageVolGetPath (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
</pre><p>Fetch the storage volume path. Depending on the pool configuration this is either persistent across hosts, or dynamically assigned at pool startup. Consult pool documentation for information on getting the persistent naming</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume path, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolGetXMLDesc" id="virStorageVolGetXMLDesc"></a>Function: virStorageVolGetXMLDesc</h3><pre class="programlisting">char * virStorageVolGetXMLDesc (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)<br />
</pre><p>Fetch an XML document describing all aspects of the storage volume</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for XML generation (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XML document, or NULL on error</td></tr></tbody></table></div><h3><a name="virStorageVolLookupByKey" id="virStorageVolLookupByKey"></a>Function: virStorageVolLookupByKey</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolLookupByKey (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * key)<br />
</pre><p>Fetch a pointer to a storage volume based on its globally unique key</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>key</tt></i>:</span></td><td>globally unique key</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a storage volume, or NULL if not found / error</td></tr></tbody></table></div><h3><a name="virStorageVolLookupByName" id="virStorageVolLookupByName"></a>Function: virStorageVolLookupByName</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolLookupByName (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * name)<br />
</pre><p>Fetch a pointer to a storage volume based on its name within a pool</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><span class="term"><i><tt>name</tt></i>:</span></td><td>name of storage volume</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a storage volume, or NULL if not found / error</td></tr></tbody></table></div><h3><a name="virStorageVolLookupByPath" id="virStorageVolLookupByPath"></a>Function: virStorageVolLookupByPath</h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolLookupByPath (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * path)<br />
</pre><p>Fetch a pointer to a storage volume based on its locally (host) unique path</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 hypervisor connection</td></tr><tr><td><span class="term"><i><tt>path</tt></i>:</span></td><td>locally unique path</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a storage volume, or NULL if not found / error</td></tr></tbody></table></div></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby bindings</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li><li><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="12" value="Search..." /><input name="submit" type="submit" value="Go" /></form></li><li><a href="http://xmlsoft.org/"><img src="../Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></li></ul><p class="credits">Graphics and design by <a href="mail:dfong@redhat.com">Diana Fong</a></p></div></div><div id="bottom"><p class="p1"></p></div></div></body></html>

View File

@ -0,0 +1,136 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Module virterror from libvirt</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Module virterror from libvirt</h1><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libvirt-libvirt.html"><img src="left.png" width="24" height="24" border="0" alt="Prev" /></a></td><th align="left"><a href="libvirt-libvirt.html">libvirt</a></th><td><a accesskey="u" href="index.html"><img src="up.png" width="24" height="24" border="0" alt="Up" /></a></td><th align="left"><a href="index.html">API documentation</a></th><td><a accesskey="h" href="../index.html"><img src="home.png" width="24" height="24" border="0" alt="Home" /></a></td><th align="center"><a href="../index.html">The virtualization API</a></th></tr></table><p>Provides the interfaces of the libvirt library to handle errors raised while using the library. </p><h2>Table of Contents</h2><pre class="programlisting">Structure <a href="#virError">virError</a><br />struct _virError
</pre><pre class="programlisting">Enum <a href="#virErrorDomain">virErrorDomain</a>
</pre><pre class="programlisting">Enum <a href="#virErrorLevel">virErrorLevel</a>
</pre><pre class="programlisting">Enum <a href="#virErrorNumber">virErrorNumber</a>
</pre><pre class="programlisting">Typedef <a href="libvirt-virterror.html#virError">virError</a> * <a name="virErrorPtr" id="virErrorPtr">virErrorPtr</a>
</pre><pre class="programlisting">int <a href="#virConnCopyLastError">virConnCopyLastError</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)</pre>
<pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> <a href="#virConnGetLastError">virConnGetLastError</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">void <a href="#virConnResetLastError">virConnResetLastError</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)</pre>
<pre class="programlisting">void <a href="#virConnSetErrorFunc">virConnSetErrorFunc</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> void * userData, <br /> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)</pre>
<pre class="programlisting">int <a href="#virCopyLastError">virCopyLastError</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)</pre>
<pre class="programlisting">void <a href="#virDefaultErrorFunc">virDefaultErrorFunc</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)</pre>
<pre class="programlisting">Function type: <a href="#virErrorFunc">virErrorFunc</a>
void <a href="#virErrorFunc">virErrorFunc</a> (void * userData, <br /> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> error)
</pre>
<pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> <a href="#virGetLastError">virGetLastError</a> (void)</pre>
<pre class="programlisting">void <a href="#virResetError">virResetError</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)</pre>
<pre class="programlisting">void <a href="#virResetLastError">virResetLastError</a> (void)</pre>
<pre class="programlisting">void <a href="#virSetErrorFunc">virSetErrorFunc</a> (void * userData, <br /> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)</pre>
<h2>Description</h2>
<h3><a name="virError" id="virError">Structure virError</a></h3><pre class="programlisting">Structure virError<br />struct _virError {
int code : The error code, a <a href="libvirt-virterror.html#virErrorNumber">virErrorNumber</a>
int domain : What part of the library raised this er
char * message : human-readable informative error messag
<a href="libvirt-virterror.html#virErrorLevel">virErrorLevel</a> level : how consequent is the error
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn : the connection if available
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom : the domain if available
char * str1 : extra string information
char * str2 : extra string information
char * str3 : extra string information
int int1 : extra number information
int int2 : extra number information
<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> net : the network if available
}</pre><h3>Enum <a name="virErrorDomain" id="virErrorDomain">virErrorDomain</a></h3><pre class="programlisting">Enum virErrorDomain {
<a name="VIR_FROM_NONE" id="VIR_FROM_NONE">VIR_FROM_NONE</a> = 0
<a name="VIR_FROM_XEN" id="VIR_FROM_XEN">VIR_FROM_XEN</a> = 1 : Error at Xen hypervisor layer
<a name="VIR_FROM_XEND" id="VIR_FROM_XEND">VIR_FROM_XEND</a> = 2 : Error at connection with xend daemon
<a name="VIR_FROM_XENSTORE" id="VIR_FROM_XENSTORE">VIR_FROM_XENSTORE</a> = 3 : Error at connection with xen store
<a name="VIR_FROM_SEXPR" id="VIR_FROM_SEXPR">VIR_FROM_SEXPR</a> = 4 : Error in the S-Expression code
<a name="VIR_FROM_XML" id="VIR_FROM_XML">VIR_FROM_XML</a> = 5 : Error in the XML code
<a name="VIR_FROM_DOM" id="VIR_FROM_DOM">VIR_FROM_DOM</a> = 6 : Error when operating on a domain
<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
<a name="VIR_FROM_CONF" id="VIR_FROM_CONF">VIR_FROM_CONF</a> = 9 : Error in the configuration file handling
<a name="VIR_FROM_QEMU" id="VIR_FROM_QEMU">VIR_FROM_QEMU</a> = 10 : Error at the QEMU daemon
<a name="VIR_FROM_NET" id="VIR_FROM_NET">VIR_FROM_NET</a> = 11 : Error when operating on a network
<a name="VIR_FROM_TEST" id="VIR_FROM_TEST">VIR_FROM_TEST</a> = 12 : Error from test driver
<a name="VIR_FROM_REMOTE" id="VIR_FROM_REMOTE">VIR_FROM_REMOTE</a> = 13 : Error from remote driver
<a name="VIR_FROM_OPENVZ" id="VIR_FROM_OPENVZ">VIR_FROM_OPENVZ</a> = 14 : Error from OpenVZ driver
<a name="VIR_FROM_XENXM" id="VIR_FROM_XENXM">VIR_FROM_XENXM</a> = 15 : Error at Xen XM layer
<a name="VIR_FROM_STATS_LINUX" id="VIR_FROM_STATS_LINUX">VIR_FROM_STATS_LINUX</a> = 16 : Error in the Linux Stats code
<a name="VIR_FROM_STORAGE" id="VIR_FROM_STORAGE">VIR_FROM_STORAGE</a> = 17 : Error from storage driver
}
</pre><h3>Enum <a name="virErrorLevel" id="virErrorLevel">virErrorLevel</a></h3><pre class="programlisting">Enum virErrorLevel {
<a name="VIR_ERR_NONE" id="VIR_ERR_NONE">VIR_ERR_NONE</a> = 0
<a name="VIR_ERR_WARNING" id="VIR_ERR_WARNING">VIR_ERR_WARNING</a> = 1 : A simple warning
<a name="VIR_ERR_ERROR" id="VIR_ERR_ERROR">VIR_ERR_ERROR</a> = 2 : An error
}
</pre><h3>Enum <a name="virErrorNumber" id="virErrorNumber">virErrorNumber</a></h3><pre class="programlisting">Enum virErrorNumber {
<a name="VIR_ERR_OK" id="VIR_ERR_OK">VIR_ERR_OK</a> = 0
<a name="VIR_ERR_INTERNAL_ERROR" id="VIR_ERR_INTERNAL_ERROR">VIR_ERR_INTERNAL_ERROR</a> = 1 : internal error
<a name="VIR_ERR_NO_MEMORY" id="VIR_ERR_NO_MEMORY">VIR_ERR_NO_MEMORY</a> = 2 : memory allocation failure
<a name="VIR_ERR_NO_SUPPORT" id="VIR_ERR_NO_SUPPORT">VIR_ERR_NO_SUPPORT</a> = 3 : no support for this function
<a name="VIR_ERR_UNKNOWN_HOST" id="VIR_ERR_UNKNOWN_HOST">VIR_ERR_UNKNOWN_HOST</a> = 4 : could not resolve hostname
<a name="VIR_ERR_NO_CONNECT" id="VIR_ERR_NO_CONNECT">VIR_ERR_NO_CONNECT</a> = 5 : can't connect to hypervisor
<a name="VIR_ERR_INVALID_CONN" id="VIR_ERR_INVALID_CONN">VIR_ERR_INVALID_CONN</a> = 6 : invalid connection object
<a name="VIR_ERR_INVALID_DOMAIN" id="VIR_ERR_INVALID_DOMAIN">VIR_ERR_INVALID_DOMAIN</a> = 7 : invalid domain object
<a name="VIR_ERR_INVALID_ARG" id="VIR_ERR_INVALID_ARG">VIR_ERR_INVALID_ARG</a> = 8 : invalid function argument
<a name="VIR_ERR_OPERATION_FAILED" id="VIR_ERR_OPERATION_FAILED">VIR_ERR_OPERATION_FAILED</a> = 9 : a command to hypervisor failed
<a name="VIR_ERR_GET_FAILED" id="VIR_ERR_GET_FAILED">VIR_ERR_GET_FAILED</a> = 10 : a HTTP GET command to failed
<a name="VIR_ERR_POST_FAILED" id="VIR_ERR_POST_FAILED">VIR_ERR_POST_FAILED</a> = 11 : a HTTP POST command to failed
<a name="VIR_ERR_HTTP_ERROR" id="VIR_ERR_HTTP_ERROR">VIR_ERR_HTTP_ERROR</a> = 12 : unexpected HTTP error code
<a name="VIR_ERR_SEXPR_SERIAL" id="VIR_ERR_SEXPR_SERIAL">VIR_ERR_SEXPR_SERIAL</a> = 13 : failure to serialize an S-Expr
<a name="VIR_ERR_NO_XEN" id="VIR_ERR_NO_XEN">VIR_ERR_NO_XEN</a> = 14 : could not open Xen hypervisor control
<a name="VIR_ERR_XEN_CALL" id="VIR_ERR_XEN_CALL">VIR_ERR_XEN_CALL</a> = 15 : failure doing an hypervisor call
<a name="VIR_ERR_OS_TYPE" id="VIR_ERR_OS_TYPE">VIR_ERR_OS_TYPE</a> = 16 : unknown OS type
<a name="VIR_ERR_NO_KERNEL" id="VIR_ERR_NO_KERNEL">VIR_ERR_NO_KERNEL</a> = 17 : missing kernel information
<a name="VIR_ERR_NO_ROOT" id="VIR_ERR_NO_ROOT">VIR_ERR_NO_ROOT</a> = 18 : missing root device information
<a name="VIR_ERR_NO_SOURCE" id="VIR_ERR_NO_SOURCE">VIR_ERR_NO_SOURCE</a> = 19 : missing source device information
<a name="VIR_ERR_NO_TARGET" id="VIR_ERR_NO_TARGET">VIR_ERR_NO_TARGET</a> = 20 : missing target device information
<a name="VIR_ERR_NO_NAME" id="VIR_ERR_NO_NAME">VIR_ERR_NO_NAME</a> = 21 : missing domain name information
<a name="VIR_ERR_NO_OS" id="VIR_ERR_NO_OS">VIR_ERR_NO_OS</a> = 22 : missing domain OS information
<a name="VIR_ERR_NO_DEVICE" id="VIR_ERR_NO_DEVICE">VIR_ERR_NO_DEVICE</a> = 23 : missing domain devices information
<a name="VIR_ERR_NO_XENSTORE" id="VIR_ERR_NO_XENSTORE">VIR_ERR_NO_XENSTORE</a> = 24 : could not open Xen Store control
<a name="VIR_ERR_DRIVER_FULL" id="VIR_ERR_DRIVER_FULL">VIR_ERR_DRIVER_FULL</a> = 25 : too many drivers registered
<a name="VIR_ERR_CALL_FAILED" id="VIR_ERR_CALL_FAILED">VIR_ERR_CALL_FAILED</a> = 26 : not supported by the drivers (DEPRECATED)
<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
<a name="VIR_ERR_OPEN_FAILED" id="VIR_ERR_OPEN_FAILED">VIR_ERR_OPEN_FAILED</a> = 30 : failed to open a conf file
<a name="VIR_ERR_READ_FAILED" id="VIR_ERR_READ_FAILED">VIR_ERR_READ_FAILED</a> = 31 : failed to read a conf file
<a name="VIR_ERR_PARSE_FAILED" id="VIR_ERR_PARSE_FAILED">VIR_ERR_PARSE_FAILED</a> = 32 : failed to parse a conf file
<a name="VIR_ERR_CONF_SYNTAX" id="VIR_ERR_CONF_SYNTAX">VIR_ERR_CONF_SYNTAX</a> = 33 : failed to parse the syntax of a conf file
<a name="VIR_ERR_WRITE_FAILED" id="VIR_ERR_WRITE_FAILED">VIR_ERR_WRITE_FAILED</a> = 34 : failed to write a conf file
<a name="VIR_ERR_XML_DETAIL" id="VIR_ERR_XML_DETAIL">VIR_ERR_XML_DETAIL</a> = 35 : detail of an XML error
<a name="VIR_ERR_INVALID_NETWORK" id="VIR_ERR_INVALID_NETWORK">VIR_ERR_INVALID_NETWORK</a> = 36 : invalid network object
<a name="VIR_ERR_NETWORK_EXIST" id="VIR_ERR_NETWORK_EXIST">VIR_ERR_NETWORK_EXIST</a> = 37 : the network already exist
<a name="VIR_ERR_SYSTEM_ERROR" id="VIR_ERR_SYSTEM_ERROR">VIR_ERR_SYSTEM_ERROR</a> = 38 : general system call failure
<a name="VIR_ERR_RPC" id="VIR_ERR_RPC">VIR_ERR_RPC</a> = 39 : some sort of RPC error
<a name="VIR_ERR_GNUTLS_ERROR" id="VIR_ERR_GNUTLS_ERROR">VIR_ERR_GNUTLS_ERROR</a> = 40 : error from a GNUTLS call
<a name="VIR_WAR_NO_NETWORK" id="VIR_WAR_NO_NETWORK">VIR_WAR_NO_NETWORK</a> = 41 : failed to start network
<a name="VIR_ERR_NO_DOMAIN" id="VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> = 42 : domain not found or unexpectedly disappeared
<a name="VIR_ERR_NO_NETWORK" id="VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> = 43 : network not found
<a name="VIR_ERR_INVALID_MAC" id="VIR_ERR_INVALID_MAC">VIR_ERR_INVALID_MAC</a> = 44 : invalid MAC address
<a name="VIR_ERR_AUTH_FAILED" id="VIR_ERR_AUTH_FAILED">VIR_ERR_AUTH_FAILED</a> = 45 : authentication failed
<a name="VIR_ERR_INVALID_STORAGE_POOL" id="VIR_ERR_INVALID_STORAGE_POOL">VIR_ERR_INVALID_STORAGE_POOL</a> = 46 : invalid storage pool object
<a name="VIR_ERR_INVALID_STORAGE_VOL" id="VIR_ERR_INVALID_STORAGE_VOL">VIR_ERR_INVALID_STORAGE_VOL</a> = 47 : invalid storage vol object
<a name="VIR_WAR_NO_STORAGE" id="VIR_WAR_NO_STORAGE">VIR_WAR_NO_STORAGE</a> = 48 : failed to start storage
<a name="VIR_ERR_NO_STORAGE_POOL" id="VIR_ERR_NO_STORAGE_POOL">VIR_ERR_NO_STORAGE_POOL</a> = 49 : storage pool not found
<a name="VIR_ERR_NO_STORAGE_VOL" id="VIR_ERR_NO_STORAGE_VOL">VIR_ERR_NO_STORAGE_VOL</a> = 50 : storage pool not found
}
</pre><h3><a name="virConnCopyLastError" id="virConnCopyLastError"></a>Function: virConnCopyLastError</h3><pre class="programlisting">int virConnCopyLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br />
</pre><p>Copy the content of the last error caught on that connection One will need to free the result with virResetError()</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no error was found and the error code otherwise and -1 in case of parameter error.</td></tr></tbody></table></div><h3><a name="virConnGetLastError" id="virConnGetLastError"></a>Function: virConnGetLastError</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> virConnGetLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Provide a pointer to the last error caught on that connection Simpler but may not be suitable for multithreaded accesses, in which case use virConnCopyLastError()</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the last error or NULL if none occurred.</td></tr></tbody></table></div><h3><a name="virConnResetLastError" id="virConnResetLastError"></a>Function: virConnResetLastError</h3><pre class="programlisting">void virConnResetLastError (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
</pre><p>Reset the last error caught on that connection</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr></tbody></table></div><h3><a name="virConnSetErrorFunc" id="virConnSetErrorFunc"></a>Function: virConnSetErrorFunc</h3><pre class="programlisting">void virConnSetErrorFunc (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> void * userData, <br /> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)<br />
</pre><p>Set a connection error handling function, if @handler is NULL it will reset to default which is to pass error back to the global library handler.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</td></tr></tbody></table></div><h3><a name="virCopyLastError" id="virCopyLastError"></a>Function: virCopyLastError</h3><pre class="programlisting">int virCopyLastError (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> to)<br />
</pre><p>Copy the content of the last error caught at the library level One will need to free the result with virResetError()</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>to</tt></i>:</span></td><td>target to receive the copy</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if no error was found and the error code otherwise and -1 in case of parameter error.</td></tr></tbody></table></div><h3><a name="virDefaultErrorFunc" id="virDefaultErrorFunc"></a>Function: virDefaultErrorFunc</h3><pre class="programlisting">void virDefaultErrorFunc (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br />
</pre><p>Default routine reporting an error to stderr.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the error.</td></tr></tbody></table></div><h3><a name="virErrorFunc" id="virErrorFunc"></a>Function type: virErrorFunc</h3><pre class="programlisting">Function type: virErrorFunc
void virErrorFunc (void * userData, <br /> <a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> error)
</pre><p>Signature of a function to use when there is an error raised by the library.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>user provided data for the error callback</td></tr><tr><td><span class="term"><i><tt>error</tt></i>:</span></td><td>the error being raised.</td></tr></tbody></table></div><br />
<h3><a name="virGetLastError" id="virGetLastError"></a>Function: virGetLastError</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> virGetLastError (void)<br />
</pre><p>Provide a pointer to the last error caught at the library level Simpler but may not be suitable for multithreaded accesses, in which case use virCopyLastError()</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the last error or NULL if none occurred.</td></tr></tbody></table></div><h3><a name="virResetError" id="virResetError"></a>Function: virResetError</h3><pre class="programlisting">void virResetError (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br />
</pre><p>Reset the error being pointed to</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>pointer to the <a href="libvirt-virterror.html#virError">virError</a> to clean up</td></tr></tbody></table></div><h3><a name="virResetLastError" id="virResetLastError"></a>Function: virResetLastError</h3><pre class="programlisting">void virResetLastError (void)<br />
</pre><p>Reset the last error caught at the library level.</p>
<h3><a name="virSetErrorFunc" id="virSetErrorFunc"></a>Function: virSetErrorFunc</h3><pre class="programlisting">void virSetErrorFunc (void * userData, <br /> <a href="libvirt-virterror.html#virErrorFunc">virErrorFunc</a> handler)<br />
</pre><p>Set a library global error handling function, if @handler is NULL, it will reset to default printing on stderr. The error raised there are those for which no handler at the connection level could caught.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>pointer to the user data provided in the handler callback</td></tr><tr><td><span class="term"><i><tt>handler</tt></i>:</span></td><td>the function to get called in case of error or NULL</td></tr></tbody></table></div></div></div><div class="linkList2"><div class="llinks2"><h3 class="links2"><span>main menu</span></h3><ul><li><a href="../index.html">Home</a></li><li><a href="../html/index.html">API Menu</a></li><li><a href="../examples/index.html">C code examples</a></li><li><a href="../ChangeLog.html">Recent Changes</a></li></ul></div><div class="llinks2"><h3 class="links2"><span>related links</span></h3><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="https://bugzilla.redhat.com/bugzilla/buglist.cgi?product=Fedora+Core&amp;component=libvirt&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_status=MODIFIED&amp;short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr">Open bugs</a></li><li><a href="http://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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>

395
docs/hvsupport.html Normal file
View File

@ -0,0 +1,395 @@
<?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>Hypervisor support</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Hypervisor support</h1><p>
This page documents which <a href="html/">libvirt calls</a> work on
which hypervisors.
</p><p>
This information changes frequently. This page was last checked or
updated on <i>2007-08-20</i>.
</p><h3>Domain functions</h3><p> x = not supported; empty cell means no information </p><table class="top_table"><tr><th> Function </th>
<th> Since </th>
<th> Xen </th>
<th> QEMU </th>
<th> KVM </th>
<th> <a href="remote.html">Remote</a> </th>
</tr><tr><td> virConnectClose </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectGetCapabilities </td>
<td> 0.2.1 </td>
<td> &#8805; 0.2.1 </td>
<td> &#8805; 0.2.1 </td>
<td> &#8805; 0.2.1 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectGetHostname </td>
<td> 0.3.0 </td>
<td> &#8805; 0.3.0 </td>
<td> &#8805; 0.3.3 </td>
<td> &#8805; 0.3.3 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectGetMaxVcpus </td>
<td> 0.2.1 </td>
<td> &#8805; 0.2.1 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectGetType </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectGetURI </td>
<td> 0.3.0 </td>
<td> &#8805; 0.3.0 </td>
<td> &#8805; 0.3.0 </td>
<td> &#8805; 0.3.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectGetVersion </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectListDefinedDomains </td>
<td> 0.1.5 </td>
<td> &#8805; 0.1.9 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectListDomains </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectNumOfDefinedDomains </td>
<td> 0.1.5 </td>
<td> &#8805; 0.1.9 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectNumOfDomains </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectOpen </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virConnectOpenReadOnly </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainAttachDevice </td>
<td> 0.1.9 </td>
<td> &#8805; 0.1.9 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainBlockStats </td>
<td> 0.3.2 </td>
<td> &#8805; 0.3.2 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.2 </td>
</tr><tr><td> virDomainCoreDump </td>
<td> 0.1.9 </td>
<td> &#8805; 0.1.9 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainCreate </td>
<td> 0.1.5 </td>
<td> &#8805; 0.1.9 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainCreateLinux </td>
<td> All </td>
<td> &#8805; 0.0.5 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainDefineXML </td>
<td> 0.1.5 </td>
<td> &#8805; 0.1.9 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainDestroy </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainDetachDevice </td>
<td> 0.1.9 </td>
<td> &#8805; 0.1.9 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainFree </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetAutostart </td>
<td> 0.2.1 </td>
<td> x </td>
<td> &#8805; 0.2.1 </td>
<td> &#8805; 0.2.1 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetConnect </td>
<td> 0.3.0 </td>
<td colspan="4"> not a HV function </td>
</tr><tr><td> virDomainGetID </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetInfo </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetMaxMemory </td>
<td> All </td>
<td> All </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetMaxVcpus </td>
<td> 0.2.1 </td>
<td> &#8805; 0.2.1 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetName </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetOSType </td>
<td> All </td>
<td> All </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetSchedulerParameters </td>
<td> 0.2.3 </td>
<td> &#8805; 0.2.3 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetSchedulerType </td>
<td> 0.2.3 </td>
<td> &#8805; 0.2.3 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetUUID </td>
<td> 0.1.10 </td>
<td> &#8805; 0.1.10 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetUUIDString </td>
<td> 0.1.10 </td>
<td> &#8805; 0.1.10 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainGetVcpus </td>
<td> 0.1.4 </td>
<td> &#8805; 0.1.4 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainInterfaceStats </td>
<td> 0.3.2 </td>
<td> &#8805; 0.3.2 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.2 </td>
</tr><tr><td> virDomainGetXMLDesc </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainLookupByID </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainLookupByName </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainLookupByUUID </td>
<td> 0.1.10 </td>
<td> &#8805; 0.1.10 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainLookupByUUIDString </td>
<td> 0.1.10 </td>
<td> &#8805; 0.1.10 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainMigrate </td>
<td> 0.3.2 </td>
<td> &#8805; 0.3.2 </td>
<td> x </td>
<td> x </td>
<td> 0.3.2 </td>
</tr><tr><td> virDomainPinVcpu </td>
<td> 0.1.4 </td>
<td> &#8805; 0.1.4 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainReboot </td>
<td> 0.1.0 </td>
<td> &#8805; 0.1.0 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainRestore </td>
<td> All </td>
<td> All </td>
<td> x </td>
<td> &#8805; 0.3.2 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainResume </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainSave </td>
<td> All </td>
<td> All </td>
<td> x </td>
<td> &#8805; 0.3.2 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainSetAutostart </td>
<td> 0.2.1 </td>
<td> x </td>
<td> &#8805; 0.2.1 </td>
<td> &#8805; 0.2.1 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainSetMaxMemory </td>
<td> All </td>
<td> All </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainSetMemory </td>
<td> 0.1.1 </td>
<td> &#8805; 0.1.1 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainSetSchedulerParameters </td>
<td> 0.2.3 </td>
<td> &#8805; 0.2.3 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainSetVcpus </td>
<td> 0.1.4 </td>
<td> &#8805; 0.1.4 </td>
<td> x </td>
<td> x </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainShutdown </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainSuspend </td>
<td> All </td>
<td> All </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virDomainUndefine </td>
<td> 0.1.5 </td>
<td> &#8805; 0.1.9 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virGetVersion </td>
<td> All </td>
<td> All </td>
<td colspan="3"> Returns -1 if HV unsupported. </td>
</tr><tr><td> virInitialize </td>
<td> 0.1.0 </td>
<td colspan="4"> not a HV function </td>
</tr><tr><td> virNodeGetInfo </td>
<td> 0.1.0 </td>
<td> &#8805; 0.1.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.2.0 </td>
<td> &#8805; 0.3.0 </td>
</tr><tr><td> virNodeGetFreeMemory </td>
<td> 0.3.3 </td>
<td> &#8805; 0.3.3 </td>
<td> x </td>
<td> x </td>
<td> x </td>
</tr><tr><td> virNodeGetCellsFreeMemory </td>
<td> 0.3.3 </td>
<td> &#8805; 0.3.3 </td>
<td> x </td>
<td> x </td>
<td> x </td>
</tr></table><h3>Network functions</h3><p>
Network functions are not hypervisor-specific. For historical
reasons they require the QEMU daemon to be running (this
restriction may be lifted in future). Most network functions
first appeared in libvirt 0.2.0.
</p><table class="top_table"><tr><th> Function </th>
<th> Since </th>
</tr><tr><td> virConnectNumOfNetworks </td> <td> 0.2.0 </td>
</tr><tr><td> virConnectListNetworks </td> <td> 0.2.0 </td>
</tr><tr><td> virConnectNumOfDefinedNetworks </td> <td> 0.2.0 </td>
</tr><tr><td> virConnectListDefinedNetworks </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkCreate </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkCreateXML </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkDefineXML </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkDestroy </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkFree </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkGetAutostart </td> <td> 0.2.1 </td>
</tr><tr><td> virNetworkGetConnect </td> <td> 0.3.0 </td>
</tr><tr><td> virNetworkGetBridgeName </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkGetName </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkGetUUID </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkGetUUIDString </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkGetXMLDesc </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkLookupByName </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkLookupByUUID </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkLookupByUUIDString </td> <td> 0.2.0 </td>
</tr><tr><td> virNetworkSetAutostart </td> <td> 0.2.1 </td>
</tr><tr><td> virNetworkUndefine </td> <td> 0.2.0 </td>
</tr></table></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">Bindings for other languages</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="windows.html">Windows support</a></li><li><a href="remote.html">Remote support</a></li><li><a href="auth.html">Access control</a></li><li><a href="uri.html">Connection URIs</a></li><li><a href="hvsupport.html">Hypervisor support</a></li><li><a href="storage.html">Storage Management</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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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

@ -3,160 +3,141 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="SHORTCUT ICON" href="/favicon.ico" />
<style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style>
<title>Libvir the virtualization API</title>
<link rel="stylesheet" type="text/css" href="libvirt.css" />
<link rel="SHORTCUT ICON" href="/32favicon.png" />
<title>the virtualization API</title>
</head>
<body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="center">
<tr>
<td width="120">
<a href="http://www.redhat.com/">
<img src="redhat.gif" alt="Red Hat Logo" />
</a>
</td>
<td>
<table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd">
<tr>
<td align="center">
<h1>Libvir the virtualization API</h1>
<h2>libvir</h2>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="4" cellspacing="0" width="100%" align="center">
<tr>
<td bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr>
<td valign="top" width="200" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="1" bgcolor="#eecfa1" align="center">
<center>
<b>Main Menu</b>
</center>
</td>
</tr>
<tr>
<td bgcolor="#fffacd">
<form action="search.php" enctype="application/x-www-form-urlencoded" method="get">
<input name="query" type="text" size="20" value="" />
<input name="submit" type="submit" value="Search ..." />
</form>
<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="downloads.html">Downloads</a>
</li>
<li>
<a href="FAQ.html">FAQ</a>
</li>
<li>
<a href="bugs.html">Reporting bugs and getting help</a>
</li>
<li>
<a style="font-weight:bold" href="html/index.html">API Menu</a>
</li>
<li>
<a href="ChangeLog.html">Recent Changes</a>
</li>
</ul>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td colspan="1" bgcolor="#eecfa1" align="center">
<center>
<b>Related links</b>
</center>
</td>
</tr>
<tr>
<td bgcolor="#fffacd">
<ul>
<li>
<a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a>
</li>
<li>
<a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a>
</li>
</ul>
</td>
</tr>
</table>
</td>
</tr>
</table>
<a href="http://xmlsoft.org/">
<img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" />
</a>
</td>
<td valign="top" bgcolor="#8b7765">
<table border="0" cellspacing="0" cellpadding="1" width="100%">
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000">
<tr>
<td>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<tr>
<td bgcolor="#fffacd">
<p>Libvir is a C toolkit to interract with the virtualization capabilities of
recent versions of Linux (and other OSes). It is free software available
<body>
<div id="container">
<div id="intro">
<div id="adjustments">
<p class="p1"></p>
</div>
<div id="content">
<h3>what is <span class="style1">libvirt?</span></h3>
<p>Libvirt is a C toolkit to interact with the virtualization capabilities
of recent versions of Linux (and other OSes). It is free software available
under the <a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
Lesser General Public License</a>. Virtualization of the Linux Operating
System means the ability to run multiple instances of Operating Systems
concurently on a single hardware system where the basic resources are driven
by a Linux instance. The library aim at providing long term stable C API
primarily for the <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen
paravirtualization</a> mechanism but should be able to integrate other
virtualization mechanisms if needed.</p>
<p>
<a href="bugs.html">Daniel Veillard</a>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
by a Linux (or Solaris) instance. The library aims at providing a long term
stable C API initially for <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen
paravirtualization</a> but it can also integrate with other
virtualization mechanisms. It currently also supports <a href="http://fabrice.bellard.free.fr/qemu/">QEMU</a>, <a href="http://kvm.qumranet.com/">KVM</a> and
<a href="http://openvz.org/">OpenVZ</a>.</p>
</div>
</div>
<div class="linkList">
<div class="llinks">
<h3 class="links">
<span>main menu</span>
</h3>
<ul>
<li>Home</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">Bindings for other languages</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="windows.html">Windows support</a>
</li>
<li>
<a href="remote.html">Remote support</a>
</li>
<li>
<a href="auth.html">Access control</a>
</li>
<li>
<a href="uri.html">Connection URIs</a>
</li>
<li>
<a href="hvsupport.html">Hypervisor support</a>
</li>
<li>
<a href="storage.html">Storage Management</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="llinks">
<h3 class="links">
<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://virt-manager.et.redhat.com/">virt-manager</a>
</li>
<li>
<a href="http://libvirt.org/CIM/">CIM provider</a>
</li>
<li>
<a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a>
</li>
<li>
<a href="http://libvirt.org/ocaml/">OCaml bindings</a>
</li>
<li>
<a href="http://libvirt.org/ruby/">Ruby 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

@ -34,8 +34,8 @@
# Bye
#
# Then run the script in the doc subdir, it will create the symbols and
# word tables and populate them with informations extracted from
# the libvir-api.xml API description, and make then accessible read-only
# word tables and populate them with informations extracted from
# the libvirt-api.xml API description, and make then accessible read-only
# by nobody@loaclhost the user expected to be Apache's one
#
# On the Apache configuration, make sure you have php support enabled
@ -116,7 +116,7 @@ TABLES={
#
# The XML API description file to parse
#
API="libvir-api.xml"
API="libvirt-api.xml"
DB=None
#########################################################################
@ -187,7 +187,7 @@ def checkTables(db, verbose = 1):
except:
pass
return 0
def openMySQL(db="libvir", passwd=None, verbose = 1):
global DB
@ -231,7 +231,7 @@ def updateWord(name, symbol, relevance):
print "UPDATE words SET relevance = %d where name = '%s' and symbol = '%s'" % (relevance, name, symbol)
print sys.exc_type, sys.exc_value
return -1
return ret
def updateSymbol(name, module, type, desc):
@ -272,9 +272,9 @@ def updateSymbol(name, module, type, desc):
print """UPDATE symbols SET module='%s', type='%s', descr='%s' where name='%s'""" % (module, type, desc, name)
print sys.exc_type, sys.exc_value
return -1
return ret
def addFunction(name, module, desc = ""):
return updateSymbol(name, module, 'function', desc)
@ -321,7 +321,7 @@ def addPage(resource, title):
print """UPDATE pages SET title='%s' WHERE resource='%s'""" % (title, resource)
print sys.exc_type, sys.exc_value
return -1
return ret
def updateWordHTML(name, resource, desc, id, relevance):
@ -361,7 +361,7 @@ def updateWordHTML(name, resource, desc, id, relevance):
print """UPDATE wordsHTML SET section='%s', id='%s', relevance='%d' where name='%s' and resource='%s'""" % (desc, id, relevance, name, resource)
print sys.exc_type, sys.exc_value
return -1
return ret
def checkXMLMsgArchive(url):
@ -383,9 +383,9 @@ def checkXMLMsgArchive(url):
return -1
except:
return -1
return row[0]
def addXMLMsgArchive(url, title):
global DB
@ -414,7 +414,7 @@ def addXMLMsgArchive(url, title):
except:
print "addXMLMsgArchive failed command: %s" % (cmd)
return -1
return((int)(row[0]))
def updateWordArchive(name, id, relevance):
@ -444,7 +444,7 @@ def updateWordArchive(name, id, relevance):
print """UPDATE wordsArchive SET relevance='%d' where name='%s' and ID='%d'""" % (relevance, name, id)
print sys.exc_type, sys.exc_value
return -1
return ret
#########################################################################
@ -501,7 +501,7 @@ def cleanupWordsString(str):
str = string.replace(str, "\xc2", " ")
str = string.replace(str, "\xa0", " ")
return str
def cleanupDescrString(str):
str = string.replace(str, "'", " ")
str = string.replace(str, "\n", " ")
@ -557,7 +557,7 @@ def addWord(word, module, symbol, relevance):
wordsDict[word] = {}
wordsDict[word][(module, symbol)] = relevance
return relevance
def addString(str, module, symbol, relevance):
if str == None or len(str) < 3:
return -1
@ -603,7 +603,7 @@ def addWordHTML(word, resource, id, section, relevance):
d = wordsDictHTML[word];
d[resource] = (relevance, id, section)
return relevance
def addStringHTML(str, resource, id, section, relevance):
if str == None or len(str) < 3:
return -1
@ -650,7 +650,7 @@ def addWordArchive(word, id, relevance):
d = wordsDictArchive[word];
d[id] = relevance
return relevance
def addStringArchive(str, id, relevance):
if str == None or len(str) < 3:
return -1
@ -692,7 +692,7 @@ def foundExport(file, symbol):
for word in l:
addWord(word, file, symbol, 10)
return 1
def analyzeAPIFile(top):
count = 0
name = top.prop("name")
@ -711,7 +711,7 @@ def analyzeAPIFile(top):
def analyzeAPIFiles(top):
count = 0
cur = top.children
while cur != None:
if cur.type == 'text':
cur = cur.next
@ -897,7 +897,7 @@ def analyzeAPIFunction(top):
def analyzeAPISymbols(top):
count = 0
cur = top.children
while cur != None:
if cur.type == 'text':
cur = cur.next
@ -1129,7 +1129,7 @@ def scanXMLDateArchive(t = None, force = 0):
pass
return newmsg
#########################################################################
# #

View File

@ -1,10 +1,31 @@
<?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="SHORTCUT ICON" href="/favicon.ico" /><style type="text/css">
TD {font-family: Verdana,Arial,Helvetica}
BODY {font-family: Verdana,Arial,Helvetica; margin-top: 2em; margin-left: 0em; margin-right: 0em}
H1 {font-family: Verdana,Arial,Helvetica}
H2 {font-family: Verdana,Arial,Helvetica}
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style><title>Introduction</title></head><body bgcolor="#8b7765" text="#000000" link="#a06060" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>Libvir the virtualization API</h1><h2>Introduction</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><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="downloads.html">Downloads</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a style="font-weight:bold" href="html/index.html">API Menu</a></li><li><a href="ChangeLog.html">Recent Changes</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="https://www.redhat.com/archives/libvir-list/">Mail archive</a></li><li><a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen project</a></li></ul></td></tr></table></td></tr></table><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-90x34.gif" alt="Made with Libxml2 Logo" /></a></td><td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"><p></p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="libvirt.css" /><link rel="SHORTCUT ICON" href="/32favicon.png" /><title>Introduction</title></head><body><div id="container"><div id="intro"><div id="adjustments"></div><div id="pageHeader"></div><div id="content2"><h1 class="style1">Introduction</h1><p>Libvirt is a C toolkit to interact with the virtualization capabilities of
recent versions of Linux (and other OSes), but libvirt won't try to provide
all possible interfaces for interacting with the virtualization features.</p><p>To avoid ambiguity about the terms used here here are the definitions for
some of the specific concepts used in libvirt documentation:</p><ul><li>a <strong>node</strong> is a single physical machine</li>
<li>an <strong>hypervisor</strong> is a layer of software allowing to
virtualize a node in a set of virtual machines with possibly different
configurations than the node itself</li>
<li>a <strong>domain</strong> is an instance of an operating system running
on a virtualized machine provided by the hypervisor</li>
</ul><p style="text-align: center"><img alt="Hypervisor and domains running on a node" src="node.gif" /></p><p>Now we can define the goal of libvirt: to provide the lowest possible
generic and stable layer to manage domains on a node.</p><p>This implies the following:</p><ul><li>the API should not be targetted to a single virtualization environment
though Xen is the current default, which also means that some very
specific capabilities which are not generic enough may not be provided as
libvirt APIs</li>
<li>the API should allow to do efficiently and cleanly all the operations
needed to manage domains on a node</li>
<li>the API will not try to provide hight level multi-nodes management
features like load balancing, though they could be implemented on top of
libvirt</li>
<li>stability of the API is a big concern, libvirt should isolate
applications from the frequent changes expected at the lower level of the
virtualization framework</li>
</ul><p>So libvirt should be a building block for higher level management tools
and for applications focusing on virtualization of a single node (the only
exception being domain migration between node capabilities which may need to
be added at the libvirt level). Where possible libvirt should be extendable
to be able to provide the same API for remote nodes, however this is not the
case at the moment, the code currently handle only local node accesses
(extension for remote access support is being worked on, see <a href="bugs.html">the mailing list</a> discussions about it).</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">Bindings for other languages</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="windows.html">Windows support</a></li><li><a href="remote.html">Remote support</a></li><li><a href="auth.html">Access control</a></li><li><a href="uri.html">Connection URIs</a></li><li><a href="hvsupport.html">Hypervisor support</a></li><li><a href="storage.html">Storage Management</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://virt-manager.et.redhat.com/">virt-manager</a></li><li><a href="http://search.cpan.org/~danberr/Sys-Virt-0.1.0/">Perl bindings</a></li><li><a href="http://libvirt.org/ocaml/">OCaml bindings</a></li><li><a href="http://libvirt.org/ruby/">Ruby 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

@ -12,10 +12,10 @@ Functional description:
- stop
- suspend
- resume
- monitor
- monitor
More advanced features should be allowed as future extensions, but
are not expected to be provided in first shipment.
Open enough Licence that customers can link their apps to it (LGPL)
Small and contained enough that we can use it as a way to
@ -32,8 +32,8 @@ Python code on top driving the hypervisor.
are not uncommon, and it is very low level usually without comment about
the function or its arguments. They are usually only called once in the
whole tree by the python bindings. In essence it looks like the Xen project
was not implemented with the idea of reusing that part of the code by
applications.
was not implemented with the idea of reusing that part of the code by
applications.
Indeed most of the userland code coming with Xen is built on Python,
like xend the xen daemon running on domain 0 or the xenstored daemon which
manage the state of the domains launched.
@ -54,7 +54,7 @@ The IBM way:
------------
Here is supposition about code that I can't instanciate except by looking
at said code but it looks that IBM also needed a C programmatic API to
at said code but it looks that IBM also needed a C programmatic API to
manage the Xen domain definitions. Their solution was to build (Rusty
Russell did this) an LGPL C API connecting directly to the xenstore
daemon (./tools/xenstore/*). In a way this is quite more fragile as it depends

View File

@ -1,218 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<api name='libvir'>
<files>
<file name='libvir'>
<summary>core interfaces for the libvir library</summary>
<description>Provides the interfaces of the libvir library to handle Xen domains from a process running in domain 0 </description>
<author>Daniel Veillard &lt;veillard@redhat.com&gt; </author>
<exports symbol='LIBVIR_VERSION_NUMBER' type='macro'/>
<exports symbol='VIR_DOMAIN_SHUTOFF' type='enum'/>
<exports symbol='VIR_DOMAIN_SHUTDOWN' type='enum'/>
<exports symbol='VIR_DOMAIN_NONE' type='enum'/>
<exports symbol='VIR_DOMAIN_BLOCKED' type='enum'/>
<exports symbol='VIR_DOMAIN_PAUSED' type='enum'/>
<exports symbol='VIR_DOMAIN_RUNNING' type='enum'/>
<exports symbol='VIR_DOMAIN_NOSTATE' type='enum'/>
<exports symbol='virDomainInfoPtr' type='typedef'/>
<exports symbol='virConnectPtr' type='typedef'/>
<exports symbol='virDomainState' type='typedef'/>
<exports symbol='virDomain' type='typedef'/>
<exports symbol='virDomainPtr' type='typedef'/>
<exports symbol='virConnect' type='typedef'/>
<exports symbol='virDomainCreateFlags' type='typedef'/>
<exports symbol='virDomainInfo' type='typedef'/>
<exports symbol='_virDomainInfo' type='struct'/>
<exports symbol='virDomainGetInfo' type='function'/>
<exports symbol='virDomainShutdown' type='function'/>
<exports symbol='virGetVersion' type='function'/>
<exports symbol='virDomainLookupByName' type='function'/>
<exports symbol='virConnectGetType' type='function'/>
<exports symbol='virConnectListDomains' type='function'/>
<exports symbol='virDomainLookupByID' type='function'/>
<exports symbol='virDomainGetOSType' type='function'/>
<exports symbol='virConnectNumOfDomains' type='function'/>
<exports symbol='virDomainSetMaxMemory' type='function'/>
<exports symbol='virDomainGetMaxMemory' type='function'/>
<exports symbol='virConnectGetVersion' type='function'/>
<exports symbol='virDomainFree' type='function'/>
<exports symbol='virConnectOpen' type='function'/>
<exports symbol='virDomainSuspend' type='function'/>
<exports symbol='virConnectClose' type='function'/>
<exports symbol='virDomainGetID' type='function'/>
<exports symbol='virDomainResume' type='function'/>
<exports symbol='virDomainCreateLinux' type='function'/>
<exports symbol='virDomainDestroy' type='function'/>
<exports symbol='virDomainGetXMLDesc' type='function'/>
<exports symbol='virDomainGetName' type='function'/>
<exports symbol='virConnectOpenReadOnly' type='function'/>
</file>
</files>
<symbols>
<macro name='LIBVIR_VERSION_NUMBER' file='libvir'>
<info>Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro</info>
</macro>
<enum name='VIR_DOMAIN_BLOCKED' file='libvir' value='2' type='virDomainState' info='the domain is blocked on resource'/>
<enum name='VIR_DOMAIN_NONE' file='libvir' value='0' type='virDomainCreateFlags'/>
<enum name='VIR_DOMAIN_NOSTATE' file='libvir' value='0' type='virDomainState' info='no state'/>
<enum name='VIR_DOMAIN_PAUSED' file='libvir' value='3' type='virDomainState' info='the domain is paused by user'/>
<enum name='VIR_DOMAIN_RUNNING' file='libvir' value='1' type='virDomainState' info='the domain is running'/>
<enum name='VIR_DOMAIN_SHUTDOWN' file='libvir' value='4' type='virDomainState' info='the domain is being shut down'/>
<enum name='VIR_DOMAIN_SHUTOFF' file='libvir' value='5' type='virDomainState' info=' the domain is shut off'/>
<struct name='virConnect' file='libvir' type='struct _virConnect'/>
<typedef name='virConnectPtr' file='libvir' 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>
</typedef>
<struct name='virDomain' file='libvir' type='struct _virDomain'/>
<typedef name='virDomainCreateFlags' file='libvir' type='enum'/>
<struct name='virDomainInfo' file='libvir' type='struct _virDomainInfo'>
<field name='state' type='unsigned char' info=' the running state, one of virDomainFlags'/>
<field name='maxMem' type='unsigned long' info=' the maximum memory in KBytes allowed'/>
<field name='memory' type='unsigned long' info=' the memory in KBytes used by the domain'/>
<field name='nrVirtCpu' type='unsigned short' info='* Informations below are only available to clients with a connection
* with full access to the hypervisor
*'/>
<field name='cpuTime' type='unsigned long long' info='* TODO:
* - check what can be extracted publicly from xenstore
* and what&apos;s private limited to the hypervisor call.
* - add padding to this structure for ABI long term protection
*'/>
</struct>
<typedef name='virDomainInfoPtr' file='libvir' type='virDomainInfo *'>
<info>a virDomainInfoPtr is a pointer to a virDomainInfo structure.</info>
</typedef>
<typedef name='virDomainPtr' file='libvir' type='virDomain *'>
<info>a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a Xen domain in the API.</info>
</typedef>
<typedef name='virDomainState' file='libvir' type='enum'/>
<function name='virConnectClose' file='libvir' module='libvir'>
<info>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</info>
<return type='int' info='0 in case of success or -1 in case of error.'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
</function>
<function name='virConnectGetType' file='libvir' module='libvir'>
<info>Get the name of the Hypervisor software used.</info>
<return type='const char *' info='NULL in case of error, a static zero terminated string otherwise.'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
</function>
<function name='virConnectGetVersion' file='libvir' module='libvir'>
<info>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</info>
<return type='int' info='-1 in case of error, 0 otherwise. if the version can&apos;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'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='hvVer' type='unsigned long *' info='return value for the version of the running hypervisor (OUT)'/>
</function>
<function name='virConnectListDomains' file='libvir' module='libvir'>
<info>Collect the list of active domains, and store their ID in @maxids</info>
<return type='int' info='the number of domain found or -1 in case of error'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='ids' type='int *' info='array to collect the list of IDs of active domains'/>
<arg name='maxids' type='int' info='size of @ids'/>
</function>
<function name='virConnectNumOfDomains' file='libvir' module='libvir'>
<info>Provides the number of active domains.</info>
<return type='int' info='the number of domain found or -1 in case of error'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
</function>
<function name='virConnectOpen' file='libvir' module='libvir'>
<info>This function should be called first to get a connection to the Hypervisor and xen store</info>
<return type='virConnectPtr' info='a pointer to the hypervisor connection or NULL in case of error'/>
<arg name='name' type='const char *' info='optional argument currently unused, pass NULL'/>
</function>
<function name='virConnectOpenReadOnly' file='libvir' module='libvir'>
<info>This function should be called first to get a read-only connection to the xen store. The set of APIs usable are then restricted.</info>
<return type='virConnectPtr' info='a pointer to the hypervisor connection or NULL in case of error'/>
<arg name='name' type='const char *' info='optional argument currently unused, pass NULL'/>
</function>
<function name='virDomainCreateLinux' file='libvir' module='libvir'>
<info>Launch a new Linux guest domain, unimplemented yet, API to be defined. This would function requires priviledged access to the hypervisor.</info>
<return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='kernel_path' type='const char *' info='the file path to the kernel image'/>
<arg name='initrd_path' type='const char *' info='an optional file path to an initrd'/>
<arg name='cmdline' type='const char *' info='optional command line parameters for the kernel'/>
<arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
<arg name='flags' type='unsigned int' info='an optional set of virDomainFlags'/>
</function>
<function name='virDomainDestroy' file='libvir' module='libvir'>
<info>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function requires priviledged access to the hypervisor.</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'/>
</function>
<function name='virDomainFree' file='libvir' module='libvir'>
<info>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</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'/>
</function>
<function name='virDomainGetID' file='libvir' module='libvir'>
<info>Get the hypervisor ID number for the domain</info>
<return type='unsigned int' info='the domain ID number or (unsigned int) -1 in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
</function>
<function name='virDomainGetInfo' file='libvir' module='libvir'>
<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>
<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'/>
</function>
<function name='virDomainGetMaxMemory' file='libvir' module='libvir'>
<info>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</info>
<return type='unsigned long' info='the memory size in kilobytes or 0 in case of error.'/>
<arg name='domain' type='virDomainPtr' info='a domain object or NULL'/>
</function>
<function name='virDomainGetName' file='libvir' module='libvir'>
<info>Get the public name for that domain</info>
<return type='const char *' info='a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
</function>
<function name='virDomainGetOSType' file='libvir' module='libvir'>
<info>Get the type of domain operation system.</info>
<return type='char *' info='the new string or NULL in case of error'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
</function>
<function name='virDomainGetXMLDesc' file='libvir' module='xml'>
<info>Provide an XML description of the domain. NOTE: this API is subject to changes.</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.'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
<arg name='flags' type='int' info='and OR&apos;ed set of extraction flags, not used yet'/>
</function>
<function name='virDomainLookupByID' file='libvir' module='libvir'>
<info>Try to find a domain based on the hypervisor ID number</info>
<return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='id' type='int' info='the domain ID number'/>
</function>
<function name='virDomainLookupByName' file='libvir' module='libvir'>
<info>Try to lookup a domain on the given hypervisor based on its name.</info>
<return type='virDomainPtr' info='a new domain object or NULL in case of failure'/>
<arg name='conn' type='virConnectPtr' info='pointer to the hypervisor connection'/>
<arg name='name' type='const char *' info='name for the domain'/>
</function>
<function name='virDomainResume' file='libvir' module='libvir'>
<info>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function requires priviledged access to the hypervisor.</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'/>
</function>
<function name='virDomainSetMaxMemory' file='libvir' module='libvir'>
<info>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires priviledged access to the hypervisor.</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 or NULL'/>
<arg name='memory' type='unsigned long' info='the memory size in kilobytes'/>
</function>
<function name='virDomainShutdown' file='libvir' module='libvir'>
<info>Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. 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.'/>
<arg name='domain' type='virDomainPtr' info='a domain object'/>
</function>
<function name='virDomainSuspend' file='libvir' module='libvir'>
<info>Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function requires priviledged access to the hypervisor.</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'/>
</function>
<function name='virGetVersion' file='libvir' module='libvir'>
<info>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, &quot;Xen&quot; is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</info>
<return type='int' info='-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.'/>
<arg name='libVer' type='unsigned long *' info='return value for the library version (OUT)'/>
<arg name='type' type='const char *' info='hypervisor type'/>
<arg name='typeVer' type='unsigned long *' info='return value for the version of the hypervisor (OUT)'/>
</function>
</symbols>
</api>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
docs/libvirHeader.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
docs/libvirLogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Some files were not shown because too many files have changed in this diff Show More