mirror of https://gitee.com/openkylin/libvirt.git
Remove all generated docs from source control
* docs/*.html, docs/devhelp/*.html, docs/html/*.html: Delete * docs/.gitignore, docs/devhelp/.gitignore, docs/html/.gitignore: Ignore generated docs files * docs/Makefile.am: Rebuild all HTML docs for 'all' target and include them in EXTRA_DIST and CLEANFILES * docs/devhelp/Makefile.am: Include HTML in CLEANFILES
This commit is contained in:
parent
b553b50acb
commit
bde4589189
|
@ -2,3 +2,4 @@ Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
.memdump
|
.memdump
|
||||||
apibuild.pyc
|
apibuild.pyc
|
||||||
|
*.html
|
||||||
|
|
198
docs/FAQ.html
198
docs/FAQ.html
|
@ -1,198 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from FAQ.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: FAQ</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="inactive" href="docs.html">Documentation</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="User contributed content" class="inactive" href="http://wiki.libvirt.org">Wiki</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">FAQ</span>
|
|
||||||
</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>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 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 libvirt depends upon is
|
|
||||||
the Xen store access library which is also licenced under the LGPL.</p>
|
|
||||||
</li><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 maintenance 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 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 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 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 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 may only be accessible with root privileges,
|
|
||||||
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 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>
|
|
||||||
<p>
|
|
||||||
<code>make</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<code>make install</code>
|
|
||||||
</p>
|
|
||||||
<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 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>
|
|
||||||
<p>The configure script (and other Makefiles) are generated. Use the
|
|
||||||
autogen.sh script to regenerate the configure script and Makefiles,
|
|
||||||
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 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 libvirt --libs</code>
|
|
||||||
</p>
|
|
||||||
</li></ol>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -65,11 +65,13 @@ EXTRA_DIST= \
|
||||||
$(patches) \
|
$(patches) \
|
||||||
ChangeLog.awk
|
ChangeLog.awk
|
||||||
|
|
||||||
|
CLEANFILES = $(dot_html) $(apihtml)
|
||||||
|
|
||||||
all: web $(top_builddir)/NEWS
|
all: web $(top_builddir)/NEWS
|
||||||
|
|
||||||
api: libvirt-api.xml libvirt-refs.xml $(srcdir)/html/index.html
|
api: libvirt-api.xml libvirt-refs.xml
|
||||||
|
|
||||||
web: $(dot_html)
|
web: $(dot_html) html/index.html
|
||||||
|
|
||||||
ChangeLog.xml: ../ChangeLog ChangeLog.awk
|
ChangeLog.xml: ../ChangeLog ChangeLog.awk
|
||||||
awk -f ChangeLog.awk < $< > $@
|
awk -f ChangeLog.awk < $< > $@
|
||||||
|
@ -97,7 +99,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl
|
||||||
else echo "missing XHTML1 DTD" ; fi ; fi );
|
else echo "missing XHTML1 DTD" ; fi ; fi );
|
||||||
|
|
||||||
|
|
||||||
$(srcdir)/html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
|
html/index.html: libvirt-api.xml newapi.xsl page.xsl sitemap.html.in
|
||||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||||
echo "Rebuilding the HTML pages from the XML API" ; \
|
echo "Rebuilding the HTML pages from the XML API" ; \
|
||||||
$(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
|
$(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi )
|
||||||
|
|
246
docs/api.html
246
docs/api.html
|
@ -1,246 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from api.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: The libvirt API concepts</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="active" href="intro.html">Architecture</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">API concepts</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Providing isolated networks and NAT based network connectivity" class="inactive" href="archnetwork.html">Network</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing storage pools and volumes" class="inactive" href="archstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enumerating host node devices" class="inactive" href="archnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>The libvirt API concepts</h1>
|
|
||||||
<p> This page describes the main principles and architecture choices
|
|
||||||
behind the definition of the libvirt API:
|
|
||||||
</p>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#Objects">Objects exposed</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Functions">Functions and naming conventions</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Driver">The drivers</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote">Daemon and remote access</a>
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="Objects" id="Objects">Objects exposed</a>
|
|
||||||
</h2>
|
|
||||||
<p> As defined in the <a href="goals.html">goals section</a>, libvirt
|
|
||||||
API need to expose all the resources needed to manage the virtualization
|
|
||||||
support of recent operating systems. The first object manipulated though
|
|
||||||
the API is <code>virConnectPtr</code> which represent a connection to
|
|
||||||
an hypervisor. Any application using libvirt is likely to start using the
|
|
||||||
API by calling one of <a href="html/libvirt-libvirt.html#virConnectOpen">the virConnectOpen functions</a>. You will note that those functions take
|
|
||||||
a name argument which is actually an URI to select the right hypervisor to
|
|
||||||
open, this is needed to allow remote connections and also select between
|
|
||||||
different possible hypervisors (for example on a Linux system it may be
|
|
||||||
possible to use both KVM and LinuxContainers on the same node). A NULL
|
|
||||||
name will default to a preselected hypervisor but it's probably not a
|
|
||||||
wise thing to do in most cases. See the <a href="uri.html">connection
|
|
||||||
URI</a> page for a full descriptions of the values allowed.</p>
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
<p> Once the application obtained a <a href="html/libvirt-libvirt.html#virConnectPtr"><code>virConnectPtr</code></a>
|
|
||||||
connection to the
|
|
||||||
hypervisor it can then use it to manage domains and related resources
|
|
||||||
available for virtualization like storage and networking. All those are
|
|
||||||
exposed as first class objects, and connected to the hypervisor connection
|
|
||||||
(and the node or cluster where it is available).</p>
|
|
||||||
<p class="image">
|
|
||||||
<img alt="first class objects exposed by the API" src="libvirt-object-model.png" /></p>
|
|
||||||
<p> The figure above shows the five main objects exported by the API:</p>
|
|
||||||
<ul><li>virConnectPtr: represent a connection to an hypervisor.</li><li>virDomainPtr: represent one domain either active or defined (i.e.
|
|
||||||
existing as permanent config file and storage but not currently running
|
|
||||||
on that node). The function <a href="html/libvirt-libvirt.html#virConnectListDomains"><code>virConnectListDomains</code></a>
|
|
||||||
allows to list all the IDs for the domains active on this hypervisor.</li><li>virNetworkPtr: represent one network either active or defined (i.e.
|
|
||||||
existing as permanent config file and storage but not currently activated.
|
|
||||||
The function <a href="html/libvirt-libvirt.html#virConnectListNetworks"><code>virConnectListNetworks</code></a>
|
|
||||||
allows to list all the virtualization networks actived on this node.</li><li>virStorageVolPtr: represent one storage volume, usually this is used
|
|
||||||
as a block device available to one of the domains. The function
|
|
||||||
<a href="html/libvirt-libvirt.html#virStorageVolLookupByPath"><code>virStorageVolLookupByPath</code></a> allows to find
|
|
||||||
the object based on its path on the node.</li><li>virStoragePoolPtr: represent a storage pool, i.e. a logical area
|
|
||||||
which can be used to allocate and store storage volumes. The function
|
|
||||||
<a href="html/libvirt-libvirt.html#virStoragePoolLookupByVolume"><code>virStoragePoolLookupByVolume</code></a> allows to find
|
|
||||||
the storage pool containing a given storage volume.</li></ul>
|
|
||||||
<p> Most object manipulated by the library can also be represented using
|
|
||||||
XML descriptions. This is used primarily to create those object, but is
|
|
||||||
also helpful to modify or save their description back.</p>
|
|
||||||
<p> Domains, network and storage pools can be either <code>active</code>
|
|
||||||
i.e. either running or available for immediate use, or
|
|
||||||
<code>defined</code> in which case they are inactive but there is
|
|
||||||
a permanent definition available in the system for them. Based on this
|
|
||||||
thay can be activated dynamically in order to be used.</p>
|
|
||||||
<p> Most kind of object can also be named in various ways:</p>
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
<ul><li>by their <code>name</code>, an user friendly identifier but
|
|
||||||
whose unicity cannot be garanteed between two nodes.</li><li>by their <code>ID</code>, which is a runtime unique identifier
|
|
||||||
provided by the hypervisor for one given activation of the object,
|
|
||||||
but it becomes invalid once the resource is deactivated.</li><li>by their <code>UUID</code>, a 16 bytes unique identifier
|
|
||||||
as defined in <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>,
|
|
||||||
which is garanteed to be unique for long term usage and across a
|
|
||||||
set of nodes.</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="Functions" id="Functions">Functions and naming
|
|
||||||
conventions</a>
|
|
||||||
</h2>
|
|
||||||
<p> The naming of the functions present in the library is usually
|
|
||||||
made of a prefix describing the object associated to the function
|
|
||||||
and a verb describing the action on that object.</p>
|
|
||||||
<p> For each first class object you will find apis
|
|
||||||
for the following actions:</p>
|
|
||||||
<ul><li><b>Lookup</b>:...LookupByName,
|
|
||||||
</li><li><b>Enumeration</b>:virConnectList... and virConnectNumOf...:
|
|
||||||
those are used to enumerate a set of object available to an given
|
|
||||||
hypervisor connection like:
|
|
||||||
<a href="html/libvirt-libvirt.html#virConnectListDomains"><code>virConnectListDomains</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virConnectNumOfDomains"><code>virConnectNumOfDomains</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virConnectListNetworks"><code>virConnectListNetworks</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virConnectListStoragePools"><code>virConnectListStoragePools</code></a>, etc.</li><li><b>Description</b>: ...GetInfo: those are generic accessor providing
|
|
||||||
a set of informations about an object, they are
|
|
||||||
<a href="html/libvirt-libvirt.html#virNodeGetInfo"><code>virNodeGetInfo</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virDomainGetInfo"><code>virDomainGetInfo</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virStoragePoolGetInfo"><code>virStoragePoolGetInfo</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virStorageVolGetInfo"><code>virStorageVolGetInfo</code></a>.</li><li><b>Accessors</b>: ...Get... and ...Set...: those are more specific
|
|
||||||
accessors to query or modify the given object, like
|
|
||||||
<a href="html/libvirt-libvirt.html#virConnectGetType"><code>virConnectGetType</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virDomainGetMaxMemory"><code>virDomainGetMaxMemory</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virDomainSetMemory"><code>virDomainSetMemory</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virDomainGetVcpus"><code>virDomainGetVcpus</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virStoragePoolSetAutostart"><code>virStoragePoolSetAutostart</code></a>,
|
|
||||||
<a href="html/libvirt-libvirt.html#virNetworkGetBridgeName"><code>virNetworkGetBridgeName</code></a>, etc.</li><li><b>Creation</b>: </li><li><b>Destruction</b>: ... </li></ul>
|
|
||||||
<p> For more in-depth details of the storage related APIs see
|
|
||||||
<a href="storage.html">the storage management page</a>,
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="Driver" id="Driver">The libvirt drivers</a>
|
|
||||||
</h2>
|
|
||||||
<p></p>
|
|
||||||
<p class="image">
|
|
||||||
<img alt="The libvirt driver architecture" src="libvirt-driver-arch.png" /></p>
|
|
||||||
<h2>
|
|
||||||
<a name="Remote" id="Remote">Daemon and remote access</a>
|
|
||||||
</h2>
|
|
||||||
<p></p>
|
|
||||||
<p class="image">
|
|
||||||
<img alt="The libvirt daemon and remote architecture" src="libvirt-daemon-arch.png" /></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,365 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from api_extension.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Implementing a new API in 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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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="active" href="internals.html">Internals</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="General hacking guidelines for contributors" class="inactive" href="hacking.html">Contributor guidelines</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">API extensions</span>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="FAQ.html">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>Implementing a new API in Libvirt</h1>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#publicapi">Defining the public API</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#internalapi">Defining the internal API</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#implpublic">Implementing the public API</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#wireproto">Defining the wire protocol format</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#rpcclient">Implement the RPC client</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#serverdispatch">Implement the server side dispatcher</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#driverimpl">Implement the driver methods</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#virsh">Implement virsh commands</a>
|
|
||||||
</li></ul>
|
|
||||||
<p>
|
|
||||||
This document walks you through the process of implementing a new
|
|
||||||
API in libvirt. It uses as an example the addition of the node device
|
|
||||||
create and destroy APIs.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Before you begin coding, it is critical that you propose your
|
|
||||||
changes on the libvirt mailing list and get feedback on your ideas to
|
|
||||||
make sure what you're proposing fits with the general direction of the
|
|
||||||
project. Even before doing a proof of concept implementation, send an
|
|
||||||
email giving an overview of the functionality you think should be
|
|
||||||
added to libvirt. Someone may already be working on the feature you
|
|
||||||
want. Also, recognize that everything you write is likely to undergo
|
|
||||||
significant rework as you discuss it with the other developers, so
|
|
||||||
don't wait too long before getting feedback.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Adding a new API to libvirt is not difficult, but there are quite a
|
|
||||||
few steps. This document assumes that you are familiar with C
|
|
||||||
programming and have checked out the libvirt code from the source code
|
|
||||||
repository and successfully built the existing tree. Instructions on
|
|
||||||
how to check out and build the code can be found at:
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a href="http://libvirt.org/downloads.html">http://libvirt.org/downloads.html</a>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Once you have a working development environment, the steps to create a
|
|
||||||
new API are:
|
|
||||||
</p>
|
|
||||||
<ol><li>define the public API</li><li>define the internal driver API</li><li>implement the public API</li><li>define the wire protocol format</li><li>implement the RPC client</li><li>implement the server side dispatcher</li><li>implement the driver methods</li><li>add virsh support</li></ol>
|
|
||||||
<p>
|
|
||||||
It is, of course, possible to implement the pieces in any order, but
|
|
||||||
if the development tasks are completed in the order listed, the code
|
|
||||||
will compile after each step. Given the number of changes required,
|
|
||||||
verification after each step is highly recommended.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Submit new code in the form shown in the example code: one patch
|
|
||||||
per step. That's not to say submit patches before you have working
|
|
||||||
functionality--get the whole thing working and make sure you're happy
|
|
||||||
with it. Then use git or some other version control system that lets
|
|
||||||
you rewrite your commit history and break patches into pieces so you
|
|
||||||
don't drop a big blob of code on the mailing list at one go. For
|
|
||||||
example, I didn't follow my own advice when I originally submitted the
|
|
||||||
example code to the libvirt list but rather submitted it in several
|
|
||||||
large chunks. I've used git's ability to rewrite my commit history to
|
|
||||||
break the code apart into the example patches shown.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Don't mix anything else into the patches you submit. The patches
|
|
||||||
should be the minimal changes required to implement the functionality
|
|
||||||
you're adding. If you notice a bug in unrelated code (i.e., code you
|
|
||||||
don't have to touch to implement your API change) during development,
|
|
||||||
create a patch that just addresses that bug and submit it
|
|
||||||
separately.
|
|
||||||
</p>
|
|
||||||
<p>With that said, let's begin.</p>
|
|
||||||
<h2>
|
|
||||||
<a name="publicapi" id="publicapi">Defining the public API</a>
|
|
||||||
</h2>
|
|
||||||
<p>The first task is to define the public API and add it to:</p>
|
|
||||||
<p>
|
|
||||||
<code>include/libvirt/libvirt.h.in</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
This task is in many ways the most important to get right, since once
|
|
||||||
the API has been committed to the repository, it's libvirt's policy
|
|
||||||
never to change it. Mistakes in the implementation are bugs that you
|
|
||||||
can fix. Make a mistake in the API definition and you're stuck with
|
|
||||||
it, so think carefully about the interface and don't be afraid to
|
|
||||||
rework it as you go through the process of implementing it.
|
|
||||||
</p>
|
|
||||||
<p>Once you have defined the API, you have to add the symbol names to:</p>
|
|
||||||
<p>
|
|
||||||
<code>src/libvirt_public.syms</code>
|
|
||||||
</p>
|
|
||||||
<p class="example">See <a href="api_extension/0001-Step-1-of-8-Define-the-public-API.patch">0001-Step-1-of-8-Define-the-public-API.patch</a> for example code.</p>
|
|
||||||
<h2>
|
|
||||||
<a name="internalapi" id="internalapi">Defining the internal API</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Each public API call is associated with a driver, such as a host
|
|
||||||
virtualization driver, a network virtualization driver, a storage
|
|
||||||
virtualization driver, a state driver, or a device monitor. Adding
|
|
||||||
the internal API is ordinarily a matter of adding a new member to the
|
|
||||||
struct representing one of these drivers.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Of course, it's possible that the new API will involve the creation of
|
|
||||||
an entire new driver type, in which case the changes will include the
|
|
||||||
creation of a new struct type to represent the new driver type.
|
|
||||||
</p>
|
|
||||||
<p>The driver structs are defined in:</p>
|
|
||||||
<p>
|
|
||||||
<code>src/driver.h</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
To define the internal API, first typedef the driver function
|
|
||||||
prototype and then add a new field for it to the relevant driver
|
|
||||||
struct.
|
|
||||||
</p>
|
|
||||||
<p class="example">See <a href="api_extension/0002-Step-2-of-8-Define-the-internal-driver-API.patch">0002-Step-2-of-8-Define-the-internal-driver-API.patch</a></p>
|
|
||||||
<h2>
|
|
||||||
<a name="implpublic" id="implpublic">Implementing the public API</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Implementing the public API is largely a formality in which we wire up
|
|
||||||
public API to the internal driver API. The public API implementation
|
|
||||||
takes care of some basic validity checks before passing control to the
|
|
||||||
driver implementation. In RFC 2119 vocabulary, this function:
|
|
||||||
</p>
|
|
||||||
<ol class="ordinarylist"><li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
|
||||||
being called and its parameters;</li><li>MUST call virResetLastError();</li><li>SHOULD confirm that the connection is valid with
|
|
||||||
VIR_IS_CONNECT(conn);</li><li><strong>SECURITY: If the API requires a connection with write
|
|
||||||
privileges, MUST confirm that the connection flags do not
|
|
||||||
indicate that the connection is read-only;</strong></li><li>SHOULD do basic validation of the parameters that are being
|
|
||||||
passed in;</li><li>MUST confirm that the driver for this connection exists and that
|
|
||||||
it implements this function;</li><li>MUST call the internal API;</li><li>SHOULD log a message with VIR_DEBUG() indicating that it is
|
|
||||||
returning, its return value, and status.</li><li>MUST return status to the caller.</li></ol>
|
|
||||||
<p>The public API calls are implemented in:</p>
|
|
||||||
<p>
|
|
||||||
<code>src/libvirt.c</code>
|
|
||||||
</p>
|
|
||||||
<p class="example">See <a href="api_extension/0003-Step-3-of-8-Implement-the-public-API.patch">0003-Step-3-of-8-Implement-the-public-API.patch</a></p>
|
|
||||||
<h2>
|
|
||||||
<a name="wireproto" id="wireproto">Defining the wire protocol format</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Defining the wire protocol is essentially a straightforward exercise
|
|
||||||
which is probably most easily understood by referring to the existing
|
|
||||||
remote protocol wire format definitions and the example patch. It
|
|
||||||
involves making two additions to:
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<code>qemud/remote_protocol.x</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
First, create two new structs for each new function that you're adding
|
|
||||||
to the API. One struct describes the parameters to be passed to the
|
|
||||||
remote function, and a second struct describes the value returned by
|
|
||||||
the remote function. The one exception to this rule is that functions
|
|
||||||
that return only integer status do not require a struct for returned
|
|
||||||
data.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Second, add values to the remote_procedure enum for each new function
|
|
||||||
added to the API.
|
|
||||||
</p>
|
|
||||||
<p class="example">See <a href="api_extension/0004-Step-4-of-8-Define-the-wire-protocol-format.patch">0004-Step-4-of-8-Define-the-wire-protocol-format.patch</a></p>
|
|
||||||
<p>
|
|
||||||
Once these changes are in place, it's necessary to run 'make rpcgen'
|
|
||||||
in the qemud directory to create the .c and .h files required by the
|
|
||||||
remote protocol code. This must be done on a Linux host using the
|
|
||||||
GLibC rpcgen program. Other rpcgen versions may generate code which
|
|
||||||
results in bogus compile time warnings
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="rpcclient" id="rpcclient">Implement the RPC client</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Implementing the RPC client is also relatively mechanical, so refer to
|
|
||||||
the exising code and example patch for guidance. The RPC client uses
|
|
||||||
the rpcgen generated .h files. The remote method calls go in:
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<code>src/remote_internal.c</code>
|
|
||||||
</p>
|
|
||||||
<p>Each remote method invocation does the following:</p>
|
|
||||||
<ol class="ordinarylist"><li>locks the remote driver;</li><li>sets up the method arguments;</li><li>invokes the remote function;</li><li>checks the return value, if necessary;</li><li>extracts any returned data;</li><li>frees any returned data;</li><li>unlocks the remote driver.</li></ol>
|
|
||||||
<p>
|
|
||||||
Once you have created the remote method calls, you have to add fields
|
|
||||||
for them to the driver structs for the appropriate remote driver.
|
|
||||||
</p>
|
|
||||||
<p class="example">See <a href="api_extension/0005-Step-5-of-8-Implement-the-RPC-client.patch">0005-Step-5-of-8-Implement-the-RPC-client.patch</a></p>
|
|
||||||
<h2>
|
|
||||||
<a name="serverdispatch" id="serverdispatch">Implement the server side dispatcher</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Implementing the server side of the remote function calls is simply a
|
|
||||||
matter of deserializing the parameters passed in from the remote
|
|
||||||
caller and passing them to the corresponding internal API function.
|
|
||||||
The server side dispatchers are implemented in:
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<code>qemud/remote.c</code>
|
|
||||||
</p>
|
|
||||||
<p>Again, this step uses the .h files generated by make rpcgen.</p>
|
|
||||||
<p class="example">See <a href="api_extension/0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch">0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch</a></p>
|
|
||||||
<h2>
|
|
||||||
<a name="driverimpl" id="driverimpl">Implement the driver methods</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
So, after all that, we get to the fun part. All functionality in
|
|
||||||
libvirt is implemented inside a driver. Thus, here is where you
|
|
||||||
implement whatever functionality you're adding to libvirt. You'll
|
|
||||||
either need to add additional files to the src directory or extend
|
|
||||||
files that are already there, depending on what functionality you're
|
|
||||||
adding.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
In the example code, the extension is only an additional two function
|
|
||||||
calls in the node device API, so most of the new code is additions to
|
|
||||||
existing files. The only new files are there for multi-platform
|
|
||||||
implementation convenience, as some of the new code is Linux specific.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The example code is probably uninteresting unless you're concerned
|
|
||||||
with libvirt storage, but I've included it here to show how new files
|
|
||||||
are added to the build environment.
|
|
||||||
</p>
|
|
||||||
<p class="example">See <a href="api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch">0007-Step-7-of-8-Implement-the-driver-methods.patch</a></p>
|
|
||||||
<h2>
|
|
||||||
<a name="virsh" id="virsh">Implement virsh commands</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Once you have the new functionality in place, the easiest way to test
|
|
||||||
it and also to provide it to end users is to implement support for it
|
|
||||||
in virsh.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
A virsh command is composed of a few pieces of code. You need to
|
|
||||||
define an array of vshCmdInfo structs for each new command that
|
|
||||||
contain the help text and the command description text. You also need
|
|
||||||
an array of vshCmdOptDef structs to describe the command options.
|
|
||||||
Once you have those pieces of data in place you can write the function
|
|
||||||
implementing the virsh command. Finally, you need to add the new
|
|
||||||
command to the commands[] array.
|
|
||||||
</p>
|
|
||||||
<p class="example">See <a href="api_extension/0008-Step-8-of-8-Add-virsh-support.patch">0008-Step-8-of-8-Add-virsh-support.patch</a></p>
|
|
||||||
<p>Once you have working functionality, run make check and make
|
|
||||||
syntax-check before generating patches.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
174
docs/apps.html
174
docs/apps.html
|
@ -1,174 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from apps.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Applications using 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="inactive" href="docs.html">Documentation</a>
|
|
||||||
</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="FAQ.html">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="active" href="relatedlinks.html">Related Links</a>
|
|
||||||
<ul class="l1"><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Applications</span>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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>Applications using <strong>libvirt</strong></h1>
|
|
||||||
<p>
|
|
||||||
This page provides an illustration of the wide variety of
|
|
||||||
applications using the libvirt management API. If you know
|
|
||||||
of interesting applications not listed on this page, send
|
|
||||||
a message to the <a href="contact.html">mailing list</a>
|
|
||||||
to request that it be added here. If your application uses
|
|
||||||
libvirt as its API, the following graphic is available for
|
|
||||||
your website to advertise support for libvirt:
|
|
||||||
</p>
|
|
||||||
<p class="image">
|
|
||||||
<img src="madeWith.png" alt="Made with libvirt" /></p>
|
|
||||||
<h2>Command line tools</h2>
|
|
||||||
<dl><dt>virsh</dt><dd>
|
|
||||||
An interactive shell, and batch scriptable tool for performing
|
|
||||||
management tasks on all libvirt managed domains, networks and
|
|
||||||
storage. This is part of the libvirt core distribution.
|
|
||||||
</dd><dt><a href="http://virt-manager.org/">virt-install</a></dt><dd>
|
|
||||||
Provides a way to provision new virtual machines from a
|
|
||||||
OS distribution install tree. It supports provisioning from
|
|
||||||
local CD images, and the network over NFS, HTTP and FTP.
|
|
||||||
</dd><dt><a href="http://virt-manager.org/">virt-clone</a></dt><dd>
|
|
||||||
Allows the disk image(s) and configuration for an existing
|
|
||||||
virtual machine to be cloned to form a new virtual machine.
|
|
||||||
It automates copying of data across to new disk images, and
|
|
||||||
updates the UUID, Mac address and name in the configuration
|
|
||||||
</dd><dt><a href="http://virt-manager.org/">virt-image</a></dt><dd>
|
|
||||||
Provides a way to deploy virtual appliances. It defines a
|
|
||||||
simplified portable XML format describing the pre-requisites
|
|
||||||
of a virtual machine. At time of deployment this is translated
|
|
||||||
into the domain XML format for execution under any libvirt
|
|
||||||
hypervisor meeting the pre-requisites.
|
|
||||||
</dd><dt><a href="http://et.redhat.com/~rjones/virt-df/">virt-df</a></dt><dd>
|
|
||||||
Examine the utilization of each filesystem in a virtual machine
|
|
||||||
from the comfort of the host machine. This tool peeks into the
|
|
||||||
guest disks and determines how much space is used. It can cope
|
|
||||||
with common Linux filesystems and LVM volumes.
|
|
||||||
</dd><dt><a href="http://et.redhat.com/~rjones/virt-top/">virt-top</a></dt><dd>
|
|
||||||
Watch the CPU, memory, network and disk utilization of all
|
|
||||||
virtual machines running on a host.
|
|
||||||
</dd></dl>
|
|
||||||
<h2>Desktop applications</h2>
|
|
||||||
<dl><dt><a href="http://virt-manager.org/">virt-manager</a></dt><dd>
|
|
||||||
A general purpose desktop management tool, able to manage
|
|
||||||
virtual machines across both local and remotely accessed
|
|
||||||
hypervisors. It is targeted at home and small office usage
|
|
||||||
upto managing 10-20 hosts and their VMs.
|
|
||||||
</dd><dt><a href="http://virt-manager.org/">virt-viewer</a></dt><dd>
|
|
||||||
A lightweight tool for accessing the graphical console
|
|
||||||
associated with a virtual machine. It can securely connect
|
|
||||||
to remote consoles supporting the VNC protocol. Also provides
|
|
||||||
an optional mozilla browser plugin.
|
|
||||||
</dd></dl>
|
|
||||||
<h2>Web applications</h2>
|
|
||||||
<dl><dt><a href="http://ovirt.org/">oVirt</a></dt><dd>
|
|
||||||
oVirt provides the ability to manage large numbers of virtual
|
|
||||||
machines across an entire data center of hosts. It integrates
|
|
||||||
with FreeIPA for Kerberos authentication, and in the future,
|
|
||||||
certificate management.
|
|
||||||
</dd><dt><a href="http://community.abiquo.com/display/AbiCloud">AbiCloud</a></dt><dd>
|
|
||||||
AbiCloud is an open source cloud platform manager which allows to
|
|
||||||
easily deploy a private cloud in your datacenter. One of the key
|
|
||||||
differences of AbiCloud is the web rich interface for managing the
|
|
||||||
infrastructure. You can deploy a new service just dragging and
|
|
||||||
dropping a VM.
|
|
||||||
</dd></dl>
|
|
||||||
<h2>LiveCD / Appliances</h2>
|
|
||||||
<dl><dt><a href="http://et.redhat.com/~rjones/virt-p2v/">virt-p2v</a></dt><dd>
|
|
||||||
A tool for converting a physical machine into a virtual machine. It
|
|
||||||
is a LiveCD which is booted on the machine to be converted. It collects
|
|
||||||
a little information from the user and then copies the disks over to
|
|
||||||
a remote machine and defines the XML for a domain to run the guest.
|
|
||||||
</dd></dl>
|
|
||||||
<h2>Monitoring plugins</h2>
|
|
||||||
<dl><dt><a href="http://honk.sigxcpu.org/projects/libvirt/#munin">for munin</a></dt><dd>
|
|
||||||
The plugins provided by Guido Günther allow to monitor various things
|
|
||||||
like network and block I/O with
|
|
||||||
<a href="http://munin.projects.linpro.no/">Munin</a>.
|
|
||||||
</dd><dt><a href="http://collectd.org/plugins/libvirt.shtml">for collectd</a></dt><dd>
|
|
||||||
The libvirt-plugin is part of <a href="http://collectd.org/">collectd</a>
|
|
||||||
and gather statistics about virtualized guests on a system. This
|
|
||||||
way, you can collect CPU, network interface and block device usage
|
|
||||||
for each guest without installing collectd on the guest systems.
|
|
||||||
or a full description of available please refer to the libvirt section
|
|
||||||
in the collectd.conf(5) manual page.
|
|
||||||
</dd><dt><a href="http://et.redhat.com/~rjones/nagios-virt/">nagios-virt</a></dt><dd>
|
|
||||||
Nagios-virt is a configuration tool for adding monitoring of your
|
|
||||||
virtualised domains to <a href="http://www.nagios.org/">Nagios</a>.
|
|
||||||
You can use this tool to either set up a new Nagios installation for
|
|
||||||
your Xen or QEMU/KVM guests, or to integrate with your existing Nagios
|
|
||||||
installation.
|
|
||||||
</dd></dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,132 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from archdomain.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Domain management architecture</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="active" href="intro.html">Architecture</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Domains</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Providing isolated networks and NAT based network connectivity" class="inactive" href="archnetwork.html">Network</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing storage pools and volumes" class="inactive" href="archstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enumerating host node devices" class="inactive" href="archnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Domain management architecture</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,157 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from architecture.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: libvirt architecture</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="inactive" href="docs.html">Documentation</a>
|
|
||||||
</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="FAQ.html">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>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 information 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
|
|
||||||
privilege 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 information at
|
|
||||||
least when possible (i.e. when the running program using libvirt has root
|
|
||||||
privilege 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 targeted.</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
|
|
||||||
maintenance 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 hypervisor drivers
|
|
||||||
defining a common set of routines. That way the Xen Daemon access, 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 id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,161 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from archnetwork.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Network management architecture</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="active" href="intro.html">Architecture</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Network</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing storage pools and volumes" class="inactive" href="archstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enumerating host node devices" class="inactive" href="archnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Network management architecture</h1>
|
|
||||||
<h2>Architecture illustration</h2>
|
|
||||||
<p>
|
|
||||||
The diagrams below illustrate some of the network configurations
|
|
||||||
enabled by the libvirt networking APIs
|
|
||||||
</p>
|
|
||||||
<ul><li><strong>VLAN 1</strong>. This virtual network has connectivity
|
|
||||||
to <code>LAN 2</code> with traffic forwarded and NATed.
|
|
||||||
</li><li><strong>VLAN 2</strong>. This virtual network is completely
|
|
||||||
isolated from any physical LAN.
|
|
||||||
</li><li><strong>Guest A</strong>. The first network interface is bridged
|
|
||||||
to the physical <code>LAN 1</code>. The second interface is connected
|
|
||||||
to a virtual network <code>VLAN 1</code>.
|
|
||||||
</li><li><strong>Guest B</strong>. The first network interface is connected
|
|
||||||
to a virtual network <code>VLAN 1</code>, giving it limited NAT
|
|
||||||
based connectivity to LAN2. It has a second network interface
|
|
||||||
connected to <code>VLAN 2</code>. It acts a router allowing limited
|
|
||||||
traffic between the two VLANs, thus giving <code>Guest C</code>
|
|
||||||
connectivity to the physical <code>LAN 2</code>.
|
|
||||||
</li><li><strong>Guest C</strong>. The only network interface is connected
|
|
||||||
to a virtual network <code>VLAN 2</code>. It has no direct connectivity
|
|
||||||
to a physical LAN, relying on <code>Guest B</code> to route traffic
|
|
||||||
on its behalf.
|
|
||||||
</li></ul>
|
|
||||||
<h3>Logical diagram</h3>
|
|
||||||
<p class="image">
|
|
||||||
<img src="libvirt-net-logical.png" alt="Logical network architecture" /></p>
|
|
||||||
<h3>Physical diagram</h3>
|
|
||||||
<p class="image">
|
|
||||||
<img src="libvirt-net-physical.png" alt="Physical network architecture" /></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,132 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from archnode.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Node device management architecture</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="active" href="intro.html">Architecture</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Providing isolated networks and NAT based network connectivity" class="inactive" href="archnetwork.html">Network</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing storage pools and volumes" class="inactive" href="archstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Node Devices</span>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Node device management architecture</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,151 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from archstorage.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Storage management architecture</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="active" href="intro.html">Architecture</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Providing isolated networks and NAT based network connectivity" class="inactive" href="archnetwork.html">Network</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Storage</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enumerating host node devices" class="inactive" href="archnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Storage management architecture</h1>
|
|
||||||
<p>
|
|
||||||
The storage management APIs are based around 2 core concepts
|
|
||||||
</p>
|
|
||||||
<ol><li>
|
|
||||||
<strong>Volume</strong> - a single storage volume which can
|
|
||||||
be assigned to a guest, or used for creating further pools. A
|
|
||||||
volume is either a block device, a raw file, or a special format
|
|
||||||
file.
|
|
||||||
</li><li>
|
|
||||||
<strong>Pool</strong> - provides a means for taking a chunk
|
|
||||||
of storage and carving it up into volumes. A pool can be used to
|
|
||||||
manage things such as a physical disk, a NFS server, a iSCSI target,
|
|
||||||
a host adapter, an LVM group.
|
|
||||||
</li></ol>
|
|
||||||
<p>
|
|
||||||
These two concepts are mapped through to two libvirt objects, a
|
|
||||||
<code>virStorageVolPtr</code> and a <code>virStoragePoolPtr</code>,
|
|
||||||
each with a collection of APIs for their management.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
314
docs/auth.html
314
docs/auth.html
|
@ -1,314 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from auth.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Access control</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="active" href="deployment.html">Deployment</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The URI formats used for connecting to libvirt" class="inactive" href="uri.html">URI format</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enable remote access over TCP" class="inactive" href="remote.html">Remote access</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Authentication</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>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, independent
|
|
||||||
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>
|
|
||||||
<a name="ACL_server_config" id="ACL_server_config">Server configuration</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The libvirt daemon allows the administrator to choose the authentication
|
|
||||||
mechanisms used for client connections on each network socket independently.
|
|
||||||
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 independently. 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>
|
|
||||||
<a name="ACL_server_unix_perms" id="ACL_server_unix_perms">UNIX socket permissions/group</a>
|
|
||||||
</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>
|
|
||||||
<a name="ACL_server_polkit" id="ACL_server_polkit">UNIX socket PolicyKit auth</a>
|
|
||||||
</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 overridden by the administrator 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>
|
|
||||||
<match action="org.libvirt.unix.manage">
|
|
||||||
<match user="fred">
|
|
||||||
<return result="yes"/>
|
|
||||||
</match>
|
|
||||||
</match>
|
|
||||||
<match action="org.libvirt.unix.manage">
|
|
||||||
<match user="joe">
|
|
||||||
<return result="auth_admin"/>
|
|
||||||
</match>
|
|
||||||
</match>
|
|
||||||
</pre>
|
|
||||||
<h3>
|
|
||||||
<a name="ACL_server_username" id="ACL_server_username">Username/password auth</a>
|
|
||||||
</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>
|
|
||||||
<a name="ACL_server_kerberos" id="ACL_server_kerberos">Kerberos auth</a>
|
|
||||||
</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 necessary 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 necessary for the administrator 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 id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,134 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from bindings.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Bindings for other languages</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Language bindings</span>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="overview of the python API bindings" class="inactive" href="python.html">Python</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="overview of the Java API bindings" class="inactive" href="java.html">Java</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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></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="FAQ.html">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>Bindings for other languages</h1>
|
|
||||||
<p>Libvirt comes with bindings to support other languages than
|
|
||||||
pure <strong>C</strong>. First the headers embeds the necessary declarations to
|
|
||||||
allow direct access from <strong>C++</strong> code, but also we have bindings for
|
|
||||||
higher level kind of languages:</p>
|
|
||||||
<ul><li><strong>Python</strong>: Libvirt comes with direct support for the Python language
|
|
||||||
(just make sure you installed the libvirt-python package if not
|
|
||||||
compiling from sources). See below for more information about
|
|
||||||
using libvirt with python</li><li><strong>Perl</strong>: Daniel Berrange provides <a href="http://search.cpan.org/dist/Sys-Virt/">bindings for
|
|
||||||
Perl</a>.</li><li><strong>OCaml</strong>: Richard Jones supplies <a href="http://libvirt.org/ocaml/">bindings for OCaml</a>.</li><li><strong>Ruby</strong>: David Lutterkort provides <a href="http://libvirt.org/ruby/">bindings for Ruby</a>.</li><li><strong>Java</strong>: Daniel Veillard maintains <a href="java.html">Java bindings</a>.</li><li><strong>C#</strong>: Richard Jones wrote about <a href="https://www.redhat.com/archives/libvir-list/2008-September/msg00283.html">calling libvirt from C# on the mailing list</a>.</li></ul>
|
|
||||||
<p>For information on using libvirt on <strong>Windows</strong>
|
|
||||||
<a href="windows.html">please see the Windows
|
|
||||||
support page</a>.
|
|
||||||
</p>
|
|
||||||
<p>Support, requests or help for libvirt bindings are welcome on
|
|
||||||
the <a href="https://www.redhat.com/mailman/listinfo/libvir-list/">mailing
|
|
||||||
list</a>, as usual try to provide enough background information
|
|
||||||
and make sure you use recent version, see the <a href="bugs.html">help
|
|
||||||
page</a>.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
120
docs/bugs.html
120
docs/bugs.html
|
@ -1,120 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from bugs.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Bug reporting</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="inactive" href="docs.html">Documentation</a>
|
|
||||||
</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="FAQ.html">FAQ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Bug reports</span>
|
|
||||||
</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>Bug reporting</h1>
|
|
||||||
<p>
|
|
||||||
The <a href="http://bugzilla.redhat.com">Red Hat Bugzilla Server</a>
|
|
||||||
should be used to report bugs and request features against libvirt.
|
|
||||||
Before submitting a ticket, check the existing tickets to see if
|
|
||||||
the bug/feature is already tracked.
|
|
||||||
</p>
|
|
||||||
<h2>General libvirt bug reports</h2>
|
|
||||||
<p>
|
|
||||||
If you are using official libvirt binaries from a Linux distribution
|
|
||||||
check below for distribution specific bug reporting policies first.
|
|
||||||
For general libvirt bug reports, from self-built releases, CVS snapshots
|
|
||||||
and any other non-distribution supported builds, enter tickets under
|
|
||||||
the <code>Virtualization Tools</code> product and the <code>libvirt</code>
|
|
||||||
component.
|
|
||||||
</p>
|
|
||||||
<ul><li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Virtualization%20Tools">View libvirt tickets</a></li><li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Virtualization%20Tools&component=libvirt">New libvirt ticket</a></li></ul>
|
|
||||||
<h2>Linux Distribution specific bug reports</h2>
|
|
||||||
<ul><li>
|
|
||||||
If you are using official binaries from a <strong>Fedora distribution</strong>, enter
|
|
||||||
tickets against the <code>Fedora</code> product and the <code>libvirt</code>
|
|
||||||
component.
|
|
||||||
<ul><li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Fedora">View Fedora libvirt tickets</a></li><li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Fedora&component=libvirt">New Fedora libvirt ticket</a></li></ul></li><li>
|
|
||||||
If you are using official binaries from <strong>Red Hat Enterprise Linux distribution</strong>,
|
|
||||||
tickets against the <code>Red Hat Enterprise Linux 5</code> product and
|
|
||||||
the <code>libvirt</code> component.
|
|
||||||
<ul><li><a href="http://bugzilla.redhat.com/buglist.cgi?component=libvirt&product=Red%20Hat%20Enterprise%20Linux%205">View Red Hat Enterprise Linux libvirt tickets</a></li><li><a href="http://bugzilla.redhat.com/bugzilla/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%205&component=libvirt">New Red Hat Enterprise Linux libvirt ticket</a></li></ul></li><li>
|
|
||||||
If you are using official binaries from another Linux distribution first
|
|
||||||
follow their own bug reporting guidelines.
|
|
||||||
</li></ul>
|
|
||||||
<h2>How to file high quality bug reports</h2>
|
|
||||||
<p>
|
|
||||||
To increase the likelihood of your bug report being addressed it is
|
|
||||||
important to provide as much information as possible. When filing
|
|
||||||
libvirt bugs use this checklist to see if you are providing enough
|
|
||||||
information:
|
|
||||||
</p>
|
|
||||||
<ul><li>The version number of the libvirt build, or date of the CVS
|
|
||||||
checkout</li><li>The hardware architecture being used</li><li>The name of the hypervisor (Xen, QEMU, KVM)</li><li>The XML config of the guest domain if relevant</li><li>For Xen hypervisor, the XenD logfile from /var/log/xen</li><li>For QEMU/KVM, the domain logfile from /var/log/libvirt/qemu</li></ul>
|
|
||||||
<p>
|
|
||||||
If requesting a new feature attach any available patch to the ticket
|
|
||||||
and also email the patch to the libvirt mailing list for discussion
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,100 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from contact.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Contacting the development team</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="inactive" href="docs.html">Documentation</a>
|
|
||||||
</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="FAQ.html">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>
|
|
||||||
<span class="active">Contact</span>
|
|
||||||
</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>Contacting the development team</h1>
|
|
||||||
<h2>Mailing list</h2>
|
|
||||||
<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 <code>cvs diff -up</code> in a CVS
|
|
||||||
checkout.
|
|
||||||
</p>
|
|
||||||
<h2>IRC discussion</h2>
|
|
||||||
<p>
|
|
||||||
Some of the libvirt developers may be found on IRC on the <a href="http://oftc.net">OFTC IRC</a>
|
|
||||||
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>
|
|
||||||
NB There is no guarantee that someone will be watching or able to reply
|
|
||||||
promptly, so use the mailing-list if you don't get an answer on the IRC
|
|
||||||
channel.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,160 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from deployment.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Deployment</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>
|
|
||||||
<span class="active">Deployment</span>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The URI formats used for connecting to libvirt" class="inactive" href="uri.html">URI format</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enable remote access over TCP" class="inactive" href="remote.html">Remote access</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Configure authentication for the libvirt daemon" class="inactive" href="auth.html">Authentication</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Deployment</h1>
|
|
||||||
<h2>Pre-packaged releases</h2>
|
|
||||||
<p>
|
|
||||||
The libvirt API is now available in all major Linux distributions
|
|
||||||
so the simplest deployment approach is to use your distributions'
|
|
||||||
package management software to install the <code>libvirt</code>
|
|
||||||
module.
|
|
||||||
</p>
|
|
||||||
<h2>Self-built releases</h2>
|
|
||||||
<p>
|
|
||||||
libvirt uses GNU autotools for its build system, so deployment
|
|
||||||
follows the usual process of <code>configure; make ; make install</code>
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
# ./configure --prefix=$HOME/usr
|
|
||||||
# make
|
|
||||||
# make install
|
|
||||||
</pre>
|
|
||||||
<h2>Built from CVS / GIT</h2>
|
|
||||||
<p>
|
|
||||||
When building from CVS it is necessary to generate the autotools
|
|
||||||
support files. This requires having <code>autoconf</code>,
|
|
||||||
<code>automake</code>, <code>libtool</code> and <code>intltool</code>
|
|
||||||
installed. The process can be automated with the <code>autogen.sh</code>
|
|
||||||
script.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
# ./autogen.sh --prefix=$HOME/usr
|
|
||||||
# make
|
|
||||||
# make install
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,3 +1,4 @@
|
||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
libvirt.devhelp
|
libvirt.devhelp
|
||||||
|
*.html
|
||||||
|
|
|
@ -15,6 +15,8 @@ EXTRA_DIST=devhelp.xsl html.xsl libvirt.devhelp $(HTML_FILES) $(EXTRA_FORMAT)
|
||||||
|
|
||||||
all: libvirt.devhelp $(HTML_FILES)
|
all: libvirt.devhelp $(HTML_FILES)
|
||||||
|
|
||||||
|
CLEANFILES = libvirt.devhelp $(HTML_FILES)
|
||||||
|
|
||||||
libvirt.devhelp $(HTML_FILES): $(srcdir)/devhelp.xsl html.xsl $(top_srcdir)/docs/libvirt-api.xml
|
libvirt.devhelp $(HTML_FILES): $(srcdir)/devhelp.xsl html.xsl $(top_srcdir)/docs/libvirt-api.xml
|
||||||
-@(echo Rebuilding devhelp files)
|
-@(echo Rebuilding devhelp files)
|
||||||
-@(if [ -x $(XSLTPROC) ] ; then \
|
-@(if [ -x $(XSLTPROC) ] ; then \
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
<?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>
|
|
|
@ -1,43 +0,0 @@
|
||||||
<?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>
|
|
|
@ -1,120 +0,0 @@
|
||||||
<?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>length 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 length 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
|
@ -1,255 +0,0 @@
|
||||||
<?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 <veillard@redhat.com> </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>;
|
|
||||||
void <a href="#virFreeError">virFreeError</a> (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err);
|
|
||||||
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);
|
|
||||||
<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> <a href="#virSaveLastError">virSaveLastError</a> (void);
|
|
||||||
</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 : connection if available, deprecated see note above
|
|
||||||
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom : domain if available, deprecated see note above
|
|
||||||
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 : network if available, deprecated see note above
|
|
||||||
} 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_LXC">VIR_FROM_LXC</a> = 17 /* Error from Linux Container driver */
|
|
||||||
<a name="VIR_FROM_STORAGE">VIR_FROM_STORAGE</a> = 18 /* Error from storage driver */
|
|
||||||
<a name="VIR_FROM_NETWORK">VIR_FROM_NETWORK</a> = 19 /* Error from network config */
|
|
||||||
<a name="VIR_FROM_DOMAIN">VIR_FROM_DOMAIN</a> = 20 /* Error from domain config */
|
|
||||||
<a name="VIR_FROM_UML">VIR_FROM_UML</a> = 21 /* Error at the UML driver */
|
|
||||||
<a name="VIR_FROM_NODEDEV">VIR_FROM_NODEDEV</a> = 22 /* Error from node device monitor */
|
|
||||||
<a name="VIR_FROM_XEN_INOTIFY">VIR_FROM_XEN_INOTIFY</a> = 23 /* Error from xen inotify layer */
|
|
||||||
<a name="VIR_FROM_SECURITY">VIR_FROM_SECURITY</a> = 24 /* Error from security framework */
|
|
||||||
<a name="VIR_FROM_VBOX">VIR_FROM_VBOX</a> = 25 /* Error from VirtualBox driver */
|
|
||||||
<a name="VIR_FROM_INTERFACE">VIR_FROM_INTERFACE</a> = 26 /* Error when operating on an interface */
|
|
||||||
<a name="VIR_FROM_ONE">VIR_FROM_ONE</a> = 27 /* Error from OpenNebula driver */
|
|
||||||
<a name="VIR_FROM_ESX">VIR_FROM_ESX</a> = 28 /* Error from ESX driver */
|
|
||||||
<a name="VIR_FROM_PHYP">VIR_FROM_PHYP</a> = 29 /* Error from IBM power hypervisor */
|
|
||||||
<a name="VIR_FROM_SECRET">VIR_FROM_SECRET</a> = 30 /* Error from secret storage */
|
|
||||||
};
|
|
||||||
</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 */
|
|
||||||
<a name="VIR_WAR_NO_NODE">VIR_WAR_NO_NODE</a> = 51 /* failed to start node driver */
|
|
||||||
<a name="VIR_ERR_INVALID_NODE_DEVICE">VIR_ERR_INVALID_NODE_DEVICE</a> = 52 /* invalid node device object */
|
|
||||||
<a name="VIR_ERR_NO_NODE_DEVICE">VIR_ERR_NO_NODE_DEVICE</a> = 53 /* node device not found */
|
|
||||||
<a name="VIR_ERR_NO_SECURITY_MODEL">VIR_ERR_NO_SECURITY_MODEL</a> = 54 /* security model not found */
|
|
||||||
<a name="VIR_ERR_OPERATION_INVALID">VIR_ERR_OPERATION_INVALID</a> = 55 /* operation is not applicable at this time */
|
|
||||||
<a name="VIR_WAR_NO_INTERFACE">VIR_WAR_NO_INTERFACE</a> = 56 /* failed to start interface driver */
|
|
||||||
<a name="VIR_ERR_NO_INTERFACE">VIR_ERR_NO_INTERFACE</a> = 57 /* interface driver not running */
|
|
||||||
<a name="VIR_ERR_INVALID_INTERFACE">VIR_ERR_INVALID_INTERFACE</a> = 58 /* invalid interface object */
|
|
||||||
<a name="VIR_ERR_MULTIPLE_INTERFACES">VIR_ERR_MULTIPLE_INTERFACES</a> = 59 /* more than one matching interface found */
|
|
||||||
<a name="VIR_WAR_NO_SECRET">VIR_WAR_NO_SECRET</a> = 60 /* failed to start secret storage */
|
|
||||||
<a name="VIR_ERR_INVALID_SECRET">VIR_ERR_INVALID_SECRET</a> = 61 /* invalid secret */
|
|
||||||
<a name="VIR_ERR_NO_SECRET">VIR_ERR_NO_SECRET</a> = 62 /* secret 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 This method is not protected against access from multiple threads. In a multi-threaded application, always use the global virGetLastError() API which is backed by thread local storage. If the connection object was discovered to be invalid by an API call, then the error will be reported against the global error object. Since 0.6.0, all errors reported in the per-connection object are also duplicated in the global error object. As such an application can always use virGetLastError(). This method remains for backwards compatability. 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 This method is not protected against access from multiple threads. In a multi-threaded application, always use the global virGetLastError() API which is backed by thread local storage. If the connection object was discovered to be invalid by an API call, then the error will be reported against the global error object. Since 0.6.0, all errors reported in the per-connection object are also duplicated in the global error object. As such an application can always use virGetLastError(). This method remains for backwards compatability.</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>The error object is kept in thread local storage, so separate threads can safely access this concurrently. 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 The error object is kept in thread local storage, so separate threads can safely access this concurrently. 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="virFreeError"/>virFreeError ()</h3><pre class="programlisting">void virFreeError (<a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> err)<br/>
|
|
||||||
</pre><p>Resets and frees the given error.</p>
|
|
||||||
<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>error to free</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 The error object is kept in thread local storage, so separate threads can safely access this concurrently.</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. The error object is kept in thread local storage, so separate threads can safely access this concurrently, only resetting their own error object.</p>
|
|
||||||
</div>
|
|
||||||
<hr/>
|
|
||||||
<div class="refsect2" lang="en"><h3><a name="virSaveLastError"/>virSaveLastError ()</h3><pre class="programlisting"><a href="libvirt-virterror.html#virErrorPtr">virErrorPtr</a> virSaveLastError (void)<br/>
|
|
||||||
</pre><p>Save the last error into a new error object.</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 copied error or NULL if allocation failed. It is the caller's responsibility to free the error with virFreeError().</td></tr></tbody></table></div></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>
|
|
107
docs/docs.html
107
docs/docs.html
|
@ -1,107 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from docs.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Documentation</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>
|
|
||||||
<span class="active">Documentation</span>
|
|
||||||
<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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Documentation</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,148 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from downloads.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Downloads</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>
|
|
||||||
<span class="active">Downloads</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Information for users, administrators and developers" class="inactive" href="docs.html">Documentation</a>
|
|
||||||
</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="FAQ.html">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>Downloads</h1>
|
|
||||||
<h2>Official Releases</h2>
|
|
||||||
<p>
|
|
||||||
The latest versions of the libvirt C library can be downloaded from:
|
|
||||||
</p>
|
|
||||||
<ul><li><a href="ftp://libvirt.org/libvirt/">libvirt.org FTP server</a></li><li><a href="http://libvirt.org/sources/">libvirt.org HTTP server</a></li></ul>
|
|
||||||
<h2>Hourly development snapshots</h2>
|
|
||||||
<p>
|
|
||||||
Once an hour, an automated snapshot is made from the git server
|
|
||||||
source tree. These snapshots should be usable, but we make no guarantees
|
|
||||||
about their stability:
|
|
||||||
</p>
|
|
||||||
<ul><li><a href="ftp://libvirt.org/libvirt/libvirt-git-snapshot.tar.gz">libvirt.org FTP server</a></li><li><a href="http://libvirt.org/sources/libvirt-git-snapshot.tar.gz">libvirt.org HTTP server</a></li></ul>
|
|
||||||
<h2>GIT source repository</h2>
|
|
||||||
<p> Libvirt code source is now maintained in a <a href="http://git-scm.com/">git</a> repository available on
|
|
||||||
<a href="http://libvirt.org/git/">libvirt.org</a>:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
git clone git://libvirt.org/libvirt.git
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
It can also be browsed at
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
<a href="http://libvirt.org/git/?p=libvirt.git;a=summary">http://libvirt.org/git/?p=libvirt.git;a=summary</a>
|
|
||||||
</pre>
|
|
||||||
<h2>CVS repository access (Deprecated) </h2>
|
|
||||||
<p>
|
|
||||||
The master source repository used to be under <a href="http://ximbiot.com/cvs/cvshome/docs/">CVS</a>
|
|
||||||
with anonymous access at:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
# cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co libvirt
|
|
||||||
</pre>
|
|
||||||
<p> The server is maintainened temporarilly for existing uses, but all
|
|
||||||
changes are only commited to git now and we expect to deprecate the CVS
|
|
||||||
server during summer 2009. </p>
|
|
||||||
<h2>Building from a source code checkout</h2>
|
|
||||||
<p> The libvirt build process uses GNU autotools, so after obtaining a
|
|
||||||
checkout it is necessary to generate the configure script and Makefile.in
|
|
||||||
templates using the <code>autogen.sh</code> command, passing the extra
|
|
||||||
arguments as as for configure. As an example, to do a complete build and
|
|
||||||
install it into your home directory run:</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
./autogen.sh --prefix=$HOME/usr
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
</pre>
|
|
||||||
<h2>GIT repository mirror</h2>
|
|
||||||
<p>
|
|
||||||
Jim Mereying was maintaining a CVS to git mirror on
|
|
||||||
<a href="http://git.et.redhat.com/?p=libvirt.git">git.et.redhat.com</a>.
|
|
||||||
Existing users should migrate to the new libvirt.org git server, as the
|
|
||||||
old one is now deprecated. For the sake of old links including now-
|
|
||||||
rewritten SHA1s, we'll leave the old repository on-line for some time.
|
|
||||||
It is available as:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
git clone git://git.et.redhat.com/libvirt.git
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
It can also be browsed at
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<a href="http://git.et.redhat.com/?p=libvirt.git;a=summary">http://git.et.redhat.com/?p=libvirt.git;a=summary</a>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,160 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drivers.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Internal drivers</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>
|
|
||||||
<span class="active">Drivers</span>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Internal drivers</h1>
|
|
||||||
<p>
|
|
||||||
The libvirt public API delegates its implementation to one or
|
|
||||||
more internal drivers, depending on the <a href="uri.html">connection URI</a>
|
|
||||||
passed when initializing the library. There is always a hypervisor driver
|
|
||||||
active, and if the libvirt daemon is available there will usually be a
|
|
||||||
network and storage driver active.
|
|
||||||
</p>
|
|
||||||
<h2>Hypervisor drivers</h2>
|
|
||||||
<p>
|
|
||||||
The hypervisor drivers currently supported by libvirt are:
|
|
||||||
</p>
|
|
||||||
<ul><li><strong><a href="drvxen.html">Xen</a></strong></li><li><strong><a href="drvqemu.html">QEMU</a></strong></li><li><strong><a href="drvlxc.html">LXC</a></strong></li><li><strong><a href="drvtest.html">Test</a></strong></li><li><strong><a href="drvopenvz.html">OpenVZ</a></strong></li><li><strong><a href="drvvbox.html">VirtualBox</a></strong></li><li><strong><a href="drvone.html">OpenNebula</a></strong></li></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
223
docs/drvlxc.html
223
docs/drvlxc.html
|
@ -1,223 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drvlxc.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: LXC container driver</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Linux Container</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>LXC container driver</h1>
|
|
||||||
<p>
|
|
||||||
The libvirt LXC driver manages "Linux Containers". Containers are sets of processes
|
|
||||||
with private namespaces which can (but don't always) look like separate machines, but
|
|
||||||
do not have their own OS. Here are two example configurations. The first is a very
|
|
||||||
light-weight "application container" which does not have it's own root image. You would
|
|
||||||
start it using
|
|
||||||
</p>
|
|
||||||
<h3>Example config version 1</h3>
|
|
||||||
<p></p>
|
|
||||||
<pre>
|
|
||||||
<domain type='lxc'>
|
|
||||||
<name>vm1</name>
|
|
||||||
<memory>500000</memory>
|
|
||||||
<os>
|
|
||||||
<type>exe</type>
|
|
||||||
<init>/bin/sh</init>
|
|
||||||
</os>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<clock offset='utc'/>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>destroy</on_crash>
|
|
||||||
<devices>
|
|
||||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
|
||||||
<interface type='network'>
|
|
||||||
<source network='default'/>
|
|
||||||
</interface>
|
|
||||||
<console type='pty' />
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
The next example assumes there is a private root filesystem
|
|
||||||
(perhaps hand-crafted using busybox, or installed from media,
|
|
||||||
debootstrap, whatever) under /opt/vm-1-root:
|
|
||||||
</p>
|
|
||||||
<p></p>
|
|
||||||
<pre>
|
|
||||||
<domain type='lxc'>
|
|
||||||
<name>vm1</name>
|
|
||||||
<memory>32768</memory>
|
|
||||||
<os>
|
|
||||||
<type>exe</type>
|
|
||||||
<init>/init</init>
|
|
||||||
</os>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<clock offset='utc'/>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>destroy</on_crash>
|
|
||||||
<devices>
|
|
||||||
<emulator>/usr/libexec/libvirt_lxc</emulator>
|
|
||||||
<filesystem type='mount'>
|
|
||||||
<source dir='/opt/vm-1-root'/>
|
|
||||||
<target dir='/'/>
|
|
||||||
</filesystem>
|
|
||||||
<interface type='network'>
|
|
||||||
<source network='default'/>
|
|
||||||
</interface>
|
|
||||||
<console type='pty' />
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
In both cases, you can define and start a container using:</p>
|
|
||||||
<pre>
|
|
||||||
virsh --connect lxc:/// define v1.xml
|
|
||||||
virsh --connect lxc:/// start v1.xml
|
|
||||||
</pre>
|
|
||||||
<pre>
|
|
||||||
virsh --connect lxc:/// console v1
|
|
||||||
</pre>
|
|
||||||
<p>Now doing 'ps -ef' will only show processes in the container, for
|
|
||||||
instance.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
234
docs/drvone.html
234
docs/drvone.html
|
@ -1,234 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drvone.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: OpenNebula Virtual Infrastructure Manager driver</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">OpenNebula</span>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>OpenNebula Virtual Infrastructure Manager driver</h1>
|
|
||||||
<p><a name="toc" id="toc"></a><a href="http://opennebula.org/">OpenNebula</a>
|
|
||||||
is a Virtual Infrastructure Manager that controls Virtual Machines (VM) in a pool of distributed resources
|
|
||||||
by orchestrating network, storage and virtualization technologies. The OpenNebula driver lets you manage your private or hybrid (<a href="http://aws.amazon.com/ec2/">Amazon EC2</a> or <a href="http://www.elastichosts.com/">Elastic Hosts</a> based) cloud using a standard libvirt interface, including the API as well as the related
|
|
||||||
tools and VM description files.</p>
|
|
||||||
<h2>
|
|
||||||
<a name="prereq" id="prereq"></a>Deployment pre-requisites</h2>
|
|
||||||
<ul><li>
|
|
||||||
<p style="margin-bottom: 0in">A working OpenNebula installation,
|
|
||||||
version 1.2 or higher.
|
|
||||||
</p>
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="uris" id="uris"></a>Connections to OpenNebula driver</h2>
|
|
||||||
<p>The Uri of the driver protocol is "one". Some example
|
|
||||||
connection Uris for the driver are:
|
|
||||||
</p>
|
|
||||||
<pre> one:/// (local access)
|
|
||||||
one+unix:/// (local access)
|
|
||||||
one://example.com/ (remote access)
|
|
||||||
one+tcp://example.com/ (remote access, SASl/Kerberos)
|
|
||||||
one+ssh://user@example.com/ (remote access, SSH tunnelled)
|
|
||||||
</pre>
|
|
||||||
<h2>
|
|
||||||
<a name="xmlconfig" id="xmlconfig"></a>Example domain XML config</h2>
|
|
||||||
<p>There are some limitations on the XML attributes that may be
|
|
||||||
specified when interfacing OpenNebula. The following xml example
|
|
||||||
details the attributes and options supported by the OpenNebula
|
|
||||||
driver:</p>
|
|
||||||
<h3>Paravirtualized guest direct kernel boot
|
|
||||||
</h3>
|
|
||||||
<pre> <domain type='one'>
|
|
||||||
<name>vm01</name>
|
|
||||||
<memory>32768</memory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
|
|
||||||
<os>
|
|
||||||
<type>linux</type>
|
|
||||||
<kernel>/boot/vmlinuz-2.6.24-17-xen</kernel>
|
|
||||||
<initrd>/boot/initrd.img-2.6.24-17-xen</initrd>
|
|
||||||
<cmdline></cmdline>
|
|
||||||
<root>sda1</root>
|
|
||||||
</os>
|
|
||||||
|
|
||||||
<devices>
|
|
||||||
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<source file='/images/sgehosts/01/disk.img'/>
|
|
||||||
<target dev='sda1'/>
|
|
||||||
</disk>
|
|
||||||
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<source file='/images/sgehosts/01/swap.img'/>
|
|
||||||
<target dev='sda2'/>
|
|
||||||
</disk>
|
|
||||||
|
|
||||||
<disk type='file' device='cdrom'>
|
|
||||||
<source file='/images/iso/cdrom.iso'/>
|
|
||||||
<target dev='hdc'/>
|
|
||||||
<readonly/>
|
|
||||||
</disk>
|
|
||||||
|
|
||||||
|
|
||||||
<!--BRIDGE-->
|
|
||||||
<interface type='bridge'>
|
|
||||||
<source bridge='eth0'/>
|
|
||||||
<mac address='00:16:3e:5d:c7:9e'/>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
<!--ONE Network-->
|
|
||||||
<interface type='network'>
|
|
||||||
<source network='onenetwork'/>
|
|
||||||
</interface>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
<b>Note:</b> The "<interface type='network'>" will
|
|
||||||
attach the interface to a previously configured network (named
|
|
||||||
<tt>onenetwork</tt>) within the <a href="http://opennebula.org/">OpenNebula</a> system, typically with the
|
|
||||||
<tt>onevnet</tt> CLI command.</p>
|
|
||||||
<p><b>Note</b>: OpenNebula supports the simultaneous use of different hypervisors, so you can specify any os type (linux or hvm) supported by your cluster.
|
|
||||||
</p>
|
|
||||||
<h2>Links</h2>
|
|
||||||
<ul><li><a href="http://www.opennebula.org/doku.php?id=documentation">OpenNebula Documentation</a>
|
|
||||||
</li><li><a href="http://www.opennebula.org/doku.php?id=documentation:rel1.2:ug">OpenNebula User Guide</a>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,236 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drvopenvz.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: OpenVZ container driver</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">OpenVZ</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>OpenVZ container driver</h1>
|
|
||||||
<p>
|
|
||||||
The OpenVZ driver for libvirt allows use and management of container
|
|
||||||
based virtualization on a Linux host OS. Prior to using the OpenVZ
|
|
||||||
driver, the OpenVZ enabled kernel must be installed & booted, and the
|
|
||||||
OpenVZ userspace tools installed. The libvirt driver has been tested
|
|
||||||
with OpenVZ 3.0.22, but other 3.0.x versions should also work without
|
|
||||||
undue trouble.
|
|
||||||
</p>
|
|
||||||
<h2>Connections to OpenVZ driver</h2>
|
|
||||||
<p>
|
|
||||||
The libvirt OpenVZ driver is a single-instance privileged driver,
|
|
||||||
with a driver name of 'openvz'. Some example conection URIs for
|
|
||||||
the libvirt driver are:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
openvz:///system (local access)
|
|
||||||
openvz+unix:///system (local access)
|
|
||||||
openvz://example.com/system (remote access, TLS/x509)
|
|
||||||
openvz+tcp://example.com/system (remote access, SASl/Kerberos)
|
|
||||||
openvz+ssh://root@example.com/system (remote access, SSH tunnelled)
|
|
||||||
</pre>
|
|
||||||
<h2>Notes on bridged networking</h2>
|
|
||||||
<p>
|
|
||||||
Bridged networking enables a guest domain (ie container) to have its
|
|
||||||
network interface connected directly to the host's physical LAN. Before
|
|
||||||
this can be used there are a couple of configuration pre-requisites for
|
|
||||||
the host OS.
|
|
||||||
</p>
|
|
||||||
<h3>Host network devices</h3>
|
|
||||||
<p>
|
|
||||||
One or more of the physical devices must be attached to a bridge. The
|
|
||||||
process for this varies according to the operating system in use, so
|
|
||||||
for up to date notes consult the <a href="http://wiki.libvirt.org">Wiki</a>
|
|
||||||
or your operating system's networking documentation. The basic idea is
|
|
||||||
that the host OS should end up with a bridge device "br0" containing a
|
|
||||||
physical device "eth0", or a bonding device "bond0".
|
|
||||||
</p>
|
|
||||||
<h3>OpenVZ tools configuration</h3>
|
|
||||||
<p>
|
|
||||||
OpenVZ releases later than 3.0.23 ship with a standard network device
|
|
||||||
setup script that is able to setup bridging, named
|
|
||||||
<code>/usr/sbin/vznetaddbr</code>. For releases prior to 3.0.23, this
|
|
||||||
script must be created manually by the host OS adminstrator. The
|
|
||||||
simplest way is to just download the latest version of this script
|
|
||||||
from a newer OpenVZ release, or upstream source repository. Then
|
|
||||||
a generic configuration file <code>/etc/vz/vznetctl.conf</code>
|
|
||||||
must be created containing
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
#!/bin/bash
|
|
||||||
EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr"
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
The host OS is now ready to allow bridging of guest containers, which
|
|
||||||
will work whether the container is started with libvirt, or OpenVZ
|
|
||||||
tools.
|
|
||||||
</p>
|
|
||||||
<h2>Example guest domain XML configuration</h2>
|
|
||||||
<p>
|
|
||||||
The current libvirt OpenVZ driver has a restriction that the
|
|
||||||
domain names must match the OpenVZ container VEID, which by
|
|
||||||
convention start at 100, and are incremented from there. The
|
|
||||||
choice of OS template to use inside the container is determined
|
|
||||||
by the <code>filesystem</code> tag, and the template source name
|
|
||||||
matches the templates known to OpenVZ tools.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<domain type='openvz' id='104'>
|
|
||||||
<name>104</name>
|
|
||||||
<uuid>86c12009-e591-a159-6e9f-91d18b85ef78</uuid>
|
|
||||||
<vcpu>3</vcpu>
|
|
||||||
<os>
|
|
||||||
<type>exe</type>
|
|
||||||
<init>/sbin/init</init>
|
|
||||||
</os>
|
|
||||||
<devices>
|
|
||||||
<filesystem type='template'>
|
|
||||||
<source name='fedora-9-i386-minimal'/>
|
|
||||||
<target dir='/'/>
|
|
||||||
</filesystem>
|
|
||||||
<interface type='bridge'>
|
|
||||||
<mac address='00:18:51:5b:ea:bf'/>
|
|
||||||
<source bridge='br0'/>
|
|
||||||
<target dev='veth101.0'/>
|
|
||||||
</interface>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,628 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drvqemu.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: QEMU/KVM hypervisor driver</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">QEMU / KVM</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>QEMU/KVM hypervisor driver</h1>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#prereq">Deployment pre-requisites</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#uris">Connections to QEMU driver</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#security">Driver security architecture</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#securitydriver">Driver instances</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#securitydac">POSIX users/groups</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#securitycap">Linux process capabilities</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#securityselinux">SELinux basic confinement</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#securitysvirt">SELinux sVirt confinement</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#securityacl">Cgroups device ACLs</a>
|
|
||||||
</li></ul>
|
|
||||||
</li><li>
|
|
||||||
<a href="#imex">Import and export of libvirt domain XML configs</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#xmlimport">Converting from QEMU args to domain XML</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#xmlexport">Converting from domain XML to QEMU args</a>
|
|
||||||
</li></ul>
|
|
||||||
</li><li>
|
|
||||||
<a href="#xmlconfig">Example domain XML config</a>
|
|
||||||
</li></ul>
|
|
||||||
<p>
|
|
||||||
The libvirt QEMU driver can manage any QEMU emulator from version 0.8.1
|
|
||||||
or later. It can also manage anything that provides the same QEMU command
|
|
||||||
line syntax and monitor interaction. This includes KVM, and Xenner.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="prereq" id="prereq">Deployment pre-requisites</a>
|
|
||||||
</h2>
|
|
||||||
<ul><li>
|
|
||||||
<strong>QEMU emulators</strong>: The driver will probe <code>/usr/bin</code>
|
|
||||||
for the presence of <code>qemu</code>, <code>qemu-system-x86_64</code>,
|
|
||||||
<code>qemu-system-mips</code>,<code>qemu-system-mipsel</code>,
|
|
||||||
<code>qemu-system-sparc</code>,<code>qemu-system-ppc</code>. The results
|
|
||||||
of this can be seen from the capabilities XML output.
|
|
||||||
</li><li>
|
|
||||||
<strong>KVM hypervisor</strong>: The driver will probe <code>/usr/bin</code>
|
|
||||||
for the presence of <code>qemu-kvm</code> and <code>/dev/kvm</code> device
|
|
||||||
node. If both are found, then KVM fullyvirtualized, hardware accelerated
|
|
||||||
guests will be available.
|
|
||||||
</li><li>
|
|
||||||
<strong>Xenner hypervisor</strong>: The driver will probe <code>/usr/bin</code>
|
|
||||||
for the presence of <code>xenner</code> and <code>/dev/kvm</code> device
|
|
||||||
node. If both are found, then Xen paravirtualized guests can be run using
|
|
||||||
the KVM hardware acceleration.
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="uris" id="uris">Connections to QEMU driver</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
The libvirt QEMU driver is a multi-instance driver, providing a single
|
|
||||||
system wide privileged driver (the "system" instance), and per-user
|
|
||||||
unprivileged drivers (the "session" instance). The of the driver protocol
|
|
||||||
is "qemu". Some example conection URIs for the libvirt driver are:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
qemu:///session (local access to per-user instance)
|
|
||||||
qemu+unix:///session (local access to per-user instance)
|
|
||||||
|
|
||||||
qemu:///system (local access to system instance)
|
|
||||||
qemu+unix:///system (local access to system instance)
|
|
||||||
qemu://example.com/system (remote access, TLS/x509)
|
|
||||||
qemu+tcp://example.com/system (remote access, SASl/Kerberos)
|
|
||||||
qemu+ssh://root@example.com/system (remote access, SSH tunnelled)
|
|
||||||
</pre>
|
|
||||||
<h2>
|
|
||||||
<a name="security" id="security">Driver security architecture</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
There are multiple layers to security in the QEMU driver, allowing for
|
|
||||||
flexibility in the use of QEMU based virtual machines.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="securitydriver" id="securitydriver">Driver instances</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
As explained above there are two ways to access the QEMU driver
|
|
||||||
in libvirt. The "qemu:///session" family of URIs connect to a
|
|
||||||
libvirtd instance running as the same user/group ID as the client
|
|
||||||
application. Thus the QEMU instances spawned from this driver will
|
|
||||||
share the same privileges as the client application. The intended
|
|
||||||
use case for this driver is desktop virtualization, with virtual
|
|
||||||
machines storing their disk imags in the user's home directory and
|
|
||||||
being managed from the local desktop login session.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The "qemu:///system" family of URIs connect to a
|
|
||||||
libvirtd instance running as the privileged system account 'root'.
|
|
||||||
Thus the QEMU instances spawned from this driver may have much
|
|
||||||
higher privileges than the client application managing them.
|
|
||||||
The intended use case for this driver is server virtualization,
|
|
||||||
where the virtual machines may need to be connected to host
|
|
||||||
resources (block, PCI, USB, network devices) whose access requires
|
|
||||||
elevated privileges.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="securitydac" id="securitydac">POSIX users/groups</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
In the "session" instance, the POSIX users/groups model restricts QEMU
|
|
||||||
virtual machines (and libvirtd in general) to only have access to resources
|
|
||||||
with the same user/group ID as the client application. There is no
|
|
||||||
finer level of configuration possible for the "session" instances.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
In the "system" instance, libvirt releases from 0.7.0 onwards allow
|
|
||||||
control over the user/group that the QEMU virtual machines are run
|
|
||||||
as. A build of libvirt with no configuration parameters set will
|
|
||||||
still run QEMU processes as root:root. It is possible to change
|
|
||||||
this default by using the --with-qemu-user=$USERNAME and
|
|
||||||
--with-qemu-group=$GROUPNAME arguments to 'configure' during
|
|
||||||
build. It is strongly recommended that vendors build with both
|
|
||||||
of these arguments set to 'qemu'. Regardless of this build time
|
|
||||||
default, administrators can set a per-host default setting in
|
|
||||||
the <code>/etc/libvirt/qemu.conf</code> configuration file via
|
|
||||||
the <code>user=$USERNAME</code> and <code>group=$GROUPNAME</code>
|
|
||||||
parameters. When a non-root user or group is configured, the
|
|
||||||
libvirt QEMU driver will change uid/gid to match immediately
|
|
||||||
before executing the QEMU binary for a virtual machine.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If QEMU virtual machines from the "system" instance are being
|
|
||||||
run as non-root, there will be greater restrictions on what
|
|
||||||
host resources the QEMU process will be able to access. The
|
|
||||||
libvirtd daemon will attempt to manage permissions on resources
|
|
||||||
to minimise the likelihood of unintentional security denials,
|
|
||||||
but the administrator / application developer must be aware of
|
|
||||||
some of the consequences / restrictions.
|
|
||||||
</p>
|
|
||||||
<ul><li>
|
|
||||||
<p>
|
|
||||||
The directories <code>/var/run/libvirt/qemu/</code>,
|
|
||||||
<code>/var/lib/libvirt/qemu/</code> and
|
|
||||||
<code>/var/cache/libvirt/qemu/</code> must all have their
|
|
||||||
ownership set to match the user / group ID that QEMU
|
|
||||||
guests will be run as. If the vendor has set a non-root
|
|
||||||
user/group for the QEMU driver at build time, the
|
|
||||||
permissions should be set automatically at install time.
|
|
||||||
If a host administrator customizes user/group in
|
|
||||||
<code>/etc/libvirt/qemu.conf</code>, they will need to
|
|
||||||
manually set the ownership on these directories.
|
|
||||||
</p>
|
|
||||||
</li><li>
|
|
||||||
<p>
|
|
||||||
When attaching USB and PCI devices to a QEMU guest,
|
|
||||||
QEMU will need to access files in <code>/dev/bus/usb</code>
|
|
||||||
and <code>/sys/bus/pci/devices</code> respectively. The libvirtd daemon
|
|
||||||
will automatically set the ownership on specific devices
|
|
||||||
that are assigned to a guest at start time. There should
|
|
||||||
not be any need for administrator changes in this respect.
|
|
||||||
</p>
|
|
||||||
</li><li>
|
|
||||||
<p>
|
|
||||||
Any files/devices used as guest disk images must be
|
|
||||||
accessible to the user/group ID that QEMU guests are
|
|
||||||
configured to run as. The libvirtd daemon will automatically
|
|
||||||
set the ownership of the file/device path to the correct
|
|
||||||
user/group ID. Applications / administrators must be aware
|
|
||||||
though that the parent directory permissions may still
|
|
||||||
deny access. The directories containing disk images
|
|
||||||
must either have their ownership set to match the user/group
|
|
||||||
configured for QEMU, or their UNIX file permissions must
|
|
||||||
have the 'execute/search' bit enabled for 'others'.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The simplest option is the latter one, of just enabling
|
|
||||||
the 'execute/search' bit. For any directory to be used
|
|
||||||
for storing disk images, this can be achieved by running
|
|
||||||
the following command on the directory itself, and any
|
|
||||||
parent directories
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
chmod o+x /path/to/directory
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
In particular note that if using the "system" instance
|
|
||||||
and attempting to store disk images in a user home
|
|
||||||
directory, the default permissions on $HOME are typically
|
|
||||||
too restrictive to allow access.
|
|
||||||
</p>
|
|
||||||
</li></ul>
|
|
||||||
<h3>
|
|
||||||
<a name="securitycap" id="securitycap">Linux process capabilities</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The libvirt QEMU driver has a build time option allowing it to use
|
|
||||||
the <a href="http://people.redhat.com/sgrubb/libcap-ng/index.html">libcap-ng</a>
|
|
||||||
library to manage process capabilities. If this build option is
|
|
||||||
enabled, then the QEMU driver will use this to ensure that all
|
|
||||||
process capabilities are dropped before executing a QEMU virtual
|
|
||||||
machine. Process capabilities are what gives the 'root' account
|
|
||||||
its high power, in particular the CAP_DAC_OVERRIDE capability
|
|
||||||
is what allows a process running as 'root' to access files owned
|
|
||||||
by any user.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If the QEMU driver is configured to run virtual machines as non-root,
|
|
||||||
then they will already loose all their process capabilities at time
|
|
||||||
of startup. The Linux capability feature is thus aimed primarily at
|
|
||||||
the scenario where the QEMU processes are running as root. In this
|
|
||||||
case, before launching a QEMU virtual machine, libvirtd will use
|
|
||||||
libcap-ng APIs to drop all process capabilities. It is important
|
|
||||||
for administrators to note that this implies the QEMU process will
|
|
||||||
<strong>only</strong> be able to access files owned by root, and
|
|
||||||
not files owned by any other user.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Thus, if a vendor / distributor has configured their libvirt package
|
|
||||||
to run as 'qemu' by default, a number of changes will be required
|
|
||||||
before an administrator can change a host to run guests as root.
|
|
||||||
In particular it will be neccessary to change ownership on the
|
|
||||||
directories <code>/var/run/libvirt/qemu/</code>,
|
|
||||||
<code>/var/lib/libvirt/qemu/</code> and
|
|
||||||
<code>/var/cache/libvirt/qemu/</code> back to root, in addition
|
|
||||||
to changing the <code>/etc/libvirt/qemu.conf</code> settings.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="securityselinux" id="securityselinux">SELinux basic confinement</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The basic SELinux protection for QEMU virtual machines is intended to
|
|
||||||
protect the host OS from a compromised virtual machine process. There
|
|
||||||
is no protection between guests.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
In the basic model, all QEMU virtual machines run under the confined
|
|
||||||
domain <code>root:system_r:qemu_t</code>. It is required that any
|
|
||||||
disk image assigned to a QEMU virtual machine is labelled with
|
|
||||||
<code>system_u:object_r:virt_image_t</code>. In a default deployment,
|
|
||||||
package vendors/distributor will typically ensure that the directory
|
|
||||||
<code>/var/lib/libvirt/images</code> has this label, such that any
|
|
||||||
disk images created in this directory will automatically inherit the
|
|
||||||
correct labelling. If attempting to use disk images in another
|
|
||||||
location, the user/administrator must ensure the directory has be
|
|
||||||
given this requisite label. Likewise physical block devices must
|
|
||||||
be labelled <code>system_u:object_r:virt_image_t</code>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Not all filesystems allow for labelling of individual files. In
|
|
||||||
particular NFS, VFat and NTFS have no support for labelling. In
|
|
||||||
these cases administrators must use the 'context' option when
|
|
||||||
mounting the filesystem to set the default label to
|
|
||||||
<code>system_u:object_r:virt_image_t</code>. In the case of
|
|
||||||
NFS, there is an alternative option, of enabling the <code>virt_use_nfs</code>
|
|
||||||
SELinux boolean.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="securitysvirt" id="securitysvirt">SELinux sVirt confinement</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The SELinux sVirt protection for QEMU virtual machines builds to the
|
|
||||||
basic level of protection, to also allow individual guests to be
|
|
||||||
protected from each other.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
In the sVirt model, each QEMU virtual machine runs under its own
|
|
||||||
confined domain, which is based on <code>system_u:system_r:svirt_t:s0</code>
|
|
||||||
with a unique category appended, eg, <code>system_u:system_r:svirt_t:s0:c34,c44</code>.
|
|
||||||
The rules are setup such that a domain can only access files which are
|
|
||||||
labelled with the matching category level, eg
|
|
||||||
<code>system_u:object_r:svirt_image_t:s0:c34,c44</code>. This prevents one
|
|
||||||
QEMU process accessing any file resources that are prevent to another QEMU
|
|
||||||
process.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
There are two ways of assigning labels to virtual machines under sVirt.
|
|
||||||
In the default setup, if sVirt is enabled, guests will get an automatically
|
|
||||||
assigned unique label each time they are booted. The libvirtd daemon will
|
|
||||||
also automatically relabel exclusive access disk images to match this
|
|
||||||
label. Disks that are marked as <shared> will get a generic
|
|
||||||
label <code>system_u:system_r:svirt_image_t:s0</code> allowing all guests
|
|
||||||
read/write access them, while disks marked as <readonly> will
|
|
||||||
get a generic label <code>system_u:system_r:svirt_content_t:s0</code>
|
|
||||||
which allows all guests read-only access.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
With statically assigned labels, the application should include the
|
|
||||||
desired guest and file labels in the XML at time of creating the
|
|
||||||
guest with libvirt. In this scenario the application is responsible
|
|
||||||
for ensuring the disk images & similar resources are suitably
|
|
||||||
labelled to match, libvirtd will not attempt any relabelling.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If the sVirt security model is active, then the node capabilities
|
|
||||||
XML will include its details. If a virtual machine is currently
|
|
||||||
protected by the security model, then the guest XML will include
|
|
||||||
its assigned labels. If enabled at compile time, the sVirt security
|
|
||||||
model will always be activated if SELinux is available on the host
|
|
||||||
OS. To disable sVirt, and revert to the basic level of SELinux
|
|
||||||
protection (host protection only), the <code>/etc/libvirt/qemu.conf</code>
|
|
||||||
file can be used to change the setting to <code>security_driver="none"</code>
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="securityacl" id="securityacl">Cgroups device ACLs</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
Recent Linux kernels have a capability known as "cgroups" which is used
|
|
||||||
for resource management. It is implemented via a number of "controllers",
|
|
||||||
each controller covering a specific task/functional area. One of the
|
|
||||||
available controllers is the "devices" controller, which is able to
|
|
||||||
setup whitelists of block/character devices that a cgroup should be
|
|
||||||
allowed to access. If the "devices" controller is mounted on a host,
|
|
||||||
then libvirt will automatically create a dedicated cgroup for each
|
|
||||||
QEMU virtual machine and setup the device whitelist so that the QEMU
|
|
||||||
process can only access shared devices, and explicitly disks images
|
|
||||||
backed by block devices.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The list of shared devices a guest is allowed access to is
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
/dev/null, /dev/full, /dev/zero,
|
|
||||||
/dev/random, /dev/urandom,
|
|
||||||
/dev/ptmx, /dev/kvm, /dev/kqemu,
|
|
||||||
/dev/rtc, /dev/hpet, /dev/net/tun
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
In the event of unanticipated needs arising, this can be customized
|
|
||||||
via the <code>/etc/libvirt/qemu.conf</code> file.
|
|
||||||
To mount the cgroups device controller, the following command
|
|
||||||
should be run as root, prior to starting libvirtd
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
mkdir /dev/cgroup
|
|
||||||
mount -t cgroup none /dev/cgroup -o devices
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
libvirt will then place each virtual machine in a cgroup at
|
|
||||||
<code>/dev/cgroup/libvirt/qemu/$VMNAME/</code>
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="imex" id="imex">Import and export of libvirt domain XML configs</a>
|
|
||||||
</h2>
|
|
||||||
<p>The QEMU driver currently supports a single native
|
|
||||||
config format known as <code>qemu-argv</code>. The data for this format
|
|
||||||
is expected to be a single line first a list of environment variables,
|
|
||||||
then the QEMu binary name, finally followed by the QEMU command line
|
|
||||||
arguments</p>
|
|
||||||
<h3>
|
|
||||||
<a name="xmlimport" id="xmlimport">Converting from QEMU args to domain XML</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The <code>virsh domxml-from-native</code> provides a way to convert an
|
|
||||||
existing set of QEMU args into a guest description using libvirt Domain XML
|
|
||||||
that can then be used by libvirt.
|
|
||||||
</p>
|
|
||||||
<pre>$ cat > demo.args <<EOF
|
|
||||||
LC_ALL=C PATH=/bin HOME=/home/test USER=test \
|
|
||||||
LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 \
|
|
||||||
-nographic -monitor pty -no-acpi -boot c -hda \
|
|
||||||
/dev/HostVG/QEMUGuest1 -net none -serial none \
|
|
||||||
-parallel none -usb
|
|
||||||
EOF
|
|
||||||
$ virsh domxml-from-native qemu-argv demo.args
|
|
||||||
<domain type='qemu'>
|
|
||||||
<uuid>00000000-0000-0000-0000-000000000000</uuid>
|
|
||||||
<memory>219136</memory>
|
|
||||||
<currentMemory>219136</currentMemory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<os>
|
|
||||||
<type arch='i686' machine='pc'>hvm</type>
|
|
||||||
<boot dev='hd'/>
|
|
||||||
</os>
|
|
||||||
<clock offset='utc'/>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>destroy</on_crash>
|
|
||||||
<devices>
|
|
||||||
<emulator>/usr/bin/qemu</emulator>
|
|
||||||
<disk type='block' device='disk'>
|
|
||||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
|
||||||
<target dev='hda' bus='ide'/>
|
|
||||||
</disk>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
<p>NB, don't include the literral \ in the args, put everything on one line</p>
|
|
||||||
<h3>
|
|
||||||
<a name="xmlexport" id="xmlexport">Converting from domain XML to QEMU args</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The <code>virsh domxml-to-native</code> provides a way to convert a
|
|
||||||
guest description using libvirt Domain XML, into a set of QEMU args
|
|
||||||
that can be run manually.
|
|
||||||
</p>
|
|
||||||
<pre>$ cat > demo.xml <<EOF
|
|
||||||
<domain type='qemu'>
|
|
||||||
<name>QEMUGuest1</name>
|
|
||||||
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
|
|
||||||
<memory>219200</memory>
|
|
||||||
<currentMemory>219200</currentMemory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<os>
|
|
||||||
<type arch='i686' machine='pc'>hvm</type>
|
|
||||||
<boot dev='hd'/>
|
|
||||||
</os>
|
|
||||||
<clock offset='utc'/>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>destroy</on_crash>
|
|
||||||
<devices>
|
|
||||||
<emulator>/usr/bin/qemu</emulator>
|
|
||||||
<disk type='block' device='disk'>
|
|
||||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
|
||||||
<target dev='hda' bus='ide'/>
|
|
||||||
</disk>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
EOF
|
|
||||||
$ virsh domxml-to-native qemu-argv demo.xml
|
|
||||||
LC_ALL=C PATH=/usr/bin:/bin HOME=/home/test \
|
|
||||||
USER=test LOGNAME=test /usr/bin/qemu -S -M pc \
|
|
||||||
-no-kqemu -m 214 -smp 1 -name QEMUGuest1 -nographic \
|
|
||||||
-monitor pty -no-acpi -boot c -drive \
|
|
||||||
file=/dev/HostVG/QEMUGuest1,if=ide,index=0 -net none \
|
|
||||||
-serial none -parallel none -usb
|
|
||||||
</pre>
|
|
||||||
<h2>
|
|
||||||
<a name="xmlconfig" id="xmlconfig">Example domain XML config</a>
|
|
||||||
</h2>
|
|
||||||
<h3>QEMU emulated guest on x86_64</h3>
|
|
||||||
<pre><domain type='qemu'>
|
|
||||||
<name>QEmu-fedora-i686</name>
|
|
||||||
<uuid>c7a5fdbd-cdaf-9455-926a-d65c16db1809</uuid>
|
|
||||||
<memory>219200</memory>
|
|
||||||
<currentMemory>219200</currentMemory>
|
|
||||||
<vcpu>2</vcpu>
|
|
||||||
<os>
|
|
||||||
<type arch='i686' machine='pc'>hvm</type>
|
|
||||||
<boot dev='cdrom'/>
|
|
||||||
</os>
|
|
||||||
<devices>
|
|
||||||
<emulator>/usr/bin/qemu-system-x86_64</emulator>
|
|
||||||
<disk type='file' device='cdrom'>
|
|
||||||
<source file='/home/user/boot.iso'/>
|
|
||||||
<target dev='hdc'/>
|
|
||||||
<readonly/>
|
|
||||||
</disk>
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<source file='/home/user/fedora.img'/>
|
|
||||||
<target dev='hda'/>
|
|
||||||
</disk>
|
|
||||||
<interface type='network'>
|
|
||||||
<source network='default'/>
|
|
||||||
</interface>
|
|
||||||
<graphics type='vnc' port='-1'/>
|
|
||||||
</devices>
|
|
||||||
</domain></pre>
|
|
||||||
<h3>KVM hardware accelerated guest on i686</h3>
|
|
||||||
<pre><domain type='kvm'>
|
|
||||||
<name>demo2</name>
|
|
||||||
<uuid>4dea24b3-1d52-d8f3-2516-782e98a23fa0</uuid>
|
|
||||||
<memory>131072</memory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<os>
|
|
||||||
<type arch="i686">hvm</type>
|
|
||||||
</os>
|
|
||||||
<clock sync="localtime"/>
|
|
||||||
<devices>
|
|
||||||
<emulator>/usr/bin/qemu-kvm</emulator>
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<source file='/var/lib/libvirt/images/demo2.img'/>
|
|
||||||
<target dev='hda'/>
|
|
||||||
</disk>
|
|
||||||
<interface type='network'>
|
|
||||||
<source network='default'/>
|
|
||||||
<mac address='24:42:53:21:52:45'/>
|
|
||||||
</interface>
|
|
||||||
<graphics type='vnc' port='-1' keymap='de'/>
|
|
||||||
</devices>
|
|
||||||
</domain></pre>
|
|
||||||
<h3>Xen paravirtualized guests with hardware acceleration</h3>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,148 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drvremote.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Remote management driver</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Remote</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Remote management driver</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,164 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drvtest.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Test "mock" driver</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Test</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Test "mock" driver</h1>
|
|
||||||
<h2>Connections to Test driver</h2>
|
|
||||||
<p>
|
|
||||||
The libvirt Test driver is a per-process fake hypervisor driver,
|
|
||||||
with a driver name of 'test'. The driver maintains all its state
|
|
||||||
in memory. It can start with a pre-configured default config, or
|
|
||||||
be given a path to a alternate config. Some example conection URIs
|
|
||||||
for the libvirt driver are:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
test:///default (local access, default config)
|
|
||||||
test:///path/to/driver/config.xml (local access, custom config)
|
|
||||||
test+unix:///default (local access, default config, via daemon)
|
|
||||||
test://example.com/default (remote access, TLS/x509)
|
|
||||||
test+tcp://example.com/default (remote access, SASl/Kerberos)
|
|
||||||
test+ssh://root@example.com/default (remote access, SSH tunnelled)
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
216
docs/drvuml.html
216
docs/drvuml.html
|
@ -1,216 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drvuml.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: User Mode Linux driver</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">UML</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>User Mode Linux driver</h1>
|
|
||||||
<p>
|
|
||||||
The UML driver for libvirt allows use and management of paravirtualized
|
|
||||||
guests built for User Mode Linux. UML requires no special support in
|
|
||||||
the host kernel, so can be used by any user of any linux system, provided
|
|
||||||
they have enough free RAM for their guest's needs, though there are
|
|
||||||
certain restrictions on network connectivity unless the adminstrator
|
|
||||||
has pre-created TAP devices.
|
|
||||||
</p>
|
|
||||||
<h2>Connections to UML driver</h2>
|
|
||||||
<p>
|
|
||||||
The libvirt UML driver follows the QEMU driver in providing two
|
|
||||||
types of connection. There is one privileged instance per host,
|
|
||||||
which runs as root. This is called the "system" instance, and allows
|
|
||||||
full use of all host resources. Then, there is a per-user unprivileged
|
|
||||||
"session", instance. This has more restricted capabilities, and may
|
|
||||||
require the host administrator to setup certain resources ahead of
|
|
||||||
time to allow full integration with the network. Example connection
|
|
||||||
URIs are
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
uml:///session (local access to per-user instance)
|
|
||||||
uml+unix:///session (local access to per-user instance)
|
|
||||||
|
|
||||||
uml:///system (local access to system instance)
|
|
||||||
uml+unix:///system (local access to system instance)
|
|
||||||
uml://example.com/system (remote access, TLS/x509)
|
|
||||||
uml+tcp://example.com/system (remote access, SASl/Kerberos)
|
|
||||||
uml+ssh://root@example.com/system (remote access, SSH tunnelled)
|
|
||||||
</pre>
|
|
||||||
<h2>Example XML configuration</h2>
|
|
||||||
<p>
|
|
||||||
User mode Linux driver only supports directly kernel boot at
|
|
||||||
this time. A future driver enhancement may allow a paravirt
|
|
||||||
bootloader in a similar style to Xen's pygrub. For now though,
|
|
||||||
the UML kernel must be stored on the host and referenced
|
|
||||||
explicitly in the "os" element. Since UML is a paravirtualized
|
|
||||||
technology, the kernel "type" is set to "uml"
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
There is not yet support for networking in the driver, but
|
|
||||||
disks can be specified in the usual libvirt manner. The main
|
|
||||||
variation is the target device naming scheme "ubd0", and
|
|
||||||
bus type of "uml".
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Once booted the primary console is connected toa PTY, and
|
|
||||||
thus accessible with "virsh console" or equivalent tools
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<domain type='uml'>
|
|
||||||
<name>demo</name>
|
|
||||||
<uuid>b4433fc2-a22e-ffb3-0a3d-9c173b395800</uuid>
|
|
||||||
<memory>500000</memory>
|
|
||||||
<currentMemory>500000</currentMemory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<os>
|
|
||||||
<type arch='x86_64'>uml</type>
|
|
||||||
<kernel>/home/berrange/linux-uml-2.6.26-x86_64</kernel>
|
|
||||||
</os>
|
|
||||||
<devices>
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<source file='/home/berrange/FedoraCore6-AMD64-root_fs'/>
|
|
||||||
<target dev='ubd0' bus='uml'/>
|
|
||||||
</disk>
|
|
||||||
<console type='pty'/>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,258 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drvvbox.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: VirtualBox hypervisor driver</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">VirtualBox</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>VirtualBox hypervisor driver</h1>
|
|
||||||
<p>
|
|
||||||
The libvirt VirtualBox driver can manage any VirtualBox version
|
|
||||||
from version 2.2 onwards.
|
|
||||||
</p>
|
|
||||||
<h2>Connections to VirtualBox driver</h2>
|
|
||||||
<p>
|
|
||||||
The libvirt VirtualBox driver provides per-user drivers (the "session" instance).
|
|
||||||
The uri of the driver protocol is "vbox". Some example connection URIs for the driver are:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
vbox:///session (local access to per-user instance)
|
|
||||||
vbox+unix:///session (local access to per-user instance)
|
|
||||||
vbox+tcp://user@example.com/session (remote access, SASl/Kerberos)
|
|
||||||
vbox+ssh://user@example.com/session (remote access, SSH tunnelled)
|
|
||||||
</pre>
|
|
||||||
<h2>
|
|
||||||
<a name="xmlconfig" id="xmlconfig">Example domain XML config</a>
|
|
||||||
</h2>
|
|
||||||
<pre>
|
|
||||||
<domain type='vbox'>
|
|
||||||
<name>vbox</name>
|
|
||||||
<uuid>4dab22b31d52d8f32516782e98ab3fa0</uuid>
|
|
||||||
|
|
||||||
<os>
|
|
||||||
<type>hvm</type>
|
|
||||||
<boot dev='cdrom'/>
|
|
||||||
<boot dev='hd'/>
|
|
||||||
<boot dev='fd'/>
|
|
||||||
<boot dev='network'/>
|
|
||||||
</os>
|
|
||||||
|
|
||||||
<memory>654321</memory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
|
|
||||||
<features>
|
|
||||||
<pae/>
|
|
||||||
<acpi/>
|
|
||||||
<apic/>
|
|
||||||
</features>
|
|
||||||
|
|
||||||
<devices>
|
|
||||||
<disk type='file' device='cdrom'>
|
|
||||||
<source file='/home/user/Downloads/slax-6.0.9.iso'/>
|
|
||||||
<target dev='hdc'/>
|
|
||||||
<readonly/>
|
|
||||||
</disk>
|
|
||||||
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<source file='/home/user/tmp/vbox.vdi'/>
|
|
||||||
<target dev='hdd'/>
|
|
||||||
</disk>
|
|
||||||
|
|
||||||
<disk type='file' device='floppy'>
|
|
||||||
<source file='/home/user/tmp/WIN98C.IMG'/>
|
|
||||||
<target dev='fda'/>
|
|
||||||
</disk>
|
|
||||||
|
|
||||||
<!--BRIDGE-->
|
|
||||||
<interface type='bridge'>
|
|
||||||
<source bridge='eth0'/>
|
|
||||||
<mac address='00:16:3e:5d:c7:9e'/>
|
|
||||||
<model type='am79c973'/>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
<!--NAT-->
|
|
||||||
<interface type='user'>
|
|
||||||
<mac address='56:16:3e:5d:c7:9e'/>
|
|
||||||
<model type='82540eM'/>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
<sound model='sb16'/>
|
|
||||||
|
|
||||||
<parallel type='dev'>
|
|
||||||
<source path='/dev/pts/1'/>
|
|
||||||
<target port='0'/>
|
|
||||||
</parallel>
|
|
||||||
|
|
||||||
<parallel type='dev'>
|
|
||||||
<source path='/dev/pts/2'/>
|
|
||||||
<target port='1'/>
|
|
||||||
</parallel>
|
|
||||||
|
|
||||||
<serial type="dev">
|
|
||||||
<source path="/dev/ttyS0"/>
|
|
||||||
<target port="0"/>
|
|
||||||
</serial>
|
|
||||||
|
|
||||||
<serial type="pipe">
|
|
||||||
<source path="/tmp/serial.txt"/>
|
|
||||||
<target port="1"/>
|
|
||||||
</serial>
|
|
||||||
|
|
||||||
<hostdev mode='subsystem' type='usb'>
|
|
||||||
<source>
|
|
||||||
<vendor id='0x1234'/>
|
|
||||||
<product id='0xbeef'/>
|
|
||||||
</source>
|
|
||||||
</hostdev>
|
|
||||||
|
|
||||||
<hostdev mode='subsystem' type='usb'>
|
|
||||||
<source>
|
|
||||||
<vendor id='0x4321'/>
|
|
||||||
<product id='0xfeeb'/>
|
|
||||||
</source>
|
|
||||||
</hostdev>
|
|
||||||
|
|
||||||
</devices>
|
|
||||||
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
455
docs/drvxen.html
455
docs/drvxen.html
|
@ -1,455 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from drvxen.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Xen hypervisor driver</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Xen</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the storage management APIs" class="inactive" href="storage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Xen hypervisor driver</h1>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#prereq">Deployment pre-requisites</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#uri">Connections to Xen driver</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#imex">Import and export of libvirt domain XML configs</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#xmlimport">Converting from XM config files to domain XML</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#xmlexport">Converting from domain XML to XM config files</a>
|
|
||||||
</li></ul>
|
|
||||||
</li><li>
|
|
||||||
<a href="#xmlconfig">Example domain XML config</a>
|
|
||||||
</li></ul>
|
|
||||||
<p>
|
|
||||||
The libvirt Xen driver provides the ability to manage virtual machines
|
|
||||||
on any Xen release from 3.0.1 onwards.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="prereq" id="prereq">Deployment pre-requisites</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
The libvirt Xen driver uses a combination of channels to manage Xen
|
|
||||||
virtual machines.
|
|
||||||
</p>
|
|
||||||
<ul><li>
|
|
||||||
<strong>XenD</strong>: Access to the Xen daemon is a mandatory
|
|
||||||
requirement for the libvirt Xen driver. It requires that the UNIX
|
|
||||||
socket interface be enabled in the <code>/etc/xen/xend-config.sxp</code>
|
|
||||||
configuration file. Specifically the config settings
|
|
||||||
<code>(xend-unix-server yes)</code>. This path is usually restricted
|
|
||||||
to only allow the <code>root</code> user access. As an alternative,
|
|
||||||
the HTTP interface can be used, however, this has significant security
|
|
||||||
implications.
|
|
||||||
</li><li>
|
|
||||||
<strong>XenStoreD</strong>: Access to the Xenstore daemon enables
|
|
||||||
more efficient codepaths for looking up domain information which
|
|
||||||
lowers the CPU overhead of management.
|
|
||||||
</li><li>
|
|
||||||
<strong>Hypercalls</strong>: The ability to make direct hypercalls
|
|
||||||
allows the most efficient codepaths in the driver to be used for
|
|
||||||
monitoring domain status.
|
|
||||||
</li><li>
|
|
||||||
<strong>XM config</strong>: When using Xen releases prior to 3.0.4,
|
|
||||||
there is no inactive domain management in XenD. For such releases,
|
|
||||||
libvirt will automatically process XM configuration files kept in
|
|
||||||
the <code>/etc/xen</code> directory. It is important not to place
|
|
||||||
any other non-config files in this directory.
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="uri" id="uri">Connections to Xen driver</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
The libvirt Xen driver is a single-instance privileged driver,
|
|
||||||
with a driver name of 'xen'. Some example conection URIs for
|
|
||||||
the libvirt driver are:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
xen:/// (local access, direct)
|
|
||||||
xen+unix:/// (local access, via daemon)
|
|
||||||
xen://example.com/ (remote access, TLS/x509)
|
|
||||||
xen+tcp://example.com/ (remote access, SASl/Kerberos)
|
|
||||||
xen+ssh://root@example.com/ (remote access, SSH tunnelled)
|
|
||||||
</pre>
|
|
||||||
<h2>
|
|
||||||
<a name="imex" id="imex">Import and export of libvirt domain XML configs</a>
|
|
||||||
</h2>
|
|
||||||
<p>The Xen driver currently supports two native
|
|
||||||
config formats. The first known as <code>xen-xm</code> is the format
|
|
||||||
used by the XM tool for files in <code>/etc/xen</code>. The second
|
|
||||||
known as <code>xen-sxpr</code>, is the format used for interacting
|
|
||||||
with the XenD's legacy HTTP RPC service.</p>
|
|
||||||
<h3>
|
|
||||||
<a name="xmlimport" id="xmlimport">Converting from XM config files to domain XML</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The <code>virsh domxml-from-native</code> provides a way to convert an
|
|
||||||
existing set of XM config files into a guest description using libvirt Domain XML
|
|
||||||
that can then be used by libvirt.
|
|
||||||
</p>
|
|
||||||
<pre>$ virsh -c xen:/// domxml-from-native xen-xm rhel5.cfg
|
|
||||||
<domain type='xen'>
|
|
||||||
<name>rhel5pv</name>
|
|
||||||
<uuid>8f07fe28-753f-2729-d76d-bdbd892f949a</uuid>
|
|
||||||
<memory>2560000</memory>
|
|
||||||
<currentMemory>307200</currentMemory>
|
|
||||||
<vcpu>4</vcpu>
|
|
||||||
<bootloader>/usr/bin/pygrub</bootloader>
|
|
||||||
<os>
|
|
||||||
<type arch='x86_64' machine='xenpv'>linux</type>
|
|
||||||
</os>
|
|
||||||
<clock offset='utc'/>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>restart</on_crash>
|
|
||||||
<devices>
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<driver name='tap' type='aio'/>
|
|
||||||
<source file='/var/lib/xen/images/rhel5pv.img'/>
|
|
||||||
<target dev='xvda' bus='xen'/>
|
|
||||||
</disk>
|
|
||||||
<disk type='file' device='disk'>
|
|
||||||
<driver name='tap' type='qcow'/>
|
|
||||||
<source file='/root/qcow1-xen.img'/>
|
|
||||||
<target dev='xvdd' bus='xen'/>
|
|
||||||
</disk>
|
|
||||||
<interface type='bridge'>
|
|
||||||
<mac address='00:16:3e:60:36:ba'/>
|
|
||||||
<source bridge='xenbr0'/>
|
|
||||||
</interface>
|
|
||||||
<console type='pty'>
|
|
||||||
<target port='0'/>
|
|
||||||
</console>
|
|
||||||
<input type='mouse' bus='xen'/>
|
|
||||||
<graphics type='vnc' port='-1' autoport='yes' listen='0.0.0.0'/>
|
|
||||||
</devices>
|
|
||||||
</domain>
|
|
||||||
</pre>
|
|
||||||
<h3>
|
|
||||||
<a name="xmlexport" id="xmlexport">Converting from domain XML to XM config files</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The <code>virsh domxml-to-native</code> provides a way to convert a
|
|
||||||
guest description using libvirt Domain XML, into the XM config file
|
|
||||||
format.
|
|
||||||
</p>
|
|
||||||
<pre># virsh -c xen:/// domxml-to-native xen-xm rhel5pv.xml
|
|
||||||
name = "rhel5pv"
|
|
||||||
uuid = "8f07fe28-753f-2729-d76d-bdbd892f949a"
|
|
||||||
maxmem = 2500
|
|
||||||
memory = 300
|
|
||||||
vcpus = 4
|
|
||||||
bootloader = "/usr/bin/pygrub"
|
|
||||||
kernel = "/var/lib/xen/boot_kernel.0YK-cS"
|
|
||||||
ramdisk = "/var/lib/xen/boot_ramdisk.vWgrxK"
|
|
||||||
extra = "ro root=/dev/VolGroup00/LogVol00 rhgb quiet"
|
|
||||||
on_poweroff = "destroy"
|
|
||||||
on_reboot = "restart"
|
|
||||||
on_crash = "restart"
|
|
||||||
sdl = 0
|
|
||||||
vnc = 1
|
|
||||||
vncunused = 1
|
|
||||||
vnclisten = "0.0.0.0"
|
|
||||||
disk = [ "tap:aio:/var/lib/xen/images/rhel5pv.img,xvda,w", "tap:qcow:/root/qcow1-xen.img,xvdd,w" ]
|
|
||||||
vif = [ "mac=00:16:3e:60:36:ba,bridge=virbr0,script=vif-bridge,vifname=vif5.0" ]
|
|
||||||
</pre>
|
|
||||||
<h2>
|
|
||||||
<a name="xmlconfig" id="xmlconfig">Example domain XML config</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Below are some example XML configurations for Xen guest domains.
|
|
||||||
For full details of the available options, consult the <a href="formatdomain.html">domain XML format</a>
|
|
||||||
guide.
|
|
||||||
</p>
|
|
||||||
<h3>Paravirtualized guest bootloader</h3>
|
|
||||||
<p>
|
|
||||||
Using a bootloader allows a paravirtualized guest to be booted using
|
|
||||||
a kernel stored inside its virtual disk image
|
|
||||||
</p>
|
|
||||||
<pre><domain type='xen' >
|
|
||||||
<name>fc8</name>
|
|
||||||
<bootloader>/usr/bin/pygrub</bootloader>
|
|
||||||
<os>
|
|
||||||
<type>linux</type>
|
|
||||||
</os>
|
|
||||||
<memory>131072</memory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<devices>
|
|
||||||
<disk type='file'>
|
|
||||||
<source file='/var/lib/xen/images/fc4.img'/>
|
|
||||||
<target dev='sda1'/>
|
|
||||||
</disk>
|
|
||||||
<interface type='bridge'>
|
|
||||||
<source bridge='xenbr0'/>
|
|
||||||
<mac address='aa:00:00:00:00:11'/>
|
|
||||||
<script path='/etc/xen/scripts/vif-bridge'/>
|
|
||||||
</interface>
|
|
||||||
<console tty='/dev/pts/5'/>
|
|
||||||
</devices>
|
|
||||||
</domain></pre>
|
|
||||||
<h3>Paravirtualized guest direct kernel boot</h3>
|
|
||||||
<p>
|
|
||||||
For installation of paravirtualized guests it is typical to boot the
|
|
||||||
domain using a kernel and initrd stored in the host OS
|
|
||||||
</p>
|
|
||||||
<pre><domain type='xen' >
|
|
||||||
<name>fc8</name>
|
|
||||||
<os>
|
|
||||||
<type>linux</type>
|
|
||||||
<kernel>/var/lib/xen/install/vmlinuz-fedora8-x86_64</kernel>
|
|
||||||
<initrd>/var/lib/xen/install/initrd-vmlinuz-fedora8-x86_64</initrd>
|
|
||||||
<cmdline> kickstart=http://example.com/myguest.ks </cmdline>
|
|
||||||
</os>
|
|
||||||
<memory>131072</memory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<devices>
|
|
||||||
<disk type='file'>
|
|
||||||
<source file='/var/lib/xen/images/fc4.img'/>
|
|
||||||
<target dev='sda1'/>
|
|
||||||
</disk>
|
|
||||||
<interface type='bridge'>
|
|
||||||
<source bridge='xenbr0'/>
|
|
||||||
<mac address='aa:00:00:00:00:11'/>
|
|
||||||
<script path='/etc/xen/scripts/vif-bridge'/>
|
|
||||||
</interface>
|
|
||||||
<graphics type='vnc' port='-1'/>
|
|
||||||
<console tty='/dev/pts/5'/>
|
|
||||||
</devices>
|
|
||||||
</domain></pre>
|
|
||||||
<h3>Fullyvirtualized guest BIOS boot</h3>
|
|
||||||
<p>
|
|
||||||
Fullyvirtualized guests use the emulated BIOS to boot off the primary
|
|
||||||
harddisk, CDROM or Network PXE ROM.
|
|
||||||
</p>
|
|
||||||
<pre><domain type='xen' id='3'>
|
|
||||||
<name>fv0</name>
|
|
||||||
<uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
|
|
||||||
<os>
|
|
||||||
<type>hvm</type>
|
|
||||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
|
||||||
<boot dev='hd'/>
|
|
||||||
</os>
|
|
||||||
<memory>524288</memory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>restart</on_crash>
|
|
||||||
<features>
|
|
||||||
<pae/>
|
|
||||||
<acpi/>
|
|
||||||
<apic/>
|
|
||||||
</features>
|
|
||||||
<clock sync="localtime"/>
|
|
||||||
<devices>
|
|
||||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
|
||||||
<interface type='bridge'>
|
|
||||||
<source bridge='xenbr0'/>
|
|
||||||
<mac address='00:16:3e:5d:c7:9e'/>
|
|
||||||
<script path='vif-bridge'/>
|
|
||||||
</interface>
|
|
||||||
<disk type='file'>
|
|
||||||
<source file='/var/lib/xen/images/fv0'/>
|
|
||||||
<target dev='hda'/>
|
|
||||||
</disk>
|
|
||||||
<disk type='file' device='cdrom'>
|
|
||||||
<source file='/var/lib/xen/images/fc5-x86_64-boot.iso'/>
|
|
||||||
<target dev='hdc'/>
|
|
||||||
<readonly/>
|
|
||||||
</disk>
|
|
||||||
<disk type='file' device='floppy'>
|
|
||||||
<source file='/root/fd.img'/>
|
|
||||||
<target dev='fda'/>
|
|
||||||
</disk>
|
|
||||||
<graphics type='vnc' port='5904'/>
|
|
||||||
</devices>
|
|
||||||
</domain></pre>
|
|
||||||
<h3>Fullyvirtualized guest direct kernel boot</h3>
|
|
||||||
<p>
|
|
||||||
With Xen 3.2.0 or later it is possible to bypass the BIOS and directly
|
|
||||||
boot a Linux kernel and initrd as a fullyvirtualized domain. This allows
|
|
||||||
for complete automation of OS installation, for example using the Anaconda
|
|
||||||
kickstart support.
|
|
||||||
</p>
|
|
||||||
<pre><domain type='xen' id='3'>
|
|
||||||
<name>fv0</name>
|
|
||||||
<uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
|
|
||||||
<os>
|
|
||||||
<type>hvm</type>
|
|
||||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
|
||||||
<kernel>/var/lib/xen/install/vmlinuz-fedora8-x86_64</kernel>
|
|
||||||
<initrd>/var/lib/xen/install/initrd-vmlinuz-fedora8-x86_64</initrd>
|
|
||||||
<cmdline> kickstart=http://example.com/myguest.ks </cmdline>
|
|
||||||
</os>
|
|
||||||
<memory>524288</memory>
|
|
||||||
<vcpu>1</vcpu>
|
|
||||||
<on_poweroff>destroy</on_poweroff>
|
|
||||||
<on_reboot>restart</on_reboot>
|
|
||||||
<on_crash>restart</on_crash>
|
|
||||||
<features>
|
|
||||||
<pae/>
|
|
||||||
<acpi/>
|
|
||||||
<apic/>
|
|
||||||
</features>
|
|
||||||
<clock sync="localtime"/>
|
|
||||||
<devices>
|
|
||||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
|
||||||
<interface type='bridge'>
|
|
||||||
<source bridge='xenbr0'/>
|
|
||||||
<mac address='00:16:3e:5d:c7:9e'/>
|
|
||||||
<script path='vif-bridge'/>
|
|
||||||
</interface>
|
|
||||||
<disk type='file'>
|
|
||||||
<source file='/var/lib/xen/images/fv0'/>
|
|
||||||
<target dev='hda'/>
|
|
||||||
</disk>
|
|
||||||
<disk type='file' device='cdrom'>
|
|
||||||
<source file='/var/lib/xen/images/fc5-x86_64-boot.iso'/>
|
|
||||||
<target dev='hdc'/>
|
|
||||||
<readonly/>
|
|
||||||
</disk>
|
|
||||||
<disk type='file' device='floppy'>
|
|
||||||
<source file='/root/fd.img'/>
|
|
||||||
<target dev='fda'/>
|
|
||||||
</disk>
|
|
||||||
<graphics type='vnc' port='5904'/>
|
|
||||||
</devices>
|
|
||||||
</domain></pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
138
docs/errors.html
138
docs/errors.html
|
@ -1,138 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from errors.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Handling of errors</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="inactive" href="docs.html">Documentation</a>
|
|
||||||
</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="FAQ.html">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>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 information 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 possible 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 information</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 information is 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
|
|
||||||
targeted in the operation</li></ul>
|
|
||||||
<p>and then extra raw information about the error which may be initialized
|
|
||||||
to 0 or NULL if unused</p>
|
|
||||||
<ul><li>str1, str2, str3: string information, usually str1 is the error
|
|
||||||
message format</li><li>int1, int2: integer information</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>,
|
|
||||||
check 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 id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
136
docs/format.html
136
docs/format.html
|
@ -1,136 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from format.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: XML Format</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>
|
|
||||||
<span class="active">XML format</span>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The domain XML format" class="inactive" href="formatdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The virtual network XML format" class="inactive" href="formatnetwork.html">Networks</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The storage pool and volume XML format" class="inactive" href="formatstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Storage volume encryption XML format" class="inactive" href="formatstorageencryption.html">Storage Encryption</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The driver capabilities XML format" class="inactive" href="formatcaps.html">Capabilities</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The host device XML format" class="inactive" href="formatnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The secret XML format" class="inactive" href="formatsecret.html">Secrets</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>XML Format</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,199 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from formatcaps.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Driver capabilities XML format</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="active" href="format.html">XML format</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The domain XML format" class="inactive" href="formatdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The virtual network XML format" class="inactive" href="formatnetwork.html">Networks</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The storage pool and volume XML format" class="inactive" href="formatstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Storage volume encryption XML format" class="inactive" href="formatstorageencryption.html">Storage Encryption</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Capabilities</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The host device XML format" class="inactive" href="formatnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The secret XML format" class="inactive" href="formatsecret.html">Secrets</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Driver capabilities XML format</h1>
|
|
||||||
<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><capabilities>
|
|
||||||
<span style="color: #E50000"><host>
|
|
||||||
<cpu>
|
|
||||||
<arch>x86_64</arch>
|
|
||||||
<features>
|
|
||||||
<vmx/>
|
|
||||||
</features>
|
|
||||||
</cpu>
|
|
||||||
</host></span>
|
|
||||||
|
|
||||||
<!-- xen-3.0-x86_64 -->
|
|
||||||
<span style="color: #0000E5"><guest>
|
|
||||||
<os_type>xen</os_type>
|
|
||||||
<arch name="x86_64">
|
|
||||||
<wordsize>64</wordsize>
|
|
||||||
<domain type="xen"></domain>
|
|
||||||
<emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
|
|
||||||
</arch>
|
|
||||||
<features>
|
|
||||||
</features>
|
|
||||||
</guest></span>
|
|
||||||
|
|
||||||
<!-- hvm-3.0-x86_32 -->
|
|
||||||
<span style="color: #00B200"><guest>
|
|
||||||
<os_type>hvm</os_type>
|
|
||||||
<arch name="i686">
|
|
||||||
<wordsize>32</wordsize>
|
|
||||||
<domain type="xen"></domain>
|
|
||||||
<emulator>/usr/lib/xen/bin/qemu-dm</emulator>
|
|
||||||
<machine>pc</machine>
|
|
||||||
<machine>isapc</machine>
|
|
||||||
<loader>/usr/lib/xen/boot/hvmloader</loader>
|
|
||||||
</arch>
|
|
||||||
<features>
|
|
||||||
</features>
|
|
||||||
</guest></span>
|
|
||||||
...
|
|
||||||
</capabilities></pre>
|
|
||||||
<p>The first block (in red) indicates the host hardware capabilities, 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 information and potential features.</p>
|
|
||||||
<p>The third block (in green) gives similar information 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 id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,332 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from formatnetwork.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Network XML format</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="active" href="format.html">XML format</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The domain XML format" class="inactive" href="formatdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Networks</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The storage pool and volume XML format" class="inactive" href="formatstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Storage volume encryption XML format" class="inactive" href="formatstorageencryption.html">Storage Encryption</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The driver capabilities XML format" class="inactive" href="formatcaps.html">Capabilities</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The host device XML format" class="inactive" href="formatnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The secret XML format" class="inactive" href="formatsecret.html">Secrets</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Network XML format</h1>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#elements">Element and attribute overview</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#elementsMetadata">General metadata</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#elementsConnect">Connectivity</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#elementsAddress">Addressing</a>
|
|
||||||
</li></ul>
|
|
||||||
</li><li>
|
|
||||||
<a href="#examples">Example configuration</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#examplesNAT">NAT based network</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#examplesRoute">Routed network config</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#examplesPrivate">Isolated network config</a>
|
|
||||||
</li></ul>
|
|
||||||
</li></ul>
|
|
||||||
<p>
|
|
||||||
This page provides an introduction to the network XML format. For background
|
|
||||||
information on the concepts referred to here, consult the <a href="archnetwork.html">network driver architecture</a>
|
|
||||||
page.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="elements" id="elements">Element and attribute overview</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
The root element required for all virtual networks is
|
|
||||||
named <code>network</code> and has no attributes.
|
|
||||||
The network XML format is available <span class="since">since 0.3.0</span>
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="elementsMetadata" id="elementsMetadata">General metadata</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The first elements provide basic metadata about the virtual
|
|
||||||
network.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<network>
|
|
||||||
<name>default</name>
|
|
||||||
<uuid>3e3fce45-4f53-4fa7-bb32-11f34168b82b</uuid>
|
|
||||||
...</pre>
|
|
||||||
<dl><dt><code>name</code></dt><dd>The content of the <code>name</code> element provides
|
|
||||||
a short name for the virtual network. This name should
|
|
||||||
consist only of alpha-numeric characters and is required
|
|
||||||
to be unique within the scope of a single host. It is
|
|
||||||
used to form the filename for storing the persistent
|
|
||||||
configuration file. <span class="since">Since 0.3.0</span></dd><dt><code>uuid</code></dt><dd>The content of the <code>uuid</code> element provides
|
|
||||||
a globally unique identifier for the virtual network.
|
|
||||||
The format must be RFC 4122 compliant, eg <code>3e3fce45-4f53-4fa7-bb32-11f34168b82b</code>.
|
|
||||||
If omitted when defining/creating a new network, a random
|
|
||||||
UUID is generated. <span class="since">Since 0.3.0</span></dd></dl>
|
|
||||||
<h3>
|
|
||||||
<a name="elementsConnect" id="elementsConnect">Connectivity</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The next set of elements control how a virtual network is
|
|
||||||
provided connectivity to the physical LAN (if at all).
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<bridge name="virbr0" />
|
|
||||||
<forward mode="nat" dev="eth0"/>
|
|
||||||
...</pre>
|
|
||||||
<dl><dt><code>bridge</code></dt><dd>The <code>name</code> attribute on the <code>bridge</code> element
|
|
||||||
defines the name of a bridge device which will be used to construct
|
|
||||||
the virtual network. The virtual machines will be connected to this
|
|
||||||
bridge device allowing them to talk to each other. The bridge device
|
|
||||||
may also be connected to the LAN. It is recommended that bridge
|
|
||||||
device names started with the prefix <code>vir</code>, but the name
|
|
||||||
<code>virbr0</code> is reserved for the "default" virtual network.
|
|
||||||
This element should always be provided when defining a new network.
|
|
||||||
<span class="since">Since 0.3.0</span>
|
|
||||||
</dd><dt><code>forward</code></dt><dd>Inclusion of the <code>forward</code> element indicates that
|
|
||||||
the virtual network is to be connected to the physical LAN. If
|
|
||||||
no attributes are set, NAT forwarding will be used for connectivity.
|
|
||||||
Firewall rules will allow forwarding to any other network device whether
|
|
||||||
ethernet, wireless, dialup, or VPN. If the <code>dev</code> attribute
|
|
||||||
is set, the firewall rules will restrict forwarding to the named
|
|
||||||
device only. If the <code>mode</code> attribute is set to <code>route</code>
|
|
||||||
then the traffic will not have NAT applied. This presumes that the
|
|
||||||
local LAN router has suitable routing table entries to return traffic
|
|
||||||
to this host. <span class="since">Since 0.3.0; 'mode' attribute since
|
|
||||||
0.4.2</span></dd></dl>
|
|
||||||
<h3>
|
|
||||||
<a name="elementsAddress" id="elementsAddress">Addressing</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The final set of elements define the IPv4 address range available,
|
|
||||||
and optionally enable DHCP sevices.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
|
||||||
<dhcp>
|
|
||||||
<range start="192.168.122.100" end="192.168.122.254" />
|
|
||||||
<host mac="00:16:3e:77:e2:ed" name="foo.example.com" ip="192.168.122.10" />
|
|
||||||
<host mac="00:16:3e:3e:a9:1a" name="bar.example.com" ip="192.168.122.11" />
|
|
||||||
</dhcp>
|
|
||||||
</ip>
|
|
||||||
</network></pre>
|
|
||||||
<dl><dt><code>ip</code></dt><dd>The <code>address</code> attribute defines an IPv4 address in
|
|
||||||
dotted-decimal format, that will be configured on the bridge
|
|
||||||
device associated with the virtual network. To the guests this
|
|
||||||
address will be their default route. The <code>netmask</code>
|
|
||||||
attribute defines the significant bits of the network address,
|
|
||||||
again specified in dotted-decimal format. <span class="since">Since 0.3.0</span>
|
|
||||||
</dd><dt><code>dhcp</code></dt><dd>Immediately within the <code>ip</code> element there is an
|
|
||||||
optional <code>dhcp</code> element. The presence of this element
|
|
||||||
enables DHCP services on the virtual network. It will further
|
|
||||||
contain one or more <code>range</code> elements.
|
|
||||||
<span class="since">Since 0.3.0</span>
|
|
||||||
</dd><dt><code>range</code></dt><dd>The <code>start</code> and <code>end</code> attributes on the
|
|
||||||
<code>range</code> element specify the boundaries of a pool of
|
|
||||||
IPv4 addresses to be provided to DHCP clients. These two addresses
|
|
||||||
must lie within the scope of the network defined on the parent
|
|
||||||
<code>ip</code> element. <span class="since">Since 0.3.0</span>
|
|
||||||
</dd><dt><code>host</code></dt><dd>Within the <code>dhcp</code> element there may be zero or more
|
|
||||||
<code>host</code> elements; these specify hosts which will be given
|
|
||||||
names and predefined IP addresses by the built-in DHCP server. Any
|
|
||||||
such element must specify the MAC address of the host to be assigned
|
|
||||||
a given name (via the <code>mac</code> attribute), the IP to be
|
|
||||||
assigned to that host (via the <code>ip</code> attribute), and the
|
|
||||||
name to be given that host by the DHCP server (via the
|
|
||||||
<code>name</code> attribute). <span class="since">Since 0.4.5</span>
|
|
||||||
</dd></dl>
|
|
||||||
<h2>
|
|
||||||
<a name="examples" id="examples">Example configuration</a>
|
|
||||||
</h2>
|
|
||||||
<h3>
|
|
||||||
<a name="examplesNAT" id="examplesNAT">NAT based network</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
This example is the so called "default" virtual network. It is
|
|
||||||
provided and enabled out-of-the-box for all libvirt installations.
|
|
||||||
This is a configuration that allows guest OS to get outbound
|
|
||||||
connectivity regardless of whether the host uses ethernet, wireless,
|
|
||||||
dialup, or VPN networking without requiring any specific admin
|
|
||||||
configuration. In the absence of host networking, it at least allows
|
|
||||||
guests to talk directly to each other.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<network>
|
|
||||||
<name>default</name>
|
|
||||||
<bridge name="virbr0" />
|
|
||||||
<forward mode="nat"/>
|
|
||||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
|
||||||
<dhcp>
|
|
||||||
<range start="192.168.122.2" end="192.168.122.254" />
|
|
||||||
</dhcp>
|
|
||||||
</ip>
|
|
||||||
</network></pre>
|
|
||||||
<h3>
|
|
||||||
<a name="examplesRoute" id="examplesRoute">Routed network config</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
This is a variant on the default network which routes traffic
|
|
||||||
from the virtual network to the LAN without applying any NAT.
|
|
||||||
It requires that the IP address range be pre-configured in the
|
|
||||||
routing tables of the router on the host network. This example
|
|
||||||
further specifies that guest traffic may only go out via the
|
|
||||||
<code>eth1</code> host network device.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<network>
|
|
||||||
<name>local</name>
|
|
||||||
<bridge name="virbr1" />
|
|
||||||
<forward mode="route" dev="eth1"/>
|
|
||||||
<ip address="192.168.122.1" netmask="255.255.255.0">
|
|
||||||
<dhcp>
|
|
||||||
<range start="192.168.122.2" end="192.168.122.254" />
|
|
||||||
</dhcp>
|
|
||||||
</ip>
|
|
||||||
</network></pre>
|
|
||||||
<h3>
|
|
||||||
<a name="examplesPrivate" id="examplesPrivate">Isolated network config</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
This variant provides a completely isolated private network
|
|
||||||
for guests. The guests can talk to each other, and the host
|
|
||||||
OS, but cannot reach any other machines on the LAN, due to
|
|
||||||
the omission of the <code>forward</code> element in the XML
|
|
||||||
description.
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<network>
|
|
||||||
<name>private</name>
|
|
||||||
<bridge name="virbr2" />
|
|
||||||
<ip address="192.168.152.1" netmask="255.255.255.0">
|
|
||||||
<dhcp>
|
|
||||||
<range start="192.168.152.2" end="192.168.152.254" />
|
|
||||||
</dhcp>
|
|
||||||
</ip>
|
|
||||||
</network></pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,136 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from formatnode.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Node devices XML format</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="active" href="format.html">XML format</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The domain XML format" class="inactive" href="formatdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The virtual network XML format" class="inactive" href="formatnetwork.html">Networks</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The storage pool and volume XML format" class="inactive" href="formatstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Storage volume encryption XML format" class="inactive" href="formatstorageencryption.html">Storage Encryption</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The driver capabilities XML format" class="inactive" href="formatcaps.html">Capabilities</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Node Devices</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The secret XML format" class="inactive" href="formatsecret.html">Secrets</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Node devices XML format</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,187 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from formatsecret.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Secret XML format</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="active" href="format.html">XML format</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The domain XML format" class="inactive" href="formatdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The virtual network XML format" class="inactive" href="formatnetwork.html">Networks</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The storage pool and volume XML format" class="inactive" href="formatstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Storage volume encryption XML format" class="inactive" href="formatstorageencryption.html">Storage Encryption</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The driver capabilities XML format" class="inactive" href="formatcaps.html">Capabilities</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The host device XML format" class="inactive" href="formatnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Secrets</span>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Secret XML format</h1>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#SecretAttributes">Secret XML</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#example">Example</a>
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="SecretAttributes" id="SecretAttributes">Secret XML</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Secrets stored by libvirt may have attributes associated with them, using
|
|
||||||
the <code>secret</code> element. The <code>secret</code> element has two
|
|
||||||
optional attributes, each with values '<code>yes</code>' and
|
|
||||||
'<code>no</code>', and defaulting to '<code>no</code>':
|
|
||||||
</p>
|
|
||||||
<dl><dt><code>ephemeral</code></dt><dd>This secret must only be kept in memory, never stored persistently.
|
|
||||||
</dd><dt><code>private</code></dt><dd>The value of the secret must not be revealed to any caller of libvirt,
|
|
||||||
nor to any other node.
|
|
||||||
</dd></dl>
|
|
||||||
<p>
|
|
||||||
The top-level <code>secret</code> element may contain the following
|
|
||||||
elements:
|
|
||||||
</p>
|
|
||||||
<dl><dt><code>uuid</code></dt><dd>
|
|
||||||
An unique identifier for this secret (not necessarily in the UUID
|
|
||||||
format). If omitted when defining a new secret, a random UUID is
|
|
||||||
generated.
|
|
||||||
</dd><dt><code>description</code></dt><dd>A human-readable description of the purpose of the secret.
|
|
||||||
</dd><dt><code>usage</code></dt><dd>
|
|
||||||
Specifies what this secret is used for. A mandatory
|
|
||||||
<code>type</code> attribute specifies the usage category, currently
|
|
||||||
only <code>volume</code> is defined. Specific usage categories are
|
|
||||||
described below.
|
|
||||||
</dd></dl>
|
|
||||||
<h3>Usage type "volume"</h3>
|
|
||||||
<p>
|
|
||||||
This secret is associated with a volume, and it is safe to delete the
|
|
||||||
secret after the volume is deleted. The <code><usage
|
|
||||||
type='volume'></code> element must contain a
|
|
||||||
single <code>volume</code> element that specifies the key of the volume
|
|
||||||
this secret is associated with.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="example" id="example">Example</a>
|
|
||||||
</h2>
|
|
||||||
<pre>
|
|
||||||
<secret ephemeral='no' private='yes'>
|
|
||||||
<description>LUKS passphrase for the main hard drive of our mail server</description>
|
|
||||||
<usage type='volume'>
|
|
||||||
<volume>/var/lib/libvirt/images/mail.img</volume>
|
|
||||||
</usage>
|
|
||||||
</secret></pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,474 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from formatstorage.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Storage pool and volume XML format</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="active" href="format.html">XML format</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The domain XML format" class="inactive" href="formatdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The virtual network XML format" class="inactive" href="formatnetwork.html">Networks</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Storage</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Storage volume encryption XML format" class="inactive" href="formatstorageencryption.html">Storage Encryption</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The driver capabilities XML format" class="inactive" href="formatcaps.html">Capabilities</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The host device XML format" class="inactive" href="formatnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The secret XML format" class="inactive" href="formatsecret.html">Secrets</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Storage pool and volume XML format</h1>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#StoragePool">Storage pool XML</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#StoragePoolFirst">General metadata</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StoragePoolSource">Source elements</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StoragePoolTarget">Target elements</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StoragePoolExtents">Device extents</a>
|
|
||||||
</li></ul>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StorageVol">Storage volume XML</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#StorageVolFirst">General metadata</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StorageVolTarget">Target elements</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StorageVolBacking">Backing store elements</a>
|
|
||||||
</li></ul>
|
|
||||||
</li><li>
|
|
||||||
<a href="#examples">Example configuration</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#exampleFile">File based storage pool</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#exampleISCSI">iSCSI based storage pool</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#exampleVol">Storage volume</a>
|
|
||||||
</li></ul>
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="StoragePool" id="StoragePool">Storage pool XML</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Although all storage pool backends share the same public APIs and
|
|
||||||
XML format, they have varying levels of capabilities. Some may
|
|
||||||
allow creation of volumes, others may only allow use of pre-existing
|
|
||||||
volumes. Some may have constraints on volume size, or placement.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The is the top level tag for a storage pool document is 'pool'. It has
|
|
||||||
a single attribute <code>type</code>, which is one of <code>dir</code>,
|
|
||||||
<code>fs</code>,<code>netfs</code>,<code>disk</code>,<code>iscsi</code>,
|
|
||||||
<code>logical</code>. This corresponds to the storage backend drivers
|
|
||||||
listed further along in this document.
|
|
||||||
The storage pool XML format is available <span class="since">since 0.4.1</span>
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="StoragePoolFirst" id="StoragePoolFirst">General metadata</a>
|
|
||||||
</h3>
|
|
||||||
<pre>
|
|
||||||
<pool type="iscsi">
|
|
||||||
<name>virtimages</name>
|
|
||||||
<uuid>3e3fce45-4f53-4fa7-bb32-11f34168b82b</uuid>
|
|
||||||
<allocation>10000000</allocation>
|
|
||||||
<capacity>50000000</capacity>
|
|
||||||
<available>40000000</available>
|
|
||||||
...</pre>
|
|
||||||
<dl><dt><code>name</code></dt><dd>Providing a name for the pool which is unique to the host.
|
|
||||||
This is mandatory when defining a pool. <span class="since">Since 0.4.1</span></dd><dt><code>uuid</code></dt><dd>Providing an identifier for the pool which is globally unique.
|
|
||||||
This is optional when defining a pool, a UUID will be generated if
|
|
||||||
omitted. <span class="since">Since 0.4.1</span></dd><dt><code>allocation</code></dt><dd>Providing the total storage allocation for the pool. This may
|
|
||||||
be larger than the sum of the allocation of all volumes due to
|
|
||||||
metadata overhead. This value is in bytes. This is not applicable
|
|
||||||
when creating a pool. <span class="since">Since 0.4.1</span></dd><dt><code>capacity</code></dt><dd>Providing the total storage capacity for the pool. Due to
|
|
||||||
underlying device constraints it may not be possible to use the
|
|
||||||
full capacity for storage volumes. This value is in bytes. This
|
|
||||||
is not applicable when creating a pool. <span class="since">Since 0.4.1</span></dd><dt><code>available</code></dt><dd>Providing the free space available for allocating new volumes
|
|
||||||
in the pool. Due to underlying device constraints it may not be
|
|
||||||
possible to allocate the entire free space to a single volume.
|
|
||||||
This value is in bytes. This is not applicable when creating a
|
|
||||||
pool. <span class="since">Since 0.4.1</span></dd></dl>
|
|
||||||
<h3>
|
|
||||||
<a name="StoragePoolSource" id="StoragePoolSource">Source elements</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
A single <code>source</code> element is contained within the top level
|
|
||||||
<code>pool</code> element. This tag is used to describe the source of
|
|
||||||
the storage pool. It can contain the following child elements:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<source>
|
|
||||||
<host name="iscsi.example.com"/>
|
|
||||||
<device path="demo-target"/>
|
|
||||||
</source>
|
|
||||||
...</pre>
|
|
||||||
<dl><dt><code>device</code></dt><dd>Provides the source for pools backed by physical devices.
|
|
||||||
May be repeated multiple times depending on backend driver. Contains
|
|
||||||
a single attribute <code>path</code> which is the fully qualified
|
|
||||||
path to the block device node. <span class="since">Since 0.4.1</span></dd><dt><code>directory</code></dt><dd>Provides the source for pools backed by directories. May
|
|
||||||
only occur once. Contains a single attribute <code>path</code>
|
|
||||||
which is the fully qualified path to the block device node.
|
|
||||||
<span class="since">Since 0.4.1</span></dd><dt><code>host</code></dt><dd>Provides the source for pools backed by storage from a
|
|
||||||
remote server. Will be used in combination with a <code>directory</code>
|
|
||||||
or <code>device</code> element. Contains an attribute <code>name</code>
|
|
||||||
which is the hostname or IP address of the server. May optionally
|
|
||||||
contain a <code>port</code> attribute for the protocol specific
|
|
||||||
port number. <span class="since">Since 0.4.1</span></dd><dt><code>name</code></dt><dd>Provides the source for pools backed by storage from a
|
|
||||||
named element (e.g., a logical volume group name).
|
|
||||||
remote server. Contains a string identifier.
|
|
||||||
<span class="since">Since 0.4.5</span></dd><dt><code>format</code></dt><dd>Provides information about the format of the pool. This
|
|
||||||
contains a single attribute <code>type</code> whose value is
|
|
||||||
backend specific. This is typically used to indicate filesystem
|
|
||||||
type, or network filesystem type, or partition table type, or
|
|
||||||
LVM metadata type. All drivers are required to have a default
|
|
||||||
value for this, so it is optional. <span class="since">Since 0.4.1</span></dd></dl>
|
|
||||||
<h3>
|
|
||||||
<a name="StoragePoolTarget" id="StoragePoolTarget">Target elements</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
A single <code>target</code> element is contained within the top level
|
|
||||||
<code>pool</code> element. This tag is used to describe the mapping of
|
|
||||||
the storage pool into the host filesystem. It can contain the following
|
|
||||||
child elements:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<target>
|
|
||||||
<path>/dev/disk/by-path</path>
|
|
||||||
<permissions>
|
|
||||||
<owner>0744</owner>
|
|
||||||
<group>0744</group>
|
|
||||||
<mode>0744</mode>
|
|
||||||
<label>virt_image_t</label>
|
|
||||||
</permissions>
|
|
||||||
<encryption type='...'>
|
|
||||||
...
|
|
||||||
</encryption>
|
|
||||||
</target>
|
|
||||||
</pool></pre>
|
|
||||||
<dl><dt><code>path</code></dt><dd>Provides the location at which the pool will be mapped into
|
|
||||||
the local filesystem namespace. For a filesystem/directory based
|
|
||||||
pool it will be the name of the directory in which volumes will
|
|
||||||
be created. For device based pools it will be the name of the directory in which
|
|
||||||
devices nodes exist. For the latter <code>/dev/</code> may seem
|
|
||||||
like the logical choice, however, devices nodes there are not
|
|
||||||
guaranteed stable across reboots, since they are allocated on
|
|
||||||
demand. It is preferable to use a stable location such as one
|
|
||||||
of the <code>/dev/disk/by-{path,id,uuid,label</code> locations.
|
|
||||||
<span class="since">Since 0.4.1</span>
|
|
||||||
</dd><dt><code>permissions</code></dt><dd>Provides information about the default permissions to use
|
|
||||||
when creating volumes. This is currently only useful for directory
|
|
||||||
or filesystem based pools, where the volumes allocated are simple
|
|
||||||
files. For pools where the volumes are device nodes, the hotplug
|
|
||||||
scripts determine permissions. It contains 4 child elements. The
|
|
||||||
<code>mode</code> element contains the octal permission set. The
|
|
||||||
<code>owner</code> element contains the numeric user ID. The <code>group</code>
|
|
||||||
element contains the numeric group ID. The <code>label</code> element
|
|
||||||
contains the MAC (eg SELinux) label string.
|
|
||||||
<span class="since">Since 0.4.1</span>
|
|
||||||
</dd><dt><code>encryption</code></dt><dd>If present, specifies how the volume is encrypted. See
|
|
||||||
the <a href="formatstorageencryption.html">Storage Encryption</a> page
|
|
||||||
for more information.
|
|
||||||
</dd></dl>
|
|
||||||
<h3>
|
|
||||||
<a name="StoragePoolExtents" id="StoragePoolExtents">Device extents</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
If a storage pool exposes information about its underlying
|
|
||||||
placement / allocation scheme, the <code>device</code> element
|
|
||||||
within the <code>source</code> element may contain information
|
|
||||||
about its available extents. Some pools have a constraint that
|
|
||||||
a volume must be allocated entirely within a single constraint
|
|
||||||
(eg disk partition pools). Thus the extent information allows an
|
|
||||||
application to determine the maximum possible size for a new
|
|
||||||
volume
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
For storage pools supporting extent information, within each
|
|
||||||
<code>device</code> element there will be zero or more <code>freeExtent</code>
|
|
||||||
elements. Each of these elements contains two attributes, <code>start</code>
|
|
||||||
and <code>end</code> which provide the boundaries of the extent on the
|
|
||||||
device, measured in bytes. <span class="since">Since 0.4.1</span>
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="StorageVol" id="StorageVol">Storage volume XML</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
A storage volume will be either a file or a device node.
|
|
||||||
The storage volume XML format is available <span class="since">since 0.4.1</span>
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="StorageVolFirst" id="StorageVolFirst">General metadata</a>
|
|
||||||
</h3>
|
|
||||||
<pre>
|
|
||||||
<volume>
|
|
||||||
<name>sparse.img</name>
|
|
||||||
<key>/var/lib/xen/images/sparse.img</key>
|
|
||||||
<allocation>0</allocation>
|
|
||||||
<capacity unit="T">1</capacity>
|
|
||||||
...</pre>
|
|
||||||
<dl><dt><code>name</code></dt><dd>Providing a name for the volume which is unique to the pool.
|
|
||||||
This is mandatory when defining a volume. <span class="since">Since 0.4.1</span></dd><dt><code>key</code></dt><dd>Providing an identifier for the volume which is globally unique.
|
|
||||||
This is optional when defining a volume, a key will be generated if
|
|
||||||
omitted. <span class="since">Since 0.4.1</span></dd><dt><code>allocation</code></dt><dd>Providing the total storage allocation for the volume. This
|
|
||||||
may be smaller than the logical capacity if the volume is sparsely
|
|
||||||
allocated. It may also be larger than the logical capacity if the
|
|
||||||
volume has substantial metadata overhead. This value is in bytes.
|
|
||||||
If omitted when creating a volume, the volume will be fully
|
|
||||||
allocated at time of creation. If set to a value smaller than the
|
|
||||||
capacity, the pool has the <strong>option</strong> of deciding
|
|
||||||
to sparsely allocate a volume. It does not have to honour requests
|
|
||||||
for sparse allocation though. <span class="since">Since 0.4.1</span></dd><dt><code>capacity</code></dt><dd>Providing the logical capacity for the volume. This value is
|
|
||||||
in bytes. This is compulsory when creating a volume.
|
|
||||||
<span class="since">Since 0.4.1</span></dd><dt><code>source</code></dt><dd>Provides information about the underlying storage allocation
|
|
||||||
of the volume. This may not be available for some pool types.
|
|
||||||
<span class="since">Since 0.4.1</span></dd><dt><code>target</code></dt><dd>Provides information about the representation of the volume
|
|
||||||
on the local host. <span class="since">Since 0.4.1</span></dd></dl>
|
|
||||||
<h3>
|
|
||||||
<a name="StorageVolTarget" id="StorageVolTarget">Target elements</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
A single <code>target</code> element is contained within the top level
|
|
||||||
<code>volume</code> element. This tag is used to describe the mapping of
|
|
||||||
the storage volume into the host filesystem. It can contain the following
|
|
||||||
child elements:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<target>
|
|
||||||
<path>/var/lib/virt/images/sparse.img</path>
|
|
||||||
<format type='qcow2'/>
|
|
||||||
<permissions>
|
|
||||||
<owner>0744</owner>
|
|
||||||
<group>0744</group>
|
|
||||||
<mode>0744</mode>
|
|
||||||
<label>virt_image_t</label>
|
|
||||||
</permissions>
|
|
||||||
</target></pre>
|
|
||||||
<dl><dt><code>path</code></dt><dd>Provides the location at which the volume can be accessed on
|
|
||||||
the local filesystem, as an absolute path. This is a readonly
|
|
||||||
attribute, so shouldn't be specified when creating a volume.
|
|
||||||
<span class="since">Since 0.4.1</span></dd><dt><code>format</code></dt><dd>Provides information about the pool specific volume format.
|
|
||||||
For disk pools it will provide the partition type. For filesystem
|
|
||||||
or directory pools it will provide the file format type, eg cow,
|
|
||||||
qcow, vmdk, raw. If omitted when creating a volume, the pool's
|
|
||||||
default format will be used. The actual format is specified via
|
|
||||||
the <code>type</code> attribute. Consult the pool-specific docs for
|
|
||||||
the list of valid values. <span class="since">Since 0.4.1</span></dd><dt><code>permissions</code></dt><dd>Provides information about the default permissions to use
|
|
||||||
when creating volumes. This is currently only useful for directory
|
|
||||||
or filesystem based pools, where the volumes allocated are simple
|
|
||||||
files. For pools where the volumes are device nodes, the hotplug
|
|
||||||
scripts determine permissions. It contains 4 child elements. The
|
|
||||||
<code>mode</code> element contains the octal permission set. The
|
|
||||||
<code>owner</code> element contains the numeric user ID. The <code>group</code>
|
|
||||||
element contains the numeric group ID. The <code>label</code> element
|
|
||||||
contains the MAC (eg SELinux) label string.
|
|
||||||
<span class="since">Since 0.4.1</span>
|
|
||||||
</dd></dl>
|
|
||||||
<h3>
|
|
||||||
<a name="StorageVolBacking" id="StorageVolBacking">Backing store elements</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
A single <code>backingStore</code> element is contained within the top level
|
|
||||||
<code>volume</code> element. This tag is used to describe the optional copy
|
|
||||||
on write, backing store for the storage volume. It can contain the following
|
|
||||||
child elements:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<backingStore>
|
|
||||||
<path>/var/lib/virt/images/master.img</path>
|
|
||||||
<format>raw</format>
|
|
||||||
<permissions>
|
|
||||||
<owner>0744</owner>
|
|
||||||
<group>0744</group>
|
|
||||||
<mode>0744</mode>
|
|
||||||
<label>virt_image_t</label>
|
|
||||||
</permissions>
|
|
||||||
</backingStore>
|
|
||||||
</volume></pre>
|
|
||||||
<dl><dt><code>path</code></dt><dd>Provides the location at which the backing store can be accessed on
|
|
||||||
the local filesystem, as an absolute path. If omitted, there is no
|
|
||||||
backing store for this volume.
|
|
||||||
<span class="since">Since 0.6.0</span></dd><dt><code>format</code></dt><dd>Provides information about the pool specific backing store format.
|
|
||||||
For disk pools it will provide the partition type. For filesystem
|
|
||||||
or directory pools it will provide the file format type, eg cow,
|
|
||||||
qcow, vmdk, raw. Consult the pool-specific docs for the list of valid
|
|
||||||
values. Most file formats require a backing store of the same format,
|
|
||||||
however, the qcow2 format allows a different backing store format.
|
|
||||||
<span class="since">Since 0.6.0</span></dd><dt><code>permissions</code></dt><dd>Provides information about the permissions of the backing file.
|
|
||||||
It contains 4 child elements. The
|
|
||||||
<code>mode</code> element contains the octal permission set. The
|
|
||||||
<code>owner</code> element contains the numeric user ID. The <code>group</code>
|
|
||||||
element contains the numeric group ID. The <code>label</code> element
|
|
||||||
contains the MAC (eg SELinux) label string.
|
|
||||||
<span class="since">Since 0.6.0</span>
|
|
||||||
</dd></dl>
|
|
||||||
<h2>
|
|
||||||
<a name="examples" id="examples">Example configuration</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Here are a couple of examples, for a more complete set demonstrating
|
|
||||||
every type of storage pool, consult the <a href="storage.html">storage driver page</a>
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="exampleFile" id="exampleFile">File based storage pool</a>
|
|
||||||
</h3>
|
|
||||||
<pre>
|
|
||||||
<pool type="dir">
|
|
||||||
<name>virtimages</name>
|
|
||||||
<target>
|
|
||||||
<path>/var/lib/virt/images</path>
|
|
||||||
</target>
|
|
||||||
</pool></pre>
|
|
||||||
<h3>
|
|
||||||
<a name="exampleISCSI" id="exampleISCSI">iSCSI based storage pool</a>
|
|
||||||
</h3>
|
|
||||||
<pre>
|
|
||||||
<pool type="iscsi">
|
|
||||||
<name>virtimages</name>
|
|
||||||
<source>
|
|
||||||
<host name="iscsi.example.com"/>
|
|
||||||
<device path="demo-target"/>
|
|
||||||
</source>
|
|
||||||
<target>
|
|
||||||
<path>/dev/disk/by-path</path>
|
|
||||||
</target>
|
|
||||||
</pool></pre>
|
|
||||||
<h3>
|
|
||||||
<a name="exampleVol" id="exampleVol">Storage volume</a>
|
|
||||||
</h3>
|
|
||||||
<pre>
|
|
||||||
<volume>
|
|
||||||
<name>sparse.img</name>
|
|
||||||
<allocation>0</allocation>
|
|
||||||
<capacity unit="T">1</capacity>
|
|
||||||
<target>
|
|
||||||
<path>/var/lib/virt/images/sparse.img</path>
|
|
||||||
<permissions>
|
|
||||||
<owner>0744</owner>
|
|
||||||
<group>0744</group>
|
|
||||||
<mode>0744</mode>
|
|
||||||
<label>virt_image_t</label>
|
|
||||||
</permissions>
|
|
||||||
</target>
|
|
||||||
</volume></pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,209 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from formatstorageencryption.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Storage volume encryption XML format</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="active" href="format.html">XML format</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The domain XML format" class="inactive" href="formatdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The virtual network XML format" class="inactive" href="formatnetwork.html">Networks</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The storage pool and volume XML format" class="inactive" href="formatstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Storage Encryption</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The driver capabilities XML format" class="inactive" href="formatcaps.html">Capabilities</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The host device XML format" class="inactive" href="formatnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The secret XML format" class="inactive" href="formatsecret.html">Secrets</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Storage volume encryption XML format</h1>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#StorageEncryption">Storage volume encryption XML</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#StorageEncryptionDefault">"default" format</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StorageEncryptionQcow">"qcow" format</a>
|
|
||||||
</li></ul>
|
|
||||||
</li><li>
|
|
||||||
<a href="#example">Example</a>
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="StorageEncryption" id="StorageEncryption">Storage volume encryption XML</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Storage volumes may be encrypted, the XML snippet described below is used
|
|
||||||
to represent the details of the encryption. It can be used as a part
|
|
||||||
of a domain or storage configuration.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The top-level tag of volume encryption specification
|
|
||||||
is <code>encryption</code>, with a mandatory
|
|
||||||
attribute <code>format</code>. Currently defined values
|
|
||||||
of <code>format</code> are <code>default</code> and <code>qcow</code>.
|
|
||||||
Each value of <code>format</code> implies some expectations about the
|
|
||||||
content of the <code>encryption</code> tag. Other format values may be
|
|
||||||
defined in the future.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The <code>encryption</code> tag can currently contain a sequence of
|
|
||||||
<code>secret</code> tags, each with mandatory attributes <code>type</code>
|
|
||||||
and <code>uuid</code>. The only currently defined value of
|
|
||||||
<code>type</code> is <code>passphrase</code>. <code>uuid</code>
|
|
||||||
refers to a secret known to libvirt. libvirt can use a secret value
|
|
||||||
previously set using <code>virSecretSetValue()</code>, or, if supported
|
|
||||||
by the particular volume format and driver, automatically generate a
|
|
||||||
secret value at the time of volume creation, and store it using the
|
|
||||||
specified <code>uuid</code>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="StorageEncryptionDefault" id="StorageEncryptionDefault">"default" format</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
<code><encryption type="default"/></code> can be specified only
|
|
||||||
when creating a volume. If the volume is successfully created, the
|
|
||||||
encryption formats, parameters and secrets will be auto-generated by
|
|
||||||
libvirt and the attached <code>encryption</code> tag will be updated.
|
|
||||||
The unmodified contents of the <code>encryption</code> tag can be used
|
|
||||||
in later operations with the volume, or when setting up a domain that
|
|
||||||
uses the volume.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="StorageEncryptionQcow" id="StorageEncryptionQcow">"qcow" format</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The <code>qcow</code> format specifies that the built-in encryption
|
|
||||||
support in <code>qcow</code>- or <code>qcow2</code>-formatted volume
|
|
||||||
images should be used. A single
|
|
||||||
<code><secret type='passphrase'></code> element is expected. If
|
|
||||||
the <code>secret</code> element is not present during volume creation,
|
|
||||||
a secret is automatically generated and attached to the volume.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="example" id="example">Example</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Here is a simple example, specifying use of the <code>qcow</code> format:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
<encryption format='qcow'>
|
|
||||||
<secret type='passphrase' uuid='c1f11a6d-8c5d-4a3e-ac7a-4e171c5e0d4a' />
|
|
||||||
</encryption></pre>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
165
docs/goals.html
165
docs/goals.html
|
@ -1,165 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from goals.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Terminology and goals</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="active" href="intro.html">Architecture</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Goals</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Providing isolated networks and NAT based network connectivity" class="inactive" href="archnetwork.html">Network</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing storage pools and volumes" class="inactive" href="archstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enumerating host node devices" class="inactive" href="archnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Terminology and goals</h1>
|
|
||||||
<p>To avoid ambiguity about the terms used, 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
|
|
||||||
(or subsystem in the case of container virtualization) running on a
|
|
||||||
virtualized machine provided by the hypervisor</li></ul>
|
|
||||||
<p class="image">
|
|
||||||
<img alt="Hypervisor and domains running on a node" src="node.gif" /></p>
|
|
||||||
<p>Now we can define the goal of libvirt: to provide a common generic
|
|
||||||
and stable layer to securely manage domains on a node. The node may be
|
|
||||||
distant and libvirt should provide all APIs needed to provision, create,
|
|
||||||
modify, monitor, control, migrate and stop the domains, within the limits
|
|
||||||
of the support of the hypervisor for those operations. Multiple mode may
|
|
||||||
be accessed with libvirt simultaneously but the APIs are limited to
|
|
||||||
single node operations.</p>
|
|
||||||
<p>This implies the following sub-goals:</p>
|
|
||||||
<ul><li>the API should not be targeted to a single virtualization environment
|
|
||||||
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 high level virtualization policies or
|
|
||||||
multi-nodes management features like load balancing, but the API should be
|
|
||||||
sufficient so they can 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><li>the node being managed may be on a different physical machine than
|
|
||||||
the management program using libvirt, to this effect libvirt supports
|
|
||||||
remote access, but should only do so by using secure protocols.</li><li>libvirt will provide APIs to enumerate, monitor and use the resources
|
|
||||||
available on the managed node, including CPUs, memory, storage, networking,
|
|
||||||
and NUMA partitions.</li></ul>
|
|
||||||
<p>So libvirt is intended to 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 involves more than one node).</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,489 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from hacking.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Contributor guidelines</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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="active" href="internals.html">Internals</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Contributor guidelines</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Adding new public libvirt APIs" class="inactive" href="api_extension.html">API extensions</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="FAQ.html">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>Contributor guidelines</h1>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#patches">General tips for contributing patches</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#indent">Code indentation</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#formatting">Code formatting (especially for new code)</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#">C types</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#memalloc">Low level memory management</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#string">String comparisons</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#strbuf">Variable length string buffer</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#includes">Include files</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#printf">Printf-style functions</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#committers">Libvirt commiters guidelines</a>
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="patches" id="patches">General tips for contributing patches</a>
|
|
||||||
</h2>
|
|
||||||
<ol><li>Discuss any large changes on the mailing list first. Post patches
|
|
||||||
early and listen to feedback.</li><li><p>Post patches in unified diff format. A command similar to this
|
|
||||||
should work:</p>
|
|
||||||
<pre>
|
|
||||||
diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
or:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
cvs diff -up > libvirt-myfeature.patch
|
|
||||||
</pre></li><li>Split large changes into a series of smaller patches, self-contained
|
|
||||||
if possible, with an explanation of each patch and an explanation of how
|
|
||||||
the sequence of patches fits together.</li><li>Make sure your patches apply against libvirt CVS. Developers
|
|
||||||
only follow CVS and don't care much about released versions.</li><li><p>Run the automated tests on your code before submitting any changes.
|
|
||||||
In particular, configure with compile warnings set to -Werror:</p>
|
|
||||||
<pre>
|
|
||||||
./configure --enable-compile-warnings=error
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
and run the tests:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
make check
|
|
||||||
make syntax-check
|
|
||||||
make -C tests valgrind
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
The latter test checks for memory leaks.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</li><li>Update tests and/or documentation, particularly if you are adding
|
|
||||||
a new feature or changing the output of a program.</li></ol>
|
|
||||||
<p>
|
|
||||||
There is more on this subject, including lots of links to background
|
|
||||||
reading on the subject, on
|
|
||||||
<a href="http://et.redhat.com/~rjones/how-to-supply-code-to-open-source-projects/">
|
|
||||||
Richard Jones' guide to working with open source projects</a>
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="indent" id="indent">Code indentation</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Libvirt's C source code generally adheres to some basic code-formatting
|
|
||||||
conventions. The existing code base is not totally consistent on this
|
|
||||||
front, but we do prefer that contributed code be formatted similarly.
|
|
||||||
In short, use spaces-not-TABs for indentation, use 4 spaces for each
|
|
||||||
indentation level, and other than that, follow the K&R style.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
If you use Emacs, add the following to one of one of your start-up files
|
|
||||||
(e.g., ~/.emacs), to help ensure that you get indentation right:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
;;; When editing C sources in libvirt, use this style.
|
|
||||||
(defun libvirt-c-mode ()
|
|
||||||
"C mode with adjusted defaults for use with libvirt."
|
|
||||||
(interactive)
|
|
||||||
(c-set-style "K&R")
|
|
||||||
(setq indent-tabs-mode nil) ; indent using spaces, not TABs
|
|
||||||
(setq c-indent-level 4)
|
|
||||||
(setq c-basic-offset 4))
|
|
||||||
(add-hook 'c-mode-hook
|
|
||||||
'(lambda () (if (string-match "/libvirt" (buffer-file-name))
|
|
||||||
(libvirt-c-mode))))
|
|
||||||
</pre>
|
|
||||||
<h2>
|
|
||||||
<a name="formatting" id="formatting">Code formatting (especially for new code)</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
With new code, we can be even more strict.
|
|
||||||
Please apply the following function (using GNU indent) to any new code.
|
|
||||||
Note that this also gives you an idea of the type of spacing we prefer
|
|
||||||
around operators and keywords:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
indent-libvirt()
|
|
||||||
{
|
|
||||||
indent -bad -bap -bbb -bli4 -br -ce -brs -cs -i4 -l75 -lc75 \
|
|
||||||
-sbi4 -psl -saf -sai -saw -sbi4 -ss -sc -cdw -cli4 -npcs -nbc \
|
|
||||||
--no-tabs "$@"
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Note that sometimes you'll have to postprocess that output further, by
|
|
||||||
piping it through "expand -i", since some leading TABs can get through.
|
|
||||||
Usually they're in macro definitions or strings, and should be converted
|
|
||||||
anyhow.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a href="types">C types</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Use the right type.
|
|
||||||
</p>
|
|
||||||
<h3>Scalars</h3>
|
|
||||||
<ul><li>If you're using "int" or "long", odds are good that there's a better type.</li><li>If a variable is counting something, be sure to declare it with an
|
|
||||||
unsigned type.</li><li>If it's memory-size-related, use size_t (use ssize_t only if required).</li><li>If it's file-size related, use uintmax_t, or maybe off_t.</li><li>If it's file-offset related (i.e., signed), use off_t.</li><li>If it's just counting small numbers use "unsigned int";
|
|
||||||
(on all but oddball embedded systems, you can assume that that
|
|
||||||
type is at least four bytes wide).</li><li>If a variable has boolean semantics, give it the "bool" type
|
|
||||||
and use the corresponding "true" and "false" macros. It's ok
|
|
||||||
to include <stdbool.h>, since libvirt's use of gnulib ensures
|
|
||||||
that it exists and is usable.</li><li>In the unusual event that you require a specific width, use a
|
|
||||||
standard type like int32_t, uint32_t, uint64_t, etc.</li><li>While using "bool" is good for readability, it comes with minor caveats:
|
|
||||||
<ul><li>Don't use "bool" in places where the type size must be constant across
|
|
||||||
all systems, like public interfaces and on-the-wire protocols. Note
|
|
||||||
that it would be possible (albeit wasteful) to use "bool" in libvirt's
|
|
||||||
logical wire protocol, since XDR maps that to its lower-level bool_t
|
|
||||||
type, which *is* fixed-size.</li><li>Don't compare a bool variable against the literal, "true",
|
|
||||||
since a value with a logical non-false value need not be "1".
|
|
||||||
I.e., don't write "if (seen == true) ...". Rather, write "if (seen)...".</li></ul></li></ul>
|
|
||||||
<p>
|
|
||||||
Of course, take all of the above with a grain of salt. If you're about
|
|
||||||
to use some system interface that requires a type like size_t, pid_t or
|
|
||||||
off_t, use matching types for any corresponding variables.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Also, if you try to use e.g., "unsigned int" as a type, and that
|
|
||||||
conflicts with the signedness of a related variable, sometimes
|
|
||||||
it's best just to use the *wrong* type, if "pulling the thread"
|
|
||||||
and fixing all related variables would be too invasive.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Finally, while using descriptive types is important, be careful not to
|
|
||||||
go overboard. If whatever you're doing causes warnings, or requires
|
|
||||||
casts, then reconsider or ask for help.
|
|
||||||
</p>
|
|
||||||
<h3>Pointers</h3>
|
|
||||||
<p>
|
|
||||||
Ensure that all of your pointers are "const-correct".
|
|
||||||
Unless a pointer is used to modify the pointed-to storage,
|
|
||||||
give it the "const" attribute. That way, the reader knows
|
|
||||||
up-front that this is a read-only pointer. Perhaps more
|
|
||||||
importantly, if we're diligent about this, when you see a non-const
|
|
||||||
pointer, you're guaranteed that it is used to modify the storage
|
|
||||||
it points to, or it is aliased to another pointer that is.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="memalloc" id="memalloc">Low level memory management</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Use of the malloc/free/realloc/calloc APIs is deprecated in the libvirt
|
|
||||||
codebase, because they encourage a number of serious coding bugs and do
|
|
||||||
not enable compile time verification of checks for NULL. Instead of these
|
|
||||||
routines, use the macros from memory.h
|
|
||||||
</p>
|
|
||||||
<ul><li><p>eg to allocate a single object:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
virDomainPtr domain;
|
|
||||||
|
|
||||||
if (VIR_ALLOC(domain) < 0) {
|
|
||||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
</pre></li><li><p>eg to allocate an array of objects</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
virDomainPtr domains;
|
|
||||||
int ndomains = 10;
|
|
||||||
|
|
||||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
|
||||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
</pre></li><li><p>eg to allocate an array of object pointers</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
virDomainPtr *domains;
|
|
||||||
int ndomains = 10;
|
|
||||||
|
|
||||||
if (VIR_ALLOC_N(domains, ndomains) < 0) {
|
|
||||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
</pre></li><li><p>eg to re-allocate the array of domains to be longer</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
ndomains = 20
|
|
||||||
|
|
||||||
if (VIR_REALLOC_N(domains, ndomains) < 0) {
|
|
||||||
__virRaiseError(VIR_ERROR_NO_MEMORY)
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
</pre></li><li><p>eg to free the domain</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
VIR_FREE(domain);
|
|
||||||
</pre></li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="string" id="string">String comparisons</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Do not use the strcmp, strncmp, etc functions directly. Instead use
|
|
||||||
one of the following semantically named macros
|
|
||||||
</p>
|
|
||||||
<ul><li><p>For strict equality:</p>
|
|
||||||
<pre>
|
|
||||||
STREQ(a,b)
|
|
||||||
STRNEQ(a,b)
|
|
||||||
</pre>
|
|
||||||
</li><li><p>For case sensitive equality:</p>
|
|
||||||
<pre>
|
|
||||||
STRCASEEQ(a,b)
|
|
||||||
STRCASENEQ(a,b)
|
|
||||||
</pre>
|
|
||||||
</li><li><p>For strict equality of a substring:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
STREQLEN(a,b,n)
|
|
||||||
STRNEQLEN(a,b,n)
|
|
||||||
</pre>
|
|
||||||
</li><li><p>For case sensitive equality of a substring:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
STRCASEEQLEN(a,b,n)
|
|
||||||
STRCASENEQLEN(a,b,n)
|
|
||||||
</pre>
|
|
||||||
</li><li><p>For strict equality of a prefix:</p>
|
|
||||||
|
|
||||||
<pre>
|
|
||||||
STRPREFIX(a,b)
|
|
||||||
</pre>
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="strbuf" id="strbuf">Variable length string buffer</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
If there is a need for complex string concatenations, avoid using
|
|
||||||
the usual sequence of malloc/strcpy/strcat/snprintf functions and
|
|
||||||
make use of the virBuffer API described in buf.h
|
|
||||||
</p>
|
|
||||||
<p>eg typical usage is as follows:</p>
|
|
||||||
<pre>
|
|
||||||
char *
|
|
||||||
somefunction(...) {
|
|
||||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
virBufferAddLit(&buf, "<domain>\n");
|
|
||||||
virBufferVSprint(&buf, " <memory>%d</memory>\n", memory);
|
|
||||||
...
|
|
||||||
virBufferAddLit(&buf, "</domain>\n");
|
|
||||||
|
|
||||||
....
|
|
||||||
|
|
||||||
if (virBufferError(&buf)) {
|
|
||||||
__virRaiseError(...);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return virBufferContentAndReset(&buf);
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
<h2>
|
|
||||||
<a name="includes" id="includes">Include files</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
There are now quite a large number of include files, both libvirt
|
|
||||||
internal and external, and system includes. To manage all this
|
|
||||||
complexity it's best to stick to the following general plan for all
|
|
||||||
*.c source files:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
/*
|
|
||||||
* Copyright notice
|
|
||||||
* ....
|
|
||||||
* ....
|
|
||||||
* ....
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <config.h> Must come first in every file.
|
|
||||||
|
|
||||||
#include <stdio.h> Any system includes you need.
|
|
||||||
#include <string.h>
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
#if HAVE_NUMACTL Some system includes aren't supported
|
|
||||||
#include <numa.h> everywhere so need these #if defences.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "internal.h" Include this first, after system includes.
|
|
||||||
|
|
||||||
#include "util.h" Any libvirt internal header files.
|
|
||||||
#include "buf.h"
|
|
||||||
|
|
||||||
static myInternalFunc () The actual code.
|
|
||||||
{
|
|
||||||
...
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Of particular note: *DO NOT* include libvirt/libvirt.h or
|
|
||||||
libvirt/virterror.h. It is included by "internal.h" already and there
|
|
||||||
are some special reasons why you cannot include these files
|
|
||||||
explicitly.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="printf" id="printf">Printf-style functions</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
Whenever you add a new printf-style function, i.e., one with a format
|
|
||||||
string argument and following "..." in its prototype, be sure to use
|
|
||||||
gcc's printf attribute directive in the prototype. For example, here's
|
|
||||||
the one for virAsprintf, in util.h:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
int virAsprintf(char **strp, const char *fmt, ...)
|
|
||||||
ATTRIBUTE_FORMAT(printf, 2, 3);
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
This makes it so gcc's -Wformat and -Wformat-security options can do
|
|
||||||
their jobs and cross-check format strings with the number and types
|
|
||||||
of arguments.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="committers" id="committers">Libvirt commiters guidelines</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
The AUTHORS files indicates the list of people with commit acces right
|
|
||||||
who can actually merge the patches.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The general rule for commiting patches is to make sure it has been reviewed
|
|
||||||
properly in the mailing-list first, usually if a couple of persons gave an
|
|
||||||
ACK or +1 to a patch and nobody raised an objection on the list it should
|
|
||||||
be good to go. If the patch touches a part of the code where you're not the
|
|
||||||
main maintainer or not have a very clear idea of how things work, it's better
|
|
||||||
to wait for a more authoritative feedback though. Before commiting please
|
|
||||||
also rebuild locally and run 'make check syntax-check' and make sure they
|
|
||||||
don't raise error. Try to look for warnings too for example configure with
|
|
||||||
--enable-compile-warnings=error
|
|
||||||
which adds -Werror to compile flags, so no warnings get missed
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Exceptions to that 'review and approval on the list first' is fixing failures
|
|
||||||
to build:
|
|
||||||
</p>
|
|
||||||
<ul><li>if a recently commited patch breaks compilation on a platform
|
|
||||||
or for a given driver then it's fine to commit a minimal fix
|
|
||||||
directly without getting the review feedback first</li><li>if make check or make syntax-chek breaks, if there is
|
|
||||||
an obvious fix, it's fine to commit immediately.
|
|
||||||
The patch should still be sent to the list (or tell what the fix was if
|
|
||||||
trivial) and 'make check syntax-check' should pass too before commiting
|
|
||||||
anything</li><li>
|
|
||||||
fixes for documentation and code comments can be managed
|
|
||||||
in the same way, but still make sure they get reviewed if non-trivial.
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -0,0 +1 @@
|
||||||
|
*.html
|
|
@ -1,7 +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"><!--
|
|
||||||
This file is autogenerated from html/index.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
--><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><link rel="stylesheet" type="text/css" href="../main.css" /><link rel="SHORTCUT ICON" href="../32favicon.png" /><title>libvirt: Reference Manual for 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><span class="active">API reference</span><ul class="l2"><li><div><a title="core interfaces for the libvirt library" class="inactive" href="../html/libvirt-libvirt.html">libvirt</a></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></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="../FAQ.html">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>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 id="footer"><p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="../et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p></div></body></html>
|
|
|
@ -1,606 +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"><!--
|
|
||||||
This file is autogenerated from html/libvirt-libvirt.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
--><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><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></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="../FAQ.html">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>
|
|
||||||
#define <a href="#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a>
|
|
||||||
#define <a href="#VIR_CPU_MAPLEN">VIR_CPU_MAPLEN</a>
|
|
||||||
#define <a href="#VIR_CPU_USABLE">VIR_CPU_USABLE</a>
|
|
||||||
#define <a href="#VIR_DOMAIN_SCHED_FIELD_LENGTH">VIR_DOMAIN_SCHED_FIELD_LENGTH</a>
|
|
||||||
#define <a href="#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a>
|
|
||||||
#define <a href="#VIR_NODEINFO_MAXCPUS">VIR_NODEINFO_MAXCPUS</a>
|
|
||||||
#define <a href="#VIR_SECURITY_DOI_BUFLEN">VIR_SECURITY_DOI_BUFLEN</a>
|
|
||||||
#define <a href="#VIR_SECURITY_LABEL_BUFLEN">VIR_SECURITY_LABEL_BUFLEN</a>
|
|
||||||
#define <a href="#VIR_SECURITY_MODEL_BUFLEN">VIR_SECURITY_MODEL_BUFLEN</a>
|
|
||||||
#define <a href="#VIR_UNUSE_CPU">VIR_UNUSE_CPU</a>
|
|
||||||
#define <a href="#VIR_USE_CPU">VIR_USE_CPU</a>
|
|
||||||
#define <a href="#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a>
|
|
||||||
#define <a href="#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a>
|
|
||||||
</pre><h3><a href="#types">Types</a></h3><pre>typedef struct _virConnect <a href="#virConnect">virConnect</a>
|
|
||||||
typedef struct _virConnectAuth <a href="#virConnectAuth">virConnectAuth</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virConnectAuth">virConnectAuth</a> * <a name="virConnectAuthPtr" id="virConnectAuthPtr">virConnectAuthPtr</a>
|
|
||||||
typedef struct _virConnectCredential <a href="#virConnectCredential">virConnectCredential</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virConnectCredential">virConnectCredential</a> * <a name="virConnectCredentialPtr" id="virConnectCredentialPtr">virConnectCredentialPtr</a>
|
|
||||||
typedef enum <a href="#virConnectCredentialType">virConnectCredentialType</a>
|
|
||||||
typedef enum <a href="#virConnectFlags">virConnectFlags</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virConnect">virConnect</a> * <a name="virConnectPtr" id="virConnectPtr">virConnectPtr</a>
|
|
||||||
typedef struct _virDomain <a href="#virDomain">virDomain</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virDomainBlockStatsStruct">virDomainBlockStatsStruct</a> * <a name="virDomainBlockStatsPtr" id="virDomainBlockStatsPtr">virDomainBlockStatsPtr</a>
|
|
||||||
typedef struct _virDomainBlockStats <a href="#virDomainBlockStatsStruct">virDomainBlockStatsStruct</a>
|
|
||||||
typedef enum <a href="#virDomainCreateFlags">virDomainCreateFlags</a>
|
|
||||||
typedef enum <a href="#virDomainEventDefinedDetailType">virDomainEventDefinedDetailType</a>
|
|
||||||
typedef enum <a href="#virDomainEventResumedDetailType">virDomainEventResumedDetailType</a>
|
|
||||||
typedef enum <a href="#virDomainEventStartedDetailType">virDomainEventStartedDetailType</a>
|
|
||||||
typedef enum <a href="#virDomainEventStoppedDetailType">virDomainEventStoppedDetailType</a>
|
|
||||||
typedef enum <a href="#virDomainEventSuspendedDetailType">virDomainEventSuspendedDetailType</a>
|
|
||||||
typedef enum <a href="#virDomainEventType">virDomainEventType</a>
|
|
||||||
typedef enum <a href="#virDomainEventUndefinedDetailType">virDomainEventUndefinedDetailType</a>
|
|
||||||
typedef struct _virDomainInfo <a href="#virDomainInfo">virDomainInfo</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virDomainInfo">virDomainInfo</a> * <a name="virDomainInfoPtr" id="virDomainInfoPtr">virDomainInfoPtr</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virDomainInterfaceStatsStruct">virDomainInterfaceStatsStruct</a> * <a name="virDomainInterfaceStatsPtr" id="virDomainInterfaceStatsPtr">virDomainInterfaceStatsPtr</a>
|
|
||||||
typedef struct _virDomainInterfaceStats <a href="#virDomainInterfaceStatsStruct">virDomainInterfaceStatsStruct</a>
|
|
||||||
typedef enum <a href="#virDomainMemoryFlags">virDomainMemoryFlags</a>
|
|
||||||
typedef enum <a href="#virDomainMigrateFlags">virDomainMigrateFlags</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virDomain">virDomain</a> * <a name="virDomainPtr" id="virDomainPtr">virDomainPtr</a>
|
|
||||||
typedef enum <a href="#virDomainState">virDomainState</a>
|
|
||||||
typedef enum <a href="#virDomainXMLFlags">virDomainXMLFlags</a>
|
|
||||||
typedef enum <a href="#virEventHandleType">virEventHandleType</a>
|
|
||||||
typedef struct _virInterface <a href="#virInterface">virInterface</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virInterface">virInterface</a> * <a name="virInterfacePtr" id="virInterfacePtr">virInterfacePtr</a>
|
|
||||||
typedef struct _virNetwork <a href="#virNetwork">virNetwork</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virNetwork">virNetwork</a> * <a name="virNetworkPtr" id="virNetworkPtr">virNetworkPtr</a>
|
|
||||||
typedef struct _virNodeDevice <a href="#virNodeDevice">virNodeDevice</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virNodeDevice">virNodeDevice</a> * <a name="virNodeDevicePtr" id="virNodeDevicePtr">virNodeDevicePtr</a>
|
|
||||||
typedef struct _virNodeInfo <a href="#virNodeInfo">virNodeInfo</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> * <a name="virNodeInfoPtr" id="virNodeInfoPtr">virNodeInfoPtr</a>
|
|
||||||
typedef struct _virSchedParameter <a href="#virSchedParameter">virSchedParameter</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virSchedParameter">virSchedParameter</a> * <a name="virSchedParameterPtr" id="virSchedParameterPtr">virSchedParameterPtr</a>
|
|
||||||
typedef enum <a href="#virSchedParameterType">virSchedParameterType</a>
|
|
||||||
typedef struct _virSecret <a href="#virSecret">virSecret</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virSecret">virSecret</a> * <a name="virSecretPtr" id="virSecretPtr">virSecretPtr</a>
|
|
||||||
typedef enum <a href="#virSecretUsageType">virSecretUsageType</a>
|
|
||||||
typedef struct _virSecurityLabel <a href="#virSecurityLabel">virSecurityLabel</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virSecurityLabel">virSecurityLabel</a> * <a name="virSecurityLabelPtr" id="virSecurityLabelPtr">virSecurityLabelPtr</a>
|
|
||||||
typedef struct _virSecurityModel <a href="#virSecurityModel">virSecurityModel</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> * <a name="virSecurityModelPtr" id="virSecurityModelPtr">virSecurityModelPtr</a>
|
|
||||||
typedef struct _virStoragePool <a href="#virStoragePool">virStoragePool</a>
|
|
||||||
typedef enum <a href="#virStoragePoolBuildFlags">virStoragePoolBuildFlags</a>
|
|
||||||
typedef enum <a href="#virStoragePoolDeleteFlags">virStoragePoolDeleteFlags</a>
|
|
||||||
typedef struct _virStoragePoolInfo <a href="#virStoragePoolInfo">virStoragePoolInfo</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virStoragePoolInfo">virStoragePoolInfo</a> * <a name="virStoragePoolInfoPtr" id="virStoragePoolInfoPtr">virStoragePoolInfoPtr</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virStoragePool">virStoragePool</a> * <a name="virStoragePoolPtr" id="virStoragePoolPtr">virStoragePoolPtr</a>
|
|
||||||
typedef enum <a href="#virStoragePoolState">virStoragePoolState</a>
|
|
||||||
typedef struct _virStorageVol <a href="#virStorageVol">virStorageVol</a>
|
|
||||||
typedef enum <a href="#virStorageVolDeleteFlags">virStorageVolDeleteFlags</a>
|
|
||||||
typedef struct _virStorageVolInfo <a href="#virStorageVolInfo">virStorageVolInfo</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virStorageVolInfo">virStorageVolInfo</a> * <a name="virStorageVolInfoPtr" id="virStorageVolInfoPtr">virStorageVolInfoPtr</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virStorageVol">virStorageVol</a> * <a name="virStorageVolPtr" id="virStorageVolPtr">virStorageVolPtr</a>
|
|
||||||
typedef enum <a href="#virStorageVolType">virStorageVolType</a>
|
|
||||||
typedef struct _virVcpuInfo <a href="#virVcpuInfo">virVcpuInfo</a>
|
|
||||||
typedef <a href="libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a> * <a name="virVcpuInfoPtr" id="virVcpuInfoPtr">virVcpuInfoPtr</a>
|
|
||||||
typedef enum <a href="#virVcpuState">virVcpuState</a>
|
|
||||||
</pre><h3><a href="#functions">Functions</a></h3><pre>typedef <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)
|
|
||||||
|
|
||||||
int <a href="#virConnectClose">virConnectClose</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
typedef <a href="#virConnectDomainEventCallback">virConnectDomainEventCallback</a>
|
|
||||||
int <a href="#virConnectDomainEventCallback">virConnectDomainEventCallback</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> int event, <br /> int detail, <br /> void * opaque)
|
|
||||||
|
|
||||||
int <a href="#virConnectDomainEventDeregister">virConnectDomainEventDeregister</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb)
|
|
||||||
int <a href="#virConnectDomainEventRegister">virConnectDomainEventRegister</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb, <br /> void * opaque, <br /> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> freecb)
|
|
||||||
char * <a href="#virConnectDomainXMLFromNative">virConnectDomainXMLFromNative</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * nativeFormat, <br /> const char * nativeConfig, <br /> unsigned int flags)
|
|
||||||
char * <a href="#virConnectDomainXMLToNative">virConnectDomainXMLToNative</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * nativeFormat, <br /> const char * domainXml, <br /> unsigned int flags)
|
|
||||||
char * <a href="#virConnectFindStoragePoolSources">virConnectFindStoragePoolSources</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * type, <br /> const char * srcSpec, <br /> unsigned int flags)
|
|
||||||
char * <a href="#virConnectGetCapabilities">virConnectGetCapabilities</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
char * <a href="#virConnectGetHostname">virConnectGetHostname</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectGetMaxVcpus">virConnectGetMaxVcpus</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * type)
|
|
||||||
const char * <a href="#virConnectGetType">virConnectGetType</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
char * <a href="#virConnectGetURI">virConnectGetURI</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectGetVersion">virConnectGetVersion</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> unsigned long * hvVer)
|
|
||||||
int <a href="#virConnectListDefinedDomains">virConnectListDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
|
||||||
int <a href="#virConnectListDefinedInterfaces">virConnectListDefinedInterfaces</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
|
||||||
int <a href="#virConnectListDefinedNetworks">virConnectListDefinedNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
|
||||||
int <a href="#virConnectListDefinedStoragePools">virConnectListDefinedStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
|
||||||
int <a href="#virConnectListDomains">virConnectListDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int * ids, <br /> int maxids)
|
|
||||||
int <a href="#virConnectListInterfaces">virConnectListInterfaces</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
|
||||||
int <a href="#virConnectListNetworks">virConnectListNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
|
||||||
int <a href="#virConnectListSecrets">virConnectListSecrets</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** uuids, <br /> int maxuuids)
|
|
||||||
int <a href="#virConnectListStoragePools">virConnectListStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)
|
|
||||||
int <a href="#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectNumOfDefinedInterfaces">virConnectNumOfDefinedInterfaces</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectNumOfDefinedNetworks">virConnectNumOfDefinedNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectNumOfDefinedStoragePools">virConnectNumOfDefinedStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectNumOfDomains">virConnectNumOfDomains</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectNumOfInterfaces">virConnectNumOfInterfaces</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectNumOfNetworks">virConnectNumOfNetworks</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectNumOfSecrets">virConnectNumOfSecrets</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virConnectNumOfStoragePools">virConnectNumOfStoragePools</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpen">virConnectOpen</a> (const char * name)
|
|
||||||
<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)
|
|
||||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virConnectOpenReadOnly">virConnectOpenReadOnly</a> (const char * name)
|
|
||||||
int <a href="#virConnectRef">virConnectRef</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
int <a href="#virDomainAttachDevice">virDomainAttachDevice</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * xml)
|
|
||||||
int <a href="#virDomainBlockPeek">virDomainBlockPeek</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> const char * path, <br /> unsigned long long offset, <br /> size_t size, <br /> void * buffer, <br /> unsigned int flags)
|
|
||||||
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)
|
|
||||||
int <a href="#virDomainCoreDump">virDomainCoreDump</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to, <br /> int flags)
|
|
||||||
int <a href="#virDomainCreate">virDomainCreate</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateLinux">virDomainCreateLinux</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)
|
|
||||||
<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> <a href="#virDomainCreateXML">virDomainCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)
|
|
||||||
<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)
|
|
||||||
int <a href="#virDomainDestroy">virDomainDestroy</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
int <a href="#virDomainDetachDevice">virDomainDetachDevice</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * xml)
|
|
||||||
int <a href="#virDomainFree">virDomainFree</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
int <a href="#virDomainGetAutostart">virDomainGetAutostart</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int * autostart)
|
|
||||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virDomainGetConnect">virDomainGetConnect</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom)
|
|
||||||
unsigned int <a href="#virDomainGetID">virDomainGetID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
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)
|
|
||||||
unsigned long <a href="#virDomainGetMaxMemory">virDomainGetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
int <a href="#virDomainGetMaxVcpus">virDomainGetMaxVcpus</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
const char * <a href="#virDomainGetName">virDomainGetName</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
char * <a href="#virDomainGetOSType">virDomainGetOSType</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
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)
|
|
||||||
char * <a href="#virDomainGetSchedulerType">virDomainGetSchedulerType</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int * nparams)
|
|
||||||
int <a href="#virDomainGetSecurityLabel">virDomainGetSecurityLabel</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virSecurityLabelPtr">virSecurityLabelPtr</a> seclabel)
|
|
||||||
int <a href="#virDomainGetUUID">virDomainGetUUID</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned char * uuid)
|
|
||||||
int <a href="#virDomainGetUUIDString">virDomainGetUUIDString</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> char * buf)
|
|
||||||
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)
|
|
||||||
char * <a href="#virDomainGetXMLDesc">virDomainGetXMLDesc</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int flags)
|
|
||||||
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)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
int <a href="#virDomainMemoryPeek">virDomainMemoryPeek</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> unsigned long long start, <br /> size_t size, <br /> void * buffer, <br /> unsigned int flags)
|
|
||||||
<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)
|
|
||||||
int <a href="#virDomainPinVcpu">virDomainPinVcpu</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int vcpu, <br /> unsigned char * cpumap, <br /> int maplen)
|
|
||||||
int <a href="#virDomainReboot">virDomainReboot</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int flags)
|
|
||||||
int <a href="#virDomainRef">virDomainRef</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
int <a href="#virDomainRestore">virDomainRestore</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * from)
|
|
||||||
int <a href="#virDomainResume">virDomainResume</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
int <a href="#virDomainSave">virDomainSave</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> const char * to)
|
|
||||||
int <a href="#virDomainSetAutostart">virDomainSetAutostart</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> int autostart)
|
|
||||||
int <a href="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)
|
|
||||||
int <a href="#virDomainSetMemory">virDomainSetMemory</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned long memory)
|
|
||||||
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)
|
|
||||||
int <a href="#virDomainSetVcpus">virDomainSetVcpus</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> unsigned int nvcpus)
|
|
||||||
int <a href="#virDomainShutdown">virDomainShutdown</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
int <a href="#virDomainSuspend">virDomainSuspend</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
int <a href="#virDomainUndefine">virDomainUndefine</a> (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)
|
|
||||||
typedef <a href="#virEventAddHandleFunc">virEventAddHandleFunc</a>
|
|
||||||
int <a href="#virEventAddHandleFunc">virEventAddHandleFunc</a> (int fd, <br /> int event, <br /> <a href="libvirt-libvirt.html#virEventHandleCallback">virEventHandleCallback</a> cb, <br /> void * opaque, <br /> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> ff)
|
|
||||||
|
|
||||||
typedef <a href="#virEventAddTimeoutFunc">virEventAddTimeoutFunc</a>
|
|
||||||
int <a href="#virEventAddTimeoutFunc">virEventAddTimeoutFunc</a> (int timeout, <br /> <a href="libvirt-libvirt.html#virEventTimeoutCallback">virEventTimeoutCallback</a> cb, <br /> void * opaque, <br /> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> ff)
|
|
||||||
|
|
||||||
typedef <a href="#virEventHandleCallback">virEventHandleCallback</a>
|
|
||||||
void <a href="#virEventHandleCallback">virEventHandleCallback</a> (int watch, <br /> int fd, <br /> int events, <br /> void * opaque)
|
|
||||||
|
|
||||||
void <a href="#virEventRegisterImpl">virEventRegisterImpl</a> (<a href="libvirt-libvirt.html#virEventAddHandleFunc">virEventAddHandleFunc</a> addHandle, <br /> <a href="libvirt-libvirt.html#virEventUpdateHandleFunc">virEventUpdateHandleFunc</a> updateHandle, <br /> <a href="libvirt-libvirt.html#virEventRemoveHandleFunc">virEventRemoveHandleFunc</a> removeHandle, <br /> <a href="libvirt-libvirt.html#virEventAddTimeoutFunc">virEventAddTimeoutFunc</a> addTimeout, <br /> <a href="libvirt-libvirt.html#virEventUpdateTimeoutFunc">virEventUpdateTimeoutFunc</a> updateTimeout, <br /> <a href="libvirt-libvirt.html#virEventRemoveTimeoutFunc">virEventRemoveTimeoutFunc</a> removeTimeout)
|
|
||||||
typedef <a href="#virEventRemoveHandleFunc">virEventRemoveHandleFunc</a>
|
|
||||||
int <a href="#virEventRemoveHandleFunc">virEventRemoveHandleFunc</a> (int watch)
|
|
||||||
|
|
||||||
typedef <a href="#virEventRemoveTimeoutFunc">virEventRemoveTimeoutFunc</a>
|
|
||||||
int <a href="#virEventRemoveTimeoutFunc">virEventRemoveTimeoutFunc</a> (int timer)
|
|
||||||
|
|
||||||
typedef <a href="#virEventTimeoutCallback">virEventTimeoutCallback</a>
|
|
||||||
void <a href="#virEventTimeoutCallback">virEventTimeoutCallback</a> (int timer, <br /> void * opaque)
|
|
||||||
|
|
||||||
typedef <a href="#virEventUpdateHandleFunc">virEventUpdateHandleFunc</a>
|
|
||||||
void <a href="#virEventUpdateHandleFunc">virEventUpdateHandleFunc</a> (int watch, <br /> int event)
|
|
||||||
|
|
||||||
typedef <a href="#virEventUpdateTimeoutFunc">virEventUpdateTimeoutFunc</a>
|
|
||||||
void <a href="#virEventUpdateTimeoutFunc">virEventUpdateTimeoutFunc</a> (int timer, <br /> int timeout)
|
|
||||||
|
|
||||||
typedef <a href="#virFreeCallback">virFreeCallback</a>
|
|
||||||
void <a href="#virFreeCallback">virFreeCallback</a> (void * opaque)
|
|
||||||
|
|
||||||
int <a href="#virGetVersion">virGetVersion</a> (unsigned long * libVer, <br /> const char * type, <br /> unsigned long * typeVer)
|
|
||||||
int <a href="#virInitialize">virInitialize</a> (void)
|
|
||||||
int <a href="#virInterfaceCreate">virInterfaceCreate</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)
|
|
||||||
<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> <a href="#virInterfaceDefineXML">virInterfaceDefineXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml, <br /> unsigned int flags)
|
|
||||||
int <a href="#virInterfaceDestroy">virInterfaceDestroy</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)
|
|
||||||
int <a href="#virInterfaceFree">virInterfaceFree</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
|
||||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virInterfaceGetConnect">virInterfaceGetConnect</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
|
||||||
const char * <a href="#virInterfaceGetMACString">virInterfaceGetMACString</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
|
||||||
const char * <a href="#virInterfaceGetName">virInterfaceGetName</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
|
||||||
char * <a href="#virInterfaceGetXMLDesc">virInterfaceGetXMLDesc</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)
|
|
||||||
<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> <a href="#virInterfaceLookupByMACString">virInterfaceLookupByMACString</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * macstr)
|
|
||||||
<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> <a href="#virInterfaceLookupByName">virInterfaceLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)
|
|
||||||
int <a href="#virInterfaceRef">virInterfaceRef</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
|
||||||
int <a href="#virInterfaceUndefine">virInterfaceUndefine</a> (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)
|
|
||||||
int <a href="#virNetworkCreate">virNetworkCreate</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
int <a href="#virNetworkDestroy">virNetworkDestroy</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
|
||||||
int <a href="#virNetworkFree">virNetworkFree</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
|
||||||
int <a href="#virNetworkGetAutostart">virNetworkGetAutostart</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int * autostart)
|
|
||||||
char * <a href="#virNetworkGetBridgeName">virNetworkGetBridgeName</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
|
||||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virNetworkGetConnect">virNetworkGetConnect</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> net)
|
|
||||||
const char * <a href="#virNetworkGetName">virNetworkGetName</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
|
||||||
int <a href="#virNetworkGetUUID">virNetworkGetUUID</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> unsigned char * uuid)
|
|
||||||
int <a href="#virNetworkGetUUIDString">virNetworkGetUUIDString</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> char * buf)
|
|
||||||
char * <a href="#virNetworkGetXMLDesc">virNetworkGetXMLDesc</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int flags)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
int <a href="#virNetworkRef">virNetworkRef</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
|
||||||
int <a href="#virNetworkSetAutostart">virNetworkSetAutostart</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br /> int autostart)
|
|
||||||
int <a href="#virNetworkUndefine">virNetworkUndefine</a> (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)
|
|
||||||
<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> <a href="#virNodeDeviceCreateXML">virNodeDeviceCreateXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)
|
|
||||||
int <a href="#virNodeDeviceDestroy">virNodeDeviceDestroy</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
|
||||||
int <a href="#virNodeDeviceDettach">virNodeDeviceDettach</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
|
||||||
int <a href="#virNodeDeviceFree">virNodeDeviceFree</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
|
||||||
const char * <a href="#virNodeDeviceGetName">virNodeDeviceGetName</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
|
||||||
const char * <a href="#virNodeDeviceGetParent">virNodeDeviceGetParent</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
|
||||||
char * <a href="#virNodeDeviceGetXMLDesc">virNodeDeviceGetXMLDesc</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev, <br /> unsigned int flags)
|
|
||||||
int <a href="#virNodeDeviceListCaps">virNodeDeviceListCaps</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev, <br /> char ** const names, <br /> int maxnames)
|
|
||||||
<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> <a href="#virNodeDeviceLookupByName">virNodeDeviceLookupByName</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)
|
|
||||||
int <a href="#virNodeDeviceNumOfCaps">virNodeDeviceNumOfCaps</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
|
||||||
int <a href="#virNodeDeviceReAttach">virNodeDeviceReAttach</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
|
||||||
int <a href="#virNodeDeviceRef">virNodeDeviceRef</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
|
||||||
int <a href="#virNodeDeviceReset">virNodeDeviceReset</a> (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)
|
|
||||||
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)
|
|
||||||
unsigned long long <a href="#virNodeGetFreeMemory">virNodeGetFreeMemory</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)
|
|
||||||
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)
|
|
||||||
int <a href="#virNodeGetSecurityModel">virNodeGetSecurityModel</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virSecurityModelPtr">virSecurityModelPtr</a> secmodel)
|
|
||||||
int <a href="#virNodeListDevices">virNodeListDevices</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * cap, <br /> char ** const names, <br /> int maxnames, <br /> unsigned int flags)
|
|
||||||
int <a href="#virNodeNumOfDevices">virNodeNumOfDevices</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * cap, <br /> unsigned int flags)
|
|
||||||
<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> <a href="#virSecretDefineXML">virSecretDefineXML</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml, <br /> unsigned int flags)
|
|
||||||
int <a href="#virSecretFree">virSecretFree</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)
|
|
||||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virSecretGetConnect">virSecretGetConnect</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)
|
|
||||||
int <a href="#virSecretGetUUID">virSecretGetUUID</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> unsigned char * uuid)
|
|
||||||
int <a href="#virSecretGetUUIDString">virSecretGetUUIDString</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> char * buf)
|
|
||||||
const char * <a href="#virSecretGetUsageID">virSecretGetUsageID</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)
|
|
||||||
int <a href="#virSecretGetUsageType">virSecretGetUsageType</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)
|
|
||||||
unsigned char * <a href="#virSecretGetValue">virSecretGetValue</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> size_t * value_size, <br /> unsigned int flags)
|
|
||||||
char * <a href="#virSecretGetXMLDesc">virSecretGetXMLDesc</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> unsigned int flags)
|
|
||||||
<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> <a href="#virSecretLookupByUUID">virSecretLookupByUUID</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)
|
|
||||||
<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> <a href="#virSecretLookupByUUIDString">virSecretLookupByUUIDString</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * uuidstr)
|
|
||||||
<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> <a href="#virSecretLookupByUsage">virSecretLookupByUsage</a> (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int usageType, <br /> const char * usageID)
|
|
||||||
int <a href="#virSecretRef">virSecretRef</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)
|
|
||||||
int <a href="#virSecretSetValue">virSecretSetValue</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> const unsigned char * value, <br /> size_t value_size, <br /> unsigned int flags)
|
|
||||||
int <a href="#virSecretUndefine">virSecretUndefine</a> (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)
|
|
||||||
int <a href="#virStoragePoolBuild">virStoragePoolBuild</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)
|
|
||||||
int <a href="#virStoragePoolCreate">virStoragePoolCreate</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
int <a href="#virStoragePoolDelete">virStoragePoolDelete</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)
|
|
||||||
int <a href="#virStoragePoolDestroy">virStoragePoolDestroy</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)
|
|
||||||
int <a href="#virStoragePoolFree">virStoragePoolFree</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)
|
|
||||||
int <a href="#virStoragePoolGetAutostart">virStoragePoolGetAutostart</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int * autostart)
|
|
||||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virStoragePoolGetConnect">virStoragePoolGetConnect</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)
|
|
||||||
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)
|
|
||||||
const char * <a href="#virStoragePoolGetName">virStoragePoolGetName</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)
|
|
||||||
int <a href="#virStoragePoolGetUUID">virStoragePoolGetUUID</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned char * uuid)
|
|
||||||
int <a href="#virStoragePoolGetUUIDString">virStoragePoolGetUUIDString</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> char * buf)
|
|
||||||
char * <a href="#virStoragePoolGetXMLDesc">virStoragePoolGetXMLDesc</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)
|
|
||||||
int <a href="#virStoragePoolListVolumes">virStoragePoolListVolumes</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> char ** const names, <br /> int maxnames)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> <a href="#virStoragePoolLookupByVolume">virStoragePoolLookupByVolume</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
|
||||||
int <a href="#virStoragePoolNumOfVolumes">virStoragePoolNumOfVolumes</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)
|
|
||||||
int <a href="#virStoragePoolRef">virStoragePoolRef</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)
|
|
||||||
int <a href="#virStoragePoolRefresh">virStoragePoolRefresh</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> unsigned int flags)
|
|
||||||
int <a href="#virStoragePoolSetAutostart">virStoragePoolSetAutostart</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> int autostart)
|
|
||||||
int <a href="#virStoragePoolUndefine">virStoragePoolUndefine</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)
|
|
||||||
<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)
|
|
||||||
<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> <a href="#virStorageVolCreateXMLFrom">virStorageVolCreateXMLFrom</a> (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br /> unsigned int flags)
|
|
||||||
int <a href="#virStorageVolDelete">virStorageVolDelete</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)
|
|
||||||
int <a href="#virStorageVolFree">virStorageVolFree</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
|
||||||
<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> <a href="#virStorageVolGetConnect">virStorageVolGetConnect</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
|
||||||
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)
|
|
||||||
const char * <a href="#virStorageVolGetKey">virStorageVolGetKey</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
|
||||||
const char * <a href="#virStorageVolGetName">virStorageVolGetName</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
|
||||||
char * <a href="#virStorageVolGetPath">virStorageVolGetPath</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
|
||||||
char * <a href="#virStorageVolGetXMLDesc">virStorageVolGetXMLDesc</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br /> unsigned int flags)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
<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)
|
|
||||||
int <a href="#virStorageVolRef">virStorageVolRef</a> (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)
|
|
||||||
</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 & 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_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="virConnect" id="virConnect"><code>virConnect</code></a></h3><div class="api"><pre>struct virConnect{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virConnectAuth" id="virConnectAuth"><code>virConnectAuth</code></a></h3><div class="api"><pre>struct virConnectAuth{
|
|
||||||
</pre><table><tr><td>int *</td><td>credtype</td><td> : List of supported <a href="libvirt-libvirt.html#virConnectCredentialType">virConnectCredentialType</a> values</td></tr><tr><td>unsigned int</td><td>ncredtype</td></tr><tr><td><a href="libvirt-libvirt.html#virConnectAuthCallbackPtr">virConnectAuthCallbackPtr</a></td><td>cb</td><td> : Callback used to collect credentials</td></tr><tr><td>void *</td><td>cbdata</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virConnectCredential" id="virConnectCredential"><code>virConnectCredential</code></a></h3><div class="api"><pre>struct virConnectCredential{
|
|
||||||
</pre><table><tr><td>int</td><td>type</td><td> : One of <a href="libvirt-libvirt.html#virConnectCredentialType">virConnectCredentialType</a> constants</td></tr><tr><td>const char *</td><td>prompt</td><td> : Prompt to show to user</td></tr><tr><td>const char *</td><td>challenge</td><td> : Additional challenge to show</td></tr><tr><td>const char *</td><td>defresult</td><td> : Optional default result</td></tr><tr><td>char *</td><td>result</td><td> : Result to be filled with user response (or defresult)</td></tr><tr><td>unsigned int</td><td>resultlen</td><td> : Length of the result</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virConnectCredentialType" id="virConnectCredentialType"><code>virConnectCredentialType</code></a></h3><div class="api"><pre>enum virConnectCredentialType {
|
|
||||||
</pre><table><tr><td><a name="VIR_CRED_USERNAME" id="VIR_CRED_USERNAME">VIR_CRED_USERNAME</a></td><td> = </td><td>1</td><td> : Identity to act as</td></tr><tr><td><a name="VIR_CRED_AUTHNAME" id="VIR_CRED_AUTHNAME">VIR_CRED_AUTHNAME</a></td><td> = </td><td>2</td><td> : Identify to authorize as</td></tr><tr><td><a name="VIR_CRED_LANGUAGE" id="VIR_CRED_LANGUAGE">VIR_CRED_LANGUAGE</a></td><td> = </td><td>3</td><td> : RFC 1766 languages, comma separated</td></tr><tr><td><a name="VIR_CRED_CNONCE" id="VIR_CRED_CNONCE">VIR_CRED_CNONCE</a></td><td> = </td><td>4</td><td> : client supplies a nonce</td></tr><tr><td><a name="VIR_CRED_PASSPHRASE" id="VIR_CRED_PASSPHRASE">VIR_CRED_PASSPHRASE</a></td><td> = </td><td>5</td><td> : Passphrase secret</td></tr><tr><td><a name="VIR_CRED_ECHOPROMPT" id="VIR_CRED_ECHOPROMPT">VIR_CRED_ECHOPROMPT</a></td><td> = </td><td>6</td><td> : Challenge response</td></tr><tr><td><a name="VIR_CRED_NOECHOPROMPT" id="VIR_CRED_NOECHOPROMPT">VIR_CRED_NOECHOPROMPT</a></td><td> = </td><td>7</td><td> : Challenge response</td></tr><tr><td><a name="VIR_CRED_REALM" id="VIR_CRED_REALM">VIR_CRED_REALM</a></td><td> = </td><td>8</td><td> : Authentication realm</td></tr><tr><td><a name="VIR_CRED_EXTERNAL" id="VIR_CRED_EXTERNAL">VIR_CRED_EXTERNAL</a></td><td> = </td><td>9</td><td> : Externally managed credential More may be added - expect the unexpected</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virConnectFlags" id="virConnectFlags"><code>virConnectFlags</code></a></h3><div class="api"><pre>enum virConnectFlags {
|
|
||||||
</pre><table><tr><td><a name="VIR_CONNECT_RO" id="VIR_CONNECT_RO">VIR_CONNECT_RO</a></td><td> = </td><td>1</td><td> : A readonly connection</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomain" id="virDomain"><code>virDomain</code></a></h3><div class="api"><pre>struct virDomain{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virDomainBlockStatsStruct" id="virDomainBlockStatsStruct"><code>virDomainBlockStatsStruct</code></a></h3><div class="api"><pre>struct virDomainBlockStatsStruct{
|
|
||||||
</pre><table><tr><td>long long</td><td>rd_req</td><td> : number of read requests</td></tr><tr><td>long long</td><td>rd_bytes</td><td> : number of read bytes</td></tr><tr><td>long long</td><td>wr_req</td><td> : number of write requests</td></tr><tr><td>long long</td><td>wr_bytes</td><td> : number of written bytes</td></tr><tr><td>long long</td><td>errs</td><td> : In Xen this returns the mysterious 'oo_req'.</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virDomainCreateFlags" id="virDomainCreateFlags"><code>virDomainCreateFlags</code></a></h3><div class="api"><pre>enum virDomainCreateFlags {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_NONE" id="VIR_DOMAIN_NONE">VIR_DOMAIN_NONE</a></td><td> = </td><td>0</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainEventDefinedDetailType" id="virDomainEventDefinedDetailType"><code>virDomainEventDefinedDetailType</code></a></h3><div class="api"><pre>enum virDomainEventDefinedDetailType {
|
|
||||||
</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>}
|
|
||||||
</pre></div><h3><a name="virDomainEventResumedDetailType" id="virDomainEventResumedDetailType"><code>virDomainEventResumedDetailType</code></a></h3><div class="api"><pre>enum virDomainEventResumedDetailType {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_EVENT_RESUMED_UNPAUSED" id="VIR_DOMAIN_EVENT_RESUMED_UNPAUSED">VIR_DOMAIN_EVENT_RESUMED_UNPAUSED</a></td><td> = </td><td>0</td><td> : Normal resume due to admin unpause</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_RESUMED_MIGRATED" id="VIR_DOMAIN_EVENT_RESUMED_MIGRATED">VIR_DOMAIN_EVENT_RESUMED_MIGRATED</a></td><td> = </td><td>1</td><td> : Resumed for completion of migration</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainEventStartedDetailType" id="virDomainEventStartedDetailType"><code>virDomainEventStartedDetailType</code></a></h3><div class="api"><pre>enum virDomainEventStartedDetailType {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_EVENT_STARTED_BOOTED" id="VIR_DOMAIN_EVENT_STARTED_BOOTED">VIR_DOMAIN_EVENT_STARTED_BOOTED</a></td><td> = </td><td>0</td><td> : Normal startup from boot</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_STARTED_MIGRATED" id="VIR_DOMAIN_EVENT_STARTED_MIGRATED">VIR_DOMAIN_EVENT_STARTED_MIGRATED</a></td><td> = </td><td>1</td><td> : Incoming migration from another host</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_STARTED_RESTORED" id="VIR_DOMAIN_EVENT_STARTED_RESTORED">VIR_DOMAIN_EVENT_STARTED_RESTORED</a></td><td> = </td><td>2</td><td> : Restored from a state file</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainEventStoppedDetailType" id="virDomainEventStoppedDetailType"><code>virDomainEventStoppedDetailType</code></a></h3><div class="api"><pre>enum virDomainEventStoppedDetailType {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN" id="VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN">VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN</a></td><td> = </td><td>0</td><td> : Normal shutdown</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_STOPPED_DESTROYED" id="VIR_DOMAIN_EVENT_STOPPED_DESTROYED">VIR_DOMAIN_EVENT_STOPPED_DESTROYED</a></td><td> = </td><td>1</td><td> : Forced poweroff from host</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_STOPPED_CRASHED" id="VIR_DOMAIN_EVENT_STOPPED_CRASHED">VIR_DOMAIN_EVENT_STOPPED_CRASHED</a></td><td> = </td><td>2</td><td> : Guest crashed</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_STOPPED_MIGRATED" id="VIR_DOMAIN_EVENT_STOPPED_MIGRATED">VIR_DOMAIN_EVENT_STOPPED_MIGRATED</a></td><td> = </td><td>3</td><td> : Migrated off to another host</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_STOPPED_SAVED" id="VIR_DOMAIN_EVENT_STOPPED_SAVED">VIR_DOMAIN_EVENT_STOPPED_SAVED</a></td><td> = </td><td>4</td><td> : Saved to a state file</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_STOPPED_FAILED" id="VIR_DOMAIN_EVENT_STOPPED_FAILED">VIR_DOMAIN_EVENT_STOPPED_FAILED</a></td><td> = </td><td>5</td><td> : Host emulator/mgmt failed</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainEventSuspendedDetailType" id="virDomainEventSuspendedDetailType"><code>virDomainEventSuspendedDetailType</code></a></h3><div class="api"><pre>enum virDomainEventSuspendedDetailType {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_EVENT_SUSPENDED_PAUSED" id="VIR_DOMAIN_EVENT_SUSPENDED_PAUSED">VIR_DOMAIN_EVENT_SUSPENDED_PAUSED</a></td><td> = </td><td>0</td><td> : Normal suspend due to admin pause</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED" id="VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED">VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED</a></td><td> = </td><td>1</td><td> : Suspended for offline migration</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainEventType" id="virDomainEventType"><code>virDomainEventType</code></a></h3><div class="api"><pre>enum virDomainEventType {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_EVENT_DEFINED" id="VIR_DOMAIN_EVENT_DEFINED">VIR_DOMAIN_EVENT_DEFINED</a></td><td> = </td><td>0</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_UNDEFINED" id="VIR_DOMAIN_EVENT_UNDEFINED">VIR_DOMAIN_EVENT_UNDEFINED</a></td><td> = </td><td>1</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_STARTED" id="VIR_DOMAIN_EVENT_STARTED">VIR_DOMAIN_EVENT_STARTED</a></td><td> = </td><td>2</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_SUSPENDED" id="VIR_DOMAIN_EVENT_SUSPENDED">VIR_DOMAIN_EVENT_SUSPENDED</a></td><td> = </td><td>3</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_RESUMED" id="VIR_DOMAIN_EVENT_RESUMED">VIR_DOMAIN_EVENT_RESUMED</a></td><td> = </td><td>4</td></tr><tr><td><a name="VIR_DOMAIN_EVENT_STOPPED" id="VIR_DOMAIN_EVENT_STOPPED">VIR_DOMAIN_EVENT_STOPPED</a></td><td> = </td><td>5</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainEventUndefinedDetailType" id="virDomainEventUndefinedDetailType"><code>virDomainEventUndefinedDetailType</code></a></h3><div class="api"><pre>enum virDomainEventUndefinedDetailType {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_EVENT_UNDEFINED_REMOVED" id="VIR_DOMAIN_EVENT_UNDEFINED_REMOVED">VIR_DOMAIN_EVENT_UNDEFINED_REMOVED</a></td><td> = </td><td>0</td><td> : Deleted the config file</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainInfo" id="virDomainInfo"><code>virDomainInfo</code></a></h3><div class="api"><pre>struct virDomainInfo{
|
|
||||||
</pre><table><tr><td>unsigned char</td><td>state</td><td> : the running state, one of <a href="libvirt-libvirt.html#virDomainState">virDomainState</a></td></tr><tr><td>unsigned long</td><td>maxMem</td><td> : the maximum memory in KBytes allowed</td></tr><tr><td>unsigned long</td><td>memory</td><td> : the memory in KBytes used by the domain</td></tr><tr><td>unsigned short</td><td>nrVirtCpu</td><td> : the number of virtual CPUs for the domain</td></tr><tr><td>unsigned long long</td><td>cpuTime</td><td> : the CPU time used in nanoseconds</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virDomainInterfaceStatsStruct" id="virDomainInterfaceStatsStruct"><code>virDomainInterfaceStatsStruct</code></a></h3><div class="api"><pre>struct virDomainInterfaceStatsStruct{
|
|
||||||
</pre><table><tr><td>long long</td><td>rx_bytes</td></tr><tr><td>long long</td><td>rx_packets</td></tr><tr><td>long long</td><td>rx_errs</td></tr><tr><td>long long</td><td>rx_drop</td></tr><tr><td>long long</td><td>tx_bytes</td></tr><tr><td>long long</td><td>tx_packets</td></tr><tr><td>long long</td><td>tx_errs</td></tr><tr><td>long long</td><td>tx_drop</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virDomainMemoryFlags" id="virDomainMemoryFlags"><code>virDomainMemoryFlags</code></a></h3><div class="api"><pre>enum virDomainMemoryFlags {
|
|
||||||
</pre><table><tr><td><a name="VIR_MEMORY_VIRTUAL" id="VIR_MEMORY_VIRTUAL">VIR_MEMORY_VIRTUAL</a></td><td> = </td><td>1</td><td> : addresses are virtual addresses</td></tr><tr><td><a name="VIR_MEMORY_PHYSICAL" id="VIR_MEMORY_PHYSICAL">VIR_MEMORY_PHYSICAL</a></td><td> = </td><td>2</td><td> : addresses are physical addresses</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainMigrateFlags" id="virDomainMigrateFlags"><code>virDomainMigrateFlags</code></a></h3><div class="api"><pre>enum virDomainMigrateFlags {
|
|
||||||
</pre><table><tr><td><a name="VIR_MIGRATE_LIVE" id="VIR_MIGRATE_LIVE">VIR_MIGRATE_LIVE</a></td><td> = </td><td>1</td><td> : live migration</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainState" id="virDomainState"><code>virDomainState</code></a></h3><div class="api"><pre>enum virDomainState {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_NOSTATE" id="VIR_DOMAIN_NOSTATE">VIR_DOMAIN_NOSTATE</a></td><td> = </td><td>0</td><td> : no state</td></tr><tr><td><a name="VIR_DOMAIN_RUNNING" id="VIR_DOMAIN_RUNNING">VIR_DOMAIN_RUNNING</a></td><td> = </td><td>1</td><td> : the domain is running</td></tr><tr><td><a name="VIR_DOMAIN_BLOCKED" id="VIR_DOMAIN_BLOCKED">VIR_DOMAIN_BLOCKED</a></td><td> = </td><td>2</td><td> : the domain is blocked on resource</td></tr><tr><td><a name="VIR_DOMAIN_PAUSED" id="VIR_DOMAIN_PAUSED">VIR_DOMAIN_PAUSED</a></td><td> = </td><td>3</td><td> : the domain is paused by user</td></tr><tr><td><a name="VIR_DOMAIN_SHUTDOWN" id="VIR_DOMAIN_SHUTDOWN">VIR_DOMAIN_SHUTDOWN</a></td><td> = </td><td>4</td><td> : the domain is being shut down</td></tr><tr><td><a name="VIR_DOMAIN_SHUTOFF" id="VIR_DOMAIN_SHUTOFF">VIR_DOMAIN_SHUTOFF</a></td><td> = </td><td>5</td><td> : the domain is shut off</td></tr><tr><td><a name="VIR_DOMAIN_CRASHED" id="VIR_DOMAIN_CRASHED">VIR_DOMAIN_CRASHED</a></td><td> = </td><td>6</td><td> : the domain is crashed</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virDomainXMLFlags" id="virDomainXMLFlags"><code>virDomainXMLFlags</code></a></h3><div class="api"><pre>enum virDomainXMLFlags {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_XML_SECURE" id="VIR_DOMAIN_XML_SECURE">VIR_DOMAIN_XML_SECURE</a></td><td> = </td><td>1</td><td> : dump security sensitive information too</td></tr><tr><td><a name="VIR_DOMAIN_XML_INACTIVE" id="VIR_DOMAIN_XML_INACTIVE">VIR_DOMAIN_XML_INACTIVE</a></td><td> = </td><td>2</td><td> : dump inactive domain information</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virEventHandleType" id="virEventHandleType"><code>virEventHandleType</code></a></h3><div class="api"><pre>enum virEventHandleType {
|
|
||||||
</pre><table><tr><td><a name="VIR_EVENT_HANDLE_READABLE" id="VIR_EVENT_HANDLE_READABLE">VIR_EVENT_HANDLE_READABLE</a></td><td> = </td><td>1</td></tr><tr><td><a name="VIR_EVENT_HANDLE_WRITABLE" id="VIR_EVENT_HANDLE_WRITABLE">VIR_EVENT_HANDLE_WRITABLE</a></td><td> = </td><td>2</td></tr><tr><td><a name="VIR_EVENT_HANDLE_ERROR" id="VIR_EVENT_HANDLE_ERROR">VIR_EVENT_HANDLE_ERROR</a></td><td> = </td><td>4</td></tr><tr><td><a name="VIR_EVENT_HANDLE_HANGUP" id="VIR_EVENT_HANDLE_HANGUP">VIR_EVENT_HANDLE_HANGUP</a></td><td> = </td><td>8</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virInterface" id="virInterface"><code>virInterface</code></a></h3><div class="api"><pre>struct virInterface{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virNetwork" id="virNetwork"><code>virNetwork</code></a></h3><div class="api"><pre>struct virNetwork{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virNodeDevice" id="virNodeDevice"><code>virNodeDevice</code></a></h3><div class="api"><pre>struct virNodeDevice{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virNodeInfo" id="virNodeInfo"><code>virNodeInfo</code></a></h3><div class="api"><pre>struct virNodeInfo{
|
|
||||||
</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>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virSchedParameter" id="virSchedParameter"><code>virSchedParameter</code></a></h3><div class="api"><pre>struct virSchedParameter{
|
|
||||||
</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>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virSchedParameterType" id="virSchedParameterType"><code>virSchedParameterType</code></a></h3><div class="api"><pre>enum virSchedParameterType {
|
|
||||||
</pre><table><tr><td><a name="VIR_DOMAIN_SCHED_FIELD_INT" id="VIR_DOMAIN_SCHED_FIELD_INT">VIR_DOMAIN_SCHED_FIELD_INT</a></td><td> = </td><td>1</td><td> : integer case</td></tr><tr><td><a name="VIR_DOMAIN_SCHED_FIELD_UINT" id="VIR_DOMAIN_SCHED_FIELD_UINT">VIR_DOMAIN_SCHED_FIELD_UINT</a></td><td> = </td><td>2</td><td> : unsigned integer case</td></tr><tr><td><a name="VIR_DOMAIN_SCHED_FIELD_LLONG" id="VIR_DOMAIN_SCHED_FIELD_LLONG">VIR_DOMAIN_SCHED_FIELD_LLONG</a></td><td> = </td><td>3</td><td> : long long case</td></tr><tr><td><a name="VIR_DOMAIN_SCHED_FIELD_ULLONG" id="VIR_DOMAIN_SCHED_FIELD_ULLONG">VIR_DOMAIN_SCHED_FIELD_ULLONG</a></td><td> = </td><td>4</td><td> : unsigned long long case</td></tr><tr><td><a name="VIR_DOMAIN_SCHED_FIELD_DOUBLE" id="VIR_DOMAIN_SCHED_FIELD_DOUBLE">VIR_DOMAIN_SCHED_FIELD_DOUBLE</a></td><td> = </td><td>5</td><td> : double case</td></tr><tr><td><a name="VIR_DOMAIN_SCHED_FIELD_BOOLEAN" id="VIR_DOMAIN_SCHED_FIELD_BOOLEAN">VIR_DOMAIN_SCHED_FIELD_BOOLEAN</a></td><td> = </td><td>6</td><td> : boolean(character) case</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virSecret" id="virSecret"><code>virSecret</code></a></h3><div class="api"><pre>struct virSecret{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virSecretUsageType" id="virSecretUsageType"><code>virSecretUsageType</code></a></h3><div class="api"><pre>enum virSecretUsageType {
|
|
||||||
</pre><table><tr><td><a name="VIR_SECRET_USAGE_TYPE_NONE" id="VIR_SECRET_USAGE_TYPE_NONE">VIR_SECRET_USAGE_TYPE_NONE</a></td><td> = </td><td>0</td></tr><tr><td><a name="VIR_SECRET_USAGE_TYPE_VOLUME" id="VIR_SECRET_USAGE_TYPE_VOLUME">VIR_SECRET_USAGE_TYPE_VOLUME</a></td><td> = </td><td>1</td><td> : Expect more owner types later...</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virSecurityLabel" id="virSecurityLabel"><code>virSecurityLabel</code></a></h3><div class="api"><pre>struct virSecurityLabel{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virSecurityModel" id="virSecurityModel"><code>virSecurityModel</code></a></h3><div class="api"><pre>struct virSecurityModel{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virStoragePool" id="virStoragePool"><code>virStoragePool</code></a></h3><div class="api"><pre>struct virStoragePool{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virStoragePoolBuildFlags" id="virStoragePoolBuildFlags"><code>virStoragePoolBuildFlags</code></a></h3><div class="api"><pre>enum virStoragePoolBuildFlags {
|
|
||||||
</pre><table><tr><td><a name="VIR_STORAGE_POOL_BUILD_NEW" id="VIR_STORAGE_POOL_BUILD_NEW">VIR_STORAGE_POOL_BUILD_NEW</a></td><td> = </td><td>0</td><td> : Regular build from scratch</td></tr><tr><td><a name="VIR_STORAGE_POOL_BUILD_REPAIR" id="VIR_STORAGE_POOL_BUILD_REPAIR">VIR_STORAGE_POOL_BUILD_REPAIR</a></td><td> = </td><td>1</td><td> : Repair / reinitialize</td></tr><tr><td><a name="VIR_STORAGE_POOL_BUILD_RESIZE" id="VIR_STORAGE_POOL_BUILD_RESIZE">VIR_STORAGE_POOL_BUILD_RESIZE</a></td><td> = </td><td>2</td><td> : Extend existing pool</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virStoragePoolDeleteFlags" id="virStoragePoolDeleteFlags"><code>virStoragePoolDeleteFlags</code></a></h3><div class="api"><pre>enum virStoragePoolDeleteFlags {
|
|
||||||
</pre><table><tr><td><a name="VIR_STORAGE_POOL_DELETE_NORMAL" id="VIR_STORAGE_POOL_DELETE_NORMAL">VIR_STORAGE_POOL_DELETE_NORMAL</a></td><td> = </td><td>0</td><td> : Delete metadata only (fast)</td></tr><tr><td><a name="VIR_STORAGE_POOL_DELETE_ZEROED" id="VIR_STORAGE_POOL_DELETE_ZEROED">VIR_STORAGE_POOL_DELETE_ZEROED</a></td><td> = </td><td>1</td><td> : Clear all data to zeros (slow)</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virStoragePoolInfo" id="virStoragePoolInfo"><code>virStoragePoolInfo</code></a></h3><div class="api"><pre>struct virStoragePoolInfo{
|
|
||||||
</pre><table><tr><td>int</td><td>state</td><td> : <a href="libvirt-libvirt.html#virStoragePoolState">virStoragePoolState</a> flags</td></tr><tr><td>unsigned long long</td><td>capacity</td><td> : Logical size bytes</td></tr><tr><td>unsigned long long</td><td>allocation</td><td> : Current allocation bytes</td></tr><tr><td>unsigned long long</td><td>available</td><td> : Remaining free space bytes</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virStoragePoolState" id="virStoragePoolState"><code>virStoragePoolState</code></a></h3><div class="api"><pre>enum virStoragePoolState {
|
|
||||||
</pre><table><tr><td><a name="VIR_STORAGE_POOL_INACTIVE" id="VIR_STORAGE_POOL_INACTIVE">VIR_STORAGE_POOL_INACTIVE</a></td><td> = </td><td>0</td><td> : Not running</td></tr><tr><td><a name="VIR_STORAGE_POOL_BUILDING" id="VIR_STORAGE_POOL_BUILDING">VIR_STORAGE_POOL_BUILDING</a></td><td> = </td><td>1</td><td> : Initializing pool, not available</td></tr><tr><td><a name="VIR_STORAGE_POOL_RUNNING" id="VIR_STORAGE_POOL_RUNNING">VIR_STORAGE_POOL_RUNNING</a></td><td> = </td><td>2</td><td> : Running normally</td></tr><tr><td><a name="VIR_STORAGE_POOL_DEGRADED" id="VIR_STORAGE_POOL_DEGRADED">VIR_STORAGE_POOL_DEGRADED</a></td><td> = </td><td>3</td><td> : Running degraded</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virStorageVol" id="virStorageVol"><code>virStorageVol</code></a></h3><div class="api"><pre>struct virStorageVol{
|
|
||||||
</pre><table><tr><td colspan="3">The content of this structure is not made public by the API</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virStorageVolDeleteFlags" id="virStorageVolDeleteFlags"><code>virStorageVolDeleteFlags</code></a></h3><div class="api"><pre>enum virStorageVolDeleteFlags {
|
|
||||||
</pre><table><tr><td><a name="VIR_STORAGE_VOL_DELETE_NORMAL" id="VIR_STORAGE_VOL_DELETE_NORMAL">VIR_STORAGE_VOL_DELETE_NORMAL</a></td><td> = </td><td>0</td><td> : Delete metadata only (fast)</td></tr><tr><td><a name="VIR_STORAGE_VOL_DELETE_ZEROED" id="VIR_STORAGE_VOL_DELETE_ZEROED">VIR_STORAGE_VOL_DELETE_ZEROED</a></td><td> = </td><td>1</td><td> : Clear all data to zeros (slow)</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virStorageVolInfo" id="virStorageVolInfo"><code>virStorageVolInfo</code></a></h3><div class="api"><pre>struct virStorageVolInfo{
|
|
||||||
</pre><table><tr><td>int</td><td>type</td><td> : <a href="libvirt-libvirt.html#virStorageVolType">virStorageVolType</a> flags</td></tr><tr><td>unsigned long long</td><td>capacity</td><td> : Logical size bytes</td></tr><tr><td>unsigned long long</td><td>allocation</td><td> : Current allocation bytes</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virStorageVolType" id="virStorageVolType"><code>virStorageVolType</code></a></h3><div class="api"><pre>enum virStorageVolType {
|
|
||||||
</pre><table><tr><td><a name="VIR_STORAGE_VOL_FILE" id="VIR_STORAGE_VOL_FILE">VIR_STORAGE_VOL_FILE</a></td><td> = </td><td>0</td><td> : Regular file based volumes</td></tr><tr><td><a name="VIR_STORAGE_VOL_BLOCK" id="VIR_STORAGE_VOL_BLOCK">VIR_STORAGE_VOL_BLOCK</a></td><td> = </td><td>1</td><td> : Block based volumes</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="virVcpuInfo" id="virVcpuInfo"><code>virVcpuInfo</code></a></h3><div class="api"><pre>struct virVcpuInfo{
|
|
||||||
</pre><table><tr><td>unsigned int</td><td>number</td><td> : virtual CPU number</td></tr><tr><td>int</td><td>state</td><td> : value from <a href="libvirt-libvirt.html#virVcpuState">virVcpuState</a></td></tr><tr><td>unsigned long long</td><td>cpuTime</td><td> : CPU time used, in nanoseconds</td></tr><tr><td>int</td><td>cpu</td><td> : real CPU number, or -1 if offline</td></tr></table><pre>
|
|
||||||
}
|
|
||||||
</pre></div><h3><a name="virVcpuState" id="virVcpuState"><code>virVcpuState</code></a></h3><div class="api"><pre>enum virVcpuState {
|
|
||||||
</pre><table><tr><td><a name="VIR_VCPU_OFFLINE" id="VIR_VCPU_OFFLINE">VIR_VCPU_OFFLINE</a></td><td> = </td><td>0</td><td> : the virtual CPU is offline</td></tr><tr><td><a name="VIR_VCPU_RUNNING" id="VIR_VCPU_RUNNING">VIR_VCPU_RUNNING</a></td><td> = </td><td>1</td><td> : the virtual CPU is running</td></tr><tr><td><a name="VIR_VCPU_BLOCKED" id="VIR_VCPU_BLOCKED">VIR_VCPU_BLOCKED</a></td><td> = </td><td>2</td><td> : the virtual CPU is blocked on resource</td></tr></table><pre>}
|
|
||||||
</pre></div><h3><a name="functions" id="functions">Functions</a></h3><h3><a name="virConnectAuthCallbackPtr" id="virConnectAuthCallbackPtr"><code>virConnectAuthCallbackPtr</code></a></h3><pre class="programlisting">typedef 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"><code>virConnectClose</code></a></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="virConnectDomainEventCallback" id="virConnectDomainEventCallback"><code>virConnectDomainEventCallback</code></a></h3><pre class="programlisting">typedef int (*virConnectDomainEventCallback) (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> int event, <br /> int detail, <br /> void * opaque)
|
|
||||||
</pre><p>A callback function to be registered, and called when a domain event occurs</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 href="libvirt-libvirt.html#virConnect">virConnect</a> connection</td></tr><tr><td><span class="term"><i><tt>dom</tt></i>:</span></td><td>The domain on which the event occured</td></tr><tr><td><span class="term"><i><tt>event</tt></i>:</span></td><td>The specfic <a href="libvirt-libvirt.html#virDomainEventType">virDomainEventType</a> which occured</td></tr><tr><td><span class="term"><i><tt>detail</tt></i>:</span></td><td>event specific detail information</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>opaque user data</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><br /><h3><a name="virConnectDomainEventDeregister" id="virConnectDomainEventDeregister"><code>virConnectDomainEventDeregister</code></a></h3><pre class="programlisting">int virConnectDomainEventDeregister (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb)<br />
|
|
||||||
</pre><p>Removes a Domain Event Callback. De-registering for a domain callback will disable delivery of this event type</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 connection</td></tr><tr><td><span class="term"><i><tt>cb</tt></i>:</span></td><td>callback to the function handling domain events</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="virConnectDomainEventRegister" id="virConnectDomainEventRegister"><code>virConnectDomainEventRegister</code></a></h3><pre class="programlisting">int virConnectDomainEventRegister (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virConnectDomainEventCallback">virConnectDomainEventCallback</a> cb, <br /> void * opaque, <br /> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> freecb)<br />
|
|
||||||
</pre><p>Adds a Domain Event Callback. Registering for a domain callback will enable delivery of the events The <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> object handle passed into the callback upon delivery of an event is only valid for the duration of execution of the callback. If the callback wishes to keep the domain object after the callback</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 connection</td></tr><tr><td><span class="term"><i><tt>cb</tt></i>:</span></td><td>callback to the function handling domain events</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>opaque data to pass on to the callback</td></tr><tr><td><span class="term"><i><tt>freecb</tt></i>:</span></td><td>optional function to deallocate opaque when not used anymore</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>it shall take a reference to it, by calling virDomainRef. The reference can be released once the object is no longer required by calling virDomainFree. Returns 0 on success, -1 on failure</td></tr></tbody></table></div><h3><a name="virConnectDomainXMLFromNative" id="virConnectDomainXMLFromNative"><code>virConnectDomainXMLFromNative</code></a></h3><pre class="programlisting">char * virConnectDomainXMLFromNative (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * nativeFormat, <br /> const char * nativeConfig, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Reads native configuration data describing a domain, and generates libvirt domain XML. 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 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 />
|
|
||||||
</pre><p>Reads a domain XML configuration document, and generates generates a native configuration file describing the domain. 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 />
|
|
||||||
</pre><p>Talks to a storage backend and attempts to auto-discover the set of available storage pool sources. e.g. For iSCSI this would be a set of iSCSI targets. For NFS this would be a list of exported paths. The srcSpec (optional for some storage pool types, e.g. local ones) is an instance of the storage pool's source element specifying where to look for the pools. srcSpec is not required for some types (e.g., those querying local storage resources only)</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>type</tt></i>:</span></td><td>type of storage pool sources to discover</td></tr><tr><td><span class="term"><i><tt>srcSpec</tt></i>:</span></td><td>XML document specifying discovery source</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags for discovery (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an xml document consisting of a SourceList element containing a source document appropriate to the given pool type for each discovered source.</td></tr></tbody></table></div><h3><a name="virConnectGetCapabilities" id="virConnectGetCapabilities"><code>virConnectGetCapabilities</code></a></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"><code>virConnectGetHostname</code></a></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"><code>virConnectGetMaxVcpus</code></a></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 <domain> 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 <domain> 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 />
|
|
||||||
</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 />
|
|
||||||
</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"><code>virConnectGetVersion</code></a></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 privileged 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"><code>virConnectListDefinedDomains</code></a></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 but inactive 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="virConnectListDefinedInterfaces" id="virConnectListDefinedInterfaces"><code>virConnectListDefinedInterfaces</code></a></h3><pre class="programlisting">int virConnectListDefinedInterfaces (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
|
|
||||||
</pre><p>Collect the list of defined (inactive) physical host interfaces, 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 interfaces</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 interfaces found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListDefinedNetworks" id="virConnectListDefinedNetworks"><code>virConnectListDefinedNetworks</code></a></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"><code>virConnectListDefinedStoragePools</code></a></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"><code>virConnectListDomains</code></a></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="virConnectListInterfaces" id="virConnectListInterfaces"><code>virConnectListInterfaces</code></a></h3><pre class="programlisting">int virConnectListInterfaces (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** const names, <br /> int maxnames)<br />
|
|
||||||
</pre><p>Collect the list of active physical host interfaces, 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 interfaces</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 interfaces found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectListNetworks" id="virConnectListNetworks"><code>virConnectListNetworks</code></a></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="virConnectListSecrets" id="virConnectListSecrets"><code>virConnectListSecrets</code></a></h3><pre class="programlisting">int virConnectListSecrets (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> char ** uuids, <br /> int maxuuids)<br />
|
|
||||||
</pre><p>List UUIDs of defined secrets, store pointers to names in uuids.</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 href="libvirt-libvirt.html#virConnect">virConnect</a> connection</td></tr><tr><td><span class="term"><i><tt>uuids</tt></i>:</span></td><td>Pointer to an array to store the UUIDs</td></tr><tr><td><span class="term"><i><tt>maxuuids</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 UUIDs provided in the array, or -1 on failure.</td></tr></tbody></table></div><h3><a name="virConnectListStoragePools" id="virConnectListStoragePools"><code>virConnectListStoragePools</code></a></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"><code>virConnectNumOfDefinedDomains</code></a></h3><pre class="programlisting">int virConnectNumOfDefinedDomains (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
|
||||||
</pre><p>Provides the number of defined but 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="virConnectNumOfDefinedInterfaces" id="virConnectNumOfDefinedInterfaces"><code>virConnectNumOfDefinedInterfaces</code></a></h3><pre class="programlisting">int virConnectNumOfDefinedInterfaces (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
|
||||||
</pre><p>Provides the number of defined (inactive) interfaces on the physical 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>Returns</tt></i>:</span></td><td>the number of defined interface found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfDefinedNetworks" id="virConnectNumOfDefinedNetworks"><code>virConnectNumOfDefinedNetworks</code></a></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"><code>virConnectNumOfDefinedStoragePools</code></a></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"><code>virConnectNumOfDomains</code></a></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="virConnectNumOfInterfaces" id="virConnectNumOfInterfaces"><code>virConnectNumOfInterfaces</code></a></h3><pre class="programlisting">int virConnectNumOfInterfaces (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
|
||||||
</pre><p>Provides the number of active interfaces on the physical 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>Returns</tt></i>:</span></td><td>the number of active interfaces found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virConnectNumOfNetworks" id="virConnectNumOfNetworks"><code>virConnectNumOfNetworks</code></a></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="virConnectNumOfSecrets" id="virConnectNumOfSecrets"><code>virConnectNumOfSecrets</code></a></h3><pre class="programlisting">int virConnectNumOfSecrets (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
|
||||||
</pre><p>Fetch number of currently defined secrets.</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 href="libvirt-libvirt.html#virConnect">virConnect</a> connection</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number currently defined secrets.</td></tr></tbody></table></div><h3><a name="virConnectNumOfStoragePools" id="virConnectNumOfStoragePools"><code>virConnectNumOfStoragePools</code></a></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"><code>virConnectOpen</code></a></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 If @name is NULL then probing will be done to determine a suitable default driver to activate. This involves trying each hypervisor in turn until one successfully opens. If the LIBVIRT_DEFAULT_URI environment variable is set, then it will be used in preference to probing for a driver. If connecting to an unprivileged hypervisor driver which requires the libvirtd daemon to be active, it will automatically be launched if not already running. This can be prevented by setting the environment variable LIBVIRT_AUTOSTART=0 URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div><h3><a name="virConnectOpenAuth" id="virConnectOpenAuth"><code>virConnectOpenAuth</code></a></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 necessary, authentication will be performed fetching credentials via the callback See <a href="libvirt-libvirt.html#virConnectOpen">virConnectOpen</a> for notes about environment variables which can have an effect on opening drivers</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"><code>virConnectOpenReadOnly</code></a></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 library functionalities. The set of APIs usable are then restricted on the available methods to control the domains. See <a href="libvirt-libvirt.html#virConnectOpen">virConnectOpen</a> for notes about environment variables which can have an effect on opening drivers</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="virConnectRef" id="virConnectRef"><code>virConnectRef</code></a></h3><pre class="programlisting">int virConnectRef (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
|
||||||
</pre><p>Increment the reference count on the connection. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virConnectClose">virConnectClose</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a connection would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>conn</tt></i>:</span></td><td>the connection to hold a reference on</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="virDomainAttachDevice" id="virDomainAttachDevice"><code>virDomainAttachDevice</code></a></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="virDomainBlockPeek" id="virDomainBlockPeek"><code>virDomainBlockPeek</code></a></h3><pre class="programlisting">int virDomainBlockPeek (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> const char * path, <br /> unsigned long long offset, <br /> size_t size, <br /> void * buffer, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>This function allows you to read the contents of a domain's disk device. Typical uses for this are to determine if the domain has written a Master Boot Record (indicating that the domain has completed installation), or to try to work out the state of the domain's filesystems. (Note that in the local case you might try to open the block device or file directly, but that won't work in the remote case, nor if you don't have sufficient permission. Hence the need for this call). 'path' must be a device or file corresponding to the domain. In other words it must be the precise string returned in a <disk><source dev='...'/></disk> from virDomainGetXMLDesc. 'offset' and 'size' represent an area which must lie entirely within the device or file. 'size' may be 0 to test if the call would succeed. 'buffer' is the return buffer and must be at least 'size' bytes. NB. The remote driver imposes a 64K byte limit on 'size'. For your program to be able to work reliably over a remote connection you should split large requests to <= 65536 bytes.</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>offset</tt></i>:</span></td><td>offset within block device</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>size to read</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>return buffer (must be at least size bytes)</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>unused, always pass 0</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. really 64 bits</td></tr></tbody></table></div><h3><a name="virDomainBlockStats" id="virDomainBlockStats"><code>virDomainBlockStats</code></a></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 <target dev='...'> 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"><code>virDomainCoreDump</code></a></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"><code>virDomainCreate</code></a></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"><code>virDomainCreateLinux</code></a></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>Deprecated after 0.4.6. Renamed to virDomainCreateXML() providing identical functionality. This existing name will left indefinitely for API compatability.</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>string containing an XML description of the domain</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>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainCreateXML" id="virDomainCreateXML"><code>virDomainCreateXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> virDomainCreateXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Launch a new guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires privileged access to the hypervisor. The domain is not persistent, so its definition will disappear when it is destroyed, or if the host is restarted (see virDomainDefineXML() to define persistent 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>xmlDesc</tt></i>:</span></td><td>string containing an XML description of the domain</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>a new domain object or NULL in case of failure</td></tr></tbody></table></div><h3><a name="virDomainDefineXML" id="virDomainDefineXML"><code>virDomainDefineXML</code></a></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. This definition is persistent, until explicitly undefined with virDomainUndefine(). A previous definition for this domain would be overriden if it already exists.</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"><code>virDomainDestroy</code></a></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. This does not free the associated <a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> object. This function may require privileged 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"><code>virDomainDetachDevice</code></a></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"><code>virDomainFree</code></a></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"><code>virDomainGetAutostart</code></a></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"><code>virDomainGetConnect</code></a></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"><code>virDomainGetID</code></a></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"><code>virDomainGetInfo</code></a></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"><code>virDomainGetMaxMemory</code></a></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"><code>virDomainGetMaxVcpus</code></a></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"><code>virDomainGetName</code></a></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"><code>virDomainGetOSType</code></a></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"><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 />
|
|
||||||
</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"><code>virDomainGetSchedulerType</code></a></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="virDomainGetSecurityLabel" id="virDomainGetSecurityLabel"><code>virDomainGetSecurityLabel</code></a></h3><pre class="programlisting">int virDomainGetSecurityLabel (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br /> <a href="libvirt-libvirt.html#virSecurityLabelPtr">virSecurityLabelPtr</a> seclabel)<br />
|
|
||||||
</pre><p>Extract security label of an active domain. The 'label' field in the @seclabel argument will be initialized to the empty string if the domain is not running under a security model.</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>seclabel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityLabel">virSecurityLabel</a> structure</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="virDomainGetUUID" id="virDomainGetUUID"><code>virDomainGetUUID</code></a></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"><code>virDomainGetUUIDString</code></a></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"><code>virDomainGetVcpus</code></a></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 isn't 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 cpumap information is returned by the API. It's assumed there is <maxinfo> cpumap in cpumaps array. The memory allocated to cpumaps must be (maxinfo * maplen) bytes (ie: calloc(maxinfo, maplen)). One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.</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"><code>virDomainGetXMLDesc</code></a></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 virDomainCreateXML().</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"><code>virDomainInterfaceStats</code></a></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"><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 />
|
|
||||||
</pre><p>Try to find a domain based on the hypervisor ID number Note that this won't work for inactive domains which have an ID of -1, 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 />
|
|
||||||
</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"><code>virDomainLookupByUUID</code></a></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"><code>virDomainLookupByUUIDString</code></a></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="virDomainMemoryPeek" id="virDomainMemoryPeek"><code>virDomainMemoryPeek</code></a></h3><pre class="programlisting">int virDomainMemoryPeek (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> dom, <br /> unsigned long long start, <br /> size_t size, <br /> void * buffer, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>This function allows you to read the contents of a domain's memory. The memory which is read is controlled by the 'start', 'size' and 'flags' parameters. If 'flags' is <a href="libvirt-libvirt.html#VIR_MEMORY_VIRTUAL">VIR_MEMORY_VIRTUAL</a> then the 'start' and 'size' parameters are interpreted as virtual memory addresses for whichever task happens to be running on the domain at the moment. Although this sounds haphazard it is in fact what you want in order to read Linux kernel state, because it ensures that pointers in the kernel image can be interpreted coherently. 'buffer' is the return buffer and must be at least 'size' bytes. 'size' may be 0 to test if the call would succeed. NB. The remote driver imposes a 64K byte limit on 'size'. For your program to be able to work reliably over a remote connection you should split large requests to <= 65536 bytes.</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>start</tt></i>:</span></td><td>start of memory to peek</td></tr><tr><td><span class="term"><i><tt>size</tt></i>:</span></td><td>size of memory to peek</td></tr><tr><td><span class="term"><i><tt>buffer</tt></i>:</span></td><td>return buffer (must be at least size bytes)</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags, see below</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. really 64 bits</td></tr></tbody></table></div><h3><a name="virDomainMigrate" id="virDomainMigrate"><code>virDomainMigrate</code></a></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"><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 />
|
|
||||||
</pre><p>Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires privileged 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 < size, missing bytes are set to zero. If maplen > 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"><code>virDomainReboot</code></a></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="virDomainRef" id="virDomainRef"><code>virDomainRef</code></a></h3><pre class="programlisting">int virDomainRef (<a href="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br />
|
|
||||||
</pre><p>Increment the reference count on the domain. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virDomainFree">virDomainFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a domain would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>domain</tt></i>:</span></td><td>the domain to hold a reference on</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"><code>virDomainRestore</code></a></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"><code>virDomainResume</code></a></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 privileged 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"><code>virDomainSave</code></a></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"><code>virDomainSetAutostart</code></a></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"><code>virDomainSetMaxMemory</code></a></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 privileged 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"><code>virDomainSetMemory</code></a></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 privileged 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"><code>virDomainSetSchedulerParameters</code></a></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"><code>virDomainSetVcpus</code></a></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 privileged 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"><code>virDomainShutdown</code></a></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"><code>virDomainSuspend</code></a></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 privileged 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"><code>virDomainUndefine</code></a></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="virEventAddHandleFunc" id="virEventAddHandleFunc"><code>virEventAddHandleFunc</code></a></h3><pre class="programlisting">typedef int (*virEventAddHandleFunc ) (int fd, <br /> int event, <br /> <a href="libvirt-libvirt.html#virEventHandleCallback">virEventHandleCallback</a> cb, <br /> void * opaque, <br /> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> ff)
|
|
||||||
</pre><p>Part of the EventImpl, this callback Adds a file handle callback to listen for specific events. The same file handle can be registered multiple times provided the requested event sets are non-overlapping If the opaque user data requires free'ing when the handle is unregistered, then a 2nd callback can be supplied for this purpose.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>file descriptor to listen on</td></tr><tr><td><span class="term"><i><tt>event</tt></i>:</span></td><td>bitset of events on which to fire the callback</td></tr><tr><td><span class="term"><i><tt>cb</tt></i>:</span></td><td>the callback to be called when an event occurrs</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>user data to pass to the callback</td></tr><tr><td><span class="term"><i><tt>ff</tt></i>:</span></td><td>the callback invoked to free opaque data blob</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a handle watch number to be used for updating and unregistering for events</td></tr></tbody></table></div><br /><h3><a name="virEventAddTimeoutFunc" id="virEventAddTimeoutFunc"><code>virEventAddTimeoutFunc</code></a></h3><pre class="programlisting">typedef int (*virEventAddTimeoutFunc ) (int timeout, <br /> <a href="libvirt-libvirt.html#virEventTimeoutCallback">virEventTimeoutCallback</a> cb, <br /> void * opaque, <br /> <a href="libvirt-libvirt.html#virFreeCallback">virFreeCallback</a> ff)
|
|
||||||
</pre><p>Part of the EventImpl, this user-defined callback handles adding an event timeout. If the opaque user data requires free'ing when the handle is unregistered, then a 2nd callback can be supplied for this purpose.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>timeout</tt></i>:</span></td><td>The timeout to monitor</td></tr><tr><td><span class="term"><i><tt>cb</tt></i>:</span></td><td>the callback to call when timeout has expired</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>user data to pass to the callback</td></tr><tr><td><span class="term"><i><tt>ff</tt></i>:</span></td><td>the callback invoked to free opaque data blob</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a timer value</td></tr></tbody></table></div><br /><h3><a name="virEventHandleCallback" id="virEventHandleCallback"><code>virEventHandleCallback</code></a></h3><pre class="programlisting">typedef void (*virEventHandleCallback ) (int watch, <br /> int fd, <br /> int events, <br /> void * opaque)
|
|
||||||
</pre><p>Callback for receiving file handle events. The callback will be invoked once for each event which is pending.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>watch</tt></i>:</span></td><td>watch on which the event occurred</td></tr><tr><td><span class="term"><i><tt>fd</tt></i>:</span></td><td>file handle on which the event occurred</td></tr><tr><td><span class="term"><i><tt>events</tt></i>:</span></td><td>bitset of events from <a href="libvirt-libvirt.html#virEventHandleType">virEventHandleType</a> constants</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>user data registered with handle</td></tr></tbody></table></div><br /><h3><a name="virEventRegisterImpl" id="virEventRegisterImpl"><code>virEventRegisterImpl</code></a></h3><pre class="programlisting">void virEventRegisterImpl (<a href="libvirt-libvirt.html#virEventAddHandleFunc">virEventAddHandleFunc</a> addHandle, <br /> <a href="libvirt-libvirt.html#virEventUpdateHandleFunc">virEventUpdateHandleFunc</a> updateHandle, <br /> <a href="libvirt-libvirt.html#virEventRemoveHandleFunc">virEventRemoveHandleFunc</a> removeHandle, <br /> <a href="libvirt-libvirt.html#virEventAddTimeoutFunc">virEventAddTimeoutFunc</a> addTimeout, <br /> <a href="libvirt-libvirt.html#virEventUpdateTimeoutFunc">virEventUpdateTimeoutFunc</a> updateTimeout, <br /> <a href="libvirt-libvirt.html#virEventRemoveTimeoutFunc">virEventRemoveTimeoutFunc</a> removeTimeout)<br />
|
|
||||||
</pre><p></p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>addHandle</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>updateHandle</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>removeHandle</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>addTimeout</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>updateTimeout</tt></i>:</span></td><td></td></tr><tr><td><span class="term"><i><tt>removeTimeout</tt></i>:</span></td><td></td></tr></tbody></table></div><h3><a name="virEventRemoveHandleFunc" id="virEventRemoveHandleFunc"><code>virEventRemoveHandleFunc</code></a></h3><pre class="programlisting">typedef int (*virEventRemoveHandleFunc) (int watch)
|
|
||||||
</pre><p>Part of the EventImpl, this user-provided callback is notified when an fd is no longer being listened on. If a virEventHandleFreeFunc was supplied when the handle was registered, it will be invoked some time during, or after this function call, when it is safe to release the user data.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>watch</tt></i>:</span></td><td>file descriptor watch to stop listening on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td></td></tr></tbody></table></div><br /><h3><a name="virEventRemoveTimeoutFunc" id="virEventRemoveTimeoutFunc"><code>virEventRemoveTimeoutFunc</code></a></h3><pre class="programlisting">typedef int (*virEventRemoveTimeoutFunc) (int timer)
|
|
||||||
</pre><p>Part of the EventImpl, this user-defined callback removes a timer If a virEventTimeoutFreeFunc was supplied when the handle was registered, it will be invoked some time during, or after this function call, when it is safe to release the user data.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>timer</tt></i>:</span></td><td>the timer to remove</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><br /><h3><a name="virEventTimeoutCallback" id="virEventTimeoutCallback"><code>virEventTimeoutCallback</code></a></h3><pre class="programlisting">typedef void (*virEventTimeoutCallback ) (int timer, <br /> void * opaque)
|
|
||||||
</pre><p>callback for receiving timer events</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>timer</tt></i>:</span></td><td>timer id emitting the event</td></tr><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td>user data registered with handle</td></tr></tbody></table></div><br /><h3><a name="virEventUpdateHandleFunc" id="virEventUpdateHandleFunc"><code>virEventUpdateHandleFunc</code></a></h3><pre class="programlisting">typedef void (*virEventUpdateHandleFunc) (int watch, <br /> int event)
|
|
||||||
</pre><p>Part of the EventImpl, this user-provided callback is notified when events to listen on change</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>watch</tt></i>:</span></td><td>file descriptor watch to modify</td></tr><tr><td><span class="term"><i><tt>event</tt></i>:</span></td><td>new events to listen on</td></tr></tbody></table></div><br /><h3><a name="virEventUpdateTimeoutFunc" id="virEventUpdateTimeoutFunc"><code>virEventUpdateTimeoutFunc</code></a></h3><pre class="programlisting">typedef void (*virEventUpdateTimeoutFunc) (int timer, <br /> int timeout)
|
|
||||||
</pre><p>Part of the EventImpl, this user-defined callback updates an event timeout.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>timer</tt></i>:</span></td><td>the timer to modify</td></tr><tr><td><span class="term"><i><tt>timeout</tt></i>:</span></td><td>the new timeout value</td></tr></tbody></table></div><br /><h3><a name="virFreeCallback" id="virFreeCallback"><code>virFreeCallback</code></a></h3><pre class="programlisting">typedef void (*virFreeCallback ) (void * opaque)
|
|
||||||
</pre><p></p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>opaque</tt></i>:</span></td><td></td></tr></tbody></table></div><br /><h3><a name="virGetVersion" id="virGetVersion"><code>virGetVersion</code></a></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 available, 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"><code>virInitialize</code></a></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="virInterfaceCreate" id="virInterfaceCreate"><code>virInterfaceCreate</code></a></h3><pre class="programlisting">int virInterfaceCreate (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Activate an interface (ie call "ifup")</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>pointer to a defined interface</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>0 in case of success, -1 in case of error</td></tr></tbody></table></div><h3><a name="virInterfaceDefineXML" id="virInterfaceDefineXML"><code>virInterfaceDefineXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> virInterfaceDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Define an interface (or modify existing interface configuration)</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 interface, preferably in UTF-8</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>NULL in case of error, a pointer to the interface otherwise</td></tr></tbody></table></div><h3><a name="virInterfaceDestroy" id="virInterfaceDestroy"><code>virInterfaceDestroy</code></a></h3><pre class="programlisting">int virInterfaceDestroy (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated <a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> object.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>an interface 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>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div><h3><a name="virInterfaceFree" id="virInterfaceFree"><code>virInterfaceFree</code></a></h3><pre class="programlisting">int virInterfaceFree (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
|
||||||
</pre><p>Free the interface object. The interface itself is unaltered. 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>iface</tt></i>:</span></td><td>an interface 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="virInterfaceGetConnect" id="virInterfaceGetConnect"><code>virInterfaceGetConnect</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virInterfaceGetConnect (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
|
||||||
</pre><p>Provides the connection pointer associated with an interface. 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 interface object together.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>pointer to an interface</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="virInterfaceGetMACString" id="virInterfaceGetMACString"><code>virInterfaceGetMACString</code></a></h3><pre class="programlisting">const char * virInterfaceGetMACString (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
|
||||||
</pre><p>Get the MAC for an interface as string. For more information about MAC see RFC4122.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>an interface object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the MAC address (in null-terminated ASCII format) or NULL, the string need not be deallocated its lifetime will be the same as the interface object.</td></tr></tbody></table></div><h3><a name="virInterfaceGetName" id="virInterfaceGetName"><code>virInterfaceGetName</code></a></h3><pre class="programlisting">const char * virInterfaceGetName (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
|
||||||
</pre><p>Get the public name for that interface</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>an interface 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 interface object.</td></tr></tbody></table></div><h3><a name="virInterfaceGetXMLDesc" id="virInterfaceGetXMLDesc"><code>virInterfaceGetXMLDesc</code></a></h3><pre class="programlisting">char * virInterfaceGetXMLDesc (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Provide an XML description of the interface. The description may be reused later to redefine the interface with virInterfaceDefineXML().</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>an interface object</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>an 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="virInterfaceLookupByMACString" id="virInterfaceLookupByMACString"><code>virInterfaceLookupByMACString</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> virInterfaceLookupByMACString (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * macstr)<br />
|
|
||||||
</pre><p>Try to lookup an interface on the given hypervisor based on its MAC.</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>macstr</tt></i>:</span></td><td>the MAC for the interface (null-terminated ASCII format)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new interface object or NULL in case of failure. If the interface cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_INTERFACE">VIR_ERR_NO_INTERFACE</a> error is raised.</td></tr></tbody></table></div><h3><a name="virInterfaceLookupByName" id="virInterfaceLookupByName"><code>virInterfaceLookupByName</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> virInterfaceLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
|
|
||||||
</pre><p>Try to lookup an interface 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 interface</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new interface object or NULL in case of failure. If the interface cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_INTERFACE">VIR_ERR_NO_INTERFACE</a> error is raised.</td></tr></tbody></table></div><h3><a name="virInterfaceRef" id="virInterfaceRef"><code>virInterfaceRef</code></a></h3><pre class="programlisting">int virInterfaceRef (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
|
||||||
</pre><p>Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virInterfaceFree">virInterfaceFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using an interface would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>the interface to hold a reference on</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="virInterfaceUndefine" id="virInterfaceUndefine"><code>virInterfaceUndefine</code></a></h3><pre class="programlisting">int virInterfaceUndefine (<a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> iface)<br />
|
|
||||||
</pre><p>Undefine an interface, ie remove it from the config. This does not free the associated <a href="libvirt-libvirt.html#virInterfacePtr">virInterfacePtr</a> object.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>iface</tt></i>:</span></td><td>pointer to a defined interface</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="virNetworkCreate" id="virNetworkCreate"><code>virNetworkCreate</code></a></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"><code>virNetworkCreateXML</code></a></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"><code>virNetworkDefineXML</code></a></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"><code>virNetworkDestroy</code></a></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. This does not free the associated <a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> object. This function may require privileged 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"><code>virNetworkFree</code></a></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"><code>virNetworkGetAutostart</code></a></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"><code>virNetworkGetBridgeName</code></a></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"><code>virNetworkGetConnect</code></a></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"><code>virNetworkGetName</code></a></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"><code>virNetworkGetUUID</code></a></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"><code>virNetworkGetUUIDString</code></a></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"><code>virNetworkGetXMLDesc</code></a></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>an 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"><code>virNetworkLookupByName</code></a></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"><code>virNetworkLookupByUUID</code></a></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"><code>virNetworkLookupByUUIDString</code></a></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="virNetworkRef" id="virNetworkRef"><code>virNetworkRef</code></a></h3><pre class="programlisting">int virNetworkRef (<a href="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network)<br />
|
|
||||||
</pre><p>Increment the reference count on the network. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virNetworkFree">virNetworkFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a network would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>network</tt></i>:</span></td><td>the network to hold a reference on</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="virNetworkSetAutostart" id="virNetworkSetAutostart"><code>virNetworkSetAutostart</code></a></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"><code>virNetworkUndefine</code></a></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="virNodeDeviceCreateXML" id="virNodeDeviceCreateXML"><code>virNodeDeviceCreateXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> virNodeDeviceCreateXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xmlDesc, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Create a new device on the VM host machine, for example, virtual HBAs created using vport_create.</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>string containing an XML description of the device to be created</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>a node device object if successful, NULL in case of failure</td></tr></tbody></table></div><h3><a name="virNodeDeviceDestroy" id="virNodeDeviceDestroy"><code>virNodeDeviceDestroy</code></a></h3><pre class="programlisting">int virNodeDeviceDestroy (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
|
||||||
</pre><p>Destroy the device object. The virtual device is removed from the host operating system. This function may require privileged access</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>a device 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="virNodeDeviceDettach" id="virNodeDeviceDettach"><code>virNodeDeviceDettach</code></a></h3><pre class="programlisting">int virNodeDeviceDettach (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
|
||||||
</pre><p>Dettach the node device from the node itself so that it may be assigned to a guest domain. Depending on the hypervisor, this may involve operations such as unbinding any device drivers from the device, binding the device to a dummy device driver and resetting the device. If the device is currently in use by the node, this method may fail. Once the device is not assigned to any guest, it may be re-attached to the node using the virNodeDeviceReattach() method.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node 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="virNodeDeviceFree" id="virNodeDeviceFree"><code>virNodeDeviceFree</code></a></h3><pre class="programlisting">int virNodeDeviceFree (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
|
||||||
</pre><p>Drops a reference to the node device, freeing it if this was the last reference.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the 0 for success, -1 for error.</td></tr></tbody></table></div><h3><a name="virNodeDeviceGetName" id="virNodeDeviceGetName"><code>virNodeDeviceGetName</code></a></h3><pre class="programlisting">const char * virNodeDeviceGetName (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
|
||||||
</pre><p>Just return the device name</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the device name or NULL in case of error</td></tr></tbody></table></div><h3><a name="virNodeDeviceGetParent" id="virNodeDeviceGetParent"><code>virNodeDeviceGetParent</code></a></h3><pre class="programlisting">const char * virNodeDeviceGetParent (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
|
||||||
</pre><p>Accessor for the parent of the device</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the name of the device's parent, or NULL if the device has no parent.</td></tr></tbody></table></div><h3><a name="virNodeDeviceGetXMLDesc" id="virNodeDeviceGetXMLDesc"><code>virNodeDeviceGetXMLDesc</code></a></h3><pre class="programlisting">char * virNodeDeviceGetXMLDesc (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Fetch an XML document describing all aspects of the device.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node device</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="virNodeDeviceListCaps" id="virNodeDeviceListCaps"><code>virNodeDeviceListCaps</code></a></h3><pre class="programlisting">int virNodeDeviceListCaps (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev, <br /> char ** const names, <br /> int maxnames)<br />
|
|
||||||
</pre><p>Lists the names of the capabilities supported by the device.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the device</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array to collect the list of capability names</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 capability names listed in @names.</td></tr></tbody></table></div><h3><a name="virNodeDeviceLookupByName" id="virNodeDeviceLookupByName"><code>virNodeDeviceLookupByName</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> virNodeDeviceLookupByName (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * name)<br />
|
|
||||||
</pre><p>Lookup a node device by 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>unique device name</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a <a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> if found, NULL otherwise.</td></tr></tbody></table></div><h3><a name="virNodeDeviceNumOfCaps" id="virNodeDeviceNumOfCaps"><code>virNodeDeviceNumOfCaps</code></a></h3><pre class="programlisting">int virNodeDeviceNumOfCaps (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
|
||||||
</pre><p>Accessor for the number of capabilities supported by the device.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the device</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of capabilities supported by the device.</td></tr></tbody></table></div><h3><a name="virNodeDeviceReAttach" id="virNodeDeviceReAttach"><code>virNodeDeviceReAttach</code></a></h3><pre class="programlisting">int virNodeDeviceReAttach (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
|
||||||
</pre><p>Re-attach a previously dettached node device to the node so that it may be used by the node again. Depending on the hypervisor, this may involve operations such as resetting the device, unbinding it from a dummy device driver and binding it to its appropriate driver. If the device is currently in use by a guest, this method may fail.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node 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="virNodeDeviceRef" id="virNodeDeviceRef"><code>virNodeDeviceRef</code></a></h3><pre class="programlisting">int virNodeDeviceRef (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
|
||||||
</pre><p>Increment the reference count on the dev. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virNodeDeviceFree">virNodeDeviceFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a dev would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>the dev to hold a reference on</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="virNodeDeviceReset" id="virNodeDeviceReset"><code>virNodeDeviceReset</code></a></h3><pre class="programlisting">int virNodeDeviceReset (<a href="libvirt-libvirt.html#virNodeDevicePtr">virNodeDevicePtr</a> dev)<br />
|
|
||||||
</pre><p>Reset a previously dettached node device to the node before or after assigning it to a guest. The exact reset semantics depends on the hypervisor and device type but, for example, KVM will attempt to reset PCI devices with a Function Level Reset, Secondary Bus Reset or a Power Management D-State reset. If the reset will affect other devices which are currently in use, this function may fail.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>dev</tt></i>:</span></td><td>pointer to the node 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="virNodeGetCellsFreeMemory" id="virNodeGetCellsFreeMemory"><code>virNodeGetCellsFreeMemory</code></a></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 bytes 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"><code>virNodeGetFreeMemory</code></a></h3><pre class="programlisting">unsigned long long virNodeGetFreeMemory (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br />
|
|
||||||
</pre><p>provides the free memory available on the Node Note: most libvirt APIs provide memory sizes in kilobytes, but in this function the returned value is in bytes. Divide by 1024 as necessary.</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 bytes or 0 in case of error</td></tr></tbody></table></div><h3><a name="virNodeGetInfo" id="virNodeGetInfo"><code>virNodeGetInfo</code></a></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="virNodeGetSecurityModel" id="virNodeGetSecurityModel"><code>virNodeGetSecurityModel</code></a></h3><pre class="programlisting">int virNodeGetSecurityModel (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> <a href="libvirt-libvirt.html#virSecurityModelPtr">virSecurityModelPtr</a> secmodel)<br />
|
|
||||||
</pre><p>Extract the security model of a hypervisor. The 'model' field in the @secmodel argument may be initialized to the empty string if the driver has not activated a security model.</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>secmodel</tt></i>:</span></td><td>pointer to a <a href="libvirt-libvirt.html#virSecurityModel">virSecurityModel</a> structure</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="virNodeListDevices" id="virNodeListDevices"><code>virNodeListDevices</code></a></h3><pre class="programlisting">int virNodeListDevices (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * cap, <br /> char ** const names, <br /> int maxnames, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Collect the list of node devices, and store their names in @names If the optional 'cap' argument is non-NULL, then the count will be restricted to devices with the specified capability</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>cap</tt></i>:</span></td><td>capability name</td></tr><tr><td><span class="term"><i><tt>names</tt></i>:</span></td><td>array to collect the list of node device names</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>flags</tt></i>:</span></td><td>flags (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of node devices found or -1 in case of error</td></tr></tbody></table></div><h3><a name="virNodeNumOfDevices" id="virNodeNumOfDevices"><code>virNodeNumOfDevices</code></a></h3><pre class="programlisting">int virNodeNumOfDevices (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * cap, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Provides the number of node devices. If the optional 'cap' argument is non-NULL, then the count will be restricted to devices with the specified capability</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>cap</tt></i>:</span></td><td>capability name</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags (unused, pass 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of node devices or -1 in case of error</td></tr></tbody></table></div><h3><a name="virSecretDefineXML" id="virSecretDefineXML"><code>virSecretDefineXML</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> virSecretDefineXML (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * xml, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>If XML specifies an UUID, locates the specified secret and replaces all attributes of the secret specified by UUID by attributes specified in xml (any attributes not specified in xml are discarded). Otherwise, creates a new secret with an automatically chosen UUID, and initializes its attributes from 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><a href="libvirt-libvirt.html#virConnect">virConnect</a> connection</td></tr><tr><td><span class="term"><i><tt>xml</tt></i>:</span></td><td>XML describing the secret.</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags, use 0 for now</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a the secret on success, NULL on failure.</td></tr></tbody></table></div><h3><a name="virSecretFree" id="virSecretFree"><code>virSecretFree</code></a></h3><pre class="programlisting">int virSecretFree (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)<br />
|
|
||||||
</pre><p>Release the secret handle. The underlying secret continues to exist.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>pointer to a secret</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="virSecretGetConnect" id="virSecretGetConnect"><code>virSecretGetConnect</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> virSecretGetConnect (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)<br />
|
|
||||||
</pre><p>Provides the connection pointer associated with a secret. 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 secret object together.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>A <a href="libvirt-libvirt.html#virSecret">virSecret</a> secret</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="virSecretGetUUID" id="virSecretGetUUID"><code>virSecretGetUUID</code></a></h3><pre class="programlisting">int virSecretGetUUID (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> unsigned char * uuid)<br />
|
|
||||||
</pre><p>Fetches the UUID of the secret.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>A <a href="libvirt-libvirt.html#virSecret">virSecret</a> secret</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 with the uuid buffer being filled, or -1 upon failure.</td></tr></tbody></table></div><h3><a name="virSecretGetUUIDString" id="virSecretGetUUIDString"><code>virSecretGetUUIDString</code></a></h3><pre class="programlisting">int virSecretGetUUIDString (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> char * buf)<br />
|
|
||||||
</pre><p>Get the UUID for a secret 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>secret</tt></i>:</span></td><td>a secret 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="virSecretGetUsageID" id="virSecretGetUsageID"><code>virSecretGetUsageID</code></a></h3><pre class="programlisting">const char * virSecretGetUsageID (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)<br />
|
|
||||||
</pre><p>Get the unique identifier of the object with which this secret is to be used. The format of the identifier is dependant on the usage type of the secret. For a secret with a usage type of <a href="libvirt-libvirt.html#VIR_SECRET_USAGE_TYPE_VOLUME">VIR_SECRET_USAGE_TYPE_VOLUME</a> the identifier will be a fully qualfied path name. The identifiers are intended to be unique within the set of all secrets sharing the same usage type. ie, there shall only ever be one secret for each volume path.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>a secret object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a string identifying the object using the secret, or NULL upon error</td></tr></tbody></table></div><h3><a name="virSecretGetUsageType" id="virSecretGetUsageType"><code>virSecretGetUsageType</code></a></h3><pre class="programlisting">int virSecretGetUsageType (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)<br />
|
|
||||||
</pre><p>Get the type of object which uses this secret. The returned value is one of the constants defined in the <a href="libvirt-libvirt.html#virSecretUsageType">virSecretUsageType</a> enumeration. More values may be added to this enumeration in the future, so callers should expect to see usage types they do not explicitly know about.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>a secret object</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a positive integer identifying the type of object, or -1 upon error.</td></tr></tbody></table></div><h3><a name="virSecretGetValue" id="virSecretGetValue"><code>virSecretGetValue</code></a></h3><pre class="programlisting">unsigned char * virSecretGetValue (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> size_t * value_size, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Fetches the value of a secret.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>A <a href="libvirt-libvirt.html#virSecret">virSecret</a> connection</td></tr><tr><td><span class="term"><i><tt>value_size</tt></i>:</span></td><td>Place for storing size of the secret value</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags, use 0 for now</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the secret value on success, NULL on failure. The caller must free() the secret value.</td></tr></tbody></table></div><h3><a name="virSecretGetXMLDesc" id="virSecretGetXMLDesc"><code>virSecretGetXMLDesc</code></a></h3><pre class="programlisting">char * virSecretGetXMLDesc (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Fetches an XML document describing attributes of the secret.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>A <a href="libvirt-libvirt.html#virSecret">virSecret</a> secret</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags, use 0 for now</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the XML document on success, NULL on failure. The caller must free() the XML.</td></tr></tbody></table></div><h3><a name="virSecretLookupByUUID" id="virSecretLookupByUUID"><code>virSecretLookupByUUID</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> virSecretLookupByUUID (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const unsigned char * uuid)<br />
|
|
||||||
</pre><p>Try to lookup a secret on the given hypervisor based on its UUID. Uses the 16 bytes of raw data to describe the 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 secret</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new secret object or NULL in case of failure. If the secret cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_SECRET">VIR_ERR_NO_SECRET</a> error is raised.</td></tr></tbody></table></div><h3><a name="virSecretLookupByUUIDString" id="virSecretLookupByUUIDString"><code>virSecretLookupByUUIDString</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> virSecretLookupByUUIDString (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> const char * uuidstr)<br />
|
|
||||||
</pre><p>Try to lookup a secret on the given hypervisor based on its UUID. Uses the printable string value to describe the 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 secret</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new secret object or NULL in case of failure. If the secret cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_SECRET">VIR_ERR_NO_SECRET</a> error is raised.</td></tr></tbody></table></div><h3><a name="virSecretLookupByUsage" id="virSecretLookupByUsage"><code>virSecretLookupByUsage</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> virSecretLookupByUsage (<a href="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br /> int usageType, <br /> const char * usageID)<br />
|
|
||||||
</pre><p>Try to lookup a secret on the given hypervisor based on its usage The usageID is unique within the set of secrets sharing the same usageType value.</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>usageType</tt></i>:</span></td><td>the type of secret usage</td></tr><tr><td><span class="term"><i><tt>usageID</tt></i>:</span></td><td>identifier of the object using the secret</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new secret object or NULL in case of failure. If the secret cannot be found, then <a href="libvirt-virterror.html#VIR_ERR_NO_SECRET">VIR_ERR_NO_SECRET</a> error is raised.</td></tr></tbody></table></div><h3><a name="virSecretRef" id="virSecretRef"><code>virSecretRef</code></a></h3><pre class="programlisting">int virSecretRef (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)<br />
|
|
||||||
</pre><p>Increment the reference count on the secret. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virSecretFree">virSecretFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a secret would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>the secret to hold a reference on</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="virSecretSetValue" id="virSecretSetValue"><code>virSecretSetValue</code></a></h3><pre class="programlisting">int virSecretSetValue (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret, <br /> const unsigned char * value, <br /> size_t value_size, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Sets the value of a secret.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>A <a href="libvirt-libvirt.html#virSecret">virSecret</a> secret</td></tr><tr><td><span class="term"><i><tt>value</tt></i>:</span></td><td>Value of the secret</td></tr><tr><td><span class="term"><i><tt>value_size</tt></i>:</span></td><td>Size of the value</td></tr><tr><td><span class="term"><i><tt>flags</tt></i>:</span></td><td>flags, use 0 for now</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="virSecretUndefine" id="virSecretUndefine"><code>virSecretUndefine</code></a></h3><pre class="programlisting">int virSecretUndefine (<a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> secret)<br />
|
|
||||||
</pre><p>Deletes the specified secret. This does not free the associated <a href="libvirt-libvirt.html#virSecretPtr">virSecretPtr</a> object.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>secret</tt></i>:</span></td><td>A <a href="libvirt-libvirt.html#virSecret">virSecret</a> secret</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="virStoragePoolBuild" id="virStoragePoolBuild"><code>virStoragePoolBuild</code></a></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>future flags, use 0 for now</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"><code>virStoragePoolCreate</code></a></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>future flags, use 0 for now</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"><code>virStoragePoolCreateXML</code></a></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 persistent, 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>future flags, use 0 for now</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"><code>virStoragePoolDefineXML</code></a></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 persistent, 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>future flags, use 0 for now</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"><code>virStoragePoolDelete</code></a></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"><code>virStoragePoolDestroy</code></a></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"><code>virStoragePoolFree</code></a></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"><code>virStoragePoolGetAutostart</code></a></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"><code>virStoragePoolGetConnect</code></a></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 pool</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"><code>virStoragePoolGetInfo</code></a></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"><code>virStoragePoolGetName</code></a></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"><code>virStoragePoolGetUUID</code></a></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"><code>virStoragePoolGetUUIDString</code></a></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"><code>virStoragePoolGetXMLDesc</code></a></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 (set of virDomainXMLFlags)</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"><code>virStoragePoolListVolumes</code></a></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"><code>virStoragePoolLookupByName</code></a></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"><code>virStoragePoolLookupByUUID</code></a></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"><code>virStoragePoolLookupByUUIDString</code></a></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"><code>virStoragePoolLookupByVolume</code></a></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"><code>virStoragePoolNumOfVolumes</code></a></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="virStoragePoolRef" id="virStoragePoolRef"><code>virStoragePoolRef</code></a></h3><pre class="programlisting">int virStoragePoolRef (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool)<br />
|
|
||||||
</pre><p>Increment the reference count on the pool. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virStoragePoolFree">virStoragePoolFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a pool would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>pool</tt></i>:</span></td><td>the pool to hold a reference on</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="virStoragePoolRefresh" id="virStoragePoolRefresh"><code>virStoragePoolRefresh</code></a></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"><code>virStoragePoolSetAutostart</code></a></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"><code>virStoragePoolUndefine</code></a></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>0 on success, -1 on failure</td></tr></tbody></table></div><h3><a name="virStorageVolCreateXML" id="virStorageVolCreateXML"><code>virStorageVolCreateXML</code></a></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="virStorageVolCreateXMLFrom" id="virStorageVolCreateXMLFrom"><code>virStorageVolCreateXMLFrom</code></a></h3><pre class="programlisting"><a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXMLFrom (<a href="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br /> const char * xmldesc, <br /> <a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> clonevol, <br /> unsigned int flags)<br />
|
|
||||||
</pre><p>Create a storage volume in the parent pool, using the 'clonevol' volume as input. Information for the new volume (name, perms) are passed via a typical volume XML description.</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 parent pool for the new volume</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>clonevol</tt></i>:</span></td><td>storage volume to use as input</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"><code>virStorageVolDelete</code></a></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>future flags, use 0 for now</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"><code>virStorageVolFree</code></a></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 continues 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"><code>virStorageVolGetConnect</code></a></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 pool</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"><code>virStorageVolGetInfo</code></a></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"><code>virStorageVolGetKey</code></a></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 have 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"><code>virStorageVolGetName</code></a></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"><code>virStorageVolGetPath</code></a></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"><code>virStorageVolGetXMLDesc</code></a></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"><code>virStorageVolLookupByKey</code></a></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"><code>virStorageVolLookupByName</code></a></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"><code>virStorageVolLookupByPath</code></a></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><h3><a name="virStorageVolRef" id="virStorageVolRef"><code>virStorageVolRef</code></a></h3><pre class="programlisting">int virStorageVolRef (<a href="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol)<br />
|
|
||||||
</pre><p>Increment the reference count on the vol. For each additional call to this method, there shall be a corresponding call to <a href="libvirt-libvirt.html#virStorageVolFree">virStorageVolFree</a> to release the reference count, once the caller no longer needs the reference to this object. This method is typically useful for applications where multiple threads are using a connection, and it is required that the connection remain open until all threads have finished using it. ie, each new thread using a vol would increment the reference count.</p><div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>vol</tt></i>:</span></td><td>the vol to hold a reference on</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div></div><div id="footer"><p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="../et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p></div></body></html>
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
118
docs/index.html
118
docs/index.html
|
@ -1,118 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from index.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: The virtualization API</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>
|
|
||||||
<span class="active">Home</span>
|
|
||||||
</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="inactive" href="docs.html">Documentation</a>
|
|
||||||
</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="FAQ.html">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>The virtualization API</h1>
|
|
||||||
<h2>libvirt is:</h2>
|
|
||||||
<ul><li>
|
|
||||||
A toolkit to interact with the virtualization capabilities
|
|
||||||
of recent versions of Linux (and other OSes).
|
|
||||||
</li><li>
|
|
||||||
Free software available under the
|
|
||||||
<a href="http://www.opensource.org/licenses/lgpl-license.html">GNU
|
|
||||||
Lesser General Public License</a>.
|
|
||||||
</li><li>
|
|
||||||
A long term stable C API
|
|
||||||
</li><li>
|
|
||||||
A set of bindings for common languages
|
|
||||||
</li><li>
|
|
||||||
A <a href="CIM/">CIM provider</a> for the DMTF virtualization schema
|
|
||||||
</li><li>
|
|
||||||
A <a href="/qpid/">QMF agent</a> for the AMQP/QPid messaging system
|
|
||||||
</li></ul>
|
|
||||||
<h2>libvirt supports:</h2>
|
|
||||||
<ul><li>
|
|
||||||
The <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen</a> hypervisor
|
|
||||||
on Linux and Solaris hosts.
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://bellard.org/qemu/">QEMU</a> emulator
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://kvm.qumranet.com/kvmwiki">KVM</a> Linux hypervisor
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://lxc.sourceforge.net/">LXC</a> Linux container system
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://openvz.org/">OpenVZ</a> Linux container system
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://user-mode-linux.sourceforge.net/">User Mode Linux</a> paravirtualized kernel
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://www.virtualbox.org/">VirtualBox</a> hypervisor
|
|
||||||
</li><li>
|
|
||||||
Storage on IDE/SCSI/USB disks, FibreChannel, LVM, iSCSI, NFS and filesystems
|
|
||||||
</li></ul>
|
|
||||||
<h2>libvirt provides:</h2>
|
|
||||||
<ul><li>Remote management using TLS encryption and x509 certificates</li><li>Remote management authenticating with Kerberos and SASL</li><li>Local access control using PolicyKit</li><li>Zero-conf discovery using Avahi multicast-DNS</li><li>Management of virtual machines, virtual networks and storage</li><li>Portable client API for Linux, Solaris and Windows</li></ul>
|
|
||||||
<p class="image">
|
|
||||||
<img src="libvirtLogo.png" alt="libvirt Logo" /></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,121 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from internals.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: libvirt internals</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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>
|
|
||||||
<span class="active">Internals</span>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="General hacking guidelines for contributors" class="inactive" href="hacking.html">Contributor guidelines</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Adding new public libvirt APIs" class="inactive" href="api_extension.html">API extensions</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="FAQ.html">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>libvirt internals</h1>
|
|
||||||
<p>
|
|
||||||
This section provides documents useful to those working on the libvirt
|
|
||||||
internals, adding new public APIs, new hypervisor drivers or extending
|
|
||||||
the libvirtd daemon code.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
138
docs/intro.html
138
docs/intro.html
|
@ -1,138 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from intro.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Architecture</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>
|
|
||||||
<span class="active">Architecture</span>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Terminology and goals of libvirt API" class="inactive" href="goals.html">Goals</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The libvirt API concepts" class="inactive" href="api.html">API concepts</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing virtual machines" class="inactive" href="archdomain.html">Domains</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Providing isolated networks and NAT based network connectivity" class="inactive" href="archnetwork.html">Network</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Managing storage pools and volumes" class="inactive" href="archstorage.html">Storage</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enumerating host node devices" class="inactive" href="archnode.html">Node Devices</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Architecture</h1>
|
|
||||||
<p>Libvirt is a C toolkit manage the virtualization capabilities
|
|
||||||
of recent versions of Linux (and other OSes).</p>
|
|
||||||
<p>To avoid ambiguity about the goals, terms and specific concepts used
|
|
||||||
in libvirt documentation please see the <a href="goals.html">Goal
|
|
||||||
section</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
241
docs/java.html
241
docs/java.html
|
@ -1,241 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from java.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Java API bindings</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Bindings of the libvirt API for other languages" class="active" href="bindings.html">Language bindings</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="overview of the python API bindings" class="inactive" href="python.html">Python</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Java</span>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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></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="FAQ.html">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>Java API bindings</h1>
|
|
||||||
<h2>Presentation</h2>
|
|
||||||
<p>The Java bindings make use of <a href="https://jna.dev.java.net/">JNA</a>
|
|
||||||
to expose the C API in a Java friendly way. The bindings are are based on
|
|
||||||
work initiated by Toth Istvan.</p>
|
|
||||||
<h2>Getting it</h2>
|
|
||||||
<p>
|
|
||||||
The latest versions of the libvirt Java bindings can be downloaded from:
|
|
||||||
</p>
|
|
||||||
<ul><li><a href="ftp://libvirt.org/libvirt/java/">libvirt.org FTP server</a></li><li><a href="http://libvirt.org/sources/java/">libvirt.org HTTP server</a></li></ul>
|
|
||||||
<h3>Maven</h3>
|
|
||||||
<p>A maven repository is located at <a href="http://www.libvirt.org/maven2/">http://www.libvirt.org/maven2/</a>
|
|
||||||
which you can use to include this in your maven projects.</p>
|
|
||||||
<h2>GIT source repository</h2>
|
|
||||||
<p> The Java bindings code source is now maintained in a <a href="http://git-scm.com/">git</a> repository available on
|
|
||||||
<a href="http://libvirt.org/git/">libvirt.org</a>:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
git clone git://libvirt.org/libvirt-java.git
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
It can also be browsed at
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
<a href="http://libvirt.org/git/?p=libvirt-java.git;a=summary">http://libvirt.org/git/?p=libvirt-java.git;a=summary</a>
|
|
||||||
</pre>
|
|
||||||
<p></p>
|
|
||||||
<h2>GIT repository mirror</h2>
|
|
||||||
<p>
|
|
||||||
The source code is also mirrored on <a href="http://www.gitorious.org">gitorious</a>
|
|
||||||
to aid in public development. You clone the repo with
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
git clone git://gitorious.org/libvirt/libvirt-java.git
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
It can also be browsed at
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
<a href="http://gitorious.org/libvirt/libvirt-java">http://gitorious.org/libvirt/libvirt-java</a>
|
|
||||||
</pre>
|
|
||||||
<p></p>
|
|
||||||
<h2>CVS repository access (Deprecated)</h2>
|
|
||||||
<p> The old source repository uses <a href="http://ximbiot.com/cvs/cvshome/docs/">CVS</a> and anonymous access
|
|
||||||
is provided. Prior to accessing the server is it necessary to authenticate
|
|
||||||
using the password <code>anoncvs</code>. This can be accomplished with
|
|
||||||
the <code>cvs login</code> command:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
# cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs login
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Once authenticated, a checkout can be obtained using
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
# cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co libvirt-java
|
|
||||||
</pre>
|
|
||||||
<p></p>
|
|
||||||
<h2>Building</h2>
|
|
||||||
<p>The code is built using ant, and assumes that you have the jna jar installed. Once you have downloaded
|
|
||||||
the code you can build the code with</p>
|
|
||||||
<pre>
|
|
||||||
|
|
||||||
% cd libvirt-java
|
|
||||||
% ant build
|
|
||||||
</pre>
|
|
||||||
<h2>Content</h2>
|
|
||||||
<p>The bindings are articulated around a few
|
|
||||||
classes in the <code>org/libvirt</code> package, notably the
|
|
||||||
<code>Connect</code>, <code>Domain</code> and <code>Network</code>
|
|
||||||
ones. Functions in the <a href="html/libvirt-libvirt.html">C API</a>
|
|
||||||
taking <code>virConnectPtr</code>, <code>virDomainPtr</code> or
|
|
||||||
<code>virNetworkPtr</code> as their first argument usually become
|
|
||||||
methods for the classes, their name is just stripped from the
|
|
||||||
virConnect or virDomain(Get) prefix and the first letter gets converted to
|
|
||||||
lower case, for example the C functions:</p>
|
|
||||||
<p>
|
|
||||||
<code>int <a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
|
|
||||||
(virConnectPtr conn);</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<code>int <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
|
|
||||||
(virDomainPtr domain, unsigned long memory);</code>
|
|
||||||
</p>
|
|
||||||
<p>become</p>
|
|
||||||
<p>
|
|
||||||
<code>virConn.numOfDomains()</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<code>virDomain.setMaxMemory(long memory)</code>
|
|
||||||
</p>
|
|
||||||
<p> There is of course some functions where the mapping is less direct
|
|
||||||
and using extra classes to map complex arguments. The <a href="http://libvirt.org/sources/java/javadoc">Javadoc</a> is available online or as
|
|
||||||
part of a separate libvirt-java-javadoc package.</p>
|
|
||||||
<p>So let's look at a simple example inspired from the
|
|
||||||
<code>test.java</code> test found in <code>src</code> in the source tree:</p>
|
|
||||||
<pre>import <span style="color: #0071FF; background-color: #FFFFFF">org.libvirt.*</span>;
|
|
||||||
public class minitest {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
Connect conn=null;
|
|
||||||
try{
|
|
||||||
conn = new <span style="color: #0071FF; background-color: #FFFFFF">Connect</span>("test:///default", true);
|
|
||||||
} catch (<span style="color: #0071FF; background-color: #FFFFFF">LibvirtException</span> e){
|
|
||||||
System.out.println("exception caught:"+e);
|
|
||||||
System.out.println(e.getError());
|
|
||||||
}
|
|
||||||
try{
|
|
||||||
<span style="color: #0071FF; background-color: #FFFFFF">Domain</span> testDomain=conn.<span style="color: #007F00; background-color: #FFFFFF">domainLookupByName</span>("test");
|
|
||||||
System.out.println("Domain:" + testDomain.<span style="color: #E50073; background-color: #FFFFFF">getName</span>() + " id " +
|
|
||||||
testDomain.<span style="color: #E50073; background-color: #FFFFFF">getID</span>() + " running " +
|
|
||||||
testDomain.<span style="color: #E50073; background-color: #FFFFFF">getOSType</span>());
|
|
||||||
} catch (<span style="color: #0071FF; background-color: #FFFFFF">LibvirtException</span> e){
|
|
||||||
System.out.println("exception caught:"+e);
|
|
||||||
System.out.println(e.getError());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</pre>
|
|
||||||
<p>There is not much to comment about it, it really is a straight mapping
|
|
||||||
from the C API, the only points to notice are:</p>
|
|
||||||
<ul><li>the import of the modules in the <code><span style="color: #0071FF; background-color: #FFFFFF">org.libvirt</span></code> package</li><li>getting a connection to the hypervisor, in that case using the
|
|
||||||
readonly access to the default test hypervisor.</li><li>getting an object representing the test domain using <span style="color: #007F00; background-color: #FFFFFF">lookupByName</span></li><li>if the domain is not found a LibvirtError exception will be raised</li><li>extracting and printing some information about the domain using
|
|
||||||
various <span style="color: #E50073; background-color: #FFFFFF">methods</span>
|
|
||||||
associated to the Domain class.</li></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,216 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from logging.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Logging in the library and the daemon</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="active" href="deployment.html">Deployment</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The URI formats used for connecting to libvirt" class="inactive" href="uri.html">URI format</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enable remote access over TCP" class="inactive" href="remote.html">Remote access</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Configure authentication for the libvirt daemon" class="inactive" href="auth.html">Authentication</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Logging</span>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Logging in the library and the daemon</h1>
|
|
||||||
<p>Libvirt includes logging facilities starting from version 0.6.0,
|
|
||||||
this complements the <a href="errors.html">error handling</a>
|
|
||||||
mechanism and APIs to allow tracing though the execution of the
|
|
||||||
library as well as in the libvirtd daemon.</p>
|
|
||||||
<p>The logging functionalities in libvirt are based on 3 key concepts,
|
|
||||||
similar to the one present in other generic logging facilities like
|
|
||||||
log4j:</p>
|
|
||||||
<ul><li>log messages: they are information generated at runtime by
|
|
||||||
the libvirt code, it includes a priority level (DEBUG = 1,
|
|
||||||
INFO = 2, WARNING = 3, ERROR = 4), a category, function name and
|
|
||||||
line number, indicating where it originated from, and finally
|
|
||||||
a formatted message, in addition the library adds a timestamp
|
|
||||||
at the begining of the message</li><li>log filters: it's a set of patter and priorities allowing to acept
|
|
||||||
or reject a log message, if the message category matches a filter,
|
|
||||||
the message priority is compared to the filter priority, if lower
|
|
||||||
the message is discarded, if higher the message is output. If
|
|
||||||
no filter matches, then a general priority level is applied to
|
|
||||||
all remaining messages. This allows to capture for example all
|
|
||||||
debug messages for the QEmu driver, but otherwise only allow
|
|
||||||
errors to show up from other parts</li><li>log outputs: once a message has gone though filtering a set of
|
|
||||||
output defines where to send the message, they can also filter
|
|
||||||
based on the priority, for example it may be useful to output
|
|
||||||
all messages to a debugging file but only allow errors to be
|
|
||||||
logged though syslog.</li></ul>
|
|
||||||
<p>The library configuration of logging is though 3 environment variables
|
|
||||||
allowing to control the logging behaviour:</p>
|
|
||||||
<ul><li>LIBVIRT_DEBUG: it can take the four following values:
|
|
||||||
<ul><li>1 or "debug": asking the library to log every message emitted,
|
|
||||||
though the filters can be used to avoid filling up the output</li><li>2 or "info": log all non-debugging informations</li><li>3 or "warn": log warnings and errors, that's the default value</li><li>4 or "error": log only error messages</li></ul></li><li>LIBVIRT_LOG_FILTERS: allow to define logging filters</li><li>LIBVIRT_LOG_OUTPUTS: allow to define logging outputs</li></ul>
|
|
||||||
<p>Note that, for example, setting LIBVIRT_DEBUG= is the same as unset. If
|
|
||||||
you specify an invalid value, it will be ignored with a warning. If you
|
|
||||||
have an error in a filter or output string, some of the settings may be
|
|
||||||
applied up to the point at which libvirt encountered the error.</p>
|
|
||||||
<p>Similary the daemon logging behaviour can be tuned using 3 config
|
|
||||||
variables, stored in the configuration file:
|
|
||||||
</p>
|
|
||||||
<ul><li>log_level: accepts the following values:
|
|
||||||
<ul><li>4: only errors</li><li>3: warnings and errors</li><li>2: informations, warnings and errors</li><li>1: debug and everything</li></ul></li><li>log_filters: allow to define logging filters</li><li>log_outputs: allow to define logging outputs</li></ul>
|
|
||||||
<p>When starting the libvirt daemon, any logging environment variable
|
|
||||||
settings will override settings in the config file. Command line options
|
|
||||||
take precedence over all. If no outputs are defined for libvirtd, it
|
|
||||||
defaults to logging to syslog when it is running as a daemon, or to
|
|
||||||
stderr when it is running in the foreground.</p>
|
|
||||||
<p>Libvirtd does not reload its logging configuration when issued a SIGHUP.
|
|
||||||
If you want to reload the configuration, you must do a <code>service
|
|
||||||
libvirtd restart</code> or manually stop and restart the daemon
|
|
||||||
yourself.</p>
|
|
||||||
<p>The syntax for filters and outputs is the same for both types of
|
|
||||||
variables.</p>
|
|
||||||
<p>The format for a filter is:</p>
|
|
||||||
<pre>x:name</pre>
|
|
||||||
<p>where <code>name</code> is a match string e.g. <code>remote</code> or
|
|
||||||
<code>qemu</code> and the x is the minimal level where matching messages
|
|
||||||
should be logged:</p>
|
|
||||||
<ul><li>1: DEBUG</li><li>2: INFO</li><li>3: WARNING</li><li>4: ERROR</li></ul>
|
|
||||||
<p>Multiple filters can be defined in a single string, they just need to be
|
|
||||||
separated by spaces, e.g: <code>"3:remote 4:event"</code> to only get
|
|
||||||
warning or errors from the remote layer and only errors from the event
|
|
||||||
layer.</p>
|
|
||||||
<p>
|
|
||||||
</p>
|
|
||||||
<p>If you specify a log priority in a filter that is below the default log
|
|
||||||
priority level, messages that match that filter will still be logged,
|
|
||||||
while others will not. In order to see those messages, you must also have
|
|
||||||
an output defined that includes the priority level of your filter.</p>
|
|
||||||
<p>The format for an output can be one of those 3 forms:</p>
|
|
||||||
<ul><li><code>x:stderr</code> output goes to stderr</li><li><code>x:syslog:name</code> use syslog for the output and use the
|
|
||||||
given <code>name</code> as the ident</li><li><code>x:file:file_path</code>output to a file, with the given
|
|
||||||
filepath</li></ul>
|
|
||||||
<p>In all cases the x prefix is the minimal level, acting as a filter:</p>
|
|
||||||
<ul><li>1: DEBUG</li><li>2: INFO</li><li>3: WARNING</li><li>4: ERROR</li></ul>
|
|
||||||
<p>Multiple output can be defined , they just need to be separated by
|
|
||||||
spaces, e.g.: <code>"3:syslog:libvirtd 1:file:/tmp/libvirt.log"</code>
|
|
||||||
will log all warnings and errors to syslog under the libvirtd ident
|
|
||||||
but also log everything debugging and informations included in the
|
|
||||||
file <code>/tmp/libvirt.log</code></p>
|
|
||||||
<p>For example setting up the following:</p>
|
|
||||||
<pre>export LIBVIRT_DEBUG=1
|
|
||||||
export LIBVIRT_LOG_OUTPUTS="1:file:virsh.log"</pre>
|
|
||||||
<p>and then running virsh will accumulate the logs in the
|
|
||||||
<code>virsh.log</code> file in a way similar to:</p>
|
|
||||||
<pre>14:29:04.771: debug : virInitialize:278 : register drivers
|
|
||||||
14:29:04.771: debug : virRegisterDriver:618 : registering Test as driver 0</pre>
|
|
||||||
<p>the messages are timestamped, there is also the level recorded,
|
|
||||||
if debug the name of the function is also printed and then the formatted
|
|
||||||
message. This should be sufficient to at least get a precise idea of
|
|
||||||
what is happening and where things are going wrong, allowing to then
|
|
||||||
put the correct breakpoints when running under a debugger.</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
1431
docs/news.html
1431
docs/news.html
File diff suppressed because it is too large
Load Diff
171
docs/python.html
171
docs/python.html
|
@ -1,171 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from python.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Python API bindings</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Bindings of the libvirt API for other languages" class="active" href="bindings.html">Language bindings</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Python</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="overview of the Java API bindings" class="inactive" href="java.html">Java</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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></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="FAQ.html">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>Python API bindings</h1>
|
|
||||||
<p>The Python binding should be complete and are mostly automatically
|
|
||||||
generated from the formal description of the API in xml. The bindings are
|
|
||||||
articulated around 2 classes <code>virConnect</code> and virDomain mapping to
|
|
||||||
the C types. Functions in the C API taking either type as argument then
|
|
||||||
becomes methods for the classes, their name is just stripped from the
|
|
||||||
virConnect or virDomain(Get) prefix and the first letter gets converted to
|
|
||||||
lower case, for example the C functions:</p>
|
|
||||||
<p>
|
|
||||||
<code>int <a href="html/libvirt-libvirt.html#virConnectNumOfDomains">virConnectNumOfDomains</a>
|
|
||||||
(virConnectPtr conn);</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<code>int <a href="html/libvirt-libvirt.html#virDomainSetMaxMemory">virDomainSetMaxMemory</a>
|
|
||||||
(virDomainPtr domain, unsigned long memory);</code>
|
|
||||||
</p>
|
|
||||||
<p>become</p>
|
|
||||||
<p>
|
|
||||||
<code>virConn::numOfDomains(self)</code>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<code>virDomain::setMaxMemory(self, memory)</code>
|
|
||||||
</p>
|
|
||||||
<p>This process is fully automated, you can get a summary of the conversion
|
|
||||||
in the file libvirtclass.txt present in the python dir or in the docs.There
|
|
||||||
is a couple of function who don't map directly to their C counterparts due to
|
|
||||||
specificities in their argument conversions:</p>
|
|
||||||
<ul><li><code><a href="html/libvirt-libvirt.html#virConnectListDomains">virConnectListDomains</a></code>
|
|
||||||
is replaced by <code>virDomain::listDomainsID(self)</code> which returns
|
|
||||||
a list of the integer ID for the currently running domains</li><li><code><a href="html/libvirt-libvirt.html#virDomainGetInfo">virDomainGetInfo</a></code>
|
|
||||||
is replaced by <code>virDomain::info()</code> which returns a list of
|
|
||||||
<ol><li>state: one of the state values (virDomainState)</li><li>maxMemory: the maximum memory used by the domain</li><li>memory: the current amount of memory used by the domain</li><li>nbVirtCPU: the number of virtual CPU</li><li>cpuTime: the time used by the domain in nanoseconds</li></ol></li></ul>
|
|
||||||
<p>So let's look at a simple example inspired from the <code>basic.py</code>
|
|
||||||
test found in <code>python/tests/</code> in the source tree:</p>
|
|
||||||
<pre>import <span style="color: #0071FF; background-color: #FFFFFF">libvirt</span>
|
|
||||||
import sys
|
|
||||||
|
|
||||||
conn = <span style="color: #0071FF; background-color: #FFFFFF">libvirt</span>.openReadOnly(None)
|
|
||||||
if conn == None:
|
|
||||||
print 'Failed to open connection to the hypervisor'
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
try:
|
|
||||||
dom0 = conn.<span style="color: #007F00; background-color: #FFFFFF">lookupByName</span>("Domain-0")
|
|
||||||
except:
|
|
||||||
print 'Failed to find the main domain'
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
print "Domain 0: id %d running %s" % (dom0.<span style="color: #FF0080; background-color: #FFFFFF">ID</span>(), dom0.<span style="color: #FF0080; background-color: #FFFFFF">OSType</span>())
|
|
||||||
print dom0.<span style="color: #FF0080; background-color: #FFFFFF">info</span>()</pre>
|
|
||||||
<p>There is not much to comment about it, it really is a straight mapping
|
|
||||||
from the C API, the only points to notice are:</p>
|
|
||||||
<ul><li>the import of the module called <code><span style="color: #0071FF; background-color: #FFFFFF">libvirt</span></code></li><li>getting a connection to the hypervisor, in that case using the
|
|
||||||
openReadOnly function allows the code to execute as a normal user.</li><li>getting an object representing the Domain 0 using <span style="color: #007F00; background-color: #FFFFFF">lookupByName</span></li><li>if the domain is not found a libvirtError exception will be raised</li><li>extracting and printing some information about the domain using
|
|
||||||
various <span style="color: #E50073; background-color: #FFFFFF">methods</span>
|
|
||||||
associated to the virDomain class.</li></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,116 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from relatedlinks.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Related links</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="inactive" href="docs.html">Documentation</a>
|
|
||||||
</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="FAQ.html">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>
|
|
||||||
<span class="active">Related Links</span>
|
|
||||||
<ul class="l1"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Overview of applications using the libvirt APIs" class="inactive" href="apps.html">Applications</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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>Related links</h1>
|
|
||||||
<p>
|
|
||||||
This page contains some links of interest in the area of virtualization.
|
|
||||||
There are separate pages covering <a href="apps.html">applications using libvirt</a>
|
|
||||||
and <a href="bindings.html">language bindings for libvirt</a>.
|
|
||||||
</p>
|
|
||||||
<h2>Other library bindings</h2>
|
|
||||||
<ul><li><a href="/CIM/">CIM provider</a></li><li><a href="/qpid/">libvirt on the Advanced Message Queuing Protocol (AMQP)</a></li><li><a href="http://search.cpan.org/dist/Sys-Virt/">Perl bindings</a></li><li><a href="/ocaml/">OCaml bindings</a></li><li><a href="/ruby/">Ruby bindings</a></li></ul>
|
|
||||||
<h2>Hypervisors / emulators / containers</h2>
|
|
||||||
<ul><li>
|
|
||||||
The <a href="http://www.cl.cam.ac.uk/Research/SRG/netos/xen/index.html">Xen</a> hypervisor
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://bellard.org/qemu/">QEMU</a> emulator
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://kvm.qumranet.com/kvmwiki">KVM</a> Linux hypervisor
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://lxc.sourceforge.net/">LXC</a> Linux container system
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://openvz.org/">OpenVZ</a> Linux container system
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://virt.kernelnewbies.org/lguest">lGuest</a> paravirtualized hypervisor
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://virt.kernelnewbies.org/Linux-VServer">Linux-VServer</a> container system
|
|
||||||
</li><li>
|
|
||||||
The <a href="http://virt.kernelnewbies.org/UML">User Mode Linux</a> paravirtualized hypervisor
|
|
||||||
</li></ul>
|
|
||||||
<h2>Virtualization technology</h2>
|
|
||||||
<ul><li>
|
|
||||||
<a href="http://virt.kernelnewbies.org/">Kernel Newbies Virtualization guide</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://www-128.ibm.com/developerworks/linux/library/l-linuxvirt/?ca=dgr-lnxw01Virtual-Linux">IBM developerworks virtualization guide</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="http://en.wikipedia.org/wiki/Virtualization">Wikipedia Virtualization</a>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
752
docs/remote.html
752
docs/remote.html
|
@ -1,752 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from remote.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Remote support</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="active" href="deployment.html">Deployment</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The URI formats used for connecting to libvirt" class="inactive" href="uri.html">URI format</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Remote access</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Configure authentication for the libvirt daemon" class="inactive" href="auth.html">Authentication</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Remote support</h1>
|
|
||||||
<p>
|
|
||||||
Libvirt allows you to access hypervisors running on remote
|
|
||||||
machines through authenticated and encrypted connections.
|
|
||||||
</p>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#Remote_basic_usage">Basic usage</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_transports">Transports</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_URI_reference">Remote URIs</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#Remote_URI_parameters">Extra parameters</a>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="#Remote_certificates">Generating TLS certificates</a>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#Remote_PKI">Public Key Infrastructure set up</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_TLS_background">Background to TLS certificates</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_TLS_CA">Setting up a Certificate Authority (CA)</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_TLS_server_certificates">Issuing server certificates</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_TLS_client_certificates">Issuing client certificates</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_TLS_troubleshooting">Troubleshooting TLS certificate problems</a>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="#Remote_libvirtd_configuration">libvirtd configuration file</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_IPv6">IPv6 support</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_limitations">Limitations</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#Remote_implementation_notes">Implementation notes</a>
|
|
||||||
</li></ul>
|
|
||||||
<h3>
|
|
||||||
<a name="Remote_basic_usage" id="Remote_basic_usage">Basic usage</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
On the remote machine, <code>libvirtd</code> should be running.
|
|
||||||
See <a href="#Remote_libvirtd_configuration">the section
|
|
||||||
on configuring libvirtd</a> for more information.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
To tell libvirt that you want to access a remote resource,
|
|
||||||
you should supply a hostname in the normal <a href="uri.html">URI</a> that is passed
|
|
||||||
to <code>virConnectOpen</code> (or <code>virsh -c ...</code>).
|
|
||||||
For example, if you normally use <code>qemu:///system</code>
|
|
||||||
to access the system-wide QEMU daemon, then to access
|
|
||||||
the system-wide QEMU daemon on a remote machine called
|
|
||||||
<code>oirase</code> you would use <code>qemu://oirase/system</code>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The <a href="#Remote_URI_reference">section on remote URIs</a>
|
|
||||||
describes in more detail these remote URIs.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
From an API point of view, apart from the change in URI, the
|
|
||||||
API should behave the same. For example, ordinary calls
|
|
||||||
are routed over the remote connection transparently, and
|
|
||||||
values or errors from the remote side are returned to you
|
|
||||||
as if they happened locally. Some differences you may notice:
|
|
||||||
</p>
|
|
||||||
<ul><li> Additional errors can be generated, specifically ones
|
|
||||||
relating to failures in the remote transport itself. </li><li> Remote calls are handled synchronously, so they will be
|
|
||||||
much slower than, say, direct hypervisor calls. </li></ul>
|
|
||||||
<h3>
|
|
||||||
<a name="Remote_transports" id="Remote_transports">Transports</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
Remote libvirt supports a range of transports:
|
|
||||||
</p>
|
|
||||||
<dl><dt> tls </dt><dd><a href="http://en.wikipedia.org/wiki/Transport_Layer_Security" title="Transport Layer Security">TLS</a>
|
|
||||||
1.0 (SSL 3.1) authenticated and encrypted TCP/IP socket, usually
|
|
||||||
listening on a public port number. To use this you will need to
|
|
||||||
<a href="#Remote_certificates" title="Generating TLS certificates">generate client and
|
|
||||||
server certificates</a>.
|
|
||||||
The standard port is 16514.
|
|
||||||
</dd><dt> unix </dt><dd> Unix domain socket. Since this is only accessible on the
|
|
||||||
local machine, it is not encrypted, and uses Unix permissions or
|
|
||||||
SELinux for authentication.
|
|
||||||
The standard socket names are
|
|
||||||
<code>/var/run/libvirt/libvirt-sock</code> and
|
|
||||||
<code>/var/run/libvirt/libvirt-sock-ro</code> (the latter
|
|
||||||
for read-only connections).
|
|
||||||
</dd><dt> ssh </dt><dd> Transported over an ordinary
|
|
||||||
<a href="http://www.openssh.com/" title="OpenSSH homepage">ssh
|
|
||||||
(secure shell)</a> connection.
|
|
||||||
Requires <a href="http://netcat.sourceforge.net/">Netcat (nc)</a>
|
|
||||||
installed and libvirtd should be running
|
|
||||||
on the remote machine. You should use some sort of
|
|
||||||
ssh key management (eg.
|
|
||||||
<a href="http://mah.everybody.org/docs/ssh" title="Using ssh-agent with ssh">ssh-agent</a>)
|
|
||||||
otherwise programs which use
|
|
||||||
this transport will stop to ask for a password. </dd><dt> ext </dt><dd> Any external program which can make a connection to the
|
|
||||||
remote machine by means outside the scope of libvirt. </dd><dt> tcp </dt><dd> Unencrypted TCP/IP socket. Not recommended for production
|
|
||||||
use, this is normally disabled, but an administrator can enable
|
|
||||||
it for testing or use over a trusted network.
|
|
||||||
The standard port is 16509.
|
|
||||||
</dd></dl>
|
|
||||||
<p>
|
|
||||||
The default transport, if no other is specified, is <code>tls</code>.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="Remote_URI_reference" id="Remote_URI_reference">Remote URIs</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
See also: <a href="uri.html">documentation on ordinary ("local") URIs</a>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Remote URIs have the general form ("[...]" meaning an optional part):
|
|
||||||
</p>
|
|
||||||
<p><code>driver</code>[<code>+transport</code>]<code>://</code>[<code>username@</code>][<code>hostname</code>][<code>:port</code>]<code>/</code>[<code>path</code>][<code>?extraparameters</code>]
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Either the transport or the hostname must be given in order
|
|
||||||
to distinguish this from a local URI.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Some examples:
|
|
||||||
</p>
|
|
||||||
<ul><li><code>xen+ssh://rjones@towada/</code><br /> — Connect to a
|
|
||||||
remote Xen hypervisor on host <code>towada</code> using ssh transport and ssh
|
|
||||||
username <code>rjones</code>.
|
|
||||||
</li><li><code>xen://towada/</code><br /> — Connect to a
|
|
||||||
remote Xen hypervisor on host <code>towada</code> using TLS.
|
|
||||||
</li><li><code>xen://towada/?no_verify=1</code><br /> — Connect to a
|
|
||||||
remote Xen hypervisor on host <code>towada</code> using TLS. Do not verify
|
|
||||||
the server's certificate.
|
|
||||||
</li><li><code>qemu+unix:///system?socket=/opt/libvirt/run/libvirt/libvirt-sock</code><br /> —
|
|
||||||
Connect to the local qemu instances over a non-standard
|
|
||||||
Unix socket (the full path to the Unix socket is
|
|
||||||
supplied explicitly in this case).
|
|
||||||
</li><li><code>test+tcp://localhost:5000/default</code><br /> —
|
|
||||||
Connect to a libvirtd daemon offering unencrypted TCP/IP connections
|
|
||||||
on localhost port 5000 and use the test driver with default
|
|
||||||
settings.
|
|
||||||
</li></ul>
|
|
||||||
<h4>
|
|
||||||
<a name="Remote_URI_parameters" id="Remote_URI_parameters">Extra parameters</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
Extra parameters can be added to remote URIs as part
|
|
||||||
of the query string (the part following <q><code>?</code></q>).
|
|
||||||
Remote URIs understand the extra parameters shown below.
|
|
||||||
Any others are passed unmodified through to the back end.
|
|
||||||
Note that parameter values must be
|
|
||||||
<a href="http://xmlsoft.org/html/libxml-uri.html#xmlURIEscapeStr">URI-escaped</a>.
|
|
||||||
</p>
|
|
||||||
<table class="top_table"><tr><th> Name </th><th> Transports </th><th> Meaning </th></tr><tr><td>
|
|
||||||
<code>name</code>
|
|
||||||
</td><td>
|
|
||||||
<i>any transport</i>
|
|
||||||
</td><td>
|
|
||||||
The name passed to the remote virConnectOpen function. The
|
|
||||||
name is normally formed by removing transport, hostname, port
|
|
||||||
number, username and extra parameters from the remote URI, but in certain
|
|
||||||
very complex cases it may be better to supply the name explicitly.
|
|
||||||
</td></tr><tr><td colspan="2"></td><td> Example: <code>name=qemu:///system</code> </td></tr><tr><td>
|
|
||||||
<code>command</code>
|
|
||||||
</td><td> ssh, ext </td><td>
|
|
||||||
The external command. For ext transport this is required.
|
|
||||||
For ssh the default is <code>ssh</code>.
|
|
||||||
The PATH is searched for the command.
|
|
||||||
</td></tr><tr><td colspan="2"></td><td> Example: <code>command=/opt/openssh/bin/ssh</code> </td></tr><tr><td>
|
|
||||||
<code>socket</code>
|
|
||||||
</td><td> unix, ssh </td><td>
|
|
||||||
The path to the Unix domain socket, which overrides the
|
|
||||||
compiled-in default. For ssh transport, this is passed to
|
|
||||||
the remote netcat command (see next).
|
|
||||||
</td></tr><tr><td colspan="2"></td><td> Example: <code>socket=/opt/libvirt/run/libvirt/libvirt-sock</code> </td></tr><tr><td>
|
|
||||||
<code>netcat</code>
|
|
||||||
</td><td> ssh </td><td>
|
|
||||||
The name of the netcat command on the remote machine.
|
|
||||||
The default is <code>nc</code>. For ssh transport, libvirt
|
|
||||||
constructs an ssh command which looks like:
|
|
||||||
|
|
||||||
<pre><i>command</i> -p <i>port</i> [-l <i>username</i>] <i>hostname</i> <i>netcat</i> -U <i>socket</i>
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
where <i>port</i>, <i>username</i>, <i>hostname</i> can be
|
|
||||||
specified as part of the remote URI, and <i>command</i>, <i>netcat</i>
|
|
||||||
and <i>socket</i> come from extra parameters (or
|
|
||||||
sensible defaults).
|
|
||||||
|
|
||||||
</td></tr><tr><td colspan="2"></td><td> Example: <code>netcat=/opt/netcat/bin/nc</code> </td></tr><tr><td>
|
|
||||||
<code>no_verify</code>
|
|
||||||
</td><td> tls </td><td>
|
|
||||||
If set to a non-zero value, this disables client checks of the
|
|
||||||
server's certificate. Note that to disable server checks of
|
|
||||||
the client's certificate or IP address you must
|
|
||||||
<a href="#Remote_libvirtd_configuration">change the libvirtd
|
|
||||||
configuration</a>.
|
|
||||||
</td></tr><tr><td colspan="2"></td><td> Example: <code>no_verify=1</code> </td></tr><tr><td>
|
|
||||||
<code>no_tty</code>
|
|
||||||
</td><td> ssh </td><td>
|
|
||||||
If set to a non-zero value, this stops ssh from asking for
|
|
||||||
a password if it cannot log in to the remote machine automatically
|
|
||||||
(eg. using ssh-agent etc.). Use this when you don't have access
|
|
||||||
to a terminal - for example in graphical programs which use libvirt.
|
|
||||||
</td></tr><tr><td colspan="2"></td><td> Example: <code>no_tty=1</code> </td></tr></table>
|
|
||||||
<h3>
|
|
||||||
<a name="Remote_certificates" id="Remote_certificates">Generating TLS certificates</a>
|
|
||||||
</h3>
|
|
||||||
<h4>
|
|
||||||
<a name="Remote_PKI" id="Remote_PKI">Public Key Infrastructure set up</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
If you are unsure how to create TLS certificates, skip to the
|
|
||||||
next section.
|
|
||||||
</p>
|
|
||||||
<table class="top_table"><tr><th> Location </th><th> Machine </th><th> Description </th><th> Required fields </th></tr><tr><td>
|
|
||||||
<code>/etc/pki/CA/cacert.pem</code>
|
|
||||||
</td><td> Installed on all clients and servers </td><td> CA's certificate (<a href="#Remote_TLS_CA">more info</a>)</td><td> n/a </td></tr><tr><td>
|
|
||||||
<code>/etc/pki/libvirt/ private/serverkey.pem</code>
|
|
||||||
</td><td> Installed on the server </td><td> Server's private key (<a href="#Remote_TLS_server_certificates">more info</a>)</td><td> n/a </td></tr><tr><td>
|
|
||||||
<code>/etc/pki/libvirt/ servercert.pem</code>
|
|
||||||
</td><td> Installed on the server </td><td> Server's certificate signed by the CA.
|
|
||||||
(<a href="#Remote_TLS_server_certificates">more info</a>) </td><td> CommonName (CN) must be the hostname of the server as it
|
|
||||||
is seen by clients. </td></tr><tr><td>
|
|
||||||
<code>/etc/pki/libvirt/ private/clientkey.pem</code>
|
|
||||||
</td><td> Installed on the client </td><td> Client's private key. (<a href="#Remote_TLS_client_certificates">more info</a>) </td><td> n/a </td></tr><tr><td>
|
|
||||||
<code>/etc/pki/libvirt/ clientcert.pem</code>
|
|
||||||
</td><td> Installed on the client </td><td> Client's certificate signed by the CA
|
|
||||||
(<a href="#Remote_TLS_client_certificates">more info</a>) </td><td> Distinguished Name (DN) can be checked against an access
|
|
||||||
control list (<code>tls_allowed_dn_list</code>).
|
|
||||||
</td></tr></table>
|
|
||||||
<h4>
|
|
||||||
<a name="Remote_TLS_background" id="Remote_TLS_background">Background to TLS certificates</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
Libvirt supports TLS certificates for verifying the identity
|
|
||||||
of the server and clients. There are two distinct checks involved:
|
|
||||||
</p>
|
|
||||||
<ul><li> The client should know that it is connecting to the right
|
|
||||||
server. Checking done by client by matching the certificate that
|
|
||||||
the server sends to the server's hostname. May be disabled by adding
|
|
||||||
<code>?no_verify=1</code> to the
|
|
||||||
<a href="#Remote_URI_parameters">remote URI</a>.
|
|
||||||
</li><li> The server should know that only permitted clients are
|
|
||||||
connecting. This can be done based on client's IP address, or on
|
|
||||||
client's IP address and client's certificate. Checking done by the
|
|
||||||
server. May be enabled and disabled in the <a href="#Remote_libvirtd_configuration">libvirtd.conf file</a>.
|
|
||||||
</li></ul>
|
|
||||||
<p>
|
|
||||||
For full certificate checking you will need to have certificates
|
|
||||||
issued by a recognised <a href="http://en.wikipedia.org/wiki/Certificate_authority">Certificate
|
|
||||||
Authority (CA)</a> for your server(s) and all clients. To avoid the
|
|
||||||
expense of getting certificates from a commercial CA, you can set up
|
|
||||||
your own CA and tell your server(s) and clients to trust certificates
|
|
||||||
issues by your own CA. Follow the instructions in the next section.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Be aware that the <a href="#Remote_libvirtd_configuration">default
|
|
||||||
configuration for libvirtd</a> allows any client to connect provided
|
|
||||||
they have a valid certificate issued by the CA for their own IP
|
|
||||||
address. You may want to change this to make it less (or more)
|
|
||||||
permissive, depending on your needs.
|
|
||||||
</p>
|
|
||||||
<h4>
|
|
||||||
<a name="Remote_TLS_CA" id="Remote_TLS_CA">Setting up a Certificate Authority (CA)</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
You will need the <a href="http://www.gnu.org/software/gnutls/manual/html_node/Invoking-certtool.html">GnuTLS
|
|
||||||
certtool program documented here</a>. In Fedora, it is in the
|
|
||||||
<code>gnutls-utils</code> package.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Create a private key for your CA:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
certtool --generate-privkey > cakey.pem
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
and self-sign it by creating a file with the
|
|
||||||
signature details called
|
|
||||||
<code>ca.info</code> containing:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
cn = <i>Name of your organization</i>
|
|
||||||
ca
|
|
||||||
cert_signing_key
|
|
||||||
</pre>
|
|
||||||
<pre>
|
|
||||||
certtool --generate-self-signed --load-privkey cakey.pem \
|
|
||||||
--template ca.info --outfile cacert.pem
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
(You can delete <code>ca.info</code> file now if you
|
|
||||||
want).
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Now you have two files which matter:
|
|
||||||
</p>
|
|
||||||
<ul><li><code>cakey.pem</code> - Your CA's private key (keep this very secret!)
|
|
||||||
</li><li><code>cacert.pem</code> - Your CA's certificate (this is public).
|
|
||||||
</li></ul>
|
|
||||||
<p><code>cacert.pem</code> has to be installed on clients and
|
|
||||||
server(s) to let them know that they can trust certificates issued by
|
|
||||||
your CA.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The normal installation directory for <code>cacert.pem</code>
|
|
||||||
is <code>/etc/pki/CA/cacert.pem</code> on all clients and servers.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
To see the contents of this file, do:
|
|
||||||
</p>
|
|
||||||
<pre><b>certtool -i --infile cacert.pem</b>
|
|
||||||
|
|
||||||
X.509 certificate info:
|
|
||||||
|
|
||||||
Version: 3
|
|
||||||
Serial Number (hex): 00
|
|
||||||
Subject: CN=Red Hat Emerging Technologies
|
|
||||||
Issuer: CN=Red Hat Emerging Technologies
|
|
||||||
Signature Algorithm: RSA-SHA
|
|
||||||
Validity:
|
|
||||||
Not Before: Mon Jun 18 16:22:18 2007
|
|
||||||
Not After: Tue Jun 17 16:22:18 2008
|
|
||||||
<i>[etc]</i>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
This is all that is required to set up your CA. Keep the CA's private
|
|
||||||
key carefully as you will need it when you come to issue certificates
|
|
||||||
for your clients and servers.
|
|
||||||
</p>
|
|
||||||
<h4>
|
|
||||||
<a name="Remote_TLS_server_certificates" id="Remote_TLS_server_certificates">Issuing server certificates</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
For each server (libvirtd) you need to issue a certificate
|
|
||||||
with the X.509 CommonName (CN) field set to the hostname
|
|
||||||
of the server. The CN must match the hostname which
|
|
||||||
clients will be using to connect to the server.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
In the example below, clients will be connecting to the
|
|
||||||
server using a <a href="#Remote_URI_reference">URI</a> of
|
|
||||||
<code>xen://oirase/</code>, so the CN must be "<code>oirase</code>".
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Make a private key for the server:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
certtool --generate-privkey > serverkey.pem
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
and sign that key with the CA's private key by first
|
|
||||||
creating a template file called <code>server.info</code>
|
|
||||||
(only the CN field matters, which as explained above must
|
|
||||||
be the server's hostname):
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
organization = <i>Name of your organization</i>
|
|
||||||
cn = oirase
|
|
||||||
tls_www_server
|
|
||||||
encryption_key
|
|
||||||
signing_key
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
and sign:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
certtool --generate-certificate --load-privkey serverkey.pem \
|
|
||||||
--load-ca-certificate cacert.pem --load-ca-privkey cakey.pem \
|
|
||||||
--template server.info --outfile servercert.pem
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
This gives two files:
|
|
||||||
</p>
|
|
||||||
<ul><li><code>serverkey.pem</code> - The server's private key.
|
|
||||||
</li><li><code>servercert.pem</code> - The server's public key.
|
|
||||||
</li></ul>
|
|
||||||
<p>
|
|
||||||
We can examine this certificate and its signature:
|
|
||||||
</p>
|
|
||||||
<pre><b>certtool -i --infile servercert.pem</b>
|
|
||||||
X.509 certificate info:
|
|
||||||
|
|
||||||
Version: 3
|
|
||||||
Serial Number (hex): 00
|
|
||||||
Subject: O=Red Hat Emerging Technologies,CN=oirase
|
|
||||||
Issuer: CN=Red Hat Emerging Technologies
|
|
||||||
Signature Algorithm: RSA-SHA
|
|
||||||
Validity:
|
|
||||||
Not Before: Mon Jun 18 16:34:49 2007
|
|
||||||
Not After: Tue Jun 17 16:34:49 2008
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
Note the "Issuer" CN is "Red Hat Emerging Technologies" (the CA) and
|
|
||||||
the "Subject" CN is "oirase" (the server).
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Finally we have two files to install:
|
|
||||||
</p>
|
|
||||||
<ul><li><code>serverkey.pem</code> is
|
|
||||||
the server's private key which should be copied to the
|
|
||||||
server <i>only</i> as
|
|
||||||
<code>/etc/pki/libvirt/private/serverkey.pem</code>.
|
|
||||||
</li><li><code>servercert.pem</code> is the server's certificate
|
|
||||||
which can be installed on the server as
|
|
||||||
<code>/etc/pki/libvirt/servercert.pem</code>.
|
|
||||||
</li></ul>
|
|
||||||
<h4>
|
|
||||||
<a name="Remote_TLS_client_certificates" id="Remote_TLS_client_certificates">Issuing client certificates</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
For each client (ie. any program linked with libvirt, such as
|
|
||||||
<a href="http://virt-manager.et.redhat.com/">virt-manager</a>)
|
|
||||||
you need to issue a certificate with the X.509 Distinguished Name (DN)
|
|
||||||
set to a suitable name. You can decide this on a company / organisation
|
|
||||||
policy. For example, I use:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
C=GB,ST=London,L=London,O=Red Hat,CN=<i>name_of_client</i>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
The process is the same as for
|
|
||||||
<a href="#Remote_TLS_server_certificates">setting up the
|
|
||||||
server certificate</a> so here we just briefly cover the
|
|
||||||
steps.
|
|
||||||
</p>
|
|
||||||
<ol><li>
|
|
||||||
Make a private key:
|
|
||||||
<pre>
|
|
||||||
certtool --generate-privkey > clientkey.pem
|
|
||||||
</pre>
|
|
||||||
</li><li>
|
|
||||||
Act as CA and sign the certificate. Create client.info containing:
|
|
||||||
<pre>
|
|
||||||
country = GB
|
|
||||||
state = London
|
|
||||||
locality = London
|
|
||||||
organization = Red Hat
|
|
||||||
cn = client1
|
|
||||||
tls_www_client
|
|
||||||
encryption_key
|
|
||||||
signing_key
|
|
||||||
</pre>
|
|
||||||
and sign by doing:
|
|
||||||
<pre>
|
|
||||||
certtool --generate-certificate --load-privkey clientkey.pem \
|
|
||||||
--load-ca-certificate cacert.pem --load-ca-privkey cakey.pem \
|
|
||||||
--template client.info --outfile clientcert.pem
|
|
||||||
</pre>
|
|
||||||
</li><li>
|
|
||||||
Install the certificates on the client machine:
|
|
||||||
<pre>
|
|
||||||
cp clientkey.pem /etc/pki/libvirt/private/clientkey.pem
|
|
||||||
cp clientcert.pem /etc/pki/libvirt/clientcert.pem
|
|
||||||
</pre>
|
|
||||||
</li></ol>
|
|
||||||
<h4>
|
|
||||||
<a name="Remote_TLS_troubleshooting" id="Remote_TLS_troubleshooting">Troubleshooting TLS certificate problems</a>
|
|
||||||
</h4>
|
|
||||||
<dl><dt> failed to verify client's certificate </dt><dd>
|
|
||||||
<p>
|
|
||||||
On the server side, run the libvirtd server with
|
|
||||||
the '--listen' and '--verbose' options while the
|
|
||||||
client is connecting. The verbose log messages should
|
|
||||||
tell you enough to diagnose the problem.
|
|
||||||
</p>
|
|
||||||
</dd></dl>
|
|
||||||
<p> You can use the virt-pki-validate shell script
|
|
||||||
to analyze the setup on the client or server machines, preferably as root.
|
|
||||||
It will try to point out the possible problems and provide solutions to
|
|
||||||
fix the set up up to a point where you have secure remote access.</p>
|
|
||||||
<h3>
|
|
||||||
<a name="Remote_libvirtd_configuration" id="Remote_libvirtd_configuration">libvirtd configuration file</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
Libvirtd (the remote daemon) is configured from a file called
|
|
||||||
<code>/etc/libvirt/libvirtd.conf</code>, or specified on
|
|
||||||
the command line using <code>-f filename</code> or
|
|
||||||
<code>--config filename</code>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
This file should contain lines of the form below.
|
|
||||||
Blank lines and comments beginning with <code>#</code> are ignored.
|
|
||||||
</p>
|
|
||||||
<pre>setting = value</pre>
|
|
||||||
<p>The following settings, values and default are:</p>
|
|
||||||
<table class="top_table"><tr><th> Line </th><th> Default </th><th> Meaning </th></tr><tr><td> listen_tls <i>[0|1]</i> </td><td> 1 (on) </td><td>
|
|
||||||
Listen for secure TLS connections on the public TCP/IP port.
|
|
||||||
Note: it is also necessary to start the server in listening mode by
|
|
||||||
running it with --listen or editing /etc/sysconfig/libvirtd by uncommenting the LIBVIRTD_ARGS="--listen" line
|
|
||||||
to cause the server to come up in listening mode whenever it is started.
|
|
||||||
</td></tr><tr><td> listen_tcp <i>[0|1]</i> </td><td> 0 (off) </td><td>
|
|
||||||
Listen for unencrypted TCP connections on the public TCP/IP port.
|
|
||||||
Note: it is also necessary to start the server in listening mode.
|
|
||||||
</td></tr><tr><td> tls_port <i>"service"</i> </td><td> "16514" </td><td>
|
|
||||||
The port number or service name to listen on for secure TLS connections.
|
|
||||||
</td></tr><tr><td> tcp_port <i>"service"</i> </td><td> "16509" </td><td>
|
|
||||||
The port number or service name to listen on for unencrypted TCP connections.
|
|
||||||
</td></tr><tr><td> mdns_adv <i>[0|1]</i> </td><td> 1 (advertise with mDNS) </td><td>
|
|
||||||
If set to 1 then the virtualization service will be advertised over
|
|
||||||
mDNS to hosts on the local LAN segment.
|
|
||||||
</td></tr><tr><td> mdns_name <i>"name"</i> </td><td> "Virtualization Host HOSTNAME" </td><td>
|
|
||||||
The name to advertise for this host with Avahi mDNS. The default
|
|
||||||
includes the machine's short hostname. This must be unique to the
|
|
||||||
local LAN segment.
|
|
||||||
</td></tr><tr><td> unix_sock_group <i>"groupname"</i> </td><td> "root" </td><td>
|
|
||||||
The UNIX group to own the UNIX domain socket. If the socket permissions allow
|
|
||||||
group access, then applications running under matching group can access the
|
|
||||||
socket. Only valid if running as root
|
|
||||||
</td></tr><tr><td> unix_sock_ro_perms <i>"octal-perms"</i> </td><td> "0777" </td><td>
|
|
||||||
The permissions for the UNIX domain socket for read-only client connections.
|
|
||||||
The default allows any user to monitor domains.
|
|
||||||
</td></tr><tr><td> unix_sock_rw_perms <i>"octal-perms"</i> </td><td> "0700" </td><td>
|
|
||||||
The permissions for the UNIX domain socket for read-write client connections.
|
|
||||||
The default allows only root to manage domains.
|
|
||||||
</td></tr><tr><td> tls_no_verify_certificate <i>[0|1]</i> </td><td> 0 (certificates are verified) </td><td>
|
|
||||||
If set to 1 then if a client certificate check fails, it is not an error.
|
|
||||||
</td></tr><tr><td> tls_no_verify_address <i>[0|1]</i> </td><td> 0 (addresses are verified) </td><td>
|
|
||||||
If set to 1 then if a client IP address check fails, it is not an error.
|
|
||||||
</td></tr><tr><td> key_file <i>"filename"</i> </td><td> "/etc/pki/libvirt/ private/serverkey.pem" </td><td>
|
|
||||||
Change the path used to find the server's private key.
|
|
||||||
If you set this to an empty string, then no private key is loaded.
|
|
||||||
</td></tr><tr><td> cert_file <i>"filename"</i> </td><td> "/etc/pki/libvirt/ servercert.pem" </td><td>
|
|
||||||
Change the path used to find the server's certificate.
|
|
||||||
If you set this to an empty string, then no certificate is loaded.
|
|
||||||
</td></tr><tr><td> ca_file <i>"filename"</i> </td><td> "/etc/pki/CA/cacert.pem" </td><td>
|
|
||||||
Change the path used to find the trusted CA certificate.
|
|
||||||
If you set this to an empty string, then no trusted CA certificate is loaded.
|
|
||||||
</td></tr><tr><td> crl_file <i>"filename"</i> </td><td> (no CRL file is used) </td><td>
|
|
||||||
Change the path used to find the CA certificate revocation list (CRL) file.
|
|
||||||
If you set this to an empty string, then no CRL is loaded.
|
|
||||||
</td></tr><tr><td> tls_allowed_dn_list ["DN1", "DN2"] </td><td> (none - DNs are not checked) </td><td>
|
|
||||||
<p>
|
|
||||||
Enable an access control list of client certificate Distinguished
|
|
||||||
Names (DNs) which can connect to the TLS port on this server.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The default is that DNs are not checked.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
This list may contain wildcards such as <code>"C=GB,ST=London,L=London,O=Red Hat,CN=*"</code>
|
|
||||||
See the POSIX <code>fnmatch</code> function for the format
|
|
||||||
of the wildcards.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Note that if this is an empty list, <i>no client can connect</i>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Note also that GnuTLS returns DNs without spaces
|
|
||||||
after commas between the fields (and this is what we check against),
|
|
||||||
but the <code>openssl x509</code> tool shows spaces.
|
|
||||||
</p>
|
|
||||||
</td></tr></table>
|
|
||||||
<h3>
|
|
||||||
<a name="Remote_IPv6" id="Remote_IPv6">IPv6 support</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The libvirtd service and libvirt remote client driver both use the
|
|
||||||
<code>getaddrinfo()</code> functions for name resolution and are
|
|
||||||
thus fully IPv6 enabled. ie, if a server has IPv6 address configured
|
|
||||||
the daemon will listen for incoming connections on both IPv4 and IPv6
|
|
||||||
protocols. If a client has an IPv6 address configured and the DNS
|
|
||||||
address resolved for a service is reachable over IPv6, then an IPv6
|
|
||||||
connection will be made, otherwise IPv4 will be used. In summary it
|
|
||||||
should just 'do the right thing(tm)'.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="Remote_limitations" id="Remote_limitations">Limitations</a>
|
|
||||||
</h3>
|
|
||||||
<ul><li> Remote storage: To be fully useful, particularly for
|
|
||||||
creating new domains, it should be possible to enumerate
|
|
||||||
and provision storage on the remote machine. This is currently
|
|
||||||
in the design phase. </li><li> Migration: We expect libvirt will support migration,
|
|
||||||
and obviously remote support is what makes migration worthwhile.
|
|
||||||
This is also in the design phase. Issues <a href="https://www.redhat.com/mailman/listinfo/libvir-list" title="libvir-list mailing list">to discuss</a> include
|
|
||||||
which path the migration data should follow (eg. client to
|
|
||||||
client direct, or client to server to client) and security.
|
|
||||||
</li><li> Fine-grained authentication: libvirt in general,
|
|
||||||
but in particular the remote case should support more
|
|
||||||
fine-grained authentication for operations, rather than
|
|
||||||
just read-write/read-only as at present.
|
|
||||||
</li></ul>
|
|
||||||
<p>
|
|
||||||
Please come and discuss these issues and more on <a href="https://www.redhat.com/mailman/listinfo/libvir-list" title="libvir-list mailing list">the mailing list</a>.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="Remote_implementation_notes" id="Remote_implementation_notes">Implementation notes</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The current implementation uses <a href="http://en.wikipedia.org/wiki/External_Data_Representation" title="External Data Representation">XDR</a>-encoded packets with a
|
|
||||||
simple remote procedure call implementation which also supports
|
|
||||||
asynchronous messaging and asynchronous and out-of-order replies,
|
|
||||||
although these latter features are not used at the moment.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The implementation should be considered <b>strictly internal</b> to
|
|
||||||
libvirt and <b>subject to change at any time without notice</b>. If
|
|
||||||
you wish to talk to libvirtd, link to libvirt. If there is a problem
|
|
||||||
that means you think you need to use the protocol directly, please
|
|
||||||
first discuss this on <a href="https://www.redhat.com/mailman/listinfo/libvir-list" title="libvir-list mailing list">the mailing list</a>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The messaging protocol is described in
|
|
||||||
<code>qemud/remote_protocol.x</code>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Authentication and encryption (for TLS) is done using <a href="http://www.gnu.org/software/gnutls/" title="GnuTLS project page">GnuTLS</a> and the RPC protocol is unaware of this layer.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Protocol messages are sent using a simple 32 bit length word (encoded
|
|
||||||
XDR int) followed by the message header (XDR
|
|
||||||
<code>remote_message_header</code>) followed by the message body. The
|
|
||||||
length count includes the length word itself, and is measured in
|
|
||||||
bytes. Maximum message size is <code>REMOTE_MESSAGE_MAX</code> and to
|
|
||||||
avoid denial of services attacks on the XDR decoders strings are
|
|
||||||
individually limited to <code>REMOTE_STRING_MAX</code> bytes. In the
|
|
||||||
TLS case, messages may be split over TLS records, but a TLS record
|
|
||||||
cannot contain parts of more than one message. In the common RPC case
|
|
||||||
a single <code>REMOTE_CALL</code> message is sent from client to
|
|
||||||
server, and the server then replies synchronously with a single
|
|
||||||
<code>REMOTE_REPLY</code> message, but other forms of messaging are
|
|
||||||
also possible.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The protocol contains support for multiple program types and protocol
|
|
||||||
versioning, modelled after SunRPC.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,270 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from sitemap.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Sitemap</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="inactive" href="docs.html">Documentation</a>
|
|
||||||
</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="FAQ.html">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>
|
|
||||||
<span class="active">Sitemap</span>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
<div id="content">
|
|
||||||
<h1>Sitemap</h1>
|
|
||||||
<div id="sitemap">
|
|
||||||
<ul><li>
|
|
||||||
<a href="index.html">Home</a>
|
|
||||||
<span>Front page of the libvirt website</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="news.html">News</a>
|
|
||||||
<span>Details of new features and bugs fixed in each release</span>
|
|
||||||
<ul><li>
|
|
||||||
<a href="ChangeLog.html">Changelog</a>
|
|
||||||
<span>Latest commit messages from the source repository </span>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="downloads.html">Downloads</a>
|
|
||||||
<span>Get the latest source releases, binary builds and get access to the source repository</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="docs.html">Documentation</a>
|
|
||||||
<span>Information for users, administrators and developers</span>
|
|
||||||
<ul><li>
|
|
||||||
<a href="deployment.html">Deployment</a>
|
|
||||||
<span>Information about deploying and using libvirt</span>
|
|
||||||
<ul><li>
|
|
||||||
<a href="uri.html">URI format</a>
|
|
||||||
<span>The URI formats used for connecting to libvirt</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="remote.html">Remote access</a>
|
|
||||||
<span>Enable remote access over TCP</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="auth.html">Authentication</a>
|
|
||||||
<span>Configure authentication for the libvirt daemon</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="windows.html">Windows port</a>
|
|
||||||
<span>Access the libvirt daemon from a native Windows client</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="logging.html">Logging</a>
|
|
||||||
<span>The library and the daemon logging support</span>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="intro.html">Architecture</a>
|
|
||||||
<span>Overview of the logical subsystems in the libvirt API</span>
|
|
||||||
<ul><li>
|
|
||||||
<a href="goals.html">Goals</a>
|
|
||||||
<span>Terminology and goals of libvirt API</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="api.html">API concepts</a>
|
|
||||||
<span>The libvirt API concepts</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="archdomain.html">Domains</a>
|
|
||||||
<span>Managing virtual machines</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="archnetwork.html">Network</a>
|
|
||||||
<span>Providing isolated networks and NAT based network connectivity</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="archstorage.html">Storage</a>
|
|
||||||
<span>Managing storage pools and volumes</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="archnode.html">Node Devices</a>
|
|
||||||
<span>Enumerating host node devices</span>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="format.html">XML format</a>
|
|
||||||
<span>Description of the XML formats used in libvirt</span>
|
|
||||||
<ul><li>
|
|
||||||
<a href="formatdomain.html">Domains</a>
|
|
||||||
<span>The domain XML format</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="formatnetwork.html">Networks</a>
|
|
||||||
<span>The virtual network XML format</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="formatstorage.html">Storage</a>
|
|
||||||
<span>The storage pool and volume XML format</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="formatstorageencryption.html">Storage Encryption</a>
|
|
||||||
<span>Storage volume encryption XML format</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="formatcaps.html">Capabilities</a>
|
|
||||||
<span>The driver capabilities XML format</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="formatnode.html">Node Devices</a>
|
|
||||||
<span>The host device XML format</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="formatsecret.html">Secrets</a>
|
|
||||||
<span>The secret XML format</span>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="drivers.html">Drivers</a>
|
|
||||||
<span>Hypervisor specific driver information</span>
|
|
||||||
<ul><li>
|
|
||||||
<a href="drvxen.html">Xen</a>
|
|
||||||
<span>Driver the Xen hypervisor</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
<span>Driver for QEMU, KQEMU, KVM and Xenner</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="drvlxc.html">Linux Container</a>
|
|
||||||
<span>Driver for the Linux native container API</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="drvtest.html">Test</a>
|
|
||||||
<span>Psuedo-driver simulating APIs in memory for test suites</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="drvremote.html">Remote</a>
|
|
||||||
<span>Driver providing secure remote to the libvirt APIs</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="drvopenvz.html">OpenVZ</a>
|
|
||||||
<span>Driver for the OpenVZ container technology</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="drvuml.html">UML</a>
|
|
||||||
<span>Driver for the User Mode Linux technology</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="storage.html">Storage</a>
|
|
||||||
<span>Driver for the storage management APIs</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="drvvbox.html">VirtualBox</a>
|
|
||||||
<span>Driver for VirtualBox</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="drvone.html">OpenNebula</a>
|
|
||||||
<span>Driver for OpenNebula</span>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="html/index.html">API reference</a>
|
|
||||||
<span>Reference manual for the C public API</span>
|
|
||||||
<!-- This is the desired new style API breakdown
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="apiconn.html">Connection</a>
|
|
||||||
<span>API reference for virConnectPtr objects</span>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="apidomain.html">Domain</a>
|
|
||||||
<span>API reference for virDomainPtr objects</span>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="apierror.html">Error</a>
|
|
||||||
<span>API reference for virErrorPtr objects</span>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="apinetwork.html">Network</a>
|
|
||||||
<span>API reference for virNetworkPtr objects</span>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="apistorage.html">Storage</a>
|
|
||||||
<span>API reference for virStoragePoolptr and virStorageVolPtr objects</span>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="apinode.html">Node Device</a>
|
|
||||||
<span>API reference for virNodeDevicePtr objects</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
-->
|
|
||||||
<ul><li>
|
|
||||||
<a href="html/libvirt-libvirt.html">libvirt</a>
|
|
||||||
<span>core interfaces for the libvirt library</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="html/libvirt-virterror.html">virterror</a>
|
|
||||||
<span>error handling interfaces for the libvirt library</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="hvsupport.html">Driver support</a>
|
|
||||||
<span>matrix of API support per hypervisor per release</span>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="bindings.html">Language bindings</a>
|
|
||||||
<span>Bindings of the libvirt API for other languages</span>
|
|
||||||
<ul><li>
|
|
||||||
<a href="python.html">Python</a>
|
|
||||||
<span>overview of the python API bindings</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="java.html">Java</a>
|
|
||||||
<span>overview of the Java API bindings</span>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="internals.html">Internals</a>
|
|
||||||
<span>Working on the internals of libvirt API, driver and daemon code</span>
|
|
||||||
<ul><li>
|
|
||||||
<a href="hacking.html">Contributor guidelines</a>
|
|
||||||
<span>General hacking guidelines for contributors</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="api_extension.html">API extensions</a>
|
|
||||||
<span>Adding new public libvirt APIs</span>
|
|
||||||
</li></ul></li></ul></li><li>
|
|
||||||
<a href="http://wiki.libvirt.org">Wiki</a>
|
|
||||||
<span>User contributed content</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="FAQ.html">FAQ</a>
|
|
||||||
<span>Frequently asked questions</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="bugs.html">Bug reports</a>
|
|
||||||
<span>How and where to report bugs and request features</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="contact.html">Contact</a>
|
|
||||||
<span>How to contact the developers via email and IRC</span>
|
|
||||||
</li><li>
|
|
||||||
<a href="relatedlinks.html">Related Links</a>
|
|
||||||
<span>Miscellaneous links of interest related to libvirt</span>
|
|
||||||
<ul><li>
|
|
||||||
<a href="apps.html">Applications</a>
|
|
||||||
<span>Overview of applications using the libvirt APIs</span>
|
|
||||||
</li></ul></li><li>
|
|
||||||
<a href="sitemap.html">Sitemap</a>
|
|
||||||
<span>Overview of all content on the website</span>
|
|
||||||
</li></ul></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,429 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from storage.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Storage Management</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="active" href="drivers.html">Drivers</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver the Xen hypervisor" class="inactive" href="drvxen.html">Xen</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for QEMU, KQEMU, KVM and Xenner" class="inactive" href="drvqemu.html">QEMU / KVM</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the Linux native container API" class="inactive" href="drvlxc.html">Linux Container</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Psuedo-driver simulating APIs in memory for test suites" class="inactive" href="drvtest.html">Test</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver providing secure remote to the libvirt APIs" class="inactive" href="drvremote.html">Remote</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the OpenVZ container technology" class="inactive" href="drvopenvz.html">OpenVZ</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for the User Mode Linux technology" class="inactive" href="drvuml.html">UML</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Storage</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for VirtualBox" class="inactive" href="drvvbox.html">VirtualBox</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Driver for OpenNebula" class="inactive" href="drvone.html">OpenNebula</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Reference manual for the C public API" class="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Storage Management</h1>
|
|
||||||
<p>
|
|
||||||
This page describes the backends for the storage management capabilities in
|
|
||||||
libvirt.
|
|
||||||
</p>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#StorageBackendDir">Directory backend</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StorageBackendFS">Local filesystem backend</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StorageBackendNetFS">Network filesystem backend</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StorageBackendLogical">Logical backend</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StorageBackendDisk">Disk backend</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#StorageBackendISCSI">iSCSI backend</a>
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="StorageBackendDir" id="StorageBackendDir">Directory pool</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
A pool with a type of <code>dir</code> provides the means to manage
|
|
||||||
files within a directory. The files can be fully allocated raw files,
|
|
||||||
sparsely allocated raw files, or one of the special disk formats
|
|
||||||
such as <code>qcow</code>,<code>qcow2</code>,<code>vmdk</code>,
|
|
||||||
<code>cow</code>, etc as supported by the <code>qemu-img</code>
|
|
||||||
program. If the directory does not exist at the time the pool is
|
|
||||||
defined, the <code>build</code> operation can be used to create it.
|
|
||||||
</p>
|
|
||||||
<h3>Example pool input definition</h3>
|
|
||||||
<pre>
|
|
||||||
<pool type="dir">
|
|
||||||
<name>virtimages</name>
|
|
||||||
<target>
|
|
||||||
<path>/var/lib/virt/images</path>
|
|
||||||
</target>
|
|
||||||
</pool>
|
|
||||||
</pre>
|
|
||||||
<h3>Valid pool format types</h3>
|
|
||||||
<p>
|
|
||||||
The directory pool does not use the pool format type element.
|
|
||||||
</p>
|
|
||||||
<h3>Valid volume format types</h3>
|
|
||||||
<p>
|
|
||||||
One of the following options:
|
|
||||||
</p>
|
|
||||||
<ul><li><code>raw</code>: a plain file</li><li><code>bochs</code>: Bochs disk image format</li><li><code>cloop</code>: compressed loopback disk image format</li><li><code>cow</code>: User Mode Linux disk image format</li><li><code>dmg</code>: Mac disk image format</li><li><code>iso</code>: CDROM disk image format</li><li><code>qcow</code>: QEMU v1 disk image format</li><li><code>qcow2</code>: QEMU v2 disk image format</li><li><code>vmdk</code>: VMWare disk image format</li><li><code>vpc</code>: VirtualPC disk image format</li></ul>
|
|
||||||
<p>
|
|
||||||
When listing existing volumes all these formats are supported
|
|
||||||
natively. When creating new volumes, only a subset may be
|
|
||||||
available. The <code>raw</code> type is guaranteed always
|
|
||||||
available. The <code>qcow2</code> type can be created if
|
|
||||||
either <code>qemu-img</code> or <code>qcow-create</code> tools
|
|
||||||
are present. The others are dependent on support of the
|
|
||||||
<code>qemu-img</code> tool.
|
|
||||||
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="StorageBackendFS" id="StorageBackendFS">Filesystem pool</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
This is a variant of the directory pool. Instead of creating a
|
|
||||||
directory on an existing mounted filesystem though, it expects
|
|
||||||
a source block device to be named. This block device will be
|
|
||||||
mounted and files managed in the directory of its mount point.
|
|
||||||
It will default to allowing the kernel to automatically discover
|
|
||||||
the filesystem type, though it can be specified manually if
|
|
||||||
required.
|
|
||||||
</p>
|
|
||||||
<h3>Example pool input</h3>
|
|
||||||
<pre>
|
|
||||||
<pool type="fs">
|
|
||||||
<name>virtimages</name>
|
|
||||||
<source>
|
|
||||||
<device path="/dev/VolGroup00/VirtImages"/>
|
|
||||||
</source>
|
|
||||||
<target>
|
|
||||||
<path>/var/lib/virt/images</path>
|
|
||||||
</target>
|
|
||||||
</pool>
|
|
||||||
</pre>
|
|
||||||
<h3>Valid pool format types</h3>
|
|
||||||
<p>
|
|
||||||
The filesystem pool supports the following formats:
|
|
||||||
</p>
|
|
||||||
<ul><li><code>auto</code> - automatically determine format</li><li>
|
|
||||||
<code>ext2</code>
|
|
||||||
</li><li>
|
|
||||||
<code>ext3</code>
|
|
||||||
</li><li>
|
|
||||||
<code>ext4</code>
|
|
||||||
</li><li>
|
|
||||||
<code>ufs</code>
|
|
||||||
</li><li>
|
|
||||||
<code>iso9660</code>
|
|
||||||
</li><li>
|
|
||||||
<code>udf</code>
|
|
||||||
</li><li>
|
|
||||||
<code>gfs</code>
|
|
||||||
</li><li>
|
|
||||||
<code>gfs2</code>
|
|
||||||
</li><li>
|
|
||||||
<code>vfat</code>
|
|
||||||
</li><li>
|
|
||||||
<code>hfs+</code>
|
|
||||||
</li><li>
|
|
||||||
<code>xfs</code>
|
|
||||||
</li></ul>
|
|
||||||
<h3>Valid volume format types</h3>
|
|
||||||
<p>
|
|
||||||
The valid volume types are the same as for the <code>directory</code>
|
|
||||||
pool type.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="StorageBackendNetFS" id="StorageBackendNetFS">Network filesystem pool</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
This is a variant of the filesystem pool. Instead of requiring
|
|
||||||
a local block device as the source, it requires the name of a
|
|
||||||
host and path of an exported directory. It will mount this network
|
|
||||||
filesystem and manage files within the directory of its mount
|
|
||||||
point. It will default to using NFS as the protocol.
|
|
||||||
</p>
|
|
||||||
<h3>Example pool input</h3>
|
|
||||||
<pre>
|
|
||||||
<pool type="netfs">
|
|
||||||
<name>virtimages</name>
|
|
||||||
<source>
|
|
||||||
<host name="nfs.example.com"/>
|
|
||||||
<dir path="/var/lib/virt/images"/>
|
|
||||||
</source>
|
|
||||||
<target>
|
|
||||||
<path>/var/lib/virt/images</path>
|
|
||||||
</target>
|
|
||||||
</pool>
|
|
||||||
</pre>
|
|
||||||
<h3>Valid pool format types</h3>
|
|
||||||
<p>
|
|
||||||
The network filesystem pool supports the following formats:
|
|
||||||
</p>
|
|
||||||
<ul><li><code>auto</code> - automatically determine format</li><li>
|
|
||||||
<code>nfs</code>
|
|
||||||
</li></ul>
|
|
||||||
<h3>Valid volume format types</h3>
|
|
||||||
<p>
|
|
||||||
The valid volume types are the same as for the <code>directory</code>
|
|
||||||
pool type.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="StorageBackendLogical" id="StorageBackendLogical">Logical volume pools</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
This provides a pool based on an LVM volume group. For a
|
|
||||||
pre-defined LVM volume group, simply providing the group
|
|
||||||
name is sufficient, while to build a new group requires
|
|
||||||
providing a list of source devices to serve as physical
|
|
||||||
volumes. Volumes will be allocated by carving out chunks
|
|
||||||
of storage from the volume group.
|
|
||||||
</p>
|
|
||||||
<h3>Example pool input</h3>
|
|
||||||
<pre>
|
|
||||||
<pool type="logical">
|
|
||||||
<name>HostVG</name>
|
|
||||||
<source>
|
|
||||||
<device path="/dev/sda1"/>
|
|
||||||
<device path="/dev/sdb1"/>
|
|
||||||
<device path="/dev/sdc1"/>
|
|
||||||
</source>
|
|
||||||
<target>
|
|
||||||
<path>/dev/HostVG</path>
|
|
||||||
</target>
|
|
||||||
</pool>
|
|
||||||
</pre>
|
|
||||||
<h3>Valid pool format types</h3>
|
|
||||||
<p>
|
|
||||||
The logical volume pool does not use the pool format type element.
|
|
||||||
</p>
|
|
||||||
<h3>Valid volume format types</h3>
|
|
||||||
<p>
|
|
||||||
The logical volume pool does not use the volume format type element.
|
|
||||||
</p>
|
|
||||||
<h2>
|
|
||||||
<a name="StorageBackendDisk" id="StorageBackendDisk">Disk volume pools</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
This provides a pool based on a physical disk. Volumes are created
|
|
||||||
by adding partitions to the disk. Disk pools are have constraints
|
|
||||||
on the size and placement of volumes. The 'free extents'
|
|
||||||
information will detail the regions which are available for creating
|
|
||||||
new volumes. A volume cannot span across 2 different free extents.
|
|
||||||
</p>
|
|
||||||
<h3>Example pool input</h3>
|
|
||||||
<pre>
|
|
||||||
<pool type="disk">
|
|
||||||
<name>sda</name>
|
|
||||||
<source>
|
|
||||||
<device path='/dev/sda'/>
|
|
||||||
</source>
|
|
||||||
<target>
|
|
||||||
<path>/dev</path>
|
|
||||||
</target>
|
|
||||||
</pool>
|
|
||||||
</pre>
|
|
||||||
<h3>Valid pool format types</h3>
|
|
||||||
<p>
|
|
||||||
The disk volume pool accepts the following pool format types, representing
|
|
||||||
the common partition table types:
|
|
||||||
</p>
|
|
||||||
<ul><li>
|
|
||||||
<code>dos</code>
|
|
||||||
</li><li>
|
|
||||||
<code>dvh</code>
|
|
||||||
</li><li>
|
|
||||||
<code>gpt</code>
|
|
||||||
</li><li>
|
|
||||||
<code>mac</code>
|
|
||||||
</li><li>
|
|
||||||
<code>bsd</code>
|
|
||||||
</li><li>
|
|
||||||
<code>pc98</code>
|
|
||||||
</li><li>
|
|
||||||
<code>sun</code>
|
|
||||||
</li></ul>
|
|
||||||
<p>
|
|
||||||
The <code>dos</code> or <code>gpt</code> formats are recommended for
|
|
||||||
best portability - the latter is needed for disks larger than 2TB.
|
|
||||||
</p>
|
|
||||||
<h3>Valid volume format types</h3>
|
|
||||||
<p>
|
|
||||||
The disk volume pool accepts the following volume format types, representing
|
|
||||||
the common partition entry types:
|
|
||||||
</p>
|
|
||||||
<ul><li>
|
|
||||||
<code>none</code>
|
|
||||||
</li><li>
|
|
||||||
<code>linux</code>
|
|
||||||
</li><li>
|
|
||||||
<code>fat16</code>
|
|
||||||
</li><li>
|
|
||||||
<code>fat32</code>
|
|
||||||
</li><li>
|
|
||||||
<code>linux-swap</code>
|
|
||||||
</li><li>
|
|
||||||
<code>linux-lvm</code>
|
|
||||||
</li><li>
|
|
||||||
<code>linux-raid</code>
|
|
||||||
</li><li>
|
|
||||||
<code>extended</code>
|
|
||||||
</li></ul>
|
|
||||||
<h2>
|
|
||||||
<a name="StorageBackendISCSI" id="StorageBackendISCSI">iSCSI volume pools</a>
|
|
||||||
</h2>
|
|
||||||
<p>
|
|
||||||
This provides a pool based on an iSCSI target. Volumes must be
|
|
||||||
pre-allocated on the iSCSI server, and cannot be created via
|
|
||||||
the libvirt APIs. Since /dev/XXX names may change each time libvirt
|
|
||||||
logs into the iSCSI target, it is recommended to configure the pool
|
|
||||||
to use <code>/dev/disk/by-path</code> or <code>/dev/disk/by-id</code>
|
|
||||||
for the target path. These provide persistent stable naming for LUNs
|
|
||||||
</p>
|
|
||||||
<h3>Example pool input</h3>
|
|
||||||
<pre>
|
|
||||||
<pool type="iscsi">
|
|
||||||
<name>virtimages</name>
|
|
||||||
<source>
|
|
||||||
<host name="iscsi.example.com"/>
|
|
||||||
<device path="demo-target"/>
|
|
||||||
</source>
|
|
||||||
<target>
|
|
||||||
<path>/dev/disk/by-path</path>
|
|
||||||
</target>
|
|
||||||
</pool>
|
|
||||||
</pre>
|
|
||||||
<h3>Valid pool format types</h3>
|
|
||||||
<p>
|
|
||||||
The iSCSI volume pool does not use the pool format type element.
|
|
||||||
</p>
|
|
||||||
<h3>Valid volume format types</h3>
|
|
||||||
<p>
|
|
||||||
The iSCSI volume pool does not use the volume format type element.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
386
docs/uri.html
386
docs/uri.html
|
@ -1,386 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from uri.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Connection URIs</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="active" href="deployment.html">Deployment</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">URI format</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enable remote access over TCP" class="inactive" href="remote.html">Remote access</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Configure authentication for the libvirt daemon" class="inactive" href="auth.html">Authentication</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Access the libvirt daemon from a native Windows client" class="inactive" href="windows.html">Windows port</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Connection URIs</h1>
|
|
||||||
<p>
|
|
||||||
Since libvirt supports many different kinds of virtualization
|
|
||||||
(often referred to as "drivers" or "hypervisors"), we need a
|
|
||||||
way to be able to specify which driver a connection refers to.
|
|
||||||
Additionally we may want to refer to a driver on a remote
|
|
||||||
machine over the network.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
To this end, libvirt uses URIs as used on the Web and as defined in <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>. This page
|
|
||||||
documents libvirt URIs.
|
|
||||||
</p>
|
|
||||||
<ul><li>
|
|
||||||
<a href="#URI_libvirt">Specifying URIs to libvirt</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#URI_virsh">Specifying URIs to virsh, virt-manager and virt-install</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#URI_xen">xen:/// URI</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#URI_qemu">qemu:///... QEMU and KVM URIs</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#URI_remote">Remote URIs</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#URI_test">test:///... Test URIs</a>
|
|
||||||
</li><li>
|
|
||||||
<a href="#URI_legacy">Other & legacy URI formats</a>
|
|
||||||
</li></ul>
|
|
||||||
<h3>
|
|
||||||
<a name="URI_libvirt" id="URI_libvirt">Specifying URIs to libvirt</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The URI is passed as the <code>name</code> parameter to <a href="html/libvirt-libvirt.html#virConnectOpen"><code>virConnectOpen</code></a> or <a href="html/libvirt-libvirt.html#virConnectOpenReadOnly"><code>virConnectOpenReadOnly</code></a>. For example:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
virConnectPtr conn = virConnectOpenReadOnly (<b>"test:///default"</b>);
|
|
||||||
</pre>
|
|
||||||
<h3>
|
|
||||||
<a name="URI_virsh" id="URI_virsh">Specifying URIs to virsh, virt-manager and virt-install</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
In virsh use the <code>-c</code> or <code>--connect</code> option:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
virsh <b>-c test:///default</b> list
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
If virsh finds the environment variable
|
|
||||||
<code>VIRSH_DEFAULT_CONNECT_URI</code> set, it will try this URI by
|
|
||||||
default.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
When using the interactive virsh shell, you can also use the
|
|
||||||
<code>connect</code> <i>URI</i> command to reconnect to another
|
|
||||||
hypervisor.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
In virt-manager use the <code>-c</code> or <code>--connect=</code><i>URI</i> option:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
virt-manager <b>-c test:///default</b>
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
In virt-install use the <code>--connect=</code><i>URI</i> option:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
virt-install <b>--connect=test:///default</b> <i>[other options]</i>
|
|
||||||
</pre>
|
|
||||||
<h3>
|
|
||||||
<a name="URI_xen" id="URI_xen">xen:/// URI</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
<i>This section describes a feature which is new in libvirt >
|
|
||||||
0.2.3. For libvirt ≤ 0.2.3 use <a href="#URI_legacy_xen"><code>"xen"</code></a>.</i>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
To access a Xen hypervisor running on the local machine
|
|
||||||
use the URI <code>xen:///</code>.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="URI_qemu" id="URI_qemu">qemu:///... QEMU and KVM URIs</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
To use QEMU support in libvirt you must be running the
|
|
||||||
<code>libvirtd</code> daemon (named <code>libvirt_qemud</code>
|
|
||||||
in releases prior to 0.3.0). The purpose of this
|
|
||||||
daemon is to manage qemu instances.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The <code>libvirtd</code> daemon should be started by the
|
|
||||||
init scripts when the machine boots. It should appear as
|
|
||||||
a process <code>libvirtd --daemon</code> running as root
|
|
||||||
in the background and will handle qemu instances on behalf
|
|
||||||
of all users of the machine (among other things). </p>
|
|
||||||
<p>
|
|
||||||
So to connect to the daemon, one of two different URIs is used:
|
|
||||||
</p>
|
|
||||||
<ul><li><code>qemu:///system</code> connects to a system mode daemon. </li><li><code>qemu:///session</code> connects to a session mode daemon. </li></ul>
|
|
||||||
<p>
|
|
||||||
(If you do <code>libvirtd --help</code>, the daemon will print
|
|
||||||
out the paths of the Unix domain socket(s) that it listens on in
|
|
||||||
the various different modes).
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
KVM URIs are identical. You select between qemu, qemu accelerated and
|
|
||||||
KVM guests in the <a href="format.html#KVM1">guest XML as described
|
|
||||||
here</a>.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="URI_remote" id="URI_remote">Remote URIs</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
Remote URIs are formed by taking ordinary local URIs and adding a
|
|
||||||
hostname and/or transport name. As a special case, using a URI
|
|
||||||
scheme of 'remote', will tell the remote libvirtd server to probe
|
|
||||||
for the optimal hypervisor driver. This is equivalent to passing
|
|
||||||
a NULL URI for a local connection. For example:
|
|
||||||
</p>
|
|
||||||
<table class="top_table"><tr><th> Local URI </th><th> Remote URI </th><th> Meaning </th></tr><tr><td>
|
|
||||||
<code>xen:///</code>
|
|
||||||
</td><td>
|
|
||||||
<code>xen://oirase/</code>
|
|
||||||
</td><td> Connect to the Xen hypervisor running on host <code>oirase</code>
|
|
||||||
using TLS. </td></tr><tr><td>
|
|
||||||
<code>NULL</code>
|
|
||||||
</td><td>
|
|
||||||
<code>remote://oirase/</code>
|
|
||||||
</td><td> Connect to the "default" hypervisor running on host <code>oirase</code>
|
|
||||||
using TLS. </td></tr><tr><td>
|
|
||||||
<code>xen:///</code>
|
|
||||||
</td><td>
|
|
||||||
<code>xen+ssh://oirase/</code>
|
|
||||||
</td><td> Connect to the Xen hypervisor running on host <code>oirase</code>
|
|
||||||
by going over an <code>ssh</code> connection. </td></tr><tr><td>
|
|
||||||
<code>test:///default</code>
|
|
||||||
</td><td>
|
|
||||||
<code>test+tcp://oirase/default</code>
|
|
||||||
</td><td> Connect to the test driver on host <code>oirase</code>
|
|
||||||
using an unsecured TCP connection. </td></tr></table>
|
|
||||||
<p>
|
|
||||||
Remote URIs in libvirt offer a rich syntax and many features.
|
|
||||||
We refer you to <a href="remote.html#Remote_URI_reference">the libvirt
|
|
||||||
remote URI reference</a> and <a href="remote.html">full documentation
|
|
||||||
for libvirt remote support</a>.
|
|
||||||
</p>
|
|
||||||
<h3>
|
|
||||||
<a name="URI_test" id="URI_test">test:///... Test URIs</a>
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
The test driver is a dummy hypervisor for test purposes.
|
|
||||||
The URIs supported are:
|
|
||||||
</p>
|
|
||||||
<ul><li><code>test:///default</code> connects to a default set of
|
|
||||||
host definitions built into the driver. </li><li><code>test:///path/to/host/definitions</code> connects to
|
|
||||||
a set of host definitions held in the named file.
|
|
||||||
</li></ul>
|
|
||||||
<h3>
|
|
||||||
<a name="URI_legacy" id="URI_legacy">Other & legacy URI formats</a>
|
|
||||||
</h3>
|
|
||||||
<h4>
|
|
||||||
<a name="URI_NULL" id="URI_NULL">NULL and empty string URIs</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
Libvirt allows you to pass a <code>NULL</code> pointer to
|
|
||||||
<code>virConnectOpen*</code>. Empty string (<code>""</code>) acts in
|
|
||||||
the same way. Traditionally this has meant
|
|
||||||
<q>connect to the local Xen hypervisor</q>. However in future this
|
|
||||||
may change to mean <q>connect to the best available hypervisor</q>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
The theory is that if, for example, Xen is unavailable but the
|
|
||||||
machine is running an OpenVZ kernel, then we should not try to
|
|
||||||
connect to the Xen hypervisor since that is obviously the wrong
|
|
||||||
thing to do.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
In any case applications linked to libvirt can continue to pass
|
|
||||||
<code>NULL</code> as a default choice, but should always allow the
|
|
||||||
user to override the URI, either by constructing one or by allowing
|
|
||||||
the user to type a URI in directly (if that is appropriate). If your
|
|
||||||
application wishes to connect specifically to a Xen hypervisor, then
|
|
||||||
for future proofing it should choose a full <a href="#URI_xen"><code>xen:///</code> URI</a>.
|
|
||||||
</p>
|
|
||||||
<h4>
|
|
||||||
<a name="URI_file" id="URI_file">File paths (xend-unix-server)</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
If XenD is running and configured in <code>/etc/xen/xend-config.sxp</code>:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
(xend-unix-server yes)
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
then it listens on a Unix domain socket, usually at
|
|
||||||
<code>/var/lib/xend/xend-socket</code>. You may pass a different path
|
|
||||||
using a file URI such as:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
virsh -c ///var/run/xend/xend-socket
|
|
||||||
</pre>
|
|
||||||
<h4>
|
|
||||||
<a name="URI_http" id="URI_http">Legacy: <code>http://...</code> (xend-http-server)</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
If XenD is running and configured in <code>/etc/xen/xend-config.sxp</code>:
|
|
||||||
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
(xend-http-server yes)
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
then it listens on TCP port 8000. libvirt allows you to
|
|
||||||
try to connect to xend running on remote machines by passing
|
|
||||||
<code>http://<i>hostname</i>[:<i>port</i>]/</code>, for example:
|
|
||||||
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
virsh -c http://oirase/ list
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
This method is unencrypted and insecure and is definitely not
|
|
||||||
recommended for production use. Instead use <a href="remote.html">libvirt's remote support</a>.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Notes:
|
|
||||||
</p>
|
|
||||||
<ol><li> The HTTP client does not fully support IPv6. </li><li> Many features do not work as expected across HTTP connections, in
|
|
||||||
particular, <a href="html/libvirt-libvirt.html#virConnectGetCapabilities">virConnectGetCapabilities</a>.
|
|
||||||
The <a href="remote.html">remote support</a> however does work
|
|
||||||
correctly. </li><li> XenD's new-style XMLRPC interface is not supported by
|
|
||||||
libvirt, only the old-style sexpr interface known in the Xen
|
|
||||||
documentation as "unix server" or "http server".</li></ol>
|
|
||||||
<h4>
|
|
||||||
<a name="URI_legacy_xen" id="URI_legacy_xen">Legacy: <code>"xen"</code></a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
Another legacy URI is to specify name as the string
|
|
||||||
<code>"xen"</code>. This will continue to refer to the Xen
|
|
||||||
hypervisor. However you should prefer a full <a href="#URI_xen"><code>xen:///</code> URI</a> in all future code.
|
|
||||||
</p>
|
|
||||||
<h4>
|
|
||||||
<a name="URI_legacy_proxy" id="URI_legacy_proxy">Legacy: Xen proxy</a>
|
|
||||||
</h4>
|
|
||||||
<p>
|
|
||||||
Libvirt continues to support connections to a separately running Xen
|
|
||||||
proxy daemon. This provides a way to allow non-root users to make a
|
|
||||||
safe (read-only) subset of queries to the hypervisor.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
There is no specific "Xen proxy" URI. However if a Xen URI of any of
|
|
||||||
the ordinary or legacy forms is used (eg. <code>NULL</code>,
|
|
||||||
<code>""</code>, <code>"xen"</code>, ...) which fails, <i>and</i> the
|
|
||||||
user is not root, <i>and</i> the Xen proxy socket can be connected to
|
|
||||||
(<code>/tmp/libvirt_proxy_conn</code>), then libvirt will use a proxy
|
|
||||||
connection.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
You should consider using <a href="remote.html">libvirt remote support</a>
|
|
||||||
in future.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,158 +0,0 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<!--
|
|
||||||
This file is autogenerated from windows.html.in
|
|
||||||
Do not edit this file. Changes will be lost.
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="main.css" />
|
|
||||||
<link rel="SHORTCUT ICON" href="32favicon.png" />
|
|
||||||
<title>libvirt: Windows support</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="active" href="deployment.html">Deployment</a>
|
|
||||||
<ul class="l2"><li>
|
|
||||||
<div>
|
|
||||||
<a title="The URI formats used for connecting to libvirt" class="inactive" href="uri.html">URI format</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Enable remote access over TCP" class="inactive" href="remote.html">Remote access</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="Configure authentication for the libvirt daemon" class="inactive" href="auth.html">Authentication</a>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<span class="active">Windows port</span>
|
|
||||||
</div>
|
|
||||||
</li><li>
|
|
||||||
<div>
|
|
||||||
<a title="The library and the daemon logging support" class="inactive" href="logging.html">Logging</a>
|
|
||||||
</div>
|
|
||||||
</li></ul>
|
|
||||||
</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="inactive" href="html/index.html">API reference</a>
|
|
||||||
</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></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="FAQ.html">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>Windows support</h1>
|
|
||||||
<p>
|
|
||||||
Libvirt can be compiled on Windows
|
|
||||||
using the free <a href="http://www.mingw.org/">MinGW compiler</a>.
|
|
||||||
You can also cross-compile to a Windows target
|
|
||||||
from a Fedora machine using the packages available
|
|
||||||
<a href="http://hg.et.redhat.com/misc/fedora-mingw--devel/">from
|
|
||||||
the Fedora MinGW project</a>
|
|
||||||
(which includes a working libvirt specfile).
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Libvirt can only be built as a client on Windows
|
|
||||||
allowing remote access to systems libvirt servers.
|
|
||||||
Configure libvirt like this:
|
|
||||||
</p>
|
|
||||||
<pre>
|
|
||||||
./configure \
|
|
||||||
--without-sasl \
|
|
||||||
--without-avahi \
|
|
||||||
--without-polkit \
|
|
||||||
--without-python \
|
|
||||||
--without-xen \
|
|
||||||
--without-qemu \
|
|
||||||
--without-lxc \
|
|
||||||
--without-openvz \
|
|
||||||
--without-libvirtd
|
|
||||||
</pre>
|
|
||||||
<p>
|
|
||||||
We intend to supply Windows binaries on this page
|
|
||||||
later, but at the moment you have to compile from source.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div id="footer">
|
|
||||||
<p id="sponsor">
|
|
||||||
Sponsored by:<br /><a href="http://et.redhat.com/"><img src="et.png" alt="Project sponsored by Red Hat Emerging Technology" /></a></p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue