~ubuntu-branches/ubuntu/natty/libvirt/natty

« back to all changes in this revision

Viewing changes to docs/html/libvirt-libvirt.html

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-02-23 09:05:46 UTC
  • mfrom: (1.2.8 upstream) (3.4.25 sid)
  • Revision ID: james.westby@ubuntu.com-20110223090546-4pwmrrt7h51hr3l3
Tags: 0.8.8-1ubuntu1
* Resynchronize and merge from Debian unstable. Remaining changes:
  - debian/patches:
    * 9000-delayed_iff_up_bridge.patch
    * 9001-dont_clobber_existing_bridges.patch
    * 9002-better_default_uri_virsh.patch
    * 9003-better-default-arch.patch
    * 9004-libvirtd-group-name.patch
    * 9005-increase-unix-socket-timeout.patch
    * 9006-default-config-test-case.patch
    * 9007-fix-daemon-conf-ftbfs.patch
    * 9011-move-ebtables-script.patch
    * 9014-skip-nodeinfotest.patch
    * 9020-lp545795.patch
    * 9021-fix-uint64_t.patch
  - debian/patches/series:
    * Disable qemu-disable-network.diff.patch
  - debian/control:
    * set ubuntu maintainer
    * Build-Depends:
      - swap libxen to libxen3, qemu to qemu-kvm, and open-iscsi to
        open-iscsi-utils in Build-Depends
      - remove virtualbox Build-Depends
      - add libxml2 and libapparmor-dev Build-Depends
    * convert Vcs-Git to Xs-Debian-Vcs-Git
    * libvirt-bin Depends: move netcat-openbsd, bridge-utils, dnsmasq-base
      (>= 2.46-1), and iptables from Recommends to Depends
    * libvirt-bin Recommends: move qemu to Suggests
    * libvirt-bin Suggests: add apparmor
    * libvirt0 Recommands: move lvm2 to Suggests
  - keep debian/libvirt-bin.apport
  - keep debian/libvirt-bin.cron.daily
  - debian/libvirt-bin.dirs:
    * add apparmor, cron.daily, and apport dirs
  - debian/libvirt-bin.examples:
    * add debian/libvirt-suspendonreboot
  - debian/libvirt-bin.install:
    * add /etc/apparmor.d files
    * add apport hook
  - debian/libvirt-bin.manpages:
    * add debian/libvirt-migrate-qemu-disks.1
  - debian/libvirt-bin.postinst:
    * replace libvirt groupname with libvirtd
    * add each admin user to libvirtd group
    * call apparmor_parser on usr.sbin.libvirtd and
      usr.lib.libvirt.virt-aa-helper
    * call 'libvirt-migrate-qemu-disks -a' after
      libvirt-bin has started if migrating from
      older than 0.8.3-1ubuntu1
  - debian/libvirt-bin.postrm:
    * replace libvirt groupname with libvirtd
    * remove usr.sbin.libvirtd and
      usr.lib.libvirt.virt-aa-helper
  - keep added files under debian/:
    * libvirt-bin.upstart
    * libvirt-migrate-qemu-disks
    * libvirt-migrate-qemu-disks.1
    * libvirt-suspendonreboot
    * apparmor profiles
  - debian/README.Debian:
    * add 'Apparmor Profile' section
    * add 'Disk migration' section
  - debian/rules:
    * don't build with vbox since virtualbox-ose is in universe
    * add --with-apparmor to DEB_CONFIGURE_EXTRA_FLAGS
    * set DEB_DH_INSTALLINIT_ARGS to '--upstart-only'
    * set DEB_MAKE_CHECK_TARGET to 'check'
    * remove unneeded binary-install/libvirt-bin:: and clean::
      sections (they only deal with sysvinit stuff)
    * add build/libvirt-bin:: section to install
      - apparmor files
      - apport hooks
      - libvirt-migrate-qemu-disks
* The following Ubuntu packaging changes occurred during the divergence
  between Debian and Ubuntu. These changes are not new, but included here
  for completeness: (0.8.5-0ubuntu1 - 0.8.5-0ubuntu5):
  - Have upstart job source /etc/default/libvirt-bin.  This is only a
    temporary fix until upstart provides proper default override support
    through /etc/init/libvirt-bin.override (or any other mechanism).
    (LP: 708172)
  - debian/apparmor/usr.sbin.libvirtd: use PUx instead of Ux for executables
    (LP: 573315)
  - Rebuild with python 2.7 as the python default.
  - debian/libvirt-bin.cron.daily: use shell globbing to enumerate xml files.
    Based on patch thanks to Henryk Plötz (LP: 655176)
* Dropped the following patches included/fixed upstream:
  - 9010-dont-disable-ipv6.patch
  - 9022-build-cleanup-declaration-of-xen-tests.patch
  - 9023-vah-require-uuid.patch
  - 9009-autodetect-nc-params.patch
    * rolled into Debian's
      Autodetect-if-the-remote-nc-command-supports-the-q-o.patch
* Updated the following patches:
  - 9011-move-ebtables-script.patch:
    * LOCALSTATEDIR is defined in configmake.h
  - 9000-9006: added DEP-3 tags
  - 9002-better_default_uri_virsh.patch: updated (context changed)
* New patches:
  - 9022-drop-booton-when-kernel-specified.patch (LP: #720426)
  - 9023-fix-lxc-console-hangup.patch (LP: #668369)
  - 9024-skip-broken-commandtest.patch
* debian/patches/series:
  - don't apply Disable-CHECKSUM-rule.patch: our iptables can do this
  - don't apply Debian-specific Debianize-libvirt-guests.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<html xmlns="http://www.w3.org/1999/xhtml"><!--
4
4
        This file is autogenerated from html/libvirt-libvirt.html.in
5
5
        Do not edit this file. Changes will be lost.
6
 
      --><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="../main.css" /><link rel="SHORTCUT ICON" href="../32favicon.png" /><title>libvirt: Module libvirt from libvirt</title><meta name="description" content="libvirt, virtualization, virtualization API" /></head><body><div id="header"><div id="headerLogo"></div><div id="headerSearch"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><div><input id="query" name="query" type="text" size="12" value="" /><input id="submit" name="submit" type="submit" value="Search" /></div></form></div></div><div id="body"><div id="menu"><ul class="l0"><li><div><a title="Front page of the libvirt website" class="inactive" href="../index.html">Home</a></div></li><li><div><a title="Details of new features and bugs fixed in each release" class="inactive" href="../news.html">News</a></div></li><li><div><a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="../downloads.html">Downloads</a></div></li><li><div><a title="Information for users, administrators and developers" class="active" href="../docs.html">Documentation</a><ul class="l1"><li><div><a title="Information about deploying and using libvirt" class="inactive" href="../deployment.html">Deployment</a></div></li><li><div><a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="../intro.html">Architecture</a></div></li><li><div><a title="Description of the XML formats used in libvirt" class="inactive" href="../format.html">XML format</a></div></li><li><div><a title="Hypervisor specific driver information" class="inactive" href="../drivers.html">Drivers</a></div></li><li><div><a title="Reference manual for the C public API" class="active" href="../html/index.html">API reference</a><ul class="l2"><li><div><span class="active">libvirt</span></div></li><li><div><a title="error handling interfaces for the libvirt library" class="inactive" href="../html/libvirt-virterror.html">virterror</a></div></li><li><div><a title="matrix of API support per hypervisor per release" class="inactive" href="../hvsupport.html">Driver support</a></div></li></ul></div></li><li><div><a title="Bindings of the libvirt API for other languages" class="inactive" href="../bindings.html">Language bindings</a></div></li><li><div><a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="../internals.html">Internals</a></div></li><li><div><a title="A guide and reference for developing with libvirt" class="inactive" href="../devguide.html">Development Guide</a></div></li></ul></div></li><li><div><a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a></div></li><li><div><a title="Frequently asked questions" class="inactive" href="../http://wiki.libvirt.org/page/FAQ">FAQ</a></div></li><li><div><a title="How and where to report bugs and request features" class="inactive" href="../bugs.html">Bug reports</a></div></li><li><div><a title="How to contact the developers via email and IRC" class="inactive" href="../contact.html">Contact</a></div></li><li><div><a title="Miscellaneous links of interest related to libvirt" class="inactive" href="../relatedlinks.html">Related Links</a></div></li><li><div><a title="Overview of all content on the website" class="inactive" href="../sitemap.html">Sitemap</a></div></li></ul></div><div id="content"><h1>Module libvirt from libvirt</h1><p>Provides the interfaces of the libvirt library to handle virtualized domains </p><h2>Table of Contents</h2><h3><a href="#macros">Macros</a></h3><pre>#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a>
 
6
      --><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="../main.css" /><link rel="SHORTCUT ICON" href="../32favicon.png" /><title>libvirt: Module libvirt from libvirt</title><meta name="description" content="libvirt, virtualization, virtualization API" /></head><body><div id="header"><div id="headerLogo"></div><div id="headerSearch"><form action="../search.php" enctype="application/x-www-form-urlencoded" method="get"><div><input id="query" name="query" type="text" size="12" value="" /><input id="submit" name="submit" type="submit" value="Search" /></div></form></div></div><div id="body"><div id="menu"><ul class="l0"><li><div><a title="Front page of the libvirt website" class="inactive" href="../index.html">Home</a></div></li><li><div><a title="Details of new features and bugs fixed in each release" class="inactive" href="../news.html">News</a></div></li><li><div><a title="Applications known to use libvirt" class="inactive" href="../apps.html">Applications</a></div></li><li><div><a title="Get the latest source releases, binary builds and get access to the source repository" class="inactive" href="../downloads.html">Downloads</a></div></li><li><div><a title="Information for users, administrators and developers" class="active" href="../docs.html">Documentation</a><ul class="l1"><li><div><a title="How to compile libvirt" class="inactive" href="../compiling.html">Compiling</a></div></li><li><div><a title="Information about deploying and using libvirt" class="inactive" href="../deployment.html">Deployment</a></div></li><li><div><a title="Overview of the logical subsystems in the libvirt API" class="inactive" href="../intro.html">Architecture</a></div></li><li><div><a title="Description of the XML formats used in libvirt" class="inactive" href="../format.html">XML format</a></div></li><li><div><a title="Hypervisor specific driver information" class="inactive" href="../drivers.html">Drivers</a></div></li><li><div><a title="Reference manual for the C public API" class="active" href="../html/index.html">API reference</a><ul class="l2"><li><div><span class="active">libvirt</span></div></li><li><div><a title="error handling interfaces for the libvirt library" class="inactive" href="../html/libvirt-virterror.html">virterror</a></div></li><li><div><a title="matrix of API support per hypervisor per release" class="inactive" href="../hvsupport.html">Driver support</a></div></li></ul></div></li><li><div><a title="Bindings of the libvirt API for other languages" class="inactive" href="../bindings.html">Language bindings</a></div></li><li><div><a title="Working on the internals of libvirt API, driver and daemon code" class="inactive" href="../internals.html">Internals</a></div></li><li><div><a title="A guide and reference for developing with libvirt" class="inactive" href="../devguide.html">Development Guide</a></div></li><li><div><a title="Command reference for virsh" class="inactive" href="../virshcmdref.html">Virsh Commands</a></div></li></ul></div></li><li><div><a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a></div></li><li><div><a title="Frequently asked questions" class="inactive" href="../http://wiki.libvirt.org/page/FAQ">FAQ</a></div></li><li><div><a title="How and where to report bugs and request features" class="inactive" href="../bugs.html">Bug reports</a></div></li><li><div><a title="How to contact the developers via email and IRC" class="inactive" href="../contact.html">Contact</a></div></li><li><div><a title="Miscellaneous links of interest related to libvirt" class="inactive" href="../relatedlinks.html">Related Links</a></div></li><li><div><a title="Overview of all content on the website" class="inactive" href="../sitemap.html">Sitemap</a></div></li></ul></div><div id="content"><h1>Module libvirt from libvirt</h1><p>Provides the interfaces of the libvirt library to handle virtualized domains </p><h2>Table of Contents</h2><h3><a href="#macros">Macros</a></h3><pre>#define <a href="#LIBVIR_VERSION_NUMBER">LIBVIR_VERSION_NUMBER</a>
7
7
#define <a href="#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a>
8
8
#define <a href="#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a>
9
9
#define <a href="#VIR_CPU_USABLE">VIR_CPU_USABLE</a>
11
11
#define <a href="#VIR_DOMAIN_MEMORY_FIELD_LENGTH">VIR_DOMAIN_MEMORY_FIELD_LENGTH</a>
12
12
#define <a href="#VIR_DOMAIN_MEMORY_HARD_LIMIT">VIR_DOMAIN_MEMORY_HARD_LIMIT</a>
13
13
#define <a href="#VIR_DOMAIN_MEMORY_MIN_GUARANTEE">VIR_DOMAIN_MEMORY_MIN_GUARANTEE</a>
 
14
#define <a href="#VIR_DOMAIN_MEMORY_PARAM_UNLIMITED">VIR_DOMAIN_MEMORY_PARAM_UNLIMITED</a>
14
15
#define <a href="#VIR_DOMAIN_MEMORY_SOFT_LIMIT">VIR_DOMAIN_MEMORY_SOFT_LIMIT</a>
15
16
#define <a href="#VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT">VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT</a>
16
17
#define <a href="#VIR_DOMAIN_SCHED_FIELD_LENGTH">VIR_DOMAIN_SCHED_FIELD_LENGTH</a>
160
161
char *  <a href="#virConnectGetHostname">virConnectGetHostname</a>              (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
161
162
int     <a href="#virConnectGetLibVersion">virConnectGetLibVersion</a>          (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br />                                     unsigned long * libVer)
162
163
int     <a href="#virConnectGetMaxVcpus">virConnectGetMaxVcpus</a>              (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br />                                     const char * type)
 
164
char *  <a href="#virConnectGetSysinfo">virConnectGetSysinfo</a>                (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br />                                     unsigned int flags)
163
165
const char *    <a href="#virConnectGetType">virConnectGetType</a>      (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
164
166
char *  <a href="#virConnectGetURI">virConnectGetURI</a>                (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
165
167
int     <a href="#virConnectGetVersion">virConnectGetVersion</a>                (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br />                                     unsigned long * hvVer)
228
230
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)
229
231
int     <a href="#virDomainIsActive">virDomainIsActive</a>              (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom)
230
232
int     <a href="#virDomainIsPersistent">virDomainIsPersistent</a>              (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom)
 
233
int     <a href="#virDomainIsUpdated">virDomainIsUpdated</a>            (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom)
231
234
<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)
232
235
<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)
233
236
<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)
239
242
<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)
240
243
int     <a href="#virDomainMigrateSetMaxDowntime">virDomainMigrateSetMaxDowntime</a>    (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br />                                     unsigned long long downtime, <br />                                     unsigned int flags)
241
244
int     <a href="#virDomainMigrateToURI">virDomainMigrateToURI</a>              (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br />                                     const char * duri, <br />                                       unsigned long flags, <br />                                     const char * dname, <br />                                      unsigned long bandwidth)
 
245
int     <a href="#virDomainOpenConsole">virDomainOpenConsole</a>                (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br />                                        const char * devname, <br />                                    <a href="libvirt-libvirt.html#virStreamPtr">virStreamPtr</a> st, <br />                                         unsigned int flags)
242
246
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)
243
247
int     <a href="#virDomainReboot">virDomainReboot</a>                  (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br />                                     unsigned int flags)
244
248
int     <a href="#virDomainRef">virDomainRef</a>                        (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
435
439
typedef <a href="#virStreamSourceFunc">virStreamSourceFunc</a>
436
440
int     <a href="#virStreamSourceFunc">virStreamSourceFunc</a>          (<a href="libvirt-libvirt.html#virStreamPtr">virStreamPtr</a> st, <br />                                         char * data, <br />                                     size_t nbytes, <br />                                   void * opaque)
437
441
 
438
 
</pre><h2>Description</h2><h3><a name="macros" id="macros">Macros</a></h3><h3><a name="LIBVIR_VERSION_NUMBER" id="LIBVIR_VERSION_NUMBER"><code>LIBVIR_VERSION_NUMBER</code></a></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"><code>VIR_COPY_CPUMAP</code></a></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"><code>VIR_CPU_MAPLEN</code></a></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"><code>VIR_CPU_USABLE</code></a></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_EVENT_CALLBACK" id="VIR_DOMAIN_EVENT_CALLBACK"><code>VIR_DOMAIN_EVENT_CALLBACK</code></a></h3><pre>#define VIR_DOMAIN_EVENT_CALLBACK</pre><p>Used to cast the event specific callback into the generic one for use for virDomainEventRegister</p><h3><a name="VIR_DOMAIN_MEMORY_FIELD_LENGTH" id="VIR_DOMAIN_MEMORY_FIELD_LENGTH"><code>VIR_DOMAIN_MEMORY_FIELD_LENGTH</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_FIELD_LENGTH</pre><p>Macro providing the field length of <a href="libvirt-libvirt.html#virMemoryParameter">virMemoryParameter</a></p><h3><a name="VIR_DOMAIN_MEMORY_HARD_LIMIT" id="VIR_DOMAIN_MEMORY_HARD_LIMIT"><code>VIR_DOMAIN_MEMORY_HARD_LIMIT</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_HARD_LIMIT</pre><p>Macro for the memory tunable hard_limit: it represents the maximum memory the guest can use.</p><h3><a name="VIR_DOMAIN_MEMORY_MIN_GUARANTEE" id="VIR_DOMAIN_MEMORY_MIN_GUARANTEE"><code>VIR_DOMAIN_MEMORY_MIN_GUARANTEE</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_MIN_GUARANTEE</pre><p>Macro for the memory tunable min_guarantee: it represents the minimum memory guaranteed to be reserved for the guest.</p><h3><a name="VIR_DOMAIN_MEMORY_SOFT_LIMIT" id="VIR_DOMAIN_MEMORY_SOFT_LIMIT"><code>VIR_DOMAIN_MEMORY_SOFT_LIMIT</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_SOFT_LIMIT</pre><p>Macro for the memory tunable soft_limit: it represents the memory upper limit enforced during memory contention.</p><h3><a name="VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT" id="VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT"><code>VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT</pre><p>Macro for the swap tunable swap_hard_limit: it represents the maximum swap the guest can use.</p><h3><a name="VIR_DOMAIN_SCHED_FIELD_LENGTH" id="VIR_DOMAIN_SCHED_FIELD_LENGTH"><code>VIR_DOMAIN_SCHED_FIELD_LENGTH</code></a></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"><code>VIR_GET_CPUMAP</code></a></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"><code>VIR_NODEINFO_MAXCPUS</code></a></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_SECURITY_DOI_BUFLEN" id="VIR_SECURITY_DOI_BUFLEN"><code>VIR_SECURITY_DOI_BUFLEN</code></a></h3><pre>#define VIR_SECURITY_DOI_BUFLEN</pre><p>Macro providing the maximum length of the <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> doi string.</p><h3><a name="VIR_SECURITY_LABEL_BUFLEN" id="VIR_SECURITY_LABEL_BUFLEN"><code>VIR_SECURITY_LABEL_BUFLEN</code></a></h3><pre>#define VIR_SECURITY_LABEL_BUFLEN</pre><p>Macro providing the maximum length of the <a href="libvirt-libvirt.html#virSecurityLabel">virSecurityLabel</a> label string. Note that this value is based on that used by Labeled NFS.</p><h3><a name="VIR_SECURITY_MODEL_BUFLEN" id="VIR_SECURITY_MODEL_BUFLEN"><code>VIR_SECURITY_MODEL_BUFLEN</code></a></h3><pre>#define VIR_SECURITY_MODEL_BUFLEN</pre><p>Macro providing the maximum length of the <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> model string.</p><h3><a name="VIR_UNUSE_CPU" id="VIR_UNUSE_CPU"><code>VIR_UNUSE_CPU</code></a></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"><code>VIR_USE_CPU</code></a></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"><code>VIR_UUID_BUFLEN</code></a></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"><code>VIR_UUID_STRING_BUFLEN</code></a></h3><pre>#define VIR_UUID_STRING_BUFLEN</pre><p>This macro provides the length of the buffer required for virDomainGetUUIDString()</p><h3><a name="types" id="types">Types</a></h3><h3><a name="virCPUCompareResult" id="virCPUCompareResult"><code>virCPUCompareResult</code></a></h3><div class="api"><pre>enum virCPUCompareResult {
 
442
</pre><h2>Description</h2><h3><a name="macros" id="macros">Macros</a></h3><h3><a name="LIBVIR_VERSION_NUMBER" id="LIBVIR_VERSION_NUMBER"><code>LIBVIR_VERSION_NUMBER</code></a></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"><code>VIR_COPY_CPUMAP</code></a></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"><code>VIR_CPU_MAPLEN</code></a></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"><code>VIR_CPU_USABLE</code></a></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_EVENT_CALLBACK" id="VIR_DOMAIN_EVENT_CALLBACK"><code>VIR_DOMAIN_EVENT_CALLBACK</code></a></h3><pre>#define VIR_DOMAIN_EVENT_CALLBACK</pre><p>Used to cast the event specific callback into the generic one for use for virDomainEventRegister</p><h3><a name="VIR_DOMAIN_MEMORY_FIELD_LENGTH" id="VIR_DOMAIN_MEMORY_FIELD_LENGTH"><code>VIR_DOMAIN_MEMORY_FIELD_LENGTH</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_FIELD_LENGTH</pre><p>Macro providing the field length of <a href="libvirt-libvirt.html#virMemoryParameter">virMemoryParameter</a></p><h3><a name="VIR_DOMAIN_MEMORY_HARD_LIMIT" id="VIR_DOMAIN_MEMORY_HARD_LIMIT"><code>VIR_DOMAIN_MEMORY_HARD_LIMIT</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_HARD_LIMIT</pre><p>Macro for the memory tunable hard_limit: it represents the maximum memory the guest can use.</p><h3><a name="VIR_DOMAIN_MEMORY_MIN_GUARANTEE" id="VIR_DOMAIN_MEMORY_MIN_GUARANTEE"><code>VIR_DOMAIN_MEMORY_MIN_GUARANTEE</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_MIN_GUARANTEE</pre><p>Macro for the memory tunable min_guarantee: it represents the minimum memory guaranteed to be reserved for the guest.</p><h3><a name="VIR_DOMAIN_MEMORY_PARAM_UNLIMITED" id="VIR_DOMAIN_MEMORY_PARAM_UNLIMITED"><code>VIR_DOMAIN_MEMORY_PARAM_UNLIMITED</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_PARAM_UNLIMITED</pre><p>Macro providing the <a href="libvirt-libvirt.html#virMemoryParameter">virMemoryParameter</a> value that indicates "unlimited"</p><h3><a name="VIR_DOMAIN_MEMORY_SOFT_LIMIT" id="VIR_DOMAIN_MEMORY_SOFT_LIMIT"><code>VIR_DOMAIN_MEMORY_SOFT_LIMIT</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_SOFT_LIMIT</pre><p>Macro for the memory tunable soft_limit: it represents the memory upper limit enforced during memory contention.</p><h3><a name="VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT" id="VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT"><code>VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT</code></a></h3><pre>#define VIR_DOMAIN_MEMORY_SWAP_HARD_LIMIT</pre><p>Macro for the swap tunable swap_hard_limit: it represents the maximum swap the guest can use.</p><h3><a name="VIR_DOMAIN_SCHED_FIELD_LENGTH" id="VIR_DOMAIN_SCHED_FIELD_LENGTH"><code>VIR_DOMAIN_SCHED_FIELD_LENGTH</code></a></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"><code>VIR_GET_CPUMAP</code></a></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"><code>VIR_NODEINFO_MAXCPUS</code></a></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_SECURITY_DOI_BUFLEN" id="VIR_SECURITY_DOI_BUFLEN"><code>VIR_SECURITY_DOI_BUFLEN</code></a></h3><pre>#define VIR_SECURITY_DOI_BUFLEN</pre><p>Macro providing the maximum length of the <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> doi string.</p><h3><a name="VIR_SECURITY_LABEL_BUFLEN" id="VIR_SECURITY_LABEL_BUFLEN"><code>VIR_SECURITY_LABEL_BUFLEN</code></a></h3><pre>#define VIR_SECURITY_LABEL_BUFLEN</pre><p>Macro providing the maximum length of the <a href="libvirt-libvirt.html#virSecurityLabel">virSecurityLabel</a> label string. Note that this value is based on that used by Labeled NFS.</p><h3><a name="VIR_SECURITY_MODEL_BUFLEN" id="VIR_SECURITY_MODEL_BUFLEN"><code>VIR_SECURITY_MODEL_BUFLEN</code></a></h3><pre>#define VIR_SECURITY_MODEL_BUFLEN</pre><p>Macro providing the maximum length of the <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> model string.</p><h3><a name="VIR_UNUSE_CPU" id="VIR_UNUSE_CPU"><code>VIR_UNUSE_CPU</code></a></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"><code>VIR_USE_CPU</code></a></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"><code>VIR_UUID_BUFLEN</code></a></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"><code>VIR_UUID_STRING_BUFLEN</code></a></h3><pre>#define VIR_UUID_STRING_BUFLEN</pre><p>This macro provides the length of the buffer required for virDomainGetUUIDString()</p><h3><a name="types" id="types">Types</a></h3><h3><a name="virCPUCompareResult" id="virCPUCompareResult"><code>virCPUCompareResult</code></a></h3><div class="api"><pre>enum virCPUCompareResult {
439
443
</pre><table><tr><td><a name="VIR_CPU_COMPARE_ERROR" id="VIR_CPU_COMPARE_ERROR">VIR_CPU_COMPARE_ERROR</a></td><td> = </td><td>-1</td></tr><tr><td><a name="VIR_CPU_COMPARE_INCOMPATIBLE" id="VIR_CPU_COMPARE_INCOMPATIBLE">VIR_CPU_COMPARE_INCOMPATIBLE</a></td><td> = </td><td>0</td></tr><tr><td><a name="VIR_CPU_COMPARE_IDENTICAL" id="VIR_CPU_COMPARE_IDENTICAL">VIR_CPU_COMPARE_IDENTICAL</a></td><td> = </td><td>1</td></tr><tr><td><a name="VIR_CPU_COMPARE_SUPERSET" id="VIR_CPU_COMPARE_SUPERSET">VIR_CPU_COMPARE_SUPERSET</a></td><td> = </td><td>2</td></tr></table><pre>}
440
444
</pre></div><h3><a name="virConnect" id="virConnect"><code>virConnect</code></a></h3><div class="api"><pre>struct virConnect{
441
445
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
464
468
</pre></div><h3><a name="virDomainCreateFlags" id="virDomainCreateFlags"><code>virDomainCreateFlags</code></a></h3><div class="api"><pre>enum virDomainCreateFlags {
465
469
</pre><table><tr><td><a name="VIR_DOMAIN_NONE" id="VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a></td><td> = </td><td>0</td><td> : Default behavior</td></tr><tr><td><a name="VIR_DOMAIN_START_PAUSED" id="VIR_DOMAIN_START_PAUSED">VIR_DOMAIN_START_PAUSED</a></td><td> = </td><td>1</td><td> : Launch guest in paused state</td></tr></table><pre>}
466
470
</pre></div><h3><a name="virDomainDeviceModifyFlags" id="virDomainDeviceModifyFlags"><code>virDomainDeviceModifyFlags</code></a></h3><div class="api"><pre>enum virDomainDeviceModifyFlags {
467
 
</pre><table><tr><td><a name="VIR_DOMAIN_DEVICE_MODIFY_CURRENT" id="VIR_DOMAIN_DEVICE_MODIFY_CURRENT">VIR_DOMAIN_DEVICE_MODIFY_CURRENT</a></td><td> = </td><td>0</td><td> : Modify device allocation based on current domain state</td></tr><tr><td><a name="VIR_DOMAIN_DEVICE_MODIFY_LIVE" id="VIR_DOMAIN_DEVICE_MODIFY_LIVE">VIR_DOMAIN_DEVICE_MODIFY_LIVE</a></td><td> = </td><td>1</td><td> : Modify live device allocation</td></tr><tr><td><a name="VIR_DOMAIN_DEVICE_MODIFY_CONFIG" id="VIR_DOMAIN_DEVICE_MODIFY_CONFIG">VIR_DOMAIN_DEVICE_MODIFY_CONFIG</a></td><td> = </td><td>2</td><td> : Modify persisted device allocation</td></tr></table><pre>}
 
471
</pre><table><tr><td><a name="VIR_DOMAIN_DEVICE_MODIFY_CURRENT" id="VIR_DOMAIN_DEVICE_MODIFY_CURRENT">VIR_DOMAIN_DEVICE_MODIFY_CURRENT</a></td><td> = </td><td>0</td><td> : Modify device allocation based on current domain state</td></tr><tr><td><a name="VIR_DOMAIN_DEVICE_MODIFY_LIVE" id="VIR_DOMAIN_DEVICE_MODIFY_LIVE">VIR_DOMAIN_DEVICE_MODIFY_LIVE</a></td><td> = </td><td>1</td><td> : Modify live device allocation</td></tr><tr><td><a name="VIR_DOMAIN_DEVICE_MODIFY_CONFIG" id="VIR_DOMAIN_DEVICE_MODIFY_CONFIG">VIR_DOMAIN_DEVICE_MODIFY_CONFIG</a></td><td> = </td><td>2</td><td> : Modify persisted device allocation</td></tr><tr><td><a name="VIR_DOMAIN_DEVICE_MODIFY_FORCE" id="VIR_DOMAIN_DEVICE_MODIFY_FORCE">VIR_DOMAIN_DEVICE_MODIFY_FORCE</a></td><td> = </td><td>4</td><td> : Forcibly modify device (ex. force eject a cdrom)</td></tr></table><pre>}
468
472
</pre></div><h3><a name="virDomainEventDefinedDetailType" id="virDomainEventDefinedDetailType"><code>virDomainEventDefinedDetailType</code></a></h3><div class="api"><pre>enum virDomainEventDefinedDetailType {
469
473
</pre><table><tr><td><a name="VIR_DOMAIN_EVENT_DEFINED_ADDED" id="VIR_DOMAIN_EVENT_DEFINED_ADDED">VIR_DOMAIN_EVENT_DEFINED_ADDED</a></td><td> = </td><td>0</td><td> : Newly created config file</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_DEFINED_UPDATED" id="VIR_DOMAIN_EVENT_DEFINED_UPDATED">VIR_DOMAIN_EVENT_DEFINED_UPDATED</a></td><td> = </td><td>1</td><td> : Changed config file</td></tr></table><pre>}
470
474
</pre></div><h3><a name="virDomainEventGraphicsAddress" id="virDomainEventGraphicsAddress"><code>virDomainEventGraphicsAddress</code></a></h3><div class="api"><pre>struct virDomainEventGraphicsAddress{
551
555
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
552
556
}
553
557
</pre></div><h3><a name="virNodeInfo" id="virNodeInfo"><code>virNodeInfo</code></a></h3><div class="api"><pre>struct virNodeInfo{
554
 
</pre><table><tr><td>charmodel[32]</td><td>model</td><td> : string indicating the CPU model</td></tr><tr><td>unsigned long</td><td>memory</td><td> : memory size in kilobytes</td></tr><tr><td>unsigned int</td><td>cpus</td><td> : the number of active CPUs</td></tr><tr><td>unsigned int</td><td>mhz</td><td> : expected CPU frequency</td></tr><tr><td>unsigned int</td><td>nodes</td><td> : the number of NUMA cell, 1 for uniform mem access</td></tr><tr><td>unsigned int</td><td>sockets</td><td> : number of CPU socket per node</td></tr><tr><td>unsigned int</td><td>cores</td><td> : number of core per socket</td></tr><tr><td>unsigned int</td><td>threads</td><td> : number of threads per core</td></tr></table><pre>
 
558
</pre><table><tr><td>charmodel[32]</td><td>model</td><td> : string indicating the CPU model</td></tr><tr><td>unsigned long</td><td>memory</td><td> : memory size in kilobytes</td></tr><tr><td>unsigned int</td><td>cpus</td><td> : the number of active CPUs</td></tr><tr><td>unsigned int</td><td>mhz</td><td> : expected CPU frequency</td></tr><tr><td>unsigned int</td><td>nodes</td><td> : the number of NUMA cell, 1 for unusual NUMA topologies or uniform memory access; check capabilities XML for the actual NUMA topology</td></tr><tr><td>unsigned int</td><td>sockets</td><td> : number of CPU sockets per node if nodes &gt; 1, total number of CPU sockets otherwise</td></tr><tr><td>unsigned int</td><td>cores</td><td> : number of cores per socket</td></tr><tr><td>unsigned int</td><td>threads</td><td> : number of threads per core</td></tr></table><pre>
555
559
}
556
560
</pre></div><h3><a name="virSchedParameter" id="virSchedParameter"><code>virSchedParameter</code></a></h3><div class="api"><pre>struct virSchedParameter{
557
561
</pre><table><tr><td>charfield[VIR_DOMAIN_SCHED_FIELD_LENGTH]</td><td>field</td><td> : parameter name</td></tr><tr><td>int</td><td>type</td><td> : parameter type</td></tr></table><pre>
664
668
generates libvirt domain XML. The format of the native
665
669
data is hypervisor dependant.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>nativeFormat</tt></i>:</span></td><td>configuration format importing from</td></tr><tr><td><span class="term"><i><tt>nativeConfig</tt></i>:</span></td><td>the configuration data to import</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>currently unused, pass 0</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="virConnectDomainXMLToNative" id="virConnectDomainXMLToNative"><code>virConnectDomainXMLToNative</code></a></h3><pre class="programlisting">char * virConnectDomainXMLToNative     (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br />                                     const char * nativeFormat, <br />                                       const char * domainXml, <br />                                  unsigned int flags)<br />
666
670
</pre><p>Reads a domain XML configuration document, and generates
667
 
generates a native configuration file describing the domain.
 
671
a native configuration file describing the domain.
668
672
The format of the native data is hypervisor dependant.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>a connection object</td></tr><tr><td><span class="term"><i><tt>nativeFormat</tt></i>:</span></td><td>configuration format exporting to</td></tr><tr><td><span class="term"><i><tt>domainXml</tt></i>:</span></td><td>the domain configuration to export</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>currently unused, pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded native config datafile, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div><h3><a name="virConnectFindStoragePoolSources" id="virConnectFindStoragePoolSources"><code>virConnectFindStoragePoolSources</code></a></h3><pre class="programlisting">char *  virConnectFindStoragePoolSources        (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br />                                             const char * type, <br />                                               const char * srcSpec, <br />                                            unsigned int flags)<br />
669
673
</pre><p>Talks to a storage backend and attempts to auto-discover the set of
670
674
available storage pool sources. e.g. For iSCSI this would be a set of
684
688
 daemon running on the @conn host</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>libVer</tt></i>:</span></td><td>returns the libvirt library version used on the connection (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 have the format major * 1,000,000 + minor * 1,000 + release.</td></tr></tbody></table></div><h3><a name="virConnectGetMaxVcpus" id="virConnectGetMaxVcpus"><code>virConnectGetMaxVcpus</code></a></h3><pre class="programlisting">int       virConnectGetMaxVcpus           (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br />                                     const char * type)<br />
685
689
</pre><p>Provides the maximum number of virtual CPUs supported for a guest VM of a
686
690
specific type. The 'type' parameter here corresponds to the 'type'
687
 
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"><code>virConnectGetType</code></a></h3><pre class="programlisting">const char *    virConnectGetType       (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
 
691
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="virConnectGetSysinfo" id="virConnectGetSysinfo"><code>virConnectGetSysinfo</code></a></h3><pre class="programlisting">char * virConnectGetSysinfo            (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br />                                     unsigned int flags)<br />
 
692
</pre><p>This returns the XML description of the sysinfo details for the
 
693
host on which the hypervisor is running, in the same format as the
 
694
&lt;sysinfo&gt; element of a domain XML. This information is generally
 
695
available only for hypervisors running with root privileges.</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>flags</tt></i>:</span></td><td>callers should always pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XML string which must be freed by the caller, or NULL if there was an error.</td></tr></tbody></table></div><h3><a name="virConnectGetType" id="virConnectGetType"><code>virConnectGetType</code></a></h3><pre class="programlisting">const char *     virConnectGetType       (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
688
696
</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"><code>virConnectGetURI</code></a></h3><pre class="programlisting">char *       virConnectGetURI                (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
689
697
</pre><p>This returns the URI (name) of the hypervisor connection.
690
698
Normally this is the same as or similar to the string passed
903
911
}
904
912
 
905
913
This function requires privileged access to the hypervisor. This function
906
 
expects the caller to allocate the @param</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 memory parameter object (return value, allocated by the caller)</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>pointer to number of memory parameters</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>currently unused, for future extension</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="virDomainGetName" id="virDomainGetName"><code>virDomainGetName</code></a></h3><pre class="programlisting">const char *      virDomainGetName        (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
 
914
expects the caller to allocate the @params.</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 memory parameter object (return value, allocated by the caller)</td></tr><tr><td><span class="term"><i><tt>nparams</tt></i>:</span></td><td>pointer to number of memory parameters</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>currently unused, for future extension</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="virDomainGetName" id="virDomainGetName"><code>virDomainGetName</code></a></h3><pre class="programlisting">const char *    virDomainGetName        (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
907
915
</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"><code>virDomainGetOSType</code></a></h3><pre class="programlisting">char *   virDomainGetOSType              (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
908
916
</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"><code>virDomainGetSchedulerParameters</code></a></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 />
909
917
</pre><p>Get the scheduler parameters, the @params array will be filled with the
949
957
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="virDomainIsActive" id="virDomainIsActive"><code>virDomainIsActive</code></a></h3><pre class="programlisting">int   virDomainIsActive               (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom)<br />
950
958
</pre><p>Determine if the domain is currently running</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>Returns</tt></i>:</span></td><td>1 if running, 0 if inactive, -1 on error</td></tr></tbody></table></div><h3><a name="virDomainIsPersistent" id="virDomainIsPersistent"><code>virDomainIsPersistent</code></a></h3><pre class="programlisting">int       virDomainIsPersistent           (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom)<br />
951
959
</pre><p>Determine if the domain has a persistent configuration
952
 
which means it will still exist after shutting down</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>Returns</tt></i>:</span></td><td>1 if persistent, 0 if transient, -1 on error</td></tr></tbody></table></div><h3><a name="virDomainLookupByID" id="virDomainLookupByID"><code>virDomainLookupByID</code></a></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 />
 
960
which means it will still exist after shutting down</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>Returns</tt></i>:</span></td><td>1 if persistent, 0 if transient, -1 on error</td></tr></tbody></table></div><h3><a name="virDomainIsUpdated" id="virDomainIsUpdated"><code>virDomainIsUpdated</code></a></h3><pre class="programlisting">int      virDomainIsUpdated              (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom)<br />
 
961
</pre><p>Determine if the domain has been updated.</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>Returns</tt></i>:</span></td><td>1 if updated, 0 if not, -1 on error</td></tr></tbody></table></div><h3><a name="virDomainLookupByID" id="virDomainLookupByID"><code>virDomainLookupByID</code></a></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 />
953
962
</pre><p>Try to find a domain based on the hypervisor ID number
954
963
Note that this won't work for inactive domains which have an ID of -1,
955
964
in that case a lookup based on the Name or UUId need to be done instead.</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"><code>virDomainLookupByName</code></a></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 />
1103
1112
There are many limitations on migration imposed by the underlying
1104
1113
technology - for example it may not be possible to migrate between
1105
1114
different processors even with the same architecture, or between
1106
 
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>duri</tt></i>:</span></td><td>mandatory URI for the destination host</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>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>0 if the migration succeeded, -1 upon error.</td></tr></tbody></table></div><h3><a name="virDomainPinVcpu" id="virDomainPinVcpu"><code>virDomainPinVcpu</code></a></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 />
 
1115
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>duri</tt></i>:</span></td><td>mandatory URI for the destination host</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>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>0 if the migration succeeded, -1 upon error.</td></tr></tbody></table></div><h3><a name="virDomainOpenConsole" id="virDomainOpenConsole"><code>virDomainOpenConsole</code></a></h3><pre class="programlisting">int  virDomainOpenConsole            (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br />                                        const char * devname, <br />                                    <a href="libvirt-libvirt.html#virStreamPtr">virStreamPtr</a> st, <br />                                         unsigned int flags)<br />
 
1116
</pre><p>This opens the backend associated with a console, serial or
 
1117
parallel port device on a guest, if the backend is supported.
 
1118
If the @devname is omitted, then the first console or serial
 
1119
device is opened. The console is associated with the passed
 
1120
in @st stream, which should have been opened in non-blocking
 
1121
mode for bi-directional I/O.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dom</tt></i>:</span></td><td>a domain object</td></tr><tr><td><span class="term"><i><tt>devname</tt></i>:</span></td><td>the console, serial or parallel port device alias, or NULL</td></tr><tr><td><span class="term"><i><tt>st</tt></i>:</span></td><td>a stream to associate with the console</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>unused, pass 0</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the console was opened, -1 on error</td></tr></tbody></table></div><h3><a name="virDomainPinVcpu" id="virDomainPinVcpu"><code>virDomainPinVcpu</code></a></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 />
1107
1122
</pre><p>Dynamically change the real CPUs which can be allocated to a virtual CPU.
1108
1123
This function requires privileged access to the hypervisor.
1109
1124