diff --git a/docs/.gitignore b/docs/.gitignore index f28418427e..977de13bc0 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -2,3 +2,4 @@ Makefile Makefile.in .memdump apibuild.pyc +*.html diff --git a/docs/FAQ.html b/docs/FAQ.html deleted file mode 100644 index f6858eada6..0000000000 --- a/docs/FAQ.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - libvirt: FAQ - - - - -
- -
-

FAQ

-

Table of Contents:

- -

License(s)

-
  1. - Licensing Terms for libvirt -

    libvirt is released under the GNU Lesser - General Public License, 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.

    -
  2. - Can I embed libvirt in a proprietary application ? -

    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.

    -
-

- Installation -

-
  1. Where can I get libvirt ? -

    The original distribution comes from ftp://libvirt.org/libvirt/.

    -
  2. - I can't install the libvirt/libvirt-devel RPM packages due to - failed dependencies -

    The most generic solution is to re-fetch the latest src.rpm , and - rebuild it locally with

    -

    rpm --rebuild libvirt-xxx.src.rpm.

    -

    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.

    -

    One can also rebuild the RPMs from a tarball:

    -

    - rpmbuild -ta libdir-xxx.tar.gz -

    -

    Or from a configured tree with:

    -

    - make rpm -

    -
  3. - Failure to use the API for non-root users -

    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:

    -

    - chmod 666 /var/run/xenstored/socket_ro -

    -

    and also make sure that the Xen Daemon is running correctly with local - HTTP server enabled, this is defined in - /etc/xen/xend-config.sxp which need the following line to be - enabled:

    -

    - (xend-http-server yes) -

    -

    If needed restart the xend daemon after making the change with the - following command run as root:

    -

    - service xend restart -

    -
-

- Compilation -

-
  1. - What is the process to compile libvirt ? -

    As most UNIX libraries libvirt follows the "standard":

    -

    - gunzip -c libvirt-xxx.tar.gz | tar xvf - -

    -

    - cd libvirt-xxxx -

    -

    - ./configure --help -

    -

    to see the options, then the compilation/installation proper

    -

    - ./configure [possible options] -

    -

    - make -

    -

    - make install -

    -

    At that point you may have to rerun ldconfig or a similar utility to - update your list of installed shared libs.

    -
  2. - What other libraries are needed to compile/install libvirt ? -

    Libvirt requires libxenstore, which is usually provided by the xen - packages as well as the public headers to compile against libxenstore.

    -
  3. - I use the CVS version and there is no configure script -

    The configure script (and other Makefiles) are generated. Use the - autogen.sh script to regenerate the configure script and Makefiles, - like:

    -

    - ./autogen.sh --prefix=/usr --disable-shared -

    -
-

Developer corner

-
  1. - Troubles compiling or linking programs using libvirt -

    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:

    -

    - pkg-config libvirt --libs -

    -
-
-
- - - diff --git a/docs/Makefile.am b/docs/Makefile.am index 4077823923..e02369db58 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -65,11 +65,13 @@ EXTRA_DIST= \ $(patches) \ ChangeLog.awk +CLEANFILES = $(dot_html) $(apihtml) + 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 awk -f ChangeLog.awk < $< > $@ @@ -97,7 +99,7 @@ ChangeLog.html.in: ChangeLog.xml ChangeLog.xsl 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 \ echo "Rebuilding the HTML pages from the XML API" ; \ $(XSLTPROC) --nonet $(srcdir)/newapi.xsl libvirt-api.xml ; fi ) diff --git a/docs/api.html b/docs/api.html deleted file mode 100644 index a1f3855567..0000000000 --- a/docs/api.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - libvirt: The libvirt API concepts - - - - -
- -
-

The libvirt API concepts

-

This page describes the main principles and architecture choices - behind the definition of the libvirt API: -

- -

- Objects exposed -

-

As defined in the goals section, 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 virConnectPtr which represent a connection to - an hypervisor. Any application using libvirt is likely to start using the - API by calling one of the virConnectOpen functions. 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 connection - URI page for a full descriptions of the values allowed.

-

-

-

Once the application obtained a virConnectPtr - 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).

-

- first class objects exposed by the API

-

The figure above shows the five main objects exported by the API:

- -

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.

-

Domains, network and storage pools can be either active - i.e. either running or available for immediate use, or - defined 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.

-

Most kind of object can also be named in various ways:

-

-

- -

- Functions and naming - conventions -

-

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.

-

For each first class object you will find apis - for the following actions:

- -

For more in-depth details of the storage related APIs see - the storage management page, -

-

- The libvirt drivers -

-

-

- The libvirt driver architecture

-

- Daemon and remote access -

-

-

- The libvirt daemon and remote architecture

-
-
- - - diff --git a/docs/api_extension.html b/docs/api_extension.html deleted file mode 100644 index 172c089c57..0000000000 --- a/docs/api_extension.html +++ /dev/null @@ -1,365 +0,0 @@ - - - - - - - - - libvirt: Implementing a new API in Libvirt - - - - -
- -
-

Implementing a new API in Libvirt

- -

- 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. -

-

- 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. -

-

- 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: -

-

- http://libvirt.org/downloads.html -

-

- Once you have a working development environment, the steps to create a - new API are: -

-
  1. define the public API
  2. define the internal driver API
  3. implement the public API
  4. define the wire protocol format
  5. implement the RPC client
  6. implement the server side dispatcher
  7. implement the driver methods
  8. add virsh support
-

- 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. -

-

- 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. -

-

- 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. -

-

With that said, let's begin.

-

- Defining the public API -

-

The first task is to define the public API and add it to:

-

- include/libvirt/libvirt.h.in -

-

- 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. -

-

Once you have defined the API, you have to add the symbol names to:

-

- src/libvirt_public.syms -

-

See 0001-Step-1-of-8-Define-the-public-API.patch for example code.

-

- Defining the internal API -

-

- 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. -

-

- 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. -

-

The driver structs are defined in:

-

- src/driver.h -

-

- To define the internal API, first typedef the driver function - prototype and then add a new field for it to the relevant driver - struct. -

-

See 0002-Step-2-of-8-Define-the-internal-driver-API.patch

-

- Implementing the public API -

-

- 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: -

-
  1. SHOULD log a message with VIR_DEBUG() indicating that it is - being called and its parameters;
  2. MUST call virResetLastError();
  3. SHOULD confirm that the connection is valid with - VIR_IS_CONNECT(conn);
  4. 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;
  5. SHOULD do basic validation of the parameters that are being - passed in;
  6. MUST confirm that the driver for this connection exists and that - it implements this function;
  7. MUST call the internal API;
  8. SHOULD log a message with VIR_DEBUG() indicating that it is - returning, its return value, and status.
  9. MUST return status to the caller.
-

The public API calls are implemented in:

-

- src/libvirt.c -

-

See 0003-Step-3-of-8-Implement-the-public-API.patch

-

- Defining the wire protocol format -

-

- 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: -

-

- qemud/remote_protocol.x -

-

- 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. -

-

- Second, add values to the remote_procedure enum for each new function - added to the API. -

-

See 0004-Step-4-of-8-Define-the-wire-protocol-format.patch

-

- 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 -

-

- Implement the RPC client -

-

- 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: -

-

- src/remote_internal.c -

-

Each remote method invocation does the following:

-
  1. locks the remote driver;
  2. sets up the method arguments;
  3. invokes the remote function;
  4. checks the return value, if necessary;
  5. extracts any returned data;
  6. frees any returned data;
  7. unlocks the remote driver.
-

- Once you have created the remote method calls, you have to add fields - for them to the driver structs for the appropriate remote driver. -

-

See 0005-Step-5-of-8-Implement-the-RPC-client.patch

-

- Implement the server side dispatcher -

-

- 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: -

-

- qemud/remote.c -

-

Again, this step uses the .h files generated by make rpcgen.

-

See 0006-Step-6-of-8-Implement-the-server-side-dispatcher.patch

-

- Implement the driver methods -

-

- 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. -

-

- 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. -

-

- 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. -

-

See 0007-Step-7-of-8-Implement-the-driver-methods.patch

-

- Implement virsh commands -

-

- 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. -

-

- 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. -

-

See 0008-Step-8-of-8-Add-virsh-support.patch

-

Once you have working functionality, run make check and make - syntax-check before generating patches.

-
-
- - - diff --git a/docs/apps.html b/docs/apps.html deleted file mode 100644 index 1e9a923659..0000000000 --- a/docs/apps.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - libvirt: Applications using libvirt - - - - -
- -
-

Applications using libvirt

-

- 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 mailing list - 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: -

-

- Made with libvirt

-

Command line tools

-
virsh
- 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. -
virt-install
- 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. -
virt-clone
- 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 -
virt-image
- 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. -
virt-df
- 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. -
virt-top
- Watch the CPU, memory, network and disk utilization of all - virtual machines running on a host. -
-

Desktop applications

-
virt-manager
- 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. -
virt-viewer
- 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. -
-

Web applications

-
oVirt
- 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. -
AbiCloud
- 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. -
-

LiveCD / Appliances

-
virt-p2v
- 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. -
-

Monitoring plugins

-
for munin
- The plugins provided by Guido Günther allow to monitor various things - like network and block I/O with - Munin. -
for collectd
- The libvirt-plugin is part of collectd - 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. -
nagios-virt
- Nagios-virt is a configuration tool for adding monitoring of your - virtualised domains to Nagios. - 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. -
-
-
- - - diff --git a/docs/archdomain.html b/docs/archdomain.html deleted file mode 100644 index 09c8c5bb6e..0000000000 --- a/docs/archdomain.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - libvirt: Domain management architecture - - - - -
- -
-

Domain management architecture

-
-
- - - diff --git a/docs/architecture.html b/docs/architecture.html deleted file mode 100644 index dc1b1a1c32..0000000000 --- a/docs/architecture.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - - libvirt: libvirt architecture - - - - -
- -
-

libvirt architecture

-

Currently libvirt supports 2 kind of virtualization, and its -internal structure is based on a driver model which simplifies adding new -engines:

- -

- Libvirt Xen support -

-

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:

- The Xen architecture -

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:

- -

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).

-

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.

-

- Libvirt QEmu and KVM support -

-

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.

-

The code controlling the QEmu process is available in the -qemud/ directory.

-

- the driver based architecture -

-

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:

- -

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.

-

-
-
- - - diff --git a/docs/archnetwork.html b/docs/archnetwork.html deleted file mode 100644 index d01c1d670e..0000000000 --- a/docs/archnetwork.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - - libvirt: Network management architecture - - - - -
- -
-

Network management architecture

-

Architecture illustration

-

- The diagrams below illustrate some of the network configurations - enabled by the libvirt networking APIs -

- -

Logical diagram

-

- Logical network architecture

-

Physical diagram

-

- Physical network architecture

-
-
- - - diff --git a/docs/archnode.html b/docs/archnode.html deleted file mode 100644 index d5b6d303ce..0000000000 --- a/docs/archnode.html +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - libvirt: Node device management architecture - - - - -
- -
-

Node device management architecture

-
-
- - - diff --git a/docs/archstorage.html b/docs/archstorage.html deleted file mode 100644 index 5d08da87bc..0000000000 --- a/docs/archstorage.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - - - libvirt: Storage management architecture - - - - -
- -
-

Storage management architecture

-

- The storage management APIs are based around 2 core concepts -

-
  1. - Volume - 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. -
  2. - Pool - 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. -
-

- These two concepts are mapped through to two libvirt objects, a - virStorageVolPtr and a virStoragePoolPtr, - each with a collection of APIs for their management. -

-
-
- - - diff --git a/docs/auth.html b/docs/auth.html deleted file mode 100644 index dd16d5cc5c..0000000000 --- a/docs/auth.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - libvirt: Access control - - - - -
- -
-

Access control

-

-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. -

- -

- Server configuration -

-

-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 -/etc/libvirt/libvirtd.conf. Each of the libvirt sockets can -have its authentication mechanism configured independently. There is -currently a choice of none, polkit, and sasl. -The SASL scheme can be further configured to choose between a large -number of different mechanisms. -

-

- UNIX socket permissions/group -

-

-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 root user to connect. The read-only socket will -be open access (mode 0777) to allow any user to connect. -

-

-To allow non-root users greater access, the libvirtd.conf file -can be edited to change the permissions via the unix_sock_rw_perms, -config parameter and to set a user group via the unix_sock_group -parameter. For example, setting the former to mode 0770 and the -latter wheel would let any user in the wheel group connect to -the libvirt daemon. -

-

- UNIX socket PolicyKit auth -

-

-If libvirt contains support for PolicyKit, then access control options are -more advanced. The unix_sock_auth parameter will default to -polkit, and the file permissions will default to 0777 -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 sudo -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. -

-

-The default policy can be overridden by the administrator using the PolicyKit -master configuration file in /etc/PolicyKit/PolicyKit.conf. The -PolicyKit.conf(5) manual page provides details on the syntax -available. The two libvirt daemon actions available are named org.libvirt.unix.monitor -for the RO socket, and org.libvirt.unix.manage for the RW socket. -

-

-As an example, to allow a user fredfull access to the RW socket, -while requiring joe to authenticate with the admin password, -would require adding the following snippet to PolicyKit.conf. -

-
-  <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>
-
-

- Username/password auth -

-

-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 auth_unix_ro, auth_unix_rw, auth_tls -config params in libvirt.conf. -

-

-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 saslpasswd2 -command. When running this command it is important to tell it that the appname is libvirt. -As an example, to add a user fred, run -

-
-# saslpasswd2 -a libvirt fred
-Password: xxxxxx
-Again (for verification): xxxxxx
-
-

-To see a list of all accounts the sasldblistusers2 command can be used. -This command expects to be given the path to the libvirt user database, which is kept -in /etc/libvirt/passwd.db -

-
-# sasldblistusers2 -f /etc/libvirt/passwd.db
-fred@t60wlan.home.berrange.com: userPassword
-
-

-Finally, to disable a user's access, the saslpasswd2 command can be used -again: -

-
-# saslpasswd2 -a libvirt -d fred
-
-

- Kerberos auth -

-

-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 /etc/sasl2/libvirt.conf. -The mech_list parameter must first be changed to gssapi -instead of the default digest-md5. 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. -

-

-Some operating systems do not install the SASL kerberos plugin by default. It -may be necessary to install a sub-package such as cyrus-sasl-gssapi. -To check whether the Kerberos plugin is installed run the pluginviewer -program and verify that gssapi is listed,eg: -

-
-# 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
-
-

-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 libvirt/full.hostname@KERBEROS.REALM. -This is typically done by running the kadmin.local 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 /etc/libvirt/krb5.tab -

-
-# 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
-
-

-Any client application wishing to connect to a Kerberos enabled libvirt server -merely needs to run kinit 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. -

-
-
- - - diff --git a/docs/bindings.html b/docs/bindings.html deleted file mode 100644 index 8196a42e0d..0000000000 --- a/docs/bindings.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - libvirt: Bindings for other languages - - - - -
- -
-

Bindings for other languages

-

Libvirt comes with bindings to support other languages than -pure C. First the headers embeds the necessary declarations to -allow direct access from C++ code, but also we have bindings for -higher level kind of languages:

- -

For information on using libvirt on Windows - please see the Windows - support page. -

-

Support, requests or help for libvirt bindings are welcome on -the mailing -list, as usual try to provide enough background information -and make sure you use recent version, see the help -page.

-
-
- - - diff --git a/docs/bugs.html b/docs/bugs.html deleted file mode 100644 index 76653bb072..0000000000 --- a/docs/bugs.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - libvirt: Bug reporting - - - - -
- -
-

Bug reporting

-

- The Red Hat Bugzilla Server - 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. -

-

General libvirt bug reports

-

- 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 Virtualization Tools product and the libvirt - component. -

- -

Linux Distribution specific bug reports

- -

How to file high quality bug reports

-

- 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: -

- -

- If requesting a new feature attach any available patch to the ticket - and also email the patch to the libvirt mailing list for discussion -

-
-
- - - diff --git a/docs/contact.html b/docs/contact.html deleted file mode 100644 index 7cd5c0bfe5..0000000000 --- a/docs/contact.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - libvirt: Contacting the development team - - - - -
- -
-

Contacting the development team

-

Mailing list

-

- There is a mailing-list libvir-list@redhat.com for libvirt, - with an on-line archive. - Please subscribe to this list before posting by visiting the - associated Web - page and follow the instructions. Patches with explanations and provided as - attachments are really appreciated and will be discussed on the mailing list. - If possible generate the patches by using cvs diff -up in a CVS - checkout. -

-

IRC discussion

-

- Some of the libvirt developers may be found on IRC on the OFTC IRC - network. Use the settings: -

- -

- 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. -

-
-
- - - diff --git a/docs/deployment.html b/docs/deployment.html deleted file mode 100644 index da1423cac1..0000000000 --- a/docs/deployment.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - libvirt: Deployment - - - - -
- -
-

Deployment

-

Pre-packaged releases

-

- 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 libvirt - module. -

-

Self-built releases

-

- libvirt uses GNU autotools for its build system, so deployment - follows the usual process of configure; make ; make install -

-
-
-      # ./configure --prefix=$HOME/usr
-      # make
-      # make install
-    
-

Built from CVS / GIT

-

- When building from CVS it is necessary to generate the autotools - support files. This requires having autoconf, - automake, libtool and intltool - installed. The process can be automated with the autogen.sh - script. -

-
-
-      # ./autogen.sh --prefix=$HOME/usr
-      # make
-      # make install
-    
-
-
- - - diff --git a/docs/devhelp/.gitignore b/docs/devhelp/.gitignore index cc4ababa85..9c75b939c3 100644 --- a/docs/devhelp/.gitignore +++ b/docs/devhelp/.gitignore @@ -1,3 +1,4 @@ Makefile Makefile.in libvirt.devhelp +*.html diff --git a/docs/devhelp/Makefile.am b/docs/devhelp/Makefile.am index 2efebb2cff..dbf47c7e81 100644 --- a/docs/devhelp/Makefile.am +++ b/docs/devhelp/Makefile.am @@ -15,6 +15,8 @@ EXTRA_DIST=devhelp.xsl html.xsl libvirt.devhelp $(HTML_FILES) $(EXTRA_FORMAT) 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 -@(echo Rebuilding devhelp files) -@(if [ -x $(XSLTPROC) ] ; then \ diff --git a/docs/devhelp/general.html b/docs/devhelp/general.html deleted file mode 100644 index 998f2b18a6..0000000000 --- a/docs/devhelp/general.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - libvirt: - - - - - - - - - - - - - - - -

- libvirt API Modules -

-

libvirt - core interfaces for the libvirt library
virterror - error handling interfaces for the libvirt library

- - diff --git a/docs/devhelp/index.html b/docs/devhelp/index.html deleted file mode 100644 index 1d40e856da..0000000000 --- a/docs/devhelp/index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - libvirt Reference Manual - - - - - - - - - - - -

- libvirt Reference Manual -

-

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 GNU -Lesser General Public License. Virtualization of the Linux Operating -System means the ability to run multiple instances of Operating Systems -concurrently on a single hardware system where the basic resources are driven -by a Linux instance. The library aim at providing long term stable C API -initially for the Xen -paravirtualization but should be able to integrate other virtualization -mechanisms if needed.

-

If you get lost searching for some specific API use, try -the online search -engine hosted on libvirt.org -it indexes the project page, the APIs as well as the mailing-list archives.

- - diff --git a/docs/devhelp/libvirt-conf.html b/docs/devhelp/libvirt-conf.html deleted file mode 100644 index e1f0c4ef29..0000000000 --- a/docs/devhelp/libvirt-conf.html +++ /dev/null @@ -1,120 +0,0 @@ - - - - - conf: - - - - - - - - - - - - - - - -

- conf -

-

conf -

-

-

Author(s):

-
-

Synopsis

-
typedef virConfValue * virConfValuePtr;
-typedef enum virConfType;
-typedef struct _virConfValue virConfValue;
-typedef struct _virConf virConf;
-typedef virConf * virConfPtr;
-int	virConfWriteFile		(const char * filename, 
virConfPtr conf); -virConfValuePtr virConfGetValue (virConfPtr conf,
const char * setting); -virConfPtr virConfReadMem (const char * memory,
int len); -int virConfFree (virConfPtr conf); -virConfPtr virConfReadFile (const char * filename); -int virConfWriteMem (char * memory,
int * len,
virConfPtr conf); -
-
-
-

Description

-
-
-

Details

-
-

Structure virConf

struct _virConf {
-The content of this structure is not made public by the API.
-} virConf;
-

-

-
-

Typedef virConfPtr

virConf * virConfPtr;
-

a pointer to a parsed configuration file

-
-
-

Enum virConfType

enum virConfType {
-    VIR_CONF_NONE = 0 /* undefined */
-    VIR_CONF_LONG = 1 /* a long int */
-    VIR_CONF_STRING = 2 /* a string */
-    VIR_CONF_LIST = 3 /*  a list */
-};
-

-

-
-

Structure virConfValue

struct _virConfValue {
-    virConfType	type	: the virConfType
-    virConfValuePtr	next	: next element if in a list
-    long	l	: long integer
-    char *	str	: pointer to 0 terminated string
-    virConfValuePtr	list	: list of a list
-} virConfValue;
-

-

-
-

Typedef virConfValuePtr

virConfValue * virConfValuePtr;
-

-

-
-

virConfFree ()

int	virConfFree			(virConfPtr conf)
-

Frees all data associated to the handle

-
conf:a configuration file handle
Returns:0 in case of success, -1 in case of error.
-
-

virConfGetValue ()

virConfValuePtr	virConfGetValue		(virConfPtr conf, 
const char * setting)
-

Lookup the value associated to this entry in the configuration file

-
conf:a configuration file handle
setting:
Returns:a pointer to the value or NULL if the lookup failed, the data associated will be freed when virConfFree() is called
-
-

virConfReadFile ()

virConfPtr	virConfReadFile		(const char * filename)
-

Reads a configuration file.

-
filename:the path to the configuration file.
Returns:an handle to lookup settings or NULL if it failed to read or parse the file, use virConfFree() to free the data.
-
-

virConfReadMem ()

virConfPtr	virConfReadMem		(const char * memory, 
int len)
-

Reads a configuration file loaded in memory. The string can be zero terminated in which case @len can be 0

-
memory:pointer to the content of the configuration file
len:length in byte
Returns:an handle to lookup settings or NULL if it failed to parse the content, use virConfFree() to free the data.
-
-

virConfWriteFile ()

int	virConfWriteFile		(const char * filename, 
virConfPtr conf)
-

Writes a configuration file back to a file.

-
filename:the path to the configuration file.
conf:the conf
Returns:the number of bytes written or -1 in case of error.
-
-

virConfWriteMem ()

int	virConfWriteMem			(char * memory, 
int * len,
virConfPtr conf)
-

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).

-
memory:pointer to the memory to store the config file
len:pointer to the length in byte of the store, on output the size
conf:the conf
Returns:the number of bytes written or -1 in case of error.
-
-
-
- - diff --git a/docs/devhelp/libvirt-libvirt.html b/docs/devhelp/libvirt-libvirt.html deleted file mode 100644 index fb1a154602..0000000000 --- a/docs/devhelp/libvirt-libvirt.html +++ /dev/null @@ -1,1601 +0,0 @@ - - - - - libvirt: core interfaces for the libvirt library - - - - - - - - - - - - - - - -

- libvirt -

-

libvirt - core interfaces for the libvirt library

-

Provides the interfaces of the libvirt library to handle virtualized domains

-

Author(s): Daniel Veillard <veillard@redhat.com>

-
-

Synopsis

-
#define VIR_NODEINFO_MAXCPUS(nodeinfo);
-#define LIBVIR_VERSION_NUMBER;
-#define VIR_USE_CPU(cpumap, cpu);
-#define VIR_SECURITY_DOI_BUFLEN;
-#define VIR_CPU_MAPLEN(cpu);
-#define VIR_SECURITY_LABEL_BUFLEN;
-#define VIR_CPU_USABLE(cpumaps, maplen, vcpu, cpu);
-#define VIR_COPY_CPUMAP(cpumaps, maplen, vcpu, cpumap);
-#define VIR_DOMAIN_SCHED_FIELD_LENGTH;
-#define VIR_SECURITY_MODEL_BUFLEN;
-#define VIR_UUID_STRING_BUFLEN;
-#define VIR_GET_CPUMAP(cpumaps, maplen, vcpu);
-#define VIR_UUID_BUFLEN;
-#define VIR_UNUSE_CPU(cpumap, cpu);
-typedef struct _virDomainBlockStats virDomainBlockStatsStruct;
-typedef enum virDomainMigrateFlags;
-typedef struct _virNodeInfo virNodeInfo;
-typedef struct _virNetwork virNetwork;
-typedef enum virDomainEventResumedDetailType;
-typedef virDomainBlockStatsStruct * virDomainBlockStatsPtr;
-typedef struct _virConnect virConnect;
-typedef virSecret * virSecretPtr;
-typedef enum virDomainEventStartedDetailType;
-typedef struct _virDomainInfo virDomainInfo;
-typedef enum virStoragePoolDeleteFlags;
-typedef enum virEventHandleType;
-typedef struct _virStoragePool virStoragePool;
-typedef enum virDomainEventType;
-typedef struct _virDomainInterfaceStats virDomainInterfaceStatsStruct;
-typedef struct _virStoragePoolInfo virStoragePoolInfo;
-typedef struct _virSecret virSecret;
-typedef enum virDomainState;
-typedef struct _virDomain virDomain;
-typedef virDomainInterfaceStatsStruct * virDomainInterfaceStatsPtr;
-typedef virConnectAuth * virConnectAuthPtr;
-typedef struct _virStorageVolInfo virStorageVolInfo;
-typedef enum virSchedParameterType;
-typedef struct _virSecurityLabel virSecurityLabel;
-typedef virStorageVolInfo * virStorageVolInfoPtr;
-typedef virConnectCredential * virConnectCredentialPtr;
-typedef virStoragePool * virStoragePoolPtr;
-typedef virNodeInfo * virNodeInfoPtr;
-typedef virNetwork * virNetworkPtr;
-typedef virDomainInfo * virDomainInfoPtr;
-typedef struct _virNodeDevice virNodeDevice;
-typedef virConnect * virConnectPtr;
-typedef struct _virStorageVol virStorageVol;
-typedef virNodeDevice * virNodeDevicePtr;
-typedef struct _virInterface virInterface;
-typedef struct _virSchedParameter virSchedParameter;
-typedef enum virConnectFlags;
-typedef enum virDomainEventDefinedDetailType;
-typedef virInterface * virInterfacePtr;
-typedef enum virDomainMemoryFlags;
-typedef enum virDomainEventStoppedDetailType;
-typedef virStorageVol * virStorageVolPtr;
-typedef enum virVcpuState;
-typedef enum virStorageVolDeleteFlags;
-typedef struct _virVcpuInfo virVcpuInfo;
-typedef virSchedParameter * virSchedParameterPtr;
-typedef struct _virConnectAuth virConnectAuth;
-typedef struct _virConnectCredential virConnectCredential;
-typedef virSecurityModel * virSecurityModelPtr;
-typedef enum virDomainEventSuspendedDetailType;
-typedef virVcpuInfo * virVcpuInfoPtr;
-typedef enum virStoragePoolBuildFlags;
-typedef enum virDomainXMLFlags;
-typedef enum virStorageVolType;
-typedef enum virDomainEventUndefinedDetailType;
-typedef virDomain * virDomainPtr;
-typedef enum virConnectCredentialType;
-typedef enum virStoragePoolState;
-typedef virStoragePoolInfo * virStoragePoolInfoPtr;
-typedef enum virDomainCreateFlags;
-typedef virSecurityLabel * virSecurityLabelPtr;
-typedef struct _virSecurityModel virSecurityModel;
-typedef enum virSecretUsageType;
-char *	virStoragePoolGetXMLDesc	(virStoragePoolPtr pool, 
unsigned int flags); -int virSecretGetUUIDString (virSecretPtr secret,
char * buf); -const char * virStorageVolGetKey (virStorageVolPtr vol); -typedef void virEventUpdateTimeoutFunc (int timer,
int timeout); -int virDomainUndefine (virDomainPtr domain); -virDomainPtr virDomainDefineXML (virConnectPtr conn,
const char * xml); -int virDomainShutdown (virDomainPtr domain); -int virConnectListDefinedInterfaces (virConnectPtr conn,
char ** const names,
int maxnames); -int virGetVersion (unsigned long * libVer,
const char * type,
unsigned long * typeVer); -int virNodeGetCellsFreeMemory (virConnectPtr conn,
unsigned long long * freeMems,
int startCell,
int maxCells); -int virInitialize (void); -const char * virNodeDeviceGetName (virNodeDevicePtr dev); -int virConnectNumOfSecrets (virConnectPtr conn); -int virStoragePoolSetAutostart (virStoragePoolPtr pool,
int autostart); -char * virConnectDomainXMLFromNative (virConnectPtr conn,
const char * nativeFormat,
const char * nativeConfig,
unsigned int flags); -int virNodeDeviceDettach (virNodeDevicePtr dev); -int virDomainGetSecurityLabel (virDomainPtr domain,
virSecurityLabelPtr seclabel); -int virConnectDomainEventDeregister (virConnectPtr conn,
virConnectDomainEventCallback cb); -int virDomainGetSchedulerParameters (virDomainPtr domain,
virSchedParameterPtr params,
int * nparams); -virDomainPtr virDomainLookupByUUIDString (virConnectPtr conn,
const char * uuidstr); -int virConnectNumOfDefinedNetworks (virConnectPtr conn); -int virConnectListStoragePools (virConnectPtr conn,
char ** const names,
int maxnames); -int virNetworkGetUUID (virNetworkPtr network,
unsigned char * uuid); -char * virInterfaceGetXMLDesc (virInterfacePtr iface,
unsigned int flags); -virConnectPtr virStoragePoolGetConnect (virStoragePoolPtr pool); -int virConnectGetVersion (virConnectPtr conn,
unsigned long * hvVer); -int virDomainFree (virDomainPtr domain); -int virStorageVolRef (virStorageVolPtr vol); -const char * virStoragePoolGetName (virStoragePoolPtr pool); -int virDomainSetAutostart (virDomainPtr domain,
int autostart); -virStoragePoolPtr virStoragePoolDefineXML (virConnectPtr conn,
const char * xml,
unsigned int flags); -virStorageVolPtr virStorageVolLookupByPath (virConnectPtr conn,
const char * path); -virStorageVolPtr virStorageVolLookupByName (virStoragePoolPtr pool,
const char * name); -int virNetworkCreate (virNetworkPtr network); -virSecretPtr virSecretLookupByUUID (virConnectPtr conn,
const unsigned char * uuid); -int virDomainSetMaxMemory (virDomainPtr domain,
unsigned long memory); -void virEventRegisterImpl (virEventAddHandleFunc addHandle,
virEventUpdateHandleFunc updateHandle,
virEventRemoveHandleFunc removeHandle,
virEventAddTimeoutFunc addTimeout,
virEventUpdateTimeoutFunc updateTimeout,
virEventRemoveTimeoutFunc removeTimeout); -virInterfacePtr virInterfaceDefineXML (virConnectPtr conn,
const char * xml,
unsigned int flags); -virDomainPtr virDomainMigrate (virDomainPtr domain,
virConnectPtr dconn,
unsigned long flags,
const char * dname,
const char * uri,
unsigned long bandwidth); -int virDomainSuspend (virDomainPtr domain); -virDomainPtr virDomainCreateLinux (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags); -char * virNodeDeviceGetXMLDesc (virNodeDevicePtr dev,
unsigned int flags); -typedef void virEventUpdateHandleFunc (int watch,
int event); -int virDomainDestroy (virDomainPtr domain); -int virConnectNumOfNetworks (virConnectPtr conn); -virStoragePoolPtr virStoragePoolLookupByUUIDString (virConnectPtr conn,
const char * uuidstr); -virConnectPtr virSecretGetConnect (virSecretPtr secret); -int virInterfaceCreate (virInterfacePtr iface,
unsigned int flags); -char * virDomainGetXMLDesc (virDomainPtr domain,
int flags); -virSecretPtr virSecretLookupByUsage (virConnectPtr conn,
int usageType,
const char * usageID); -int virStoragePoolGetUUID (virStoragePoolPtr pool,
unsigned char * uuid); -int virNodeDeviceFree (virNodeDevicePtr dev); -int virSecretGetUsageType (virSecretPtr secret); -int virDomainGetInfo (virDomainPtr domain,
virDomainInfoPtr info); -virNodeDevicePtr virNodeDeviceCreateXML (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags); -int virNetworkDestroy (virNetworkPtr network); -virStoragePoolPtr virStoragePoolLookupByName (virConnectPtr conn,
const char * name); -virStoragePoolPtr virStoragePoolCreateXML (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags); -int virNetworkGetAutostart (virNetworkPtr network,
int * autostart); -char * virNetworkGetBridgeName (virNetworkPtr network); -char * virStorageVolGetXMLDesc (virStorageVolPtr vol,
unsigned int flags); -char * virConnectDomainXMLToNative (virConnectPtr conn,
const char * nativeFormat,
const char * domainXml,
unsigned int flags); -int virDomainSetSchedulerParameters (virDomainPtr domain,
virSchedParameterPtr params,
int nparams); -const char * virConnectGetType (virConnectPtr conn); -virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool,
const char * xmldesc,
unsigned int flags); -int virDomainSave (virDomainPtr domain,
const char * to); -int virDomainCreate (virDomainPtr domain); -int virConnectListDomains (virConnectPtr conn,
int * ids,
int maxids); -int virDomainCoreDump (virDomainPtr domain,
const char * to,
int flags); -int virDomainSetMemory (virDomainPtr domain,
unsigned long memory); -const char * virInterfaceGetName (virInterfacePtr iface); -int virStoragePoolCreate (virStoragePoolPtr pool,
unsigned int flags); -int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info); -int virNetworkSetAutostart (virNetworkPtr network,
int autostart); -virSecretPtr virSecretLookupByUUIDString (virConnectPtr conn,
const char * uuidstr); -unsigned long virDomainGetMaxMemory (virDomainPtr domain); -int virStoragePoolFree (virStoragePoolPtr pool); -int virConnectNumOfDefinedInterfaces (virConnectPtr conn); -typedef void virFreeCallback (void * opaque); -virNetworkPtr virNetworkDefineXML (virConnectPtr conn,
const char * xml); -int virNodeDeviceListCaps (virNodeDevicePtr dev,
char ** const names,
int maxnames); -int virDomainBlockStats (virDomainPtr dom,
const char * path,
virDomainBlockStatsPtr stats,
size_t size); -virConnectPtr virConnectOpenAuth (const char * name,
virConnectAuthPtr auth,
int flags); -int virStoragePoolDelete (virStoragePoolPtr pool,
unsigned int flags); -int virDomainResume (virDomainPtr domain); -const char * virStorageVolGetName (virStorageVolPtr vol); -int virStoragePoolGetAutostart (virStoragePoolPtr pool,
int * autostart); -int virDomainGetAutostart (virDomainPtr domain,
int * autostart); -int virStoragePoolListVolumes (virStoragePoolPtr pool,
char ** const names,
int maxnames); -char * virConnectGetHostname (virConnectPtr conn); -typedef int virEventRemoveTimeoutFunc (int timer); -int virStorageVolGetInfo (virStorageVolPtr vol,
virStorageVolInfoPtr info); -const char * virDomainGetName (virDomainPtr domain); -int virStoragePoolRef (virStoragePoolPtr pool); -char * virNetworkGetXMLDesc (virNetworkPtr network,
int flags); -int virConnectNumOfStoragePools (virConnectPtr conn); -virConnectPtr virInterfaceGetConnect (virInterfacePtr iface); -int virStoragePoolNumOfVolumes (virStoragePoolPtr pool); -const char * virNetworkGetName (virNetworkPtr network); -char * virSecretGetXMLDesc (virSecretPtr secret,
unsigned int flags); -int virConnectListDefinedDomains (virConnectPtr conn,
char ** const names,
int maxnames); -char * virConnectGetCapabilities (virConnectPtr conn); -virDomainPtr virDomainLookupByName (virConnectPtr conn,
const char * name); -char * virConnectFindStoragePoolSources (virConnectPtr conn,
const char * type,
const char * srcSpec,
unsigned int flags); -int virStorageVolFree (virStorageVolPtr vol); -int virDomainPinVcpu (virDomainPtr domain,
unsigned int vcpu,
unsigned char * cpumap,
int maplen); -int virNodeGetSecurityModel (virConnectPtr conn,
virSecurityModelPtr secmodel); -int virDomainRestore (virConnectPtr conn,
const char * from); -int virSecretGetUUID (virSecretPtr secret,
unsigned char * uuid); -int virNodeDeviceDestroy (virNodeDevicePtr dev); -char * virStorageVolGetPath (virStorageVolPtr vol); -virNetworkPtr virNetworkLookupByUUIDString (virConnectPtr conn,
const char * uuidstr); -typedef int virConnectDomainEventCallback (virConnectPtr conn,
virDomainPtr dom,
int event,
int detail,
void * opaque); -virDomainPtr virDomainLookupByID (virConnectPtr conn,
int id); -int virStorageVolDelete (virStorageVolPtr vol,
unsigned int flags); -int virSecretUndefine (virSecretPtr secret); -int virConnectListInterfaces (virConnectPtr conn,
char ** const names,
int maxnames); -int virDomainMemoryPeek (virDomainPtr dom,
unsigned long long start,
size_t size,
void * buffer,
unsigned int flags); -virNetworkPtr virNetworkLookupByUUID (virConnectPtr conn,
const unsigned char * uuid); -int virConnectListDefinedNetworks (virConnectPtr conn,
char ** const names,
int maxnames); -int virConnectRef (virConnectPtr conn); -int virDomainGetUUID (virDomainPtr domain,
unsigned char * uuid); -virNetworkPtr virNetworkCreateXML (virConnectPtr conn,
const char * xmlDesc); -int virNetworkUndefine (virNetworkPtr network); -int virConnectDomainEventRegister (virConnectPtr conn,
virConnectDomainEventCallback cb,
void * opaque,
virFreeCallback freecb); -int virDomainGetVcpus (virDomainPtr domain,
virVcpuInfoPtr info,
int maxinfo,
unsigned char * cpumaps,
int maplen); -virNodeDevicePtr virNodeDeviceLookupByName (virConnectPtr conn,
const char * name); -int virStoragePoolGetInfo (virStoragePoolPtr pool,
virStoragePoolInfoPtr info); -typedef int virEventRemoveHandleFunc (int watch); -int virInterfaceRef (virInterfacePtr iface); -const char * virInterfaceGetMACString (virInterfacePtr iface); -int virConnectNumOfDomains (virConnectPtr conn); -int virStoragePoolRefresh (virStoragePoolPtr pool,
unsigned int flags); -int virConnectNumOfDefinedDomains (virConnectPtr conn); -virStorageVolPtr virStorageVolCreateXMLFrom (virStoragePoolPtr pool,
const char * xmldesc,
virStorageVolPtr clonevol,
unsigned int flags); -int virConnectClose (virConnectPtr conn); -int virDomainReboot (virDomainPtr domain,
unsigned int flags); -int virNetworkGetUUIDString (virNetworkPtr network,
char * buf); -virNetworkPtr virNetworkLookupByName (virConnectPtr conn,
const char * name); -int virDomainGetMaxVcpus (virDomainPtr domain); -typedef void virEventHandleCallback (int watch,
int fd,
int events,
void * opaque); -char * virDomainGetSchedulerType (virDomainPtr domain,
int * nparams); -int virNodeDeviceReset (virNodeDevicePtr dev); -int virDomainDetachDevice (virDomainPtr domain,
const char * xml); -const char * virSecretGetUsageID (virSecretPtr secret); -int virStoragePoolGetUUIDString (virStoragePoolPtr pool,
char * buf); -int virNodeDeviceReAttach (virNodeDevicePtr dev); -int virStoragePoolUndefine (virStoragePoolPtr pool); -typedef int virConnectAuthCallbackPtr (virConnectCredentialPtr cred,
unsigned int ncred,
void * cbdata); -int virDomainAttachDevice (virDomainPtr domain,
const char * xml); -char * virConnectGetURI (virConnectPtr conn); -virConnectPtr virConnectOpenReadOnly (const char * name); -virSecretPtr virSecretDefineXML (virConnectPtr conn,
const char * xml,
unsigned int flags); -int virNetworkFree (virNetworkPtr network); -virStoragePoolPtr virStoragePoolLookupByUUID (virConnectPtr conn,
const unsigned char * uuid); -typedef int virEventAddHandleFunc (int fd,
int event,
virEventHandleCallback cb,
void * opaque,
virFreeCallback ff); -int virNetworkRef (virNetworkPtr network); -int virConnectListDefinedStoragePools (virConnectPtr conn,
char ** const names,
int maxnames); -typedef void virEventTimeoutCallback (int timer,
void * opaque); -int virInterfaceFree (virInterfacePtr iface); -int virNodeDeviceNumOfCaps (virNodeDevicePtr dev); -virInterfacePtr virInterfaceLookupByMACString (virConnectPtr conn,
const char * macstr); -virConnectPtr virNetworkGetConnect (virNetworkPtr net); -unsigned long long virNodeGetFreeMemory (virConnectPtr conn); -int virInterfaceDestroy (virInterfacePtr iface,
unsigned int flags); -int virSecretSetValue (virSecretPtr secret,
const unsigned char * value,
size_t value_size,
unsigned int flags); -virConnectPtr virStorageVolGetConnect (virStorageVolPtr vol); -int virNodeNumOfDevices (virConnectPtr conn,
const char * cap,
unsigned int flags); -int virStoragePoolDestroy (virStoragePoolPtr pool); -virStoragePoolPtr virStoragePoolLookupByVolume (virStorageVolPtr vol); -virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
const unsigned char * uuid); -char * virDomainGetOSType (virDomainPtr domain); -int virStoragePoolBuild (virStoragePoolPtr pool,
unsigned int flags); -int virConnectGetMaxVcpus (virConnectPtr conn,
const char * type); -int virDomainGetUUIDString (virDomainPtr domain,
char * buf); -virConnectPtr virDomainGetConnect (virDomainPtr dom); -int virConnectNumOfDefinedStoragePools (virConnectPtr conn); -int virSecretFree (virSecretPtr secret); -int virNodeListDevices (virConnectPtr conn,
const char * cap,
char ** const names,
int maxnames,
unsigned int flags); -const char * virNodeDeviceGetParent (virNodeDevicePtr dev); -virConnectPtr virConnectOpen (const char * name); -virDomainPtr virDomainCreateXML (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags); -int virNodeDeviceRef (virNodeDevicePtr dev); -int virInterfaceUndefine (virInterfacePtr iface); -int virDomainSetVcpus (virDomainPtr domain,
unsigned int nvcpus); -int virDomainRef (virDomainPtr domain); -int virConnectListSecrets (virConnectPtr conn,
char ** uuids,
int maxuuids); -int virConnectNumOfInterfaces (virConnectPtr conn); -unsigned int virDomainGetID (virDomainPtr domain); -int virSecretRef (virSecretPtr secret); -int virDomainBlockPeek (virDomainPtr dom,
const char * path,
unsigned long long offset,
size_t size,
void * buffer,
unsigned int flags); -typedef int virEventAddTimeoutFunc (int timeout,
virEventTimeoutCallback cb,
void * opaque,
virFreeCallback ff); -virInterfacePtr virInterfaceLookupByName (virConnectPtr conn,
const char * name); -int virDomainInterfaceStats (virDomainPtr dom,
const char * path,
virDomainInterfaceStatsPtr stats,
size_t size); -int virConnectListNetworks (virConnectPtr conn,
char ** const names,
int maxnames); -unsigned char * virSecretGetValue (virSecretPtr secret,
size_t * value_size,
unsigned int flags); -virStorageVolPtr virStorageVolLookupByKey (virConnectPtr conn,
const char * key); -
-
-
-

Description

-
-
-

Details

-
-

Macro LIBVIR_VERSION_NUMBER

#define LIBVIR_VERSION_NUMBER;
-

Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro

-
-
-

Macro VIR_COPY_CPUMAP

#define VIR_COPY_CPUMAP(cpumaps, maplen, vcpu, cpumap);
-

This macro is to be used in conjunction with virDomainGetVcpus() and virDomainPinVcpu() APIs. VIR_COPY_CPUMAP macro extract the cpumap of the specified vcpu from cpumaps array and copy it into cpumap to be used later by virDomainPinVcpu() API.

cpumaps:pointer to an array of cpumap (in 8-bit bytes) (IN)
maplen:the length (in bytes) of one cpumap
vcpu:the virtual CPU number
cpumap:pointer to a cpumap (in 8-bit bytes) (OUT) This cpumap must be previously allocated by the caller (ie: malloc(maplen))
-
-
-

Macro VIR_CPU_MAPLEN

#define VIR_CPU_MAPLEN(cpu);
-

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.

cpu:number of physical CPUs
-
-
-

Macro VIR_CPU_USABLE

#define VIR_CPU_USABLE(cpumaps, maplen, vcpu, cpu);
-

This macro is to be used in conjunction with virDomainGetVcpus() API. VIR_CPU_USABLE macro returns a non zero value (true) if the cpu is usable by the vcpu, and 0 otherwise.

cpumaps:pointer to an array of cpumap (in 8-bit bytes) (IN)
maplen:the length (in bytes) of one cpumap
vcpu:the virtual CPU number
cpu:the physical CPU number
-
-
-

Macro VIR_DOMAIN_SCHED_FIELD_LENGTH

#define VIR_DOMAIN_SCHED_FIELD_LENGTH;
-

Macro providing the field length of virSchedParameter

-
-
-

Macro VIR_GET_CPUMAP

#define VIR_GET_CPUMAP(cpumaps, maplen, vcpu);
-

This macro is to be used in conjunction with virDomainGetVcpus() and virDomainPinVcpu() APIs. VIR_GET_CPUMAP macro returns a pointer to the cpumap of the specified vcpu from cpumaps array.

cpumaps:pointer to an array of cpumap (in 8-bit bytes) (IN)
maplen:the length (in bytes) of one cpumap
vcpu:the virtual CPU number
-
-
-

Macro VIR_NODEINFO_MAXCPUS

#define VIR_NODEINFO_MAXCPUS(nodeinfo);
-

This macro is to calculate the total number of CPUs supported but not necessary active in the host.

nodeinfo:virNodeInfo instance
-
-
-

Macro VIR_SECURITY_DOI_BUFLEN

#define VIR_SECURITY_DOI_BUFLEN;
-

Macro providing the maximum length of the virSecurityModel doi string.

-
-
-

Macro VIR_SECURITY_LABEL_BUFLEN

#define VIR_SECURITY_LABEL_BUFLEN;
-

Macro providing the maximum length of the virSecurityLabel label string. Note that this value is based on that used by Labeled NFS.

-
-
-

Macro VIR_SECURITY_MODEL_BUFLEN

#define VIR_SECURITY_MODEL_BUFLEN;
-

Macro providing the maximum length of the virSecurityModel model string.

-
-
-

Macro VIR_UNUSE_CPU

#define VIR_UNUSE_CPU(cpumap, cpu);
-

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.

cpumap:pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)
cpu:the physical CPU number
-
-
-

Macro VIR_USE_CPU

#define VIR_USE_CPU(cpumap, cpu);
-

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.

cpumap:pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)
cpu:the physical CPU number
-
-
-

Macro VIR_UUID_BUFLEN

#define VIR_UUID_BUFLEN;
-

This macro provides the length of the buffer required for virDomainGetUUID()

-
-
-

Macro VIR_UUID_STRING_BUFLEN

#define VIR_UUID_STRING_BUFLEN;
-

This macro provides the length of the buffer required for virDomainGetUUIDString()

-
-
-

Structure virConnect

struct _virConnect {
-The content of this structure is not made public by the API.
-} virConnect;
-

-

-
-

Structure virConnectAuth

struct _virConnectAuth {
-    int *	credtype	: List of supported virConnectCredentialType values
-    unsigned int	ncredtype
-    virConnectAuthCallbackPtr	cb	: Callback used to collect credentials
-    void *	cbdata
-} virConnectAuth;
-

-

-
-

Typedef virConnectAuthPtr

virConnectAuth * virConnectAuthPtr;
-

-

-
-

Structure virConnectCredential

struct _virConnectCredential {
-    int	type	: One of virConnectCredentialType constants
-    const char *	prompt	: Prompt to show to user
-    const char *	challenge	: Additional challenge to show
-    const char *	defresult	: Optional default result
-    char *	result	: Result to be filled with user response (or defresult)
-    unsigned int	resultlen	: Length of the result
-} virConnectCredential;
-

-

-
-

Typedef virConnectCredentialPtr

virConnectCredential * virConnectCredentialPtr;
-

-

-
-

Enum virConnectCredentialType

enum virConnectCredentialType {
-    VIR_CRED_USERNAME = 1 /* Identity to act as */
-    VIR_CRED_AUTHNAME = 2 /* Identify to authorize as */
-    VIR_CRED_LANGUAGE = 3 /* RFC 1766 languages, comma separated */
-    VIR_CRED_CNONCE = 4 /* client supplies a nonce */
-    VIR_CRED_PASSPHRASE = 5 /* Passphrase secret */
-    VIR_CRED_ECHOPROMPT = 6 /* Challenge response */
-    VIR_CRED_NOECHOPROMPT = 7 /* Challenge response */
-    VIR_CRED_REALM = 8 /* Authentication realm */
-    VIR_CRED_EXTERNAL = 9 /*  Externally managed credential More may be added - expect the unexpected */
-};
-

-

-
-

Enum virConnectFlags

enum virConnectFlags {
-    VIR_CONNECT_RO = 1 /*  A readonly connection */
-};
-

-

-
-

Typedef virConnectPtr

virConnect * virConnectPtr;
-

a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Hypervisor in the API.

-
-
-

Structure virDomain

struct _virDomain {
-The content of this structure is not made public by the API.
-} virDomain;
-

-

-
-

Typedef virDomainBlockStatsPtr

virDomainBlockStatsStruct * virDomainBlockStatsPtr;
-

A pointer to a virDomainBlockStats structure

-
-
-

Structure virDomainBlockStatsStruct

struct _virDomainBlockStats {
-    long long	rd_req	: number of read requests
-    long long	rd_bytes	: number of read bytes
-    long long	wr_req	: number of write requests
-    long long	wr_bytes	: number of written bytes
-    long long	errs	: In Xen this returns the mysterious 'oo_req'.
-} virDomainBlockStatsStruct;
-

-

-
-

Enum virDomainCreateFlags

enum virDomainCreateFlags {
-    VIR_DOMAIN_NONE = 0
-};
-

-

-
-

Enum virDomainEventDefinedDetailType

enum virDomainEventDefinedDetailType {
-    VIR_DOMAIN_EVENT_DEFINED_ADDED = 0 /* Newly created config file */
-    VIR_DOMAIN_EVENT_DEFINED_UPDATED = 1 /*  Changed config file */
-};
-

-

-
-

Enum virDomainEventResumedDetailType

enum virDomainEventResumedDetailType {
-    VIR_DOMAIN_EVENT_RESUMED_UNPAUSED = 0 /* Normal resume due to admin unpause */
-    VIR_DOMAIN_EVENT_RESUMED_MIGRATED = 1 /*  Resumed for completion of migration */
-};
-

-

-
-

Enum virDomainEventStartedDetailType

enum virDomainEventStartedDetailType {
-    VIR_DOMAIN_EVENT_STARTED_BOOTED = 0 /* Normal startup from boot */
-    VIR_DOMAIN_EVENT_STARTED_MIGRATED = 1 /* Incoming migration from another host */
-    VIR_DOMAIN_EVENT_STARTED_RESTORED = 2 /*  Restored from a state file */
-};
-

-

-
-

Enum virDomainEventStoppedDetailType

enum virDomainEventStoppedDetailType {
-    VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN = 0 /* Normal shutdown */
-    VIR_DOMAIN_EVENT_STOPPED_DESTROYED = 1 /* Forced poweroff from host */
-    VIR_DOMAIN_EVENT_STOPPED_CRASHED = 2 /* Guest crashed */
-    VIR_DOMAIN_EVENT_STOPPED_MIGRATED = 3 /* Migrated off to another host */
-    VIR_DOMAIN_EVENT_STOPPED_SAVED = 4 /* Saved to a state file */
-    VIR_DOMAIN_EVENT_STOPPED_FAILED = 5 /*  Host emulator/mgmt failed */
-};
-

-

-
-

Enum virDomainEventSuspendedDetailType

enum virDomainEventSuspendedDetailType {
-    VIR_DOMAIN_EVENT_SUSPENDED_PAUSED = 0 /* Normal suspend due to admin pause */
-    VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED = 1 /*  Suspended for offline migration */
-};
-

-

-
- -
-

Enum virDomainEventUndefinedDetailType

enum virDomainEventUndefinedDetailType {
-    VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0 /*  Deleted the config file */
-};
-

-

-
-

Structure virDomainInfo

struct _virDomainInfo {
-    unsigned char	state	: the running state, one of virDomainState
-    unsigned long	maxMem	: the maximum memory in KBytes allowed
-    unsigned long	memory	: the memory in KBytes used by the domain
-    unsigned short	nrVirtCpu	: the number of virtual CPUs for the domain
-    unsigned long long	cpuTime	: the CPU time used in nanoseconds
-} virDomainInfo;
-

-

-
-

Typedef virDomainInfoPtr

virDomainInfo * virDomainInfoPtr;
-

a virDomainInfoPtr is a pointer to a virDomainInfo structure.

-
-
-

Typedef virDomainInterfaceStatsPtr

virDomainInterfaceStatsStruct * virDomainInterfaceStatsPtr;
-

A pointer to a virDomainInterfaceStats structure

-
-
-

Structure virDomainInterfaceStatsStruct

struct _virDomainInterfaceStats {
-    long long	rx_bytes
-    long long	rx_packets
-    long long	rx_errs
-    long long	rx_drop
-    long long	tx_bytes
-    long long	tx_packets
-    long long	tx_errs
-    long long	tx_drop
-} virDomainInterfaceStatsStruct;
-

-

-
-

Enum virDomainMemoryFlags

enum virDomainMemoryFlags {
-    VIR_MEMORY_VIRTUAL = 1 /* addresses are virtual addresses */
-    VIR_MEMORY_PHYSICAL = 2 /*  addresses are physical addresses */
-};
-

-

-
-

Enum virDomainMigrateFlags

enum virDomainMigrateFlags {
-    VIR_MIGRATE_LIVE = 1 /*  live migration */
-};
-

-

-
-

Typedef virDomainPtr

virDomain * virDomainPtr;
-

a virDomainPtr is pointer to a virDomain private structure, this is the type used to reference a domain in the API.

-
-
-

Enum virDomainState

enum virDomainState {
-    VIR_DOMAIN_NOSTATE = 0 /* no state */
-    VIR_DOMAIN_RUNNING = 1 /* the domain is running */
-    VIR_DOMAIN_BLOCKED = 2 /* the domain is blocked on resource */
-    VIR_DOMAIN_PAUSED = 3 /* the domain is paused by user */
-    VIR_DOMAIN_SHUTDOWN = 4 /* the domain is being shut down */
-    VIR_DOMAIN_SHUTOFF = 5 /* the domain is shut off */
-    VIR_DOMAIN_CRASHED = 6 /*  the domain is crashed */
-};
-

-

-
-

Enum virDomainXMLFlags

enum virDomainXMLFlags {
-    VIR_DOMAIN_XML_SECURE = 1 /* dump security sensitive information too */
-    VIR_DOMAIN_XML_INACTIVE = 2 /*  dump inactive domain information */
-};
-

-

-
- -
-

Structure virInterface

struct _virInterface {
-The content of this structure is not made public by the API.
-} virInterface;
-

-

-
-

Typedef virInterfacePtr

virInterface * virInterfacePtr;
-

a virInterfacePtr is pointer to a virInterface private structure, this is the type used to reference a virtual interface in the API.

-
-
-

Structure virNetwork

struct _virNetwork {
-The content of this structure is not made public by the API.
-} virNetwork;
-

-

-
-

Typedef virNetworkPtr

virNetwork * virNetworkPtr;
-

a virNetworkPtr is pointer to a virNetwork private structure, this is the type used to reference a virtual network in the API.

-
-
-

Structure virNodeDevice

struct _virNodeDevice {
-The content of this structure is not made public by the API.
-} virNodeDevice;
-

-

-
-

Typedef virNodeDevicePtr

virNodeDevice * virNodeDevicePtr;
-

A virNodeDevicePtr is a pointer to a virNodeDevice structure. Get one via virNodeDeviceLookupByKey, virNodeDeviceLookupByName, or virNodeDeviceCreate. Be sure to Call virNodeDeviceFree when done using a virNodeDevicePtr obtained from any of the above functions to avoid leaking memory.

-
-
-

Structure virNodeInfo

struct _virNodeInfo {
-    charmodel[32]	model	: string indicating the CPU model
-    unsigned long	memory	: memory size in kilobytes
-    unsigned int	cpus	: the number of active CPUs
-    unsigned int	mhz	: expected CPU frequency
-    unsigned int	nodes	: the number of NUMA cell, 1 for uniform mem access
-    unsigned int	sockets	: number of CPU socket per node
-    unsigned int	cores	: number of core per socket
-    unsigned int	threads	: number of threads per core
-} virNodeInfo;
-

-

-
-

Typedef virNodeInfoPtr

virNodeInfo * virNodeInfoPtr;
-

a virNodeInfoPtr is a pointer to a virNodeInfo structure.

-
-
-

Structure virSchedParameter

struct _virSchedParameter {
-    charfield[VIR_DOMAIN_SCHED_FIELD_LENGTH]	field	: parameter name
-    int	type	: parameter type
-} virSchedParameter;
-

-

-
-

Typedef virSchedParameterPtr

virSchedParameter * virSchedParameterPtr;
-

a virSchedParameterPtr is a pointer to a virSchedParameter structure.

-
-
-

Enum virSchedParameterType

enum virSchedParameterType {
-    VIR_DOMAIN_SCHED_FIELD_INT = 1 /* integer case */
-    VIR_DOMAIN_SCHED_FIELD_UINT = 2 /* unsigned integer case */
-    VIR_DOMAIN_SCHED_FIELD_LLONG = 3 /* long long case */
-    VIR_DOMAIN_SCHED_FIELD_ULLONG = 4 /* unsigned long long case */
-    VIR_DOMAIN_SCHED_FIELD_DOUBLE = 5 /* double case */
-    VIR_DOMAIN_SCHED_FIELD_BOOLEAN = 6 /*  boolean(character) case */
-};
-

-

-
-

Structure virSecret

struct _virSecret {
-The content of this structure is not made public by the API.
-} virSecret;
-

-

-
-

Typedef virSecretPtr

virSecret * virSecretPtr;
-

-

-
-

Enum virSecretUsageType

enum virSecretUsageType {
-    VIR_SECRET_USAGE_TYPE_NONE = 0
-    VIR_SECRET_USAGE_TYPE_VOLUME = 1 /*  Expect more owner types later... */
-};
-

-

-
-

Structure virSecurityLabel

struct _virSecurityLabel {
-The content of this structure is not made public by the API.
-} virSecurityLabel;
-

-

-
-

Typedef virSecurityLabelPtr

virSecurityLabel * virSecurityLabelPtr;
-

a virSecurityLabelPtr is a pointer to a virSecurityLabel.

-
-
-

Structure virSecurityModel

struct _virSecurityModel {
-The content of this structure is not made public by the API.
-} virSecurityModel;
-

-

-
-

Typedef virSecurityModelPtr

virSecurityModel * virSecurityModelPtr;
-

a virSecurityModelPtr is a pointer to a virSecurityModel.

-
-
-

Structure virStoragePool

struct _virStoragePool {
-The content of this structure is not made public by the API.
-} virStoragePool;
-

-

-
-

Enum virStoragePoolBuildFlags

enum virStoragePoolBuildFlags {
-    VIR_STORAGE_POOL_BUILD_NEW = 0 /* Regular build from scratch */
-    VIR_STORAGE_POOL_BUILD_REPAIR = 1 /* Repair / reinitialize */
-    VIR_STORAGE_POOL_BUILD_RESIZE = 2 /*  Extend existing pool */
-};
-

-

-
-

Enum virStoragePoolDeleteFlags

enum virStoragePoolDeleteFlags {
-    VIR_STORAGE_POOL_DELETE_NORMAL = 0 /* Delete metadata only    (fast) */
-    VIR_STORAGE_POOL_DELETE_ZEROED = 1 /*  Clear all data to zeros (slow) */
-};
-

-

-
-

Structure virStoragePoolInfo

struct _virStoragePoolInfo {
-    int	state	: virStoragePoolState flags
-    unsigned long long	capacity	: Logical size bytes
-    unsigned long long	allocation	: Current allocation bytes
-    unsigned long long	available	: Remaining free space bytes
-} virStoragePoolInfo;
-

-

-
-

Typedef virStoragePoolInfoPtr

virStoragePoolInfo * virStoragePoolInfoPtr;
-

-

-
-

Typedef virStoragePoolPtr

virStoragePool * virStoragePoolPtr;
-

a virStoragePoolPtr is pointer to a virStoragePool private structure, this is the type used to reference a storage pool in the API.

-
-
-

Enum virStoragePoolState

enum virStoragePoolState {
-    VIR_STORAGE_POOL_INACTIVE = 0 /* Not running */
-    VIR_STORAGE_POOL_BUILDING = 1 /* Initializing pool, not available */
-    VIR_STORAGE_POOL_RUNNING = 2 /* Running normally */
-    VIR_STORAGE_POOL_DEGRADED = 3 /*  Running degraded */
-};
-

-

-
-

Structure virStorageVol

struct _virStorageVol {
-The content of this structure is not made public by the API.
-} virStorageVol;
-

-

-
-

Enum virStorageVolDeleteFlags

enum virStorageVolDeleteFlags {
-    VIR_STORAGE_VOL_DELETE_NORMAL = 0 /* Delete metadata only    (fast) */
-    VIR_STORAGE_VOL_DELETE_ZEROED = 1 /*  Clear all data to zeros (slow) */
-};
-

-

-
-

Structure virStorageVolInfo

struct _virStorageVolInfo {
-    int	type	: virStorageVolType flags
-    unsigned long long	capacity	: Logical size bytes
-    unsigned long long	allocation	: Current allocation bytes
-} virStorageVolInfo;
-

-

-
-

Typedef virStorageVolInfoPtr

virStorageVolInfo * virStorageVolInfoPtr;
-

-

-
-

Typedef virStorageVolPtr

virStorageVol * virStorageVolPtr;
-

a virStorageVolPtr is pointer to a virStorageVol private structure, this is the type used to reference a storage volume in the API.

-
-
-

Enum virStorageVolType

enum virStorageVolType {
-    VIR_STORAGE_VOL_FILE = 0 /* Regular file based volumes */
-    VIR_STORAGE_VOL_BLOCK = 1 /*  Block based volumes */
-};
-

-

-
-

Structure virVcpuInfo

struct _virVcpuInfo {
-    unsigned int	number	: virtual CPU number
-    int	state	: value from virVcpuState
-    unsigned long long	cpuTime	: CPU time used, in nanoseconds
-    int	cpu	: real CPU number, or -1 if offline
-} virVcpuInfo;
-

-

-
-

Typedef virVcpuInfoPtr

virVcpuInfo * virVcpuInfoPtr;
-

-

-
-

Enum virVcpuState

enum virVcpuState {
-    VIR_VCPU_OFFLINE = 0 /* the virtual CPU is offline */
-    VIR_VCPU_RUNNING = 1 /* the virtual CPU is running */
-    VIR_VCPU_BLOCKED = 2 /*  the virtual CPU is blocked on resource */
-};
-

-

-
-

Function type virConnectAuthCallbackPtr

int	virConnectAuthCallbackPtr	(virConnectCredentialPtr cred, 
unsigned int ncred,
void * cbdata)
-

-

cred:
ncred:
cbdata:
Returns:
-
-

Function type virConnectDomainEventCallback

int	virConnectDomainEventCallback	(virConnectPtr conn, 
virDomainPtr dom,
int event,
int detail,
void * opaque)
-

A callback function to be registered, and called when a domain event occurs

-
conn:virConnect connection
dom:The domain on which the event occured
event:The specfic virDomainEventType which occured
detail:event specific detail information
opaque:opaque user data
Returns:
-
-

Function type virEventAddHandleFunc

int	virEventAddHandleFunc		(int fd, 
int event,
virEventHandleCallback cb,
void * opaque,
virFreeCallback ff)
-

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.

-
fd:file descriptor to listen on
event:bitset of events on which to fire the callback
cb:the callback to be called when an event occurrs
opaque:user data to pass to the callback
ff:the callback invoked to free opaque data blob
Returns:a handle watch number to be used for updating and unregistering for events
-
-

Function type virEventAddTimeoutFunc

int	virEventAddTimeoutFunc		(int timeout, 
virEventTimeoutCallback cb,
void * opaque,
virFreeCallback ff)
-

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.

-
timeout:The timeout to monitor
cb:the callback to call when timeout has expired
opaque:user data to pass to the callback
ff:the callback invoked to free opaque data blob
Returns:a timer value
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-

Variable virConnectAuthPtrDefault

virConnectAuthPtr virConnectAuthPtrDefault;
-

-

-
-

virConnectClose ()

int	virConnectClose			(virConnectPtr conn)
-

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.

-
conn:pointer to the hypervisor connection
Returns:0 in case of success or -1 in case of error.
-
-

virConnectDomainEventDeregister ()

int	virConnectDomainEventDeregister	(virConnectPtr conn, 
virConnectDomainEventCallback cb)
-

Removes a Domain Event Callback. De-registering for a domain callback will disable delivery of this event type

-
conn:pointer to the connection
cb:callback to the function handling domain events
Returns:0 on success, -1 on failure
-
-

virConnectDomainEventRegister ()

int	virConnectDomainEventRegister	(virConnectPtr conn, 
virConnectDomainEventCallback cb,
void * opaque,
virFreeCallback freecb)
-

Adds a Domain Event Callback. Registering for a domain callback will enable delivery of the events The virDomainPtr 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

-
conn:pointer to the connection
cb:callback to the function handling domain events
opaque:opaque data to pass on to the callback
freecb:optional function to deallocate opaque when not used anymore
Returns: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
-
-

virConnectDomainXMLFromNative ()

char *	virConnectDomainXMLFromNative	(virConnectPtr conn, 
const char * nativeFormat,
const char * nativeConfig,
unsigned int flags)
-

Reads native configuration data describing a domain, and generates libvirt domain XML. The format of the native data is hypervisor dependant.

-
conn:a connection object
nativeFormat:configuration format importing from
nativeConfig:the configuration data to import
flags:currently unused, pass 0
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.
-
-

virConnectDomainXMLToNative ()

char *	virConnectDomainXMLToNative	(virConnectPtr conn, 
const char * nativeFormat,
const char * domainXml,
unsigned int flags)
-

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.

-
conn:a connection object
nativeFormat:configuration format exporting to
domainXml:the domain configuration to export
flags:currently unused, pass 0
Returns:a 0 terminated UTF-8 encoded native config datafile, or NULL in case of error. the caller must free() the returned value.
-
-

virConnectFindStoragePoolSources ()

char *	virConnectFindStoragePoolSources	(virConnectPtr conn, 
const char * type,
const char * srcSpec,
unsigned int flags)
-

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)

-
conn:pointer to hypervisor connection
type:type of storage pool sources to discover
srcSpec:XML document specifying discovery source
flags:flags for discovery (unused, pass 0)
Returns:an xml document consisting of a SourceList element containing a source document appropriate to the given pool type for each discovered source.
-
-

virConnectGetCapabilities ()

char *	virConnectGetCapabilities	(virConnectPtr conn)
-

Provides capabilities of the hypervisor / driver.

-
conn:pointer to the hypervisor connection
Returns:NULL in case of error, or an XML string defining the capabilities. The client must free the returned string after use.
-
-

virConnectGetHostname ()

char *	virConnectGetHostname		(virConnectPtr conn)
-

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.

-
conn:pointer to a hypervisor connection
Returns:the hostname which must be freed by the caller, or NULL if there was an error.
-
-

virConnectGetMaxVcpus ()

int	virConnectGetMaxVcpus		(virConnectPtr conn, 
const char * type)
-

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.

-
conn:pointer to the hypervisor connection
type:value of the 'type' attribute in the <domain> element
Returns:the maximum of virtual CPU or -1 in case of error.
-
-

virConnectGetType ()

const char *	virConnectGetType	(virConnectPtr conn)
-

Get the name of the Hypervisor software used.

-
conn:pointer to the hypervisor connection
Returns:NULL in case of error, a static zero terminated string otherwise. See also: http://www.redhat.com/archives/libvir-list/2007-February/msg00096.html
-
-

virConnectGetURI ()

char *	virConnectGetURI		(virConnectPtr conn)
-

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.

-
conn:pointer to a hypervisor connection
Returns:the URI string which must be freed by the caller, or NULL if there was an error.
-
-

virConnectGetVersion ()

int	virConnectGetVersion		(virConnectPtr conn, 
unsigned long * hvVer)
-

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.

-
conn:pointer to the hypervisor connection
hvVer:return value for the version of the running hypervisor (OUT)
Returns:-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release
-
-

virConnectListDefinedDomains ()

int	virConnectListDefinedDomains	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

list the defined but inactive domains, stores the pointers to the names in @names

-
conn:pointer to the hypervisor connection
names:pointer to an array to store the names
maxnames:size of the array
Returns:the number of names provided in the array or -1 in case of error
-
-

virConnectListDefinedInterfaces ()

int	virConnectListDefinedInterfaces	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Collect the list of defined (inactive) physical host interfaces, and store their names in @names.

-
conn:pointer to the hypervisor connection
names:array to collect the list of names of interfaces
maxnames:size of @names
Returns:the number of interfaces found or -1 in case of error
-
-

virConnectListDefinedNetworks ()

int	virConnectListDefinedNetworks	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

list the inactive networks, stores the pointers to the names in @names

-
conn:pointer to the hypervisor connection
names:pointer to an array to store the names
maxnames:size of the array
Returns:the number of names provided in the array or -1 in case of error
-
-

virConnectListDefinedStoragePools ()

int	virConnectListDefinedStoragePools	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Provides the list of names of inactive storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.

-
conn:pointer to hypervisor connection
names:array of char * to fill with pool names (allocated by caller)
maxnames:size of the names array
Returns:0 on success, -1 on error
-
-

virConnectListDomains ()

int	virConnectListDomains		(virConnectPtr conn, 
int * ids,
int maxids)
-

Collect the list of active domains, and store their ID in @maxids

-
conn:pointer to the hypervisor connection
ids:array to collect the list of IDs of active domains
maxids:size of @ids
Returns:the number of domain found or -1 in case of error
-
-

virConnectListInterfaces ()

int	virConnectListInterfaces	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Collect the list of active physical host interfaces, and store their names in @names

-
conn:pointer to the hypervisor connection
names:array to collect the list of names of interfaces
maxnames:size of @names
Returns:the number of interfaces found or -1 in case of error
-
-

virConnectListNetworks ()

int	virConnectListNetworks		(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Collect the list of active networks, and store their names in @names

-
conn:pointer to the hypervisor connection
names:array to collect the list of names of active networks
maxnames:size of @names
Returns:the number of networks found or -1 in case of error
-
-

virConnectListSecrets ()

int	virConnectListSecrets		(virConnectPtr conn, 
char ** uuids,
int maxuuids)
-

List UUIDs of defined secrets, store pointers to names in uuids.

-
conn:virConnect connection
uuids:Pointer to an array to store the UUIDs
maxuuids:size of the array.
Returns:the number of UUIDs provided in the array, or -1 on failure.
-
-

virConnectListStoragePools ()

int	virConnectListStoragePools	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Provides the list of names of active storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.

-
conn:pointer to hypervisor connection
names:array of char * to fill with pool names (allocated by caller)
maxnames:size of the names array
Returns:0 on success, -1 on error
-
-

virConnectNumOfDefinedDomains ()

int	virConnectNumOfDefinedDomains	(virConnectPtr conn)
-

Provides the number of defined but inactive domains.

-
conn:pointer to the hypervisor connection
Returns:the number of domain found or -1 in case of error
-
-

virConnectNumOfDefinedInterfaces ()

int	virConnectNumOfDefinedInterfaces	(virConnectPtr conn)
-

Provides the number of defined (inactive) interfaces on the physical host.

-
conn:pointer to the hypervisor connection
Returns:the number of defined interface found or -1 in case of error
-
-

virConnectNumOfDefinedNetworks ()

int	virConnectNumOfDefinedNetworks	(virConnectPtr conn)
-

Provides the number of inactive networks.

-
conn:pointer to the hypervisor connection
Returns:the number of networks found or -1 in case of error
-
-

virConnectNumOfDefinedStoragePools ()

int	virConnectNumOfDefinedStoragePools	(virConnectPtr conn)
-

Provides the number of inactive storage pools

-
conn:pointer to hypervisor connection
Returns:the number of pools found, or -1 on error
-
-

virConnectNumOfDomains ()

int	virConnectNumOfDomains		(virConnectPtr conn)
-

Provides the number of active domains.

-
conn:pointer to the hypervisor connection
Returns:the number of domain found or -1 in case of error
-
-

virConnectNumOfInterfaces ()

int	virConnectNumOfInterfaces	(virConnectPtr conn)
-

Provides the number of active interfaces on the physical host.

-
conn:pointer to the hypervisor connection
Returns:the number of active interfaces found or -1 in case of error
-
-

virConnectNumOfNetworks ()

int	virConnectNumOfNetworks		(virConnectPtr conn)
-

Provides the number of active networks.

-
conn:pointer to the hypervisor connection
Returns:the number of network found or -1 in case of error
-
-

virConnectNumOfSecrets ()

int	virConnectNumOfSecrets		(virConnectPtr conn)
-

Fetch number of currently defined secrets.

-
conn:virConnect connection
Returns:the number currently defined secrets.
-
-

virConnectNumOfStoragePools ()

int	virConnectNumOfStoragePools	(virConnectPtr conn)
-

Provides the number of active storage pools

-
conn:pointer to hypervisor connection
Returns:the number of pools found, or -1 on error
-
-

virConnectOpen ()

virConnectPtr	virConnectOpen		(const char * name)
-

This function should be called first to get a connection to the Hypervisor and xen store

-
name:URI of the hypervisor
Returns: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
-
-

virConnectOpenAuth ()

virConnectPtr	virConnectOpenAuth	(const char * name, 
virConnectAuthPtr auth,
int flags)
-

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 virConnectOpen for notes about environment variables which can have an effect on opening drivers

-
name:URI of the hypervisor
auth:Authenticate callback parameters
flags:Open flags
Returns:a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html
-
-

virConnectOpenReadOnly ()

virConnectPtr	virConnectOpenReadOnly	(const char * name)
-

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 virConnectOpen for notes about environment variables which can have an effect on opening drivers

-
name:URI of the hypervisor
Returns:a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html
-
-

virConnectRef ()

int	virConnectRef			(virConnectPtr conn)
-

Increment the reference count on the connection. For each additional call to this method, there shall be a corresponding call to virConnectClose 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.

-
conn:the connection to hold a reference on
Returns:0 in case of success, -1 in case of failure
-
-

virDomainAttachDevice ()

int	virDomainAttachDevice		(virDomainPtr domain, 
const char * xml)
-

Create a virtual device attachment to backend.

-
domain:pointer to domain object
xml:pointer to XML description of one device
Returns:0 in case of success, -1 in case of failure.
-
-

virDomainBlockPeek ()

int	virDomainBlockPeek		(virDomainPtr dom, 
const char * path,
unsigned long long offset,
size_t size,
void * buffer,
unsigned int flags)
-

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.

-
dom:pointer to the domain object
path:path to the block device
offset:offset within block device
size:size to read
buffer:return buffer (must be at least size bytes)
flags:unused, always pass 0
Returns:0 in case of success or -1 in case of failure. really 64 bits
-
-

virDomainBlockStats ()

int	virDomainBlockStats		(virDomainPtr dom, 
const char * path,
virDomainBlockStatsPtr stats,
size_t size)
-

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 virDomainGetXMLDesc 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.

-
dom:pointer to the domain object
path:path to the block device
stats:block device stats (returned)
size:size of stats structure
Returns:0 in case of success or -1 in case of failure.
-
-

virDomainCoreDump ()

int	virDomainCoreDump		(virDomainPtr domain, 
const char * to,
int flags)
-

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.

-
domain:a domain object
to:path for the core file
flags:extra flags, currently unused
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainCreate ()

int	virDomainCreate			(virDomainPtr domain)
-

launch a defined domain. If the call succeed the domain moves from the defined to the running domains pools.

-
domain:pointer to a defined domain
Returns:0 in case of success, -1 in case of error
-
-

virDomainCreateLinux ()

virDomainPtr	virDomainCreateLinux	(virConnectPtr conn, 
const char * xmlDesc,
unsigned int flags)
-

Deprecated after 0.4.6. Renamed to virDomainCreateXML() providing identical functionality. This existing name will left indefinitely for API compatability.

-
conn:pointer to the hypervisor connection
xmlDesc:string containing an XML description of the domain
flags:callers should always pass 0
Returns:a new domain object or NULL in case of failure
-
-

virDomainCreateXML ()

virDomainPtr	virDomainCreateXML	(virConnectPtr conn, 
const char * xmlDesc,
unsigned int flags)
-

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).

-
conn:pointer to the hypervisor connection
xmlDesc:string containing an XML description of the domain
flags:callers should always pass 0
Returns:a new domain object or NULL in case of failure
-
-

virDomainDefineXML ()

virDomainPtr	virDomainDefineXML	(virConnectPtr conn, 
const char * xml)
-

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.

-
conn:pointer to the hypervisor connection
xml:the XML description for the domain, preferably in UTF-8
Returns:NULL in case of error, a pointer to the domain otherwise
-
-

virDomainDestroy ()

int	virDomainDestroy		(virDomainPtr domain)
-

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 virDomainPtr object. This function may require privileged access

-
domain:a domain object
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainDetachDevice ()

int	virDomainDetachDevice		(virDomainPtr domain, 
const char * xml)
-

Destroy a virtual device attachment to backend.

-
domain:pointer to domain object
xml:pointer to XML description of one device
Returns:0 in case of success, -1 in case of failure.
-
-

virDomainFree ()

int	virDomainFree			(virDomainPtr domain)
-

Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.

-
domain:a domain object
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainGetAutostart ()

int	virDomainGetAutostart		(virDomainPtr domain, 
int * autostart)
-

Provides a boolean value indicating whether the domain configured to be automatically started when the host machine boots.

-
domain:a domain object
autostart:the value returned
Returns:-1 in case of error, 0 in case of success
-
-

virDomainGetConnect ()

virConnectPtr	virDomainGetConnect	(virDomainPtr dom)
-

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.

-
dom:pointer to a domain
Returns:the virConnectPtr or NULL in case of failure.
-
-

virDomainGetID ()

unsigned int	virDomainGetID		(virDomainPtr domain)
-

Get the hypervisor ID number for the domain

-
domain:a domain object
Returns:the domain ID number or (unsigned int) -1 in case of error
-
-

virDomainGetInfo ()

int	virDomainGetInfo		(virDomainPtr domain, 
virDomainInfoPtr info)
-

Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.

-
domain:a domain object
info:pointer to a virDomainInfo structure allocated by the user
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainGetMaxMemory ()

unsigned long	virDomainGetMaxMemory	(virDomainPtr domain)
-

Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.

-
domain:a domain object or NULL
Returns:the memory size in kilobytes or 0 in case of error.
-
-

virDomainGetMaxVcpus ()

int	virDomainGetMaxVcpus		(virDomainPtr domain)
-

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.

-
domain:pointer to domain object
Returns:the maximum of virtual CPU or -1 in case of error.
-
-

virDomainGetName ()

const char *	virDomainGetName	(virDomainPtr domain)
-

Get the public name for that domain

-
domain:a domain object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.
-
-

virDomainGetOSType ()

char *	virDomainGetOSType		(virDomainPtr domain)
-

Get the type of domain operation system.

-
domain:a domain object
Returns:the new string or NULL in case of error, the string must be freed by the caller.
-
-

virDomainGetSchedulerParameters ()

int	virDomainGetSchedulerParameters	(virDomainPtr domain, 
virSchedParameterPtr params,
int * nparams)
-

Get the scheduler parameters, the @params array will be filled with the values.

-
domain:pointer to domain object
params:pointer to scheduler parameter object (return value)
nparams:pointer to number of scheduler parameter (this value should be same than the returned value nparams of virDomainGetSchedulerType)
Returns:-1 in case of error, 0 in case of success.
-
-

virDomainGetSchedulerType ()

char *	virDomainGetSchedulerType	(virDomainPtr domain, 
int * nparams)
-

Get the scheduler type.

-
domain:pointer to domain object
nparams:number of scheduler parameters(return value)
Returns:NULL in case of error. The caller must free the returned string.
-
-

virDomainGetSecurityLabel ()

int	virDomainGetSecurityLabel	(virDomainPtr domain, 
virSecurityLabelPtr seclabel)
-

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.

-
domain:a domain object
seclabel:pointer to a virSecurityLabel structure
Returns:0 in case of success, -1 in case of failure
-
-

virDomainGetUUID ()

int	virDomainGetUUID		(virDomainPtr domain, 
unsigned char * uuid)
-

Get the UUID for a domain

-
domain:a domain object
uuid:pointer to a VIR_UUID_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success
-
-

virDomainGetUUIDString ()

int	virDomainGetUUIDString		(virDomainPtr domain, 
char * buf)
-

Get the UUID for a domain as string. For more information about UUID see RFC4122.

-
domain:a domain object
buf:pointer to a VIR_UUID_STRING_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success
-
-

virDomainGetVcpus ()

int	virDomainGetVcpus		(virDomainPtr domain, 
virVcpuInfoPtr info,
int maxinfo,
unsigned char * cpumaps,
int maplen)
-

Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer isn't NULL.

-
domain:pointer to domain object, or NULL for Domain0
info:pointer to an array of virVcpuInfo structures (OUT)
maxinfo:number of structures in info array
cpumaps:pointer to an bit map of real CPUs for all vcpus of this domain (in 8-bit bytes) (OUT) If cpumaps is NULL, then no 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.
maplen:number of bytes in one cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...).
Returns:the number of info filled in case of success, -1 in case of failure.
-
-

virDomainGetXMLDesc ()

char *	virDomainGetXMLDesc		(virDomainPtr domain, 
int flags)
-

Provide an XML description of the domain. The description may be reused later to relaunch the domain with virDomainCreateXML().

-
domain:a domain object
flags:an OR'ed set of virDomainXMLFlags
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.
-
-

virDomainInterfaceStats ()

int	virDomainInterfaceStats		(virDomainPtr dom, 
const char * path,
virDomainInterfaceStatsPtr stats,
size_t size)
-

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.

-
dom:pointer to the domain object
path:path to the interface
stats:network interface stats (returned)
size:size of stats structure
Returns:0 in case of success or -1 in case of failure.
-
-

virDomainLookupByID ()

virDomainPtr	virDomainLookupByID	(virConnectPtr conn, 
int id)
-

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.

-
conn:pointer to the hypervisor connection
id:the domain ID number
Returns:a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.
-
-

virDomainLookupByName ()

virDomainPtr	virDomainLookupByName	(virConnectPtr conn, 
const char * name)
-

Try to lookup a domain on the given hypervisor based on its name.

-
conn:pointer to the hypervisor connection
name:name for the domain
Returns:a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.
-
-

virDomainLookupByUUID ()

virDomainPtr	virDomainLookupByUUID	(virConnectPtr conn, 
const unsigned char * uuid)
-

Try to lookup a domain on the given hypervisor based on its UUID.

-
conn:pointer to the hypervisor connection
uuid:the raw UUID for the domain
Returns:a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.
-
-

virDomainLookupByUUIDString ()

virDomainPtr	virDomainLookupByUUIDString	(virConnectPtr conn, 
const char * uuidstr)
-

Try to lookup a domain on the given hypervisor based on its UUID.

-
conn:pointer to the hypervisor connection
uuidstr:the string UUID for the domain
Returns:a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.
-
-

virDomainMemoryPeek ()

int	virDomainMemoryPeek		(virDomainPtr dom, 
unsigned long long start,
size_t size,
void * buffer,
unsigned int flags)
-

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 VIR_MEMORY_VIRTUAL 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.

-
dom:pointer to the domain object
start:start of memory to peek
size:size of memory to peek
buffer:return buffer (must be at least size bytes)
flags:flags, see below
Returns:0 in case of success or -1 in case of failure. really 64 bits
-
-

virDomainMigrate ()

virDomainPtr	virDomainMigrate	(virDomainPtr domain, 
virConnectPtr dconn,
unsigned long flags,
const char * dname,
const char * uri,
unsigned long bandwidth)
-

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: VIR_MIGRATE_LIVE 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.

-
domain:a domain object
dconn:destination host (a connection object)
flags:flags
dname:(optional) rename domain to this at destination
uri:(optional) dest hostname/URI as seen from the source host
bandwidth:(optional) specify migration bandwidth limit in Mbps
Returns: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).
-
-

virDomainPinVcpu ()

int	virDomainPinVcpu		(virDomainPtr domain, 
unsigned int vcpu,
unsigned char * cpumap,
int maplen)
-

Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires privileged access to the hypervisor.

-
domain:pointer to domain object, or NULL for Domain0
vcpu:virtual CPU number
cpumap:pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.
maplen:number of bytes in cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...). If maplen < size, missing bytes are set to zero. If maplen > size, failure code is returned.
Returns:0 in case of success, -1 in case of failure.
-
-

virDomainReboot ()

int	virDomainReboot			(virDomainPtr domain, 
unsigned int flags)
-

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.

-
domain:a domain object
flags:extra flags for the reboot operation, not used yet
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainRef ()

int	virDomainRef			(virDomainPtr domain)
-

Increment the reference count on the domain. For each additional call to this method, there shall be a corresponding call to virDomainFree 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.

-
domain:the domain to hold a reference on
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainRestore ()

int	virDomainRestore		(virConnectPtr conn, 
const char * from)
-

This method will restore a domain saved to disk by virDomainSave().

-
conn:pointer to the hypervisor connection
from:path to the
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainResume ()

int	virDomainResume			(virDomainPtr domain)
-

Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires privileged access

-
domain:a domain object
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainSave ()

int	virDomainSave			(virDomainPtr domain, 
const char * to)
-

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.

-
domain:a domain object
to:path for the output file
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainSetAutostart ()

int	virDomainSetAutostart		(virDomainPtr domain, 
int autostart)
-

Configure the domain to be automatically started when the host machine boots.

-
domain:a domain object
autostart:whether the domain should be automatically started 0 or 1
Returns:-1 in case of error, 0 in case of success
-
-

virDomainSetMaxMemory ()

int	virDomainSetMaxMemory		(virDomainPtr domain, 
unsigned long memory)
-

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.

-
domain:a domain object or NULL
memory:the memory size in kilobytes
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainSetMemory ()

int	virDomainSetMemory		(virDomainPtr domain, 
unsigned long memory)
-

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.

-
domain:a domain object or NULL
memory:the memory size in kilobytes
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainSetSchedulerParameters ()

int	virDomainSetSchedulerParameters	(virDomainPtr domain, 
virSchedParameterPtr params,
int nparams)
-

Change the scheduler parameters

-
domain:pointer to domain object
params:pointer to scheduler parameter objects
nparams:number of scheduler parameter (this value should be same or less than the returned value nparams of virDomainGetSchedulerType)
Returns:-1 in case of error, 0 in case of success.
-
-

virDomainSetVcpus ()

int	virDomainSetVcpus		(virDomainPtr domain, 
unsigned int nvcpus)
-

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.

-
domain:pointer to domain object, or NULL for Domain0
nvcpus:the new number of virtual CPUs for this domain
Returns:0 in case of success, -1 in case of failure.
-
-

virDomainShutdown ()

int	virDomainShutdown		(virDomainPtr domain)
-

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 ?

-
domain:a domain object
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainSuspend ()

int	virDomainSuspend		(virDomainPtr domain)
-

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.

-
domain:a domain object
Returns:0 in case of success and -1 in case of failure.
-
-

virDomainUndefine ()

int	virDomainUndefine		(virDomainPtr domain)
-

Undefine a domain but does not stop it if it is running

-
domain:pointer to a defined domain
Returns:0 in case of success, -1 in case of error
-
-

virEventRegisterImpl ()

void	virEventRegisterImpl		(virEventAddHandleFunc addHandle, 
virEventUpdateHandleFunc updateHandle,
virEventRemoveHandleFunc removeHandle,
virEventAddTimeoutFunc addTimeout,
virEventUpdateTimeoutFunc updateTimeout,
virEventRemoveTimeoutFunc removeTimeout)
-

-

addHandle:
updateHandle:
removeHandle:
addTimeout:
updateTimeout:
removeTimeout:
-
- -
-
-
-

virInterfaceCreate ()

int	virInterfaceCreate		(virInterfacePtr iface, 
unsigned int flags)
-

Activate an interface (ie call "ifup")

-
iface:pointer to a defined interface
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success, -1 in case of error
-
-

virInterfaceDefineXML ()

virInterfacePtr	virInterfaceDefineXML	(virConnectPtr conn, 
const char * xml,
unsigned int flags)
-

Define an interface (or modify existing interface configuration)

-
conn:pointer to the hypervisor connection
xml:the XML description for the interface, preferably in UTF-8
flags:and OR'ed set of extraction flags, not used yet
Returns:NULL in case of error, a pointer to the interface otherwise
-
-

virInterfaceDestroy ()

int	virInterfaceDestroy		(virInterfacePtr iface, 
unsigned int flags)
-

deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated virInterfacePtr object.

-
iface:an interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success and -1 in case of failure.
-
-

virInterfaceFree ()

int	virInterfaceFree		(virInterfacePtr iface)
-

Free the interface object. The interface itself is unaltered. The data structure is freed and should not be used thereafter.

-
iface:an interface object
Returns:0 in case of success and -1 in case of failure.
-
-

virInterfaceGetConnect ()

virConnectPtr	virInterfaceGetConnect	(virInterfacePtr iface)
-

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.

-
iface:pointer to an interface
Returns:the virConnectPtr or NULL in case of failure.
-
-

virInterfaceGetMACString ()

const char *	virInterfaceGetMACString	(virInterfacePtr iface)
-

Get the MAC for an interface as string. For more information about MAC see RFC4122.

-
iface:an interface object
Returns: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.
-
-

virInterfaceGetName ()

const char *	virInterfaceGetName	(virInterfacePtr iface)
-

Get the public name for that interface

-
iface:an interface object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the interface object.
-
-

virInterfaceGetXMLDesc ()

char *	virInterfaceGetXMLDesc		(virInterfacePtr iface, 
unsigned int flags)
-

Provide an XML description of the interface. The description may be reused later to redefine the interface with virInterfaceDefineXML().

-
iface:an interface object
flags:an OR'ed set of extraction flags, not used yet
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.
-
-

virInterfaceLookupByMACString ()

virInterfacePtr	virInterfaceLookupByMACString	(virConnectPtr conn, 
const char * macstr)
-

Try to lookup an interface on the given hypervisor based on its MAC.

-
conn:pointer to the hypervisor connection
macstr:the MAC for the interface (null-terminated ASCII format)
Returns:a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.
-
-

virInterfaceLookupByName ()

virInterfacePtr	virInterfaceLookupByName	(virConnectPtr conn, 
const char * name)
-

Try to lookup an interface on the given hypervisor based on its name.

-
conn:pointer to the hypervisor connection
name:name for the interface
Returns:a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.
-
-

virInterfaceRef ()

int	virInterfaceRef			(virInterfacePtr iface)
-

Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to virInterfaceFree 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.

-
iface:the interface to hold a reference on
Returns:0 in case of success, -1 in case of failure.
-
-

virInterfaceUndefine ()

int	virInterfaceUndefine		(virInterfacePtr iface)
-

Undefine an interface, ie remove it from the config. This does not free the associated virInterfacePtr object.

-
iface:pointer to a defined interface
Returns:0 in case of success, -1 in case of error
-
-

virNetworkCreate ()

int	virNetworkCreate		(virNetworkPtr network)
-

Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.

-
network:pointer to a defined network
Returns:0 in case of success, -1 in case of error
-
-

virNetworkCreateXML ()

virNetworkPtr	virNetworkCreateXML	(virConnectPtr conn, 
const char * xmlDesc)
-

Create and start a new virtual network, based on an XML description similar to the one returned by virNetworkGetXMLDesc()

-
conn:pointer to the hypervisor connection
xmlDesc:an XML description of the network
Returns:a new network object or NULL in case of failure
-
-

virNetworkDefineXML ()

virNetworkPtr	virNetworkDefineXML	(virConnectPtr conn, 
const char * xml)
-

Define a network, but does not create it

-
conn:pointer to the hypervisor connection
xml:the XML description for the network, preferably in UTF-8
Returns:NULL in case of error, a pointer to the network otherwise
-
-

virNetworkDestroy ()

int	virNetworkDestroy		(virNetworkPtr network)
-

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 virNetworkPtr object. This function may require privileged access

-
network:a network object
Returns:0 in case of success and -1 in case of failure.
-
-

virNetworkFree ()

int	virNetworkFree			(virNetworkPtr network)
-

Free the network object. The running instance is kept alive. The data structure is freed and should not be used thereafter.

-
network:a network object
Returns:0 in case of success and -1 in case of failure.
-
-

virNetworkGetAutostart ()

int	virNetworkGetAutostart		(virNetworkPtr network, 
int * autostart)
-

Provides a boolean value indicating whether the network configured to be automatically started when the host machine boots.

-
network:a network object
autostart:the value returned
Returns:-1 in case of error, 0 in case of success
-
-

virNetworkGetBridgeName ()

char *	virNetworkGetBridgeName		(virNetworkPtr network)
-

Provides a bridge interface name to which a domain may connect a network interface in order to join the network.

-
network:a network object
Returns:a 0 terminated interface name, or NULL in case of error. the caller must free() the returned value.
-
-

virNetworkGetConnect ()

virConnectPtr	virNetworkGetConnect	(virNetworkPtr net)
-

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.

-
net:pointer to a network
Returns:the virConnectPtr or NULL in case of failure.
-
-

virNetworkGetName ()

const char *	virNetworkGetName	(virNetworkPtr network)
-

Get the public name for that network

-
network:a network object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the network object.
-
-

virNetworkGetUUID ()

int	virNetworkGetUUID		(virNetworkPtr network, 
unsigned char * uuid)
-

Get the UUID for a network

-
network:a network object
uuid:pointer to a VIR_UUID_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success
-
-

virNetworkGetUUIDString ()

int	virNetworkGetUUIDString		(virNetworkPtr network, 
char * buf)
-

Get the UUID for a network as string. For more information about UUID see RFC4122.

-
network:a network object
buf:pointer to a VIR_UUID_STRING_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success
-
-

virNetworkGetXMLDesc ()

char *	virNetworkGetXMLDesc		(virNetworkPtr network, 
int flags)
-

Provide an XML description of the network. The description may be reused later to relaunch the network with virNetworkCreateXML().

-
network:a network object
flags:an OR'ed set of extraction flags, not used yet
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.
-
-

virNetworkLookupByName ()

virNetworkPtr	virNetworkLookupByName	(virConnectPtr conn, 
const char * name)
-

Try to lookup a network on the given hypervisor based on its name.

-
conn:pointer to the hypervisor connection
name:name for the network
Returns:a new network object or NULL in case of failure. If the network cannot be found, then VIR_ERR_NO_NETWORK error is raised.
-
-

virNetworkLookupByUUID ()

virNetworkPtr	virNetworkLookupByUUID	(virConnectPtr conn, 
const unsigned char * uuid)
-

Try to lookup a network on the given hypervisor based on its UUID.

-
conn:pointer to the hypervisor connection
uuid:the raw UUID for the network
Returns:a new network object or NULL in case of failure. If the network cannot be found, then VIR_ERR_NO_NETWORK error is raised.
-
-

virNetworkLookupByUUIDString ()

virNetworkPtr	virNetworkLookupByUUIDString	(virConnectPtr conn, 
const char * uuidstr)
-

Try to lookup a network on the given hypervisor based on its UUID.

-
conn:pointer to the hypervisor connection
uuidstr:the string UUID for the network
Returns:a new network object or NULL in case of failure. If the network cannot be found, then VIR_ERR_NO_NETWORK error is raised.
-
-

virNetworkRef ()

int	virNetworkRef			(virNetworkPtr network)
-

Increment the reference count on the network. For each additional call to this method, there shall be a corresponding call to virNetworkFree 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.

-
network:the network to hold a reference on
Returns:0 in case of success, -1 in case of failure.
-
-

virNetworkSetAutostart ()

int	virNetworkSetAutostart		(virNetworkPtr network, 
int autostart)
-

Configure the network to be automatically started when the host machine boots.

-
network:a network object
autostart:whether the network should be automatically started 0 or 1
Returns:-1 in case of error, 0 in case of success
-
-

virNetworkUndefine ()

int	virNetworkUndefine		(virNetworkPtr network)
-

Undefine a network but does not stop it if it is running

-
network:pointer to a defined network
Returns:0 in case of success, -1 in case of error
-
-

virNodeDeviceCreateXML ()

virNodeDevicePtr	virNodeDeviceCreateXML	(virConnectPtr conn, 
const char * xmlDesc,
unsigned int flags)
-

Create a new device on the VM host machine, for example, virtual HBAs created using vport_create.

-
conn:pointer to the hypervisor connection
xmlDesc:string containing an XML description of the device to be created
flags:callers should always pass 0
Returns:a node device object if successful, NULL in case of failure
-
-

virNodeDeviceDestroy ()

int	virNodeDeviceDestroy		(virNodeDevicePtr dev)
-

Destroy the device object. The virtual device is removed from the host operating system. This function may require privileged access

-
dev:a device object
Returns:0 in case of success and -1 in case of failure.
-
-

virNodeDeviceDettach ()

int	virNodeDeviceDettach		(virNodeDevicePtr dev)
-

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.

-
dev:pointer to the node device
Returns:0 in case of success, -1 in case of failure.
-
-

virNodeDeviceFree ()

int	virNodeDeviceFree		(virNodeDevicePtr dev)
-

Drops a reference to the node device, freeing it if this was the last reference.

-
dev:pointer to the node device
Returns:the 0 for success, -1 for error.
-
-

virNodeDeviceGetName ()

const char *	virNodeDeviceGetName	(virNodeDevicePtr dev)
-

Just return the device name

-
dev:the device
Returns:the device name or NULL in case of error
-
-

virNodeDeviceGetParent ()

const char *	virNodeDeviceGetParent	(virNodeDevicePtr dev)
-

Accessor for the parent of the device

-
dev:the device
Returns:the name of the device's parent, or NULL if the device has no parent.
-
-

virNodeDeviceGetXMLDesc ()

char *	virNodeDeviceGetXMLDesc		(virNodeDevicePtr dev, 
unsigned int flags)
-

Fetch an XML document describing all aspects of the device.

-
dev:pointer to the node device
flags:flags for XML generation (unused, pass 0)
Returns:the XML document, or NULL on error
-
-

virNodeDeviceListCaps ()

int	virNodeDeviceListCaps		(virNodeDevicePtr dev, 
char ** const names,
int maxnames)
-

Lists the names of the capabilities supported by the device.

-
dev:the device
names:array to collect the list of capability names
maxnames:size of @names
Returns:the number of capability names listed in @names.
-
-

virNodeDeviceLookupByName ()

virNodeDevicePtr	virNodeDeviceLookupByName	(virConnectPtr conn, 
const char * name)
-

Lookup a node device by its name.

-
conn:pointer to the hypervisor connection
name:unique device name
Returns:a virNodeDevicePtr if found, NULL otherwise.
-
-

virNodeDeviceNumOfCaps ()

int	virNodeDeviceNumOfCaps		(virNodeDevicePtr dev)
-

Accessor for the number of capabilities supported by the device.

-
dev:the device
Returns:the number of capabilities supported by the device.
-
-

virNodeDeviceReAttach ()

int	virNodeDeviceReAttach		(virNodeDevicePtr dev)
-

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.

-
dev:pointer to the node device
Returns:0 in case of success, -1 in case of failure.
-
-

virNodeDeviceRef ()

int	virNodeDeviceRef		(virNodeDevicePtr dev)
-

Increment the reference count on the dev. For each additional call to this method, there shall be a corresponding call to virNodeDeviceFree 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.

-
dev:the dev to hold a reference on
Returns:0 in case of success, -1 in case of failure.
-
-

virNodeDeviceReset ()

int	virNodeDeviceReset		(virNodeDevicePtr dev)
-

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.

-
dev:pointer to the node device
Returns:0 in case of success, -1 in case of failure.
-
-

virNodeGetCellsFreeMemory ()

int	virNodeGetCellsFreeMemory	(virConnectPtr conn, 
unsigned long long * freeMems,
int startCell,
int maxCells)
-

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.

-
conn:pointer to the hypervisor connection
freeMems:pointer to the array of unsigned long long
startCell:index of first cell to return freeMems info on.
maxCells:Maximum number of cells for which freeMems information can be returned.
Returns:the number of entries filled in freeMems, or -1 in case of error.
-
-

virNodeGetFreeMemory ()

unsigned long long	virNodeGetFreeMemory	(virConnectPtr conn)
-

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.

-
conn:pointer to the hypervisor connection
Returns:the available free memory in bytes or 0 in case of error
-
-

virNodeGetInfo ()

int	virNodeGetInfo			(virConnectPtr conn, 
virNodeInfoPtr info)
-

Extract hardware information about the node.

-
conn:pointer to the hypervisor connection
info:pointer to a virNodeInfo structure allocated by the user
Returns:0 in case of success and -1 in case of failure.
-
-

virNodeGetSecurityModel ()

int	virNodeGetSecurityModel		(virConnectPtr conn, 
virSecurityModelPtr secmodel)
-

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.

-
conn:a connection object
secmodel:pointer to a virSecurityModel structure
Returns:0 in case of success, -1 in case of failure
-
-

virNodeListDevices ()

int	virNodeListDevices		(virConnectPtr conn, 
const char * cap,
char ** const names,
int maxnames,
unsigned int flags)
-

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

-
conn:pointer to the hypervisor connection
cap:capability name
names:array to collect the list of node device names
maxnames:size of @names
flags:flags (unused, pass 0)
Returns:the number of node devices found or -1 in case of error
-
-

virNodeNumOfDevices ()

int	virNodeNumOfDevices		(virConnectPtr conn, 
const char * cap,
unsigned int flags)
-

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

-
conn:pointer to the hypervisor connection
cap:capability name
flags:flags (unused, pass 0)
Returns:the number of node devices or -1 in case of error
-
-

virSecretDefineXML ()

virSecretPtr	virSecretDefineXML	(virConnectPtr conn, 
const char * xml,
unsigned int flags)
-

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.

-
conn:virConnect connection
xml:XML describing the secret.
flags:flags, use 0 for now
Returns:a the secret on success, NULL on failure.
-
-

virSecretFree ()

int	virSecretFree			(virSecretPtr secret)
-

Release the secret handle. The underlying secret continues to exist.

-
secret:pointer to a secret
Returns:0 on success, or -1 on error
-
-

virSecretGetConnect ()

virConnectPtr	virSecretGetConnect	(virSecretPtr secret)
-

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.

-
secret:A virSecret secret
Returns:the virConnectPtr or NULL in case of failure.
-
-

virSecretGetUUID ()

int	virSecretGetUUID		(virSecretPtr secret, 
unsigned char * uuid)
-

Fetches the UUID of the secret.

-
secret:A virSecret secret
uuid:buffer of VIR_UUID_BUFLEN bytes in size
Returns:0 on success with the uuid buffer being filled, or -1 upon failure.
-
-

virSecretGetUUIDString ()

int	virSecretGetUUIDString		(virSecretPtr secret, 
char * buf)
-

Get the UUID for a secret as string. For more information about UUID see RFC4122.

-
secret:a secret object
buf:pointer to a VIR_UUID_STRING_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success
-
-

virSecretGetUsageID ()

const char *	virSecretGetUsageID	(virSecretPtr secret)
-

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 VIR_SECRET_USAGE_TYPE_VOLUME 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.

-
secret:a secret object
Returns:a string identifying the object using the secret, or NULL upon error
-
-

virSecretGetUsageType ()

int	virSecretGetUsageType		(virSecretPtr secret)
-

Get the type of object which uses this secret. The returned value is one of the constants defined in the virSecretUsageType 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.

-
secret:a secret object
Returns:a positive integer identifying the type of object, or -1 upon error.
-
-

virSecretGetValue ()

unsigned char *	virSecretGetValue	(virSecretPtr secret, 
size_t * value_size,
unsigned int flags)
-

Fetches the value of a secret.

-
secret:A virSecret connection
value_size:Place for storing size of the secret value
flags:flags, use 0 for now
Returns:the secret value on success, NULL on failure. The caller must free() the secret value.
-
-

virSecretGetXMLDesc ()

char *	virSecretGetXMLDesc		(virSecretPtr secret, 
unsigned int flags)
-

Fetches an XML document describing attributes of the secret.

-
secret:A virSecret secret
flags:flags, use 0 for now
Returns:the XML document on success, NULL on failure. The caller must free() the XML.
-
-

virSecretLookupByUUID ()

virSecretPtr	virSecretLookupByUUID	(virConnectPtr conn, 
const unsigned char * uuid)
-

Try to lookup a secret on the given hypervisor based on its UUID. Uses the 16 bytes of raw data to describe the UUID

-
conn:pointer to the hypervisor connection
uuid:the raw UUID for the secret
Returns:a new secret object or NULL in case of failure. If the secret cannot be found, then VIR_ERR_NO_SECRET error is raised.
-
-

virSecretLookupByUUIDString ()

virSecretPtr	virSecretLookupByUUIDString	(virConnectPtr conn, 
const char * uuidstr)
-

Try to lookup a secret on the given hypervisor based on its UUID. Uses the printable string value to describe the UUID

-
conn:pointer to the hypervisor connection
uuidstr:the string UUID for the secret
Returns:a new secret object or NULL in case of failure. If the secret cannot be found, then VIR_ERR_NO_SECRET error is raised.
-
-

virSecretLookupByUsage ()

virSecretPtr	virSecretLookupByUsage	(virConnectPtr conn, 
int usageType,
const char * usageID)
-

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.

-
conn:pointer to the hypervisor connection
usageType:the type of secret usage
usageID:identifier of the object using the secret
Returns:a new secret object or NULL in case of failure. If the secret cannot be found, then VIR_ERR_NO_SECRET error is raised.
-
-

virSecretRef ()

int	virSecretRef			(virSecretPtr secret)
-

Increment the reference count on the secret. For each additional call to this method, there shall be a corresponding call to virSecretFree 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.

-
secret:the secret to hold a reference on
Returns:0 in case of success, -1 in case of failure.
-
-

virSecretSetValue ()

int	virSecretSetValue		(virSecretPtr secret, 
const unsigned char * value,
size_t value_size,
unsigned int flags)
-

Sets the value of a secret.

-
secret:A virSecret secret
value:Value of the secret
value_size:Size of the value
flags:flags, use 0 for now
Returns:0 on success, -1 on failure.
-
-

virSecretUndefine ()

int	virSecretUndefine		(virSecretPtr secret)
-

Deletes the specified secret. This does not free the associated virSecretPtr object.

-
secret:A virSecret secret
Returns:0 on success, -1 on failure.
-
-

virStoragePoolBuild ()

int	virStoragePoolBuild		(virStoragePoolPtr pool, 
unsigned int flags)
-

Build the underlying storage pool

-
pool:pointer to storage pool
flags:future flags, use 0 for now
Returns:0 on success, or -1 upon failure
-
-

virStoragePoolCreate ()

int	virStoragePoolCreate		(virStoragePoolPtr pool, 
unsigned int flags)
-

Starts an inactive storage pool

-
pool:pointer to storage pool
flags:future flags, use 0 for now
Returns:0 on success, or -1 if it could not be started
-
-

virStoragePoolCreateXML ()

virStoragePoolPtr	virStoragePoolCreateXML	(virConnectPtr conn, 
const char * xmlDesc,
unsigned int flags)
-

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

-
conn:pointer to hypervisor connection
xmlDesc:XML description for new pool
flags:future flags, use 0 for now
Returns:a virStoragePoolPtr object, or NULL if creation failed
-
-

virStoragePoolDefineXML ()

virStoragePoolPtr	virStoragePoolDefineXML	(virConnectPtr conn, 
const char * xml,
unsigned int flags)
-

Define a new inactive storage pool based on its XML description. The pool is persistent, until explicitly undefined.

-
conn:pointer to hypervisor connection
xml:XML description for new pool
flags:future flags, use 0 for now
Returns:a virStoragePoolPtr object, or NULL if creation failed
-
-

virStoragePoolDelete ()

int	virStoragePoolDelete		(virStoragePoolPtr pool, 
unsigned int flags)
-

Delete the underlying pool resources. This is a non-recoverable operation. The virStoragePoolPtr object itself is not free'd.

-
pool:pointer to storage pool
flags:flags for obliteration process
Returns:0 on success, or -1 if it could not be obliterate
-
-

virStoragePoolDestroy ()

int	virStoragePoolDestroy		(virStoragePoolPtr pool)
-

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 virStoragePoolPtr object.

-
pool:pointer to storage pool
Returns:0 on success, or -1 if it could not be destroyed
-
-

virStoragePoolFree ()

int	virStoragePoolFree		(virStoragePoolPtr pool)
-

Free a storage pool object, releasing all memory associated with it. Does not change the state of the pool on the host.

-
pool:pointer to storage pool
Returns:0 on success, or -1 if it could not be free'd.
-
-

virStoragePoolGetAutostart ()

int	virStoragePoolGetAutostart	(virStoragePoolPtr pool, 
int * autostart)
-

Fetches the value of the autostart flag, which determines whether the pool is automatically started at boot time

-
pool:pointer to storage pool
autostart:location in which to store autostart flag
Returns:0 on success, -1 on failure
-
-

virStoragePoolGetConnect ()

virConnectPtr	virStoragePoolGetConnect	(virStoragePoolPtr pool)
-

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.

-
pool:pointer to a pool
Returns:the virConnectPtr or NULL in case of failure.
-
-

virStoragePoolGetInfo ()

int	virStoragePoolGetInfo		(virStoragePoolPtr pool, 
virStoragePoolInfoPtr info)
-

Get volatile information about the storage pool such as free space / usage summary

-
pool:pointer to storage pool
info:pointer at which to store info
Returns:0 on success, or -1 on failure.
-
-

virStoragePoolGetName ()

const char *	virStoragePoolGetName	(virStoragePoolPtr pool)
-

Fetch the locally unique name of the storage pool

-
pool:pointer to storage pool
Returns:the name of the pool, or NULL on error
-
-

virStoragePoolGetUUID ()

int	virStoragePoolGetUUID		(virStoragePoolPtr pool, 
unsigned char * uuid)
-

Fetch the globally unique ID of the storage pool

-
pool:pointer to storage pool
uuid:buffer of VIR_UUID_BUFLEN bytes in size
Returns:0 on success, or -1 on error;
-
-

virStoragePoolGetUUIDString ()

int	virStoragePoolGetUUIDString	(virStoragePoolPtr pool, 
char * buf)
-

Fetch the globally unique ID of the storage pool as a string

-
pool:pointer to storage pool
buf:buffer of VIR_UUID_STRING_BUFLEN bytes in size
Returns:0 on success, or -1 on error;
-
-

virStoragePoolGetXMLDesc ()

char *	virStoragePoolGetXMLDesc	(virStoragePoolPtr pool, 
unsigned int flags)
-

Fetch an XML document describing all aspects of the storage pool. This is suitable for later feeding back into the virStoragePoolCreateXML method.

-
pool:pointer to storage pool
flags:flags for XML format options (set of virDomainXMLFlags)
Returns:a XML document, or NULL on error
-
-

virStoragePoolListVolumes ()

int	virStoragePoolListVolumes	(virStoragePoolPtr pool, 
char ** const names,
int maxnames)
-

Fetch list of storage volume names, limiting to at most maxnames.

-
pool:pointer to storage pool
names:array in which to storage volume names
maxnames:size of names array
Returns:the number of names fetched, or -1 on error
-
-

virStoragePoolLookupByName ()

virStoragePoolPtr	virStoragePoolLookupByName	(virConnectPtr conn, 
const char * name)
-

Fetch a storage pool based on its unique name

-
conn:pointer to hypervisor connection
name:name of pool to fetch
Returns:a virStoragePoolPtr object, or NULL if no matching pool is found
-
-

virStoragePoolLookupByUUID ()

virStoragePoolPtr	virStoragePoolLookupByUUID	(virConnectPtr conn, 
const unsigned char * uuid)
-

Fetch a storage pool based on its globally unique id

-
conn:pointer to hypervisor connection
uuid:globally unique id of pool to fetch
Returns:a virStoragePoolPtr object, or NULL if no matching pool is found
-
-

virStoragePoolLookupByUUIDString ()

virStoragePoolPtr	virStoragePoolLookupByUUIDString	(virConnectPtr conn, 
const char * uuidstr)
-

Fetch a storage pool based on its globally unique id

-
conn:pointer to hypervisor connection
uuidstr:globally unique id of pool to fetch
Returns:a virStoragePoolPtr object, or NULL if no matching pool is found
-
-

virStoragePoolLookupByVolume ()

virStoragePoolPtr	virStoragePoolLookupByVolume	(virStorageVolPtr vol)
-

Fetch a storage pool which contains a particular volume

-
vol:pointer to storage volume
Returns:a virStoragePoolPtr object, or NULL if no matching pool is found
-
-

virStoragePoolNumOfVolumes ()

int	virStoragePoolNumOfVolumes	(virStoragePoolPtr pool)
-

Fetch the number of storage volumes within a pool

-
pool:pointer to storage pool
Returns:the number of storage pools, or -1 on failure
-
-

virStoragePoolRef ()

int	virStoragePoolRef		(virStoragePoolPtr pool)
-

Increment the reference count on the pool. For each additional call to this method, there shall be a corresponding call to virStoragePoolFree 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.

-
pool:the pool to hold a reference on
Returns:0 in case of success, -1 in case of failure.
-
-

virStoragePoolRefresh ()

int	virStoragePoolRefresh		(virStoragePoolPtr pool, 
unsigned int flags)
-

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

-
pool:pointer to storage pool
flags:flags to control refresh behaviour (currently unused, use 0)
Returns:0 if the volume list was refreshed, -1 on failure
-
-

virStoragePoolSetAutostart ()

int	virStoragePoolSetAutostart	(virStoragePoolPtr pool, 
int autostart)
-

Sets the autostart flag

-
pool:pointer to storage pool
autostart:new flag setting
Returns:0 on success, -1 on failure
-
-

virStoragePoolUndefine ()

int	virStoragePoolUndefine		(virStoragePoolPtr pool)
-

Undefine an inactive storage pool

-
pool:pointer to storage pool
Returns:0 on success, -1 on failure
-
-

virStorageVolCreateXML ()

virStorageVolPtr	virStorageVolCreateXML	(virStoragePoolPtr pool, 
const char * xmldesc,
unsigned int flags)
-

Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes

-
pool:pointer to storage pool
xmldesc:description of volume to create
flags:flags for creation (unused, pass 0)
Returns:the storage volume, or NULL on error
-
-

virStorageVolCreateXMLFrom ()

virStorageVolPtr	virStorageVolCreateXMLFrom	(virStoragePoolPtr pool, 
const char * xmldesc,
virStorageVolPtr clonevol,
unsigned int flags)
-

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.

-
pool:pointer to parent pool for the new volume
xmldesc:description of volume to create
clonevol:storage volume to use as input
flags:flags for creation (unused, pass 0)
Returns:the storage volume, or NULL on error
-
-

virStorageVolDelete ()

int	virStorageVolDelete		(virStorageVolPtr vol, 
unsigned int flags)
-

Delete the storage volume from the pool

-
vol:pointer to storage volume
flags:future flags, use 0 for now
Returns:0 on success, or -1 on error
-
-

virStorageVolFree ()

int	virStorageVolFree		(virStorageVolPtr vol)
-

Release the storage volume handle. The underlying storage volume continues to exist.

-
vol:pointer to storage volume
Returns:0 on success, or -1 on error
-
-

virStorageVolGetConnect ()

virConnectPtr	virStorageVolGetConnect	(virStorageVolPtr vol)
-

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.

-
vol:pointer to a pool
Returns:the virConnectPtr or NULL in case of failure.
-
-

virStorageVolGetInfo ()

int	virStorageVolGetInfo		(virStorageVolPtr vol, 
virStorageVolInfoPtr info)
-

Fetches volatile information about the storage volume such as its current allocation

-
vol:pointer to storage volume
info:pointer at which to store info
Returns:0 on success, or -1 on failure
-
-

virStorageVolGetKey ()

const char *	virStorageVolGetKey	(virStorageVolPtr vol)
-

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

-
vol:pointer to storage volume
Returns:the volume key, or NULL on error
-
-

virStorageVolGetName ()

const char *	virStorageVolGetName	(virStorageVolPtr vol)
-

Fetch the storage volume name. This is unique within the scope of a pool

-
vol:pointer to storage volume
Returns:the volume name, or NULL on error
-
-

virStorageVolGetPath ()

char *	virStorageVolGetPath		(virStorageVolPtr vol)
-

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

-
vol:pointer to storage volume
Returns:the storage volume path, or NULL on error
-
-

virStorageVolGetXMLDesc ()

char *	virStorageVolGetXMLDesc		(virStorageVolPtr vol, 
unsigned int flags)
-

Fetch an XML document describing all aspects of the storage volume

-
vol:pointer to storage volume
flags:flags for XML generation (unused, pass 0)
Returns:the XML document, or NULL on error
-
-

virStorageVolLookupByKey ()

virStorageVolPtr	virStorageVolLookupByKey	(virConnectPtr conn, 
const char * key)
-

Fetch a pointer to a storage volume based on its globally unique key

-
conn:pointer to hypervisor connection
key:globally unique key
Returns:a storage volume, or NULL if not found / error
-
-

virStorageVolLookupByName ()

virStorageVolPtr	virStorageVolLookupByName	(virStoragePoolPtr pool, 
const char * name)
-

Fetch a pointer to a storage volume based on its name within a pool

-
pool:pointer to storage pool
name:name of storage volume
Returns:a storage volume, or NULL if not found / error
-
-

virStorageVolLookupByPath ()

virStorageVolPtr	virStorageVolLookupByPath	(virConnectPtr conn, 
const char * path)
-

Fetch a pointer to a storage volume based on its locally (host) unique path

-
conn:pointer to hypervisor connection
path:locally unique path
Returns:a storage volume, or NULL if not found / error
-
-

virStorageVolRef ()

int	virStorageVolRef		(virStorageVolPtr vol)
-

Increment the reference count on the vol. For each additional call to this method, there shall be a corresponding call to virStorageVolFree 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.

-
vol:the vol to hold a reference on
Returns:0 in case of success, -1 in case of failure.
-
-
-
- - diff --git a/docs/devhelp/libvirt-virterror.html b/docs/devhelp/libvirt-virterror.html deleted file mode 100644 index 686522429e..0000000000 --- a/docs/devhelp/libvirt-virterror.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - virterror: error handling interfaces for the libvirt library - - - - - - - - - - - - - - - -

- virterror -

-

virterror - error handling interfaces for the libvirt library

-

Provides the interfaces of the libvirt library to handle errors raised while using the library.

-

Author(s): Daniel Veillard <veillard@redhat.com>

-
-

Synopsis

-
typedef virError * virErrorPtr;
-typedef enum virErrorLevel;
-typedef enum virErrorDomain;
-typedef enum virErrorNumber;
-typedef struct _virError virError;
-void	virFreeError			(virErrorPtr err);
-int	virCopyLastError		(virErrorPtr to);
-void	virConnSetErrorFunc		(virConnectPtr conn, 
void * userData,
virErrorFunc handler); -void virResetLastError (void); -typedef void virErrorFunc (void * userData,
virErrorPtr error); -void virResetError (virErrorPtr err); -virErrorPtr virConnGetLastError (virConnectPtr conn); -void virDefaultErrorFunc (virErrorPtr err); -virErrorPtr virGetLastError (void); -void virSetErrorFunc (void * userData,
virErrorFunc handler); -int virConnCopyLastError (virConnectPtr conn,
virErrorPtr to); -void virConnResetLastError (virConnectPtr conn); -virErrorPtr virSaveLastError (void); -
-
-
-

Description

-
-
-

Details

-
-

Structure virError

struct _virError {
-    int	code	: The error code, a virErrorNumber
-    int	domain	: What part of the library raised this error
-    char *	message	: human-readable informative error message
-    virErrorLevel	level	: how consequent is the error
-    virConnectPtr	conn	: connection if available, deprecated see note above
-    virDomainPtr	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
-    virNetworkPtr	net	: network if available, deprecated see note above
-} virError;
-

-

-
-

Enum virErrorDomain

enum virErrorDomain {
-    VIR_FROM_NONE = 0
-    VIR_FROM_XEN = 1 /* Error at Xen hypervisor layer */
-    VIR_FROM_XEND = 2 /* Error at connection with xend daemon */
-    VIR_FROM_XENSTORE = 3 /* Error at connection with xen store */
-    VIR_FROM_SEXPR = 4 /* Error in the S-Expression code */
-    VIR_FROM_XML = 5 /* Error in the XML code */
-    VIR_FROM_DOM = 6 /* Error when operating on a domain */
-    VIR_FROM_RPC = 7 /* Error in the XML-RPC code */
-    VIR_FROM_PROXY = 8 /* Error in the proxy code */
-    VIR_FROM_CONF = 9 /* Error in the configuration file handling */
-    VIR_FROM_QEMU = 10 /* Error at the QEMU daemon */
-    VIR_FROM_NET = 11 /* Error when operating on a network */
-    VIR_FROM_TEST = 12 /* Error from test driver */
-    VIR_FROM_REMOTE = 13 /* Error from remote driver */
-    VIR_FROM_OPENVZ = 14 /* Error from OpenVZ driver */
-    VIR_FROM_XENXM = 15 /* Error at Xen XM layer */
-    VIR_FROM_STATS_LINUX = 16 /* Error in the Linux Stats code */
-    VIR_FROM_LXC = 17 /* Error from Linux Container driver */
-    VIR_FROM_STORAGE = 18 /* Error from storage driver */
-    VIR_FROM_NETWORK = 19 /* Error from network config */
-    VIR_FROM_DOMAIN = 20 /* Error from domain config */
-    VIR_FROM_UML = 21 /* Error at the UML driver */
-    VIR_FROM_NODEDEV = 22 /* Error from node device monitor */
-    VIR_FROM_XEN_INOTIFY = 23 /* Error from xen inotify layer */
-    VIR_FROM_SECURITY = 24 /* Error from security framework */
-    VIR_FROM_VBOX = 25 /* Error from VirtualBox driver */
-    VIR_FROM_INTERFACE = 26 /* Error when operating on an interface */
-    VIR_FROM_ONE = 27 /* Error from OpenNebula driver */
-    VIR_FROM_ESX = 28 /* Error from ESX driver */
-    VIR_FROM_PHYP = 29 /* Error from IBM power hypervisor */
-    VIR_FROM_SECRET = 30 /*  Error from secret storage */
-};
-

-

-
-

Enum virErrorLevel

enum virErrorLevel {
-    VIR_ERR_NONE = 0
-    VIR_ERR_WARNING = 1 /* A simple warning */
-    VIR_ERR_ERROR = 2 /*  An error */
-};
-

-

-
-

Enum virErrorNumber

enum virErrorNumber {
-    VIR_ERR_OK = 0
-    VIR_ERR_INTERNAL_ERROR = 1 /* internal error */
-    VIR_ERR_NO_MEMORY = 2 /* memory allocation failure */
-    VIR_ERR_NO_SUPPORT = 3 /* no support for this function */
-    VIR_ERR_UNKNOWN_HOST = 4 /* could not resolve hostname */
-    VIR_ERR_NO_CONNECT = 5 /* can't connect to hypervisor */
-    VIR_ERR_INVALID_CONN = 6 /* invalid connection object */
-    VIR_ERR_INVALID_DOMAIN = 7 /* invalid domain object */
-    VIR_ERR_INVALID_ARG = 8 /* invalid function argument */
-    VIR_ERR_OPERATION_FAILED = 9 /* a command to hypervisor failed */
-    VIR_ERR_GET_FAILED = 10 /* a HTTP GET command to failed */
-    VIR_ERR_POST_FAILED = 11 /* a HTTP POST command to failed */
-    VIR_ERR_HTTP_ERROR = 12 /* unexpected HTTP error code */
-    VIR_ERR_SEXPR_SERIAL = 13 /* failure to serialize an S-Expr */
-    VIR_ERR_NO_XEN = 14 /* could not open Xen hypervisor control */
-    VIR_ERR_XEN_CALL = 15 /* failure doing an hypervisor call */
-    VIR_ERR_OS_TYPE = 16 /* unknown OS type */
-    VIR_ERR_NO_KERNEL = 17 /* missing kernel information */
-    VIR_ERR_NO_ROOT = 18 /* missing root device information */
-    VIR_ERR_NO_SOURCE = 19 /* missing source device information */
-    VIR_ERR_NO_TARGET = 20 /* missing target device information */
-    VIR_ERR_NO_NAME = 21 /* missing domain name information */
-    VIR_ERR_NO_OS = 22 /* missing domain OS information */
-    VIR_ERR_NO_DEVICE = 23 /* missing domain devices information */
-    VIR_ERR_NO_XENSTORE = 24 /* could not open Xen Store control */
-    VIR_ERR_DRIVER_FULL = 25 /* too many drivers registered */
-    VIR_ERR_CALL_FAILED = 26 /* not supported by the drivers (DEPRECATED) */
-    VIR_ERR_XML_ERROR = 27 /* an XML description is not well formed or broken */
-    VIR_ERR_DOM_EXIST = 28 /* the domain already exist */
-    VIR_ERR_OPERATION_DENIED = 29 /* operation forbidden on read-only connections */
-    VIR_ERR_OPEN_FAILED = 30 /* failed to open a conf file */
-    VIR_ERR_READ_FAILED = 31 /* failed to read a conf file */
-    VIR_ERR_PARSE_FAILED = 32 /* failed to parse a conf file */
-    VIR_ERR_CONF_SYNTAX = 33 /* failed to parse the syntax of a conf file */
-    VIR_ERR_WRITE_FAILED = 34 /* failed to write a conf file */
-    VIR_ERR_XML_DETAIL = 35 /* detail of an XML error */
-    VIR_ERR_INVALID_NETWORK = 36 /* invalid network object */
-    VIR_ERR_NETWORK_EXIST = 37 /* the network already exist */
-    VIR_ERR_SYSTEM_ERROR = 38 /* general system call failure */
-    VIR_ERR_RPC = 39 /* some sort of RPC error */
-    VIR_ERR_GNUTLS_ERROR = 40 /* error from a GNUTLS call */
-    VIR_WAR_NO_NETWORK = 41 /* failed to start network */
-    VIR_ERR_NO_DOMAIN = 42 /* domain not found or unexpectedly disappeared */
-    VIR_ERR_NO_NETWORK = 43 /* network not found */
-    VIR_ERR_INVALID_MAC = 44 /* invalid MAC address */
-    VIR_ERR_AUTH_FAILED = 45 /* authentication failed */
-    VIR_ERR_INVALID_STORAGE_POOL = 46 /* invalid storage pool object */
-    VIR_ERR_INVALID_STORAGE_VOL = 47 /* invalid storage vol object */
-    VIR_WAR_NO_STORAGE = 48 /* failed to start storage */
-    VIR_ERR_NO_STORAGE_POOL = 49 /* storage pool not found */
-    VIR_ERR_NO_STORAGE_VOL = 50 /* storage pool not found */
-    VIR_WAR_NO_NODE = 51 /* failed to start node driver */
-    VIR_ERR_INVALID_NODE_DEVICE = 52 /* invalid node device object */
-    VIR_ERR_NO_NODE_DEVICE = 53 /* node device not found */
-    VIR_ERR_NO_SECURITY_MODEL = 54 /* security model not found */
-    VIR_ERR_OPERATION_INVALID = 55 /* operation is not applicable at this time */
-    VIR_WAR_NO_INTERFACE = 56 /* failed to start interface driver */
-    VIR_ERR_NO_INTERFACE = 57 /* interface driver not running */
-    VIR_ERR_INVALID_INTERFACE = 58 /* invalid interface object */
-    VIR_ERR_MULTIPLE_INTERFACES = 59 /* more than one matching interface found */
-    VIR_WAR_NO_SECRET = 60 /* failed to start secret storage */
-    VIR_ERR_INVALID_SECRET = 61 /* invalid secret */
-    VIR_ERR_NO_SECRET = 62 /*  secret not found */
-};
-

-

-
-

Typedef virErrorPtr

virError * virErrorPtr;
-

-

-
-

Function type virErrorFunc

void	virErrorFunc			(void * userData, 
virErrorPtr error)
-

Signature of a function to use when there is an error raised by the library.

-
userData:user provided data for the error callback
error:the error being raised.
-
-

virConnCopyLastError ()

int	virConnCopyLastError		(virConnectPtr conn, 
virErrorPtr to)
-

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()

-
conn:pointer to the hypervisor connection
to:target to receive the copy
Returns:0 if no error was found and the error code otherwise and -1 in case of parameter error.
-
-

virConnGetLastError ()

virErrorPtr	virConnGetLastError	(virConnectPtr conn)
-

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.

-
conn:pointer to the hypervisor connection
Returns:a pointer to the last error or NULL if none occurred.
-
-

virConnResetLastError ()

void	virConnResetLastError		(virConnectPtr conn)
-

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

-
conn:pointer to the hypervisor connection
-
-

virConnSetErrorFunc ()

void	virConnSetErrorFunc		(virConnectPtr conn, 
void * userData,
virErrorFunc handler)
-

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.

-
conn:pointer to the hypervisor connection
userData:pointer to the user data provided in the handler callback
handler:the function to get called in case of error or NULL
-
-

virCopyLastError ()

int	virCopyLastError		(virErrorPtr to)
-

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()

-
to:target to receive the copy
Returns:0 if no error was found and the error code otherwise and -1 in case of parameter error.
-
-

virDefaultErrorFunc ()

void	virDefaultErrorFunc		(virErrorPtr err)
-

Default routine reporting an error to stderr.

-
err:pointer to the error.
-
-

virFreeError ()

void	virFreeError			(virErrorPtr err)
-

Resets and frees the given error.

-
err:error to free
-
-

virGetLastError ()

virErrorPtr	virGetLastError		(void)
-

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.

-
Returns:a pointer to the last error or NULL if none occurred.
-
-

virResetError ()

void	virResetError			(virErrorPtr err)
-

Reset the error being pointed to

-
err:pointer to the virError to clean up
-
- -
-

virSaveLastError ()

virErrorPtr	virSaveLastError	(void)
-

Save the last error into a new error object.

-
Returns:a pointer to the copied error or NULL if allocation failed. It is the caller's responsibility to free the error with virFreeError().
-
-

virSetErrorFunc ()

void	virSetErrorFunc			(void * userData, 
virErrorFunc handler)
-

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.

-
userData:pointer to the user data provided in the handler callback
handler:the function to get called in case of error or NULL
-
-
-
- - diff --git a/docs/docs.html b/docs/docs.html deleted file mode 100644 index 49a62d54d1..0000000000 --- a/docs/docs.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - libvirt: Documentation - - - - -
- -
-

Documentation

-
-
- - - diff --git a/docs/downloads.html b/docs/downloads.html deleted file mode 100644 index 603814e90a..0000000000 --- a/docs/downloads.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - libvirt: Downloads - - - - -
- -
-

Downloads

-

Official Releases

-

- The latest versions of the libvirt C library can be downloaded from: -

- -

Hourly development snapshots

-

- 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: -

- -

GIT source repository

-

Libvirt code source is now maintained in a git repository available on - libvirt.org: -

-
-
-      git clone git://libvirt.org/libvirt.git
-    
-

- It can also be browsed at -

-
-
-      http://libvirt.org/git/?p=libvirt.git;a=summary
-    
-

CVS repository access (Deprecated)

-

- The master source repository used to be under CVS - with anonymous access at: -

-
-
-      # cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co libvirt
-    
-

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.

-

Building from a source code checkout

-

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 autogen.sh 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:

-
-
-      ./autogen.sh --prefix=$HOME/usr
-      make
-      make install
-    
-

GIT repository mirror

-

- Jim Mereying was maintaining a CVS to git mirror on - git.et.redhat.com. - 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: -

-
-
-      git clone git://git.et.redhat.com/libvirt.git
-    
-

- It can also be browsed at -

-
-      http://git.et.redhat.com/?p=libvirt.git;a=summary
-    
-
-
- - - diff --git a/docs/drivers.html b/docs/drivers.html deleted file mode 100644 index dd5e740d8f..0000000000 --- a/docs/drivers.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - libvirt: Internal drivers - - - - -
- -
-

Internal drivers

-

- The libvirt public API delegates its implementation to one or - more internal drivers, depending on the connection URI - 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. -

-

Hypervisor drivers

-

- The hypervisor drivers currently supported by libvirt are: -

- -
-
- - - diff --git a/docs/drvlxc.html b/docs/drvlxc.html deleted file mode 100644 index b3a376f73c..0000000000 --- a/docs/drvlxc.html +++ /dev/null @@ -1,223 +0,0 @@ - - - - - - - - - libvirt: LXC container driver - - - - -
- -
-

LXC container driver

-

-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 -

-

Example config version 1

-

-
-<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>
-
-

-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: -

-

-
-<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>
-
-

-In both cases, you can define and start a container using:

-
-virsh --connect lxc:/// define v1.xml
-virsh --connect lxc:/// start v1.xml
-
-
-virsh --connect lxc:/// console v1
-
-

Now doing 'ps -ef' will only show processes in the container, for -instance. -

-
-
- - - diff --git a/docs/drvone.html b/docs/drvone.html deleted file mode 100644 index 68f35e667f..0000000000 --- a/docs/drvone.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - libvirt: OpenNebula Virtual Infrastructure Manager driver - - - - -
- -
-

OpenNebula Virtual Infrastructure Manager driver

-

OpenNebula -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 (Amazon EC2 or Elastic Hosts based) cloud using a standard libvirt interface, including the API as well as the related -tools and VM description files.

-

-Deployment pre-requisites

- -

-Connections to OpenNebula driver

-

The Uri of the driver protocol is "one". Some example -connection Uris for the driver are: -

-
    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)
-    
-

-Example domain XML config

-

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:

-

Paravirtualized guest direct kernel boot -

-
    <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>
-    
-

-Note: The "<interface type='network'>" will -attach the interface to a previously configured network (named -onenetwork) within the OpenNebula system, typically with the -onevnet CLI command.

-

Note: OpenNebula supports the simultaneous use of different hypervisors, so you can specify any os type (linux or hvm) supported by your cluster. -

-

Links

- -
-
- - - diff --git a/docs/drvopenvz.html b/docs/drvopenvz.html deleted file mode 100644 index a83926dec0..0000000000 --- a/docs/drvopenvz.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - - libvirt: OpenVZ container driver - - - - -
- -
-

OpenVZ container driver

-

- 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. -

-

Connections to OpenVZ driver

-

- 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: -

-
-    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)
-    
-

Notes on bridged networking

-

- 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. -

-

Host network devices

-

- 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 Wiki - 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". -

-

OpenVZ tools configuration

-

- OpenVZ releases later than 3.0.23 ship with a standard network device - setup script that is able to setup bridging, named - /usr/sbin/vznetaddbr. 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 /etc/vz/vznetctl.conf - must be created containing -

-
-#!/bin/bash
-EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr"
-    
-

- 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. -

-

Example guest domain XML configuration

-

- 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 filesystem tag, and the template source name - matches the templates known to OpenVZ tools. -

-
-<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>
-    
-
-
- - - diff --git a/docs/drvqemu.html b/docs/drvqemu.html deleted file mode 100644 index d6f0dfcd0d..0000000000 --- a/docs/drvqemu.html +++ /dev/null @@ -1,628 +0,0 @@ - - - - - - - - - libvirt: QEMU/KVM hypervisor driver - - - - -
- -
-

QEMU/KVM hypervisor driver

- -

- 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. -

-

- Deployment pre-requisites -

- -

- Connections to QEMU driver -

-

- 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: -

-
-    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)
-    
-

- Driver security architecture -

-

- There are multiple layers to security in the QEMU driver, allowing for - flexibility in the use of QEMU based virtual machines. -

-

- Driver instances -

-

- 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. -

-

- 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. -

-

- POSIX users/groups -

-

- 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. -

-

- 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 /etc/libvirt/qemu.conf configuration file via - the user=$USERNAME and group=$GROUPNAME - 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. -

-

- 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. -

- -

- Linux process capabilities -

-

- The libvirt QEMU driver has a build time option allowing it to use - the libcap-ng - 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. -

-

- 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 - only be able to access files owned by root, and - not files owned by any other user. -

-

- 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 /var/run/libvirt/qemu/, - /var/lib/libvirt/qemu/ and - /var/cache/libvirt/qemu/ back to root, in addition - to changing the /etc/libvirt/qemu.conf settings. -

-

- SELinux basic confinement -

-

- 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. -

-

- In the basic model, all QEMU virtual machines run under the confined - domain root:system_r:qemu_t. It is required that any - disk image assigned to a QEMU virtual machine is labelled with - system_u:object_r:virt_image_t. In a default deployment, - package vendors/distributor will typically ensure that the directory - /var/lib/libvirt/images 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 system_u:object_r:virt_image_t. -

-

- 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 - system_u:object_r:virt_image_t. In the case of - NFS, there is an alternative option, of enabling the virt_use_nfs - SELinux boolean. -

-

- SELinux sVirt confinement -

-

- 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. -

-

- In the sVirt model, each QEMU virtual machine runs under its own - confined domain, which is based on system_u:system_r:svirt_t:s0 - with a unique category appended, eg, system_u:system_r:svirt_t:s0:c34,c44. - The rules are setup such that a domain can only access files which are - labelled with the matching category level, eg - system_u:object_r:svirt_image_t:s0:c34,c44. This prevents one - QEMU process accessing any file resources that are prevent to another QEMU - process. -

-

- 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 system_u:system_r:svirt_image_t:s0 allowing all guests - read/write access them, while disks marked as <readonly> will - get a generic label system_u:system_r:svirt_content_t:s0 - which allows all guests read-only access. -

-

- 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. -

-

- 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 /etc/libvirt/qemu.conf - file can be used to change the setting to security_driver="none" -

-

- Cgroups device ACLs -

-

- 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. -

-

- The list of shared devices a guest is allowed access to is -

-
-      /dev/null, /dev/full, /dev/zero,
-      /dev/random, /dev/urandom,
-      /dev/ptmx, /dev/kvm, /dev/kqemu,
-      /dev/rtc, /dev/hpet, /dev/net/tun
-    
-

- In the event of unanticipated needs arising, this can be customized - via the /etc/libvirt/qemu.conf file. - To mount the cgroups device controller, the following command - should be run as root, prior to starting libvirtd -

-
-      mkdir /dev/cgroup
-      mount -t cgroup none /dev/cgroup -o devices
-    
-

- libvirt will then place each virtual machine in a cgroup at - /dev/cgroup/libvirt/qemu/$VMNAME/ -

-

- Import and export of libvirt domain XML configs -

-

The QEMU driver currently supports a single native - config format known as qemu-argv. 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

-

- Converting from QEMU args to domain XML -

-

- The virsh domxml-from-native 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. -

-
$ 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>
-    
-

NB, don't include the literral \ in the args, put everything on one line

-

- Converting from domain XML to QEMU args -

-

- The virsh domxml-to-native provides a way to convert a - guest description using libvirt Domain XML, into a set of QEMU args - that can be run manually. -

-
$ 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
-    
-

- Example domain XML config -

-

QEMU emulated guest on x86_64

-
<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>
-

KVM hardware accelerated guest on i686

-
<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>
-

Xen paravirtualized guests with hardware acceleration

-
-
- - - diff --git a/docs/drvremote.html b/docs/drvremote.html deleted file mode 100644 index d2a74a59f5..0000000000 --- a/docs/drvremote.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - libvirt: Remote management driver - - - - -
- -
-

Remote management driver

-
-
- - - diff --git a/docs/drvtest.html b/docs/drvtest.html deleted file mode 100644 index 9fcccdb801..0000000000 --- a/docs/drvtest.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - - libvirt: Test "mock" driver - - - - -
- -
-

Test "mock" driver

-

Connections to Test driver

-

- 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: -

-
-    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)
-    
-
-
- - - diff --git a/docs/drvuml.html b/docs/drvuml.html deleted file mode 100644 index fd4b0dbcb4..0000000000 --- a/docs/drvuml.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - libvirt: User Mode Linux driver - - - - -
- -
-

User Mode Linux driver

-

- 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. -

-

Connections to UML driver

-

- 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 -

-
-    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)
-    
-

Example XML configuration

-

- 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" -

-

- 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". -

-

- Once booted the primary console is connected toa PTY, and - thus accessible with "virsh console" or equivalent tools -

-
-<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>
-    
-
-
- - - diff --git a/docs/drvvbox.html b/docs/drvvbox.html deleted file mode 100644 index f6158a4f76..0000000000 --- a/docs/drvvbox.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - - libvirt: VirtualBox hypervisor driver - - - - -
- -
-

VirtualBox hypervisor driver

-

- The libvirt VirtualBox driver can manage any VirtualBox version - from version 2.2 onwards. -

-

Connections to VirtualBox driver

-

- 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: -

-
-    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)
-    
-

- Example domain XML config -

-
-    <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>
-    
-
-
- - - diff --git a/docs/drvxen.html b/docs/drvxen.html deleted file mode 100644 index 595b80393d..0000000000 --- a/docs/drvxen.html +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - - - - libvirt: Xen hypervisor driver - - - - -
- -
-

Xen hypervisor driver

- -

- The libvirt Xen driver provides the ability to manage virtual machines - on any Xen release from 3.0.1 onwards. -

-

- Deployment pre-requisites -

-

- The libvirt Xen driver uses a combination of channels to manage Xen - virtual machines. -

- -

- Connections to Xen driver -

-

- 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: -

-
-    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)
-    
-

- Import and export of libvirt domain XML configs -

-

The Xen driver currently supports two native - config formats. The first known as xen-xm is the format - used by the XM tool for files in /etc/xen. The second - known as xen-sxpr, is the format used for interacting - with the XenD's legacy HTTP RPC service.

-

- Converting from XM config files to domain XML -

-

- The virsh domxml-from-native 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. -

-
$ 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>
-    
-

- Converting from domain XML to XM config files -

-

- The virsh domxml-to-native provides a way to convert a - guest description using libvirt Domain XML, into the XM config file - format. -

-
# 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" ]
-    
-

- Example domain XML config -

-

- Below are some example XML configurations for Xen guest domains. - For full details of the available options, consult the domain XML format - guide. -

-

Paravirtualized guest bootloader

-

- Using a bootloader allows a paravirtualized guest to be booted using - a kernel stored inside its virtual disk image -

-
<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>
-

Paravirtualized guest direct kernel boot

-

- For installation of paravirtualized guests it is typical to boot the - domain using a kernel and initrd stored in the host OS -

-
<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>
-

Fullyvirtualized guest BIOS boot

-

- Fullyvirtualized guests use the emulated BIOS to boot off the primary - harddisk, CDROM or Network PXE ROM. -

-
<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>
-

Fullyvirtualized guest direct kernel boot

-

- 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. -

-
<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>
-
-
- - - diff --git a/docs/errors.html b/docs/errors.html deleted file mode 100644 index dad8c69d01..0000000000 --- a/docs/errors.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - libvirt: Handling of errors - - - - -
- -
-

Handling of errors

-

The main goals of libvirt when it comes to error handling are:

- -

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.

-

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

-

So error handling in the code is the following:

-
  1. if the error can be associated to a connection for example when failing - to look up a domain -
    1. if there is a callback associated to the connection set with virConnSetErrorFunc, - call it with the error information
    2. otherwise if there is a global callback set with virSetErrorFunc, - call it with the error information
    3. otherwise call virDefaultErrorFunc - which is the default error function of the library issuing the error - on stderr
    4. save the error in the connection for later retrieval with virConnGetLastError
  2. otherwise like when failing to create an hypervisor connection: -
    1. if there is a global callback set with virSetErrorFunc, - call it with the error information
    2. otherwise call virDefaultErrorFunc - which is the default error function of the library issuing the error - on stderr
    3. save the error in the connection for later retrieval with virGetLastError
-

In all cases the error information is provided as a virErrorPtr pointer to -read-only structure virError containing the -following fields:

- -

and then extra raw information about the error which may be initialized -to 0 or NULL if unused

- -

So usually, setting up specific error handling with libvirt consist of -registering an handler with with virSetErrorFunc or -with virConnSetErrorFunc, -check the value of the code value, take appropriate action, if needed let -libvirt print the error on stderr by calling virDefaultErrorFunc. -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 virResetError or virConnResetLastError -once an error has been processed fully.

-

At the python level, there only a global reporting callback function at -this point, see the error.py example about it:

-
def handler(ctxt, err):
-    global errno
-
-    #print "handler(%s, %s)" % (ctxt, err)
-    errno = err
-
-libvirt.registerErrorHandler(handler, 'context') 
-

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.

-
-
- - - diff --git a/docs/format.html b/docs/format.html deleted file mode 100644 index e8b14983fe..0000000000 --- a/docs/format.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - libvirt: XML Format - - - - -
- -
-

XML Format

-
-
- - - diff --git a/docs/formatcaps.html b/docs/formatcaps.html deleted file mode 100644 index 32401016db..0000000000 --- a/docs/formatcaps.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - libvirt: Driver capabilities XML format - - - - -
- -
-

Driver capabilities XML format

-

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:

-
    char * virConnectGetCapabilities (virConnectPtr conn);
-

The value returned is an XML document listing the virtualization -capabilities of the host and virtualization engine to which -@conn is connected. One can test it using virsh -command line tool command 'capabilities', 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

-
<capabilities>
-  <host>
-    <cpu>
-      <arch>x86_64</arch>
-      <features>
-        <vmx/>
-      </features>
-    </cpu>
-  </host>
-
-  <!-- xen-3.0-x86_64 -->
-  <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>
-
-  <!-- hvm-3.0-x86_32 -->
-  <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>
-  ...
-</capabilities>
-

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).

-

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.

-

The third block (in green) gives similar information but when running a -32 bit OS fully virtualized with Xen using the hvm support.

-

This section is likely to be updated and augmented in the future, see the -discussion which led to the capabilities format in the mailing-list -archives.

-
-
- - - diff --git a/docs/formatdomain.html b/docs/formatdomain.html deleted file mode 100644 index a7154577c2..0000000000 --- a/docs/formatdomain.html +++ /dev/null @@ -1,1025 +0,0 @@ - - - - - - - - - libvirt: Domain XML format - - - - -
- -
-

Domain XML format

- -

- This section describes the XML format used to represent domains, there are - variations on the format based on the kind of domains run and the options - used to launch them. For hypervisor specific details consult the - driver docs -

-

- Element and attribute overview -

-

- The root element required for all virtual machines is - named domain. It has two attributes, the - type specifies the hypervisor used for running - the domain. The allowed values are driver specific, but - include "xen", "kvm", "qemu", "lxc" and "kqemu". The - second attribute is id which is a unique - integer identifier for the running guest machine. Inactive - machines have no id value. -

-

- General metadata -

-
-      <domain type='xen' id='3'>
-        <name>fv0</name>
-        <uuid>4dea22b31d52d8f32516782e98ab3fa0</uuid>
-        ...
-
name
The content of the name element provides - a short name for the virtual machine. This name should - consist only of alpha-numeric characters and is required - to be unique within the scope of a single host. It is - often used to form the filename for storing the persistent - configuration file. Since 0.0.1
uuid
The content of the uuid element provides - a globally unique identifier for the virtual machine. - The format must be RFC 4122 compliant, eg 3e3fce45-4f53-4fa7-bb32-11f34168b82b. - If omitted when defining/creating a new machine, a random - UUID is generated. Since 0.0.1
-

- Operating system booting -

-

- There are a number of different ways to boot virtual machines - each with their own pros and cons. -

-

- BIOS bootloader -

-

- Booting via the BIOS is available for hypervisors supporting - full virtualization. In this case the BIOS has a boot order - priority (floppy, harddisk, cdrom, network) determining where - to obtain/find the boot image. -

-
-        ...
-        <os>
-          <type>hvm</type>
-          <loader>/usr/lib/xen/boot/hvmloader</loader>
-          <boot dev='hd'/>
-        </os>
-        ...
-
type
The content of the type element specifies the - type of operating system to be booted in the virtual machine. - hvm indicates that the OS is one designed to run - on bare metal, so requires full virtualization. linux - (badly named!) refers to an OS that supports the Xen 3 hypervisor - guest ABI. There are also two optional attributes, arch - specifying the CPU architecture to virtualization, and machine - referring to the machine type. The Capabilities XML - provides details on allowed values for these. Since 0.0.1
loader
The optional loader tag refers to a firmware blob - used to assist the domain creation process. At this time, it is - only needed by Xen fully virtualized domains. Since 0.1.0
boot
The dev attribute takes one of the values "fd", "hd", - "cdrom" or "network" and is used to specify the next boot device - to consider. The boot element can be repeated multiple - times to setup a priority list of boot devices to try in turn. - Since 0.1.3 -
-

- Host bootloader -

-

- Hypervisors employing paravirtualization do not usually emulate - a BIOS, and instead the host is responsible to kicking off the - operating system boot. This may use a pseudo-bootloader in the - host to provide an interface to choose a kernel for the guest. - An example is pygrub with Xen. -

-
-        ...
-	<bootloader>/usr/bin/pygrub</bootloader>
-	<bootloader_args>--append single</bootloader_args>
-        ...
-
bootloader
The content of the bootloader element provides - a fully qualified path to the bootloader executable in the - host OS. This bootloader will be run to choose which kernel - to boot. The required output of the bootloader is dependent - on the hypervisor in use. Since 0.1.0
bootloader_args
The optional bootloader_args element allows - command line arguments to be passed to the bootloader. - Since 0.2.3 -
-

- Direct kernel boot -

-

- When installing a new guest OS it is often useful to boot directly - from a kernel and initrd stored in the host OS, allowing command - line arguments to be passed directly to the installer. This capability - is usually available for both para and full virtualized guests. -

-
-        ...
-	<os>
-          <type>hvm</type>
-          <loader>/usr/lib/xen/boot/hvmloader</loader>
-          <kernel>/root/f8-i386-vmlinuz</kernel>
-          <initrd>/root/f8-i386-initrd</initrd>
-          <cmdline>console=ttyS0 ks=http://example.com/f8-i386/os/</cmdline>
-	</os>
-	...
-
type
This element has the same semantics as described earlier in the - BIOS boot section
loader
This element has the same semantics as described earlier in the - BIOS boot section
kernel
The contents of this element specify the fully-qualified path - to the kernel image in the host OS.
initrd
The contents of this element specify the fully-qualified path - to the (optional) ramdisk image in the host OS.
cmdline
The contents of this element specify arguments to be passed to - the kernel (or installer) at boottime. This is often used to - specify an alternate primary console (eg serial port), or the - installation media source / kickstart file
-

- Basic resources -

-
-        ...
-	<memory>524288</memory>
-	<currentMemory>524288</currentMemory>
-	<memoryBacking>
-	  <hugepages/>
-        </memoryBacking>
-	<vcpu>1</vcpu>
-	...
-
memory
The maximum allocation of memory for the guest at boot time. - The units for this value are kilobytes (i.e. blocks of 1024 bytes)
currentMemory
The actual allocation of memory for the guest. This value - be less than the maximum allocation, to allow for ballooning - up the guests memory on the fly. If this is omitted, it defaults - to the same value as the memory element
memoryBacking
The optional memoryBacking element, may have an - hugepages element set within it. This tells the - hypervisor that the guest should have its memory allocated using - hugepages instead of the normal native page size.
vcpu
The content of this element defines the number of virtual - CPUs allocated for the guest OS.
-

- Lifecycle control -

-

- It is sometimes necessary to override the default actions taken - when a guest OS triggers a lifecycle operation. The following - collections of elements allow the actions to be specified. A - common use case is to force a reboot to be treated as a poweroff - when doing the initial OS installation. This allows the VM to be - re-configured for the first post-install bootup. -

-
-        ...
-	<on_poweroff>destroy</on_poweroff>
-	<on_reboot>restart</on_reboot>
-	<on_crash>restart</on_crash>
-	...
-
on_poweroff
The content of this element specifies the action to take when - the guest requests a poweroff.
on_reboot
The content of this element specifies the action to take when - the guest requests a reboot.
on_crash
The content of this element specifies the action to take when - the guest crashes.
-

- Each of these states allow for the same four possible actions. -

-
destroy
The domain will be terminated completely and all resources - released
restart
The domain will be terminated, and then restarted with - the same configuration
preserve
The domain will be terminated, and its resource preserved - to allow analysis.
rename-restart
The domain will be terminated, and then restarted with - a new name
-

- Hypervisor features -

-

- Hypervisors may allow certain CPU / machine features to be - toggled on/off. -

-
-        ...
-	<features>
-	  <pae/>
-	  <acpi/>
-	  <apic/>
-	</features>
-	...
-

- All features are listed within the features - element, omitting a togglable feature tag turns it off. - The available features can be found by asking - for the capabilities XML, - but a common set for fully virtualized domains are: -

-
pae
Physical address extension mode allows 32-bit guests - to address more than 4 GB of memory.
acpi
ACPI is useful for power management, for example, with - KVM guests it is required for graceful shutdown to work. -
-

- Time keeping -

-

- The guest clock is typically initialized from the host clock. - Most operating systems expect the hardware clock to be kept - in UTC, and this is the default. Windows, however, expects - it to be in so called 'localtime'. -

-
-        ...
-        <clock offset="localtime"/>
-	...
-
clock
The sync attribute takes either "utc" or - "localtime" to specify how the guest clock is initialized - in relation to the host OS. -
-

- Devices -

-

- The final set of XML elements are all used to describe devices - provided to the guest domain. All devices occur as children - of the main devices element. - Since 0.1.3 -

-
-        ...
-        <devices>
-	  <emulator>/usr/lib/xen/bin/qemu-dm</emulator>
-          ...
-
emulator
- The contents of the emulator element specify - the fully qualified path to the device model emulator binary. - The capabilities XML specifies - the recommended default emulator to use for each particular - domain type / architecture combination. -
-

- Hard drives, floppy disks, CDROMs -

-

- Any device that looks like a disk, be it a floppy, harddisk, - cdrom, or paravirtualized driver is specified via the disk - element. -

-
-          ...
-	  <disk type='file'>
-	    <driver name="tap" type="aio">
-	    <source file='/var/lib/xen/images/fv0'/>
-	    <target dev='hda' bus='ide'/>
-            <encryption type='...'>
-              ...
-            </encryption>
-	  </disk>
-	  ...
-
disk
The disk element is the main container for describing - disks. The type attribute is either "file" or "block" - and refers to the underlying source for the disk. The optional - device attribute indicates how the disk is to be exposed - to the guest OS. Possible values for this attribute are "floppy", "disk" - and "cdrom", defaulting to "disk". - Since 0.0.3; "device" attribute since 0.1.4
source
If the disk type is "file", then the file attribute - specifies the fully-qualified path to the file holding the disk. If the disk - type is "block", then the dev attribute specifies - the path to the host device to serve as the disk. Since 0.0.3
target
The target element controls the bus / device under which the - disk is exposed to the guest OS. The dev attribute indicates - the "logical" device name. The actual device name specified is not guaranteed to map to - the device name in the guest OS. Treat it as a device ordering hint. - The optional bus attribute specifies the type of disk device - to emulate; possible values are driver specific, with typical values being - "ide", "scsi", "virtio", "xen" or "usb". If omitted, the bus type is - inferred from the style of the device name. eg, a device named 'sda' - will typically be exported using a SCSI bus. - Since 0.0.3; bus attribute since 0.4.3; - "usb" attribute value since after 0.4.4
driver
If the hypervisor supports multiple backend drivers, then the optional - driver element allows them to be selected. The name - attribute is the primary backend driver name, while the optional type - attribute provides the sub-type. Since 0.1.8 -
encryption
If present, specifies how the volume is encrypted. See - the Storage Encryption page - for more information. -
-

- USB and PCI devices -

-

- USB and PCI devices attached to the host can be passed through to the guest using - the hostdev element. since after - 0.4.4 for USB and 0.6.0 for PCI (KVM only): -

-
-          ...
-	  <hostdev mode='subsystem' type='usb'>
-	    <source>
-	      <vendor id='0x1234'/>
-	      <product id='0xbeef'/>
-	    </source>
-	  </hostdev>
-	  ...
-

or:

-
-          ...
-	  <hostdev mode='subsystem' type='pci'>
-	    <source>
-	      <address bus='0x06' slot='0x02' function='0x0'/>
-	    </source>
-	  </hostdev>
-	  ...
-
hostdev
The hostdev element is the main container for describing - host devices. For usb device passthrough mode is always - "subsystem" and type is "usb" for an USB device and "pci" - for a PCI device.. -
source
The source element describes the device as seen from the host. - The USB device can either be addressed by vendor / product id using the - vendor and product elements or by the device's - address on the hosts using the address element. - PCI devices on the other hand can only be described by their - address
vendor, product
The vendor and product elements each have an - id attribute that specifies the USB vendor and product id. - The ids can be given in decimal, hexadecimal (starting with 0x) or - octal (starting with 0) form.
address
The address element for USB devices has a - bus and device attribute to specify the - USB bus and device number the device appears at on the host. - The values of these attributes can be given in decimal, hexadecimal - (starting with 0x) or octal (starting with 0) form. - For PCI devices the element carries 3 attributes allowing to designate - the device as can be found with the lspci or - with virsh nodedev-list. The - bus attribute allows the hexadecimal values 0 to ff, the - slot attribute allows the hexadecimal values 0 to 1f, and - the function attribute allows the hexadecimal values 0 to - 7. There is also an optional domain attribute for the - PCI domain, with hexadecimal values 0 to ffff, but it is currently - not used by qemu.
-

- Network interfaces -

-
-          ...
-	  <interface type='bridge'>
-	    <source bridge='xenbr0'/>
-	    <mac address='00:16:3e:5d:c7:9e'/>
-	    <script path='vif-bridge'/>
-	  </interface>
-	  ...
-
- Virtual network -
-

- - This is the recommended config for general guest connectivity on - hosts with dynamic / wireless networking configs - -

-

- Provides a virtual network using a bridge device in the host. - Depending on the virtual network configuration, the network may be - totally isolated, NAT'ing to an explicit network device, or NAT'ing to - the default route. DHCP and DNS are provided on the virtual network in - all cases and the IP range can be determined by examining the virtual - network config with 'virsh net-dumpxml [networkname]'. - There is one virtual network called 'default' setup out - of the box which does NAT'ing to the default route and has an IP range of - 192.168.22.0/255.255.255.0. Each guest will have an - associated tun device created with a name of vnetN, which can also be - overridden with the <target> element. -

-
-      ...
-      <interface type='network'>
-        <source network='default'/>
-      </interface>
-      ...
-      <interface type='network'>
-        <source network='default'/>
-        <target dev='vnet7'/>
-        <mac address="11:22:33:44:55:66"/>
-      </interface>
-      ...
-
- Bridge to to LAN -
-

- - This is the recommended config for general guest connectivity on - hosts with static wired networking configs - -

-

- Provides a bridge from the VM directly onto the LAN. This assumes - there is a bridge device on the host which has one or more of the hosts - physical NICs enslaved. The guest VM will have an associated tun device - created with a name of vnetN, which can also be overridden with the - <target> element. The tun device will be enslaved to the bridge. - The IP range / network configuration is whatever is used on the LAN. This - provides the guest VM full incoming & outgoing net access just like a - physical machine. -

-
-      ...
-      <interface type='bridge'>
-        <source bridge='br0'/>
-      </interface>
-
-      <interface type='bridge'>
-        <source bridge='br0'/>
-        <target dev='vnet7'/>
-        <mac address="11:22:33:44:55:66"/>
-      </interface>
-      ...
-
- Userspace SLIRP stack -
-

- Provides a virtual LAN with NAT to the outside world. The virtual - network has DHCP & DNS services and will give the guest VM addresses - starting from 10.0.2.15. The default router will be - 10.0.2.2 and the DNS server will be 10.0.2.3. - This networking is the only option for unprivileged users who need their - VMs to have outgoing access. -

-
-      ...
-      <interface type='user'/>
-      ...
-      <interface type='user'>
-        <mac address="11:22:33:44:55:66"/>
-      </interface>
-      ...
-
- Generic ethernet connection -
-

- Provides a means for the administrator to execute an arbitrary script - to connect the guest's network to the LAN. The guest will have a tun - device created with a name of vnetN, which can also be overridden with the - <target> element. After creating the tun device a shell script will - be run which is expected to do whatever host network integration is - required. By default this script is called /etc/qemu-ifup but can be - overridden. -

-
-      ...
-      <interface type='ethernet'/>
-      ...
-      <interface type='ethernet'>
-        <target dev='vnet7'/>
-        <script path='/etc/qemu-ifup-mynet'/>
-      </interface>
-      ...
-
- Multicast tunnel -
-

- A multicast group is setup to represent a virtual network. Any VMs - whose network devices are in the same multicast group can talk to each - other even across hosts. This mode is also available to unprivileged - users. There is no default DNS or DHCP support and no outgoing network - access. To provide outgoing network access, one of the VMs should have a - 2nd NIC which is connected to one of the first 4 network types and do the - appropriate routing. The multicast protocol is compatible with that used - by user mode linux guests too. The source address used must be from the - multicast address block. -

-
-      ...
-      <interface type='mcast'>
-        <source address='230.0.0.1' port='5558'/>
-      </interface>
-      ...
-
- TCP tunnel -
-

- A TCP client/server architecture provides a virtual network. One VM - provides the server end of the network, all other VMS are configured as - clients. All network traffic is routed between the VMs via the server. - This mode is also available to unprivileged users. There is no default - DNS or DHCP support and no outgoing network access. To provide outgoing - network access, one of the VMs should have a 2nd NIC which is connected - to one of the first 4 network types and do the appropriate routing.

-
-      ...
-      <interface type='server'>
-        <source address='192.168.0.1' port='5558'/>
-      </interface>
-      ...
-      <interface type='client'>
-      <source address='192.168.0.1' port='5558'/>
-      </interface>
-      ...
-
- Setting the NIC model -
-
-      ...
-      <interface type='network'>
-        <source network='default'/>
-        <target dev='vnet1'/>
-        <model type='ne2k_pci'/>
-      </interface>
-      ...
-

- For hypervisors which support this, you can set the model of - emulated network interface card. -

-

- The values for type aren't defined specifically by - libvirt, but by what the underlying hypervisor supports (if - any). For QEMU and KVM you can get a list of supported models - with these commands: -

-
-qemu -net nic,model=? /dev/null
-qemu-kvm -net nic,model=? /dev/null
-
-

- Typical values for QEMU and KVM include: - ne2k_isa i82551 i82557b i82559er ne2k_pci pcnet rtl8139 e1000 virtio -

-

- Input devices -

-

- Input devices allow interaction with the graphical framebuffer in the guest - virtual machine. When enabling the framebuffer, an input device is automatically - provided. It may be possible to add additional devices explicitly, for example, - to provide a graphics tablet for absolute cursor movement. -

-
-          ...
-	  <input type='mouse' bus='usb'/>
-	  ...
-
input
The input element has one mandatory attribute, the type - whose value can be either 'mouse' or 'tablet'. The latter provides absolute - cursor movement, while the former uses relative movement. The optional - bus attribute can be used to refine the exact device type. - It takes values "xen" (paravirtualized), "ps2" and "usb".
-

- Graphical framebuffers -

-

- A graphics device allows for graphical interaction with the - guest OS. A guest will typically have either a framebuffer - or a text console configured to allow interaction with the - admin. -

-
-          ...
-	  <graphics type='vnc' port='5904'/>
-	  ...
-
graphics
The graphics element has a mandatory type - attribute which takes the value "sdl" or "vnc". The former displays - a window on the host desktop, while the latter activates a VNC server. - The former accepts 3 optional arguments: a display - attribute for the display to use, an xauth attribute for - the authentication identifier, and an optional fullscreen - attribute accepting values 'yes' or 'no'. - If the latter is used the port attribute specifies the TCP - port number (with -1 as legacy syntax indicating that it should be - auto-allocated). The autoport attribute is the new - preferred syntax for indicating autoallocation of the TCP port to use. - The listen attribute is an IP address for the server to - listen on. The passwd attribute provides a VNC password - in clear text. The keymap attribute specifies the keymap - to use.
-

- Consoles, serial & parallel devices -

-

- A character device provides a way to interact with the virtual machine. - Paravirtualized consoles, serial ports and parallel ports are all - classed as character devices and so represented using the same syntax. -

-
-        ...
-        <parallel type='pty'>
-	  <source path='/dev/pts/2'/>
-	  <target port='0'/>
-        </parallel>
-        <serial type='pty'>
-	  <source path='/dev/pts/3'/>
-	  <target port='0'/>
-        </serial>
-        <console type='pty'>
-	  <source path='/dev/pts/4'/>
-	  <target port='0'/>
-        </console>
-        </devices>
-      </domain>
-
parallel
Represents a parallel port
serial
Represents a serial port
console
Represents the primary console. This can be the paravirtualized - console with Xen guests, or duplicates the primary serial port - for fully virtualized guests without a paravirtualized console.
source
The attributes available for the source element - vary according to the type attribute on the parent - tag. Allowed variations will be described below
target
The port number of the character device is specified via the - port attribute, numbered starting from 1. There is - usually only one console device, and 0, 1 or 2 serial devices - or parallel devices. -
-
- Domain logfile -
-

- This disables all input on the character device, and sends output - into the virtual machine's logfile -

-
-      ...
-      <console type='stdio'>
-        <target port='1'>
-      </console>
-      ...
-
- Device logfile -
-

- A file is opened and all data sent to the character - device is written to the file. -

-
-      ...
-      <serial type="file">
-        <source path="/var/log/vm/vm-serial.log"/>
-        <target port="1"/>
-      </serial>
-      ...
-
- Virtual console -
-

- Connects the character device to the graphical framebuffer in - a virtual console. This is typically accessed via a special - hotkey sequence such as "ctrl+alt+3" -

-
-      ...
-      <serial type='vc'>
-        <target port="1"/>
-      </serial>
-      ...
-
- Null device -
-

- Connects the character device to the void. No data is ever - provided to the input. All data written is discarded. -

-
-      ...
-      <serial type='null'>
-        <target port="1"/>
-      </serial>
-      ...
-
- Pseudo TTY -
-

- A Pseudo TTY is allocated using /dev/ptmx. A suitable client - such as 'virsh console' can connect to interact with the - serial port locally. -

-
-      ...
-      <serial type="pty">
-        <source path="/dev/pts/3"/>
-        <target port="1"/>
-      </serial>
-      ...
-

- NB special case if <console type='pty'>, then the TTY - path is also duplicated as an attribute tty='/dev/pts/3' - on the top level <console> tag. This provides compat - with existing syntax for <console> tags. -

-
- Host device proxy -
-

- The character device is passed through to the underlying - physical character device. The device types must match, - eg the emulated serial port should only be connected to - a host serial port - don't connect a serial port to a parallel - port. -

-
-      ...
-      <serial type="dev">
-        <source path="/dev/ttyS0"/>
-        <target port="1"/>
-      </serial>
-      ...
-
- Named pipe -
-

- The character device writes output to a named pipe. See pipe(7) for - more info. -

-
-      ...
-      <serial type="pipe">
-        <source path="/tmp/mypipe"/>
-        <target port="1"/>
-      </serial>
-      ...
-
- TCP client/server -
-

- The character device acts as a TCP client connecting to a - remote server. -

-
-      ...
-      <serial type="tcp">
-        <source mode="connect" host="0.0.0.0" service="2445"/>
-        <protocol type="raw"/>
-        <target port="1"/>
-      </serial>
-      ...
-

- Or as a TCP server waiting for a client connection. -

-
-      ...
-      <serial type="tcp">
-        <source mode="bind" host="127.0.0.1" service="2445"/>
-        <protocol type="raw"/>
-        <target port="1"/>
-      </serial>
-      ...
-

- Alternatively you can use telnet instead of raw TCP. -

-

- -

-
-      ...
-      <serial type="tcp">
-        <source mode="connect" host="0.0.0.0" service="2445"/>
-        <protocol type="telnet"/>
-        <target port="1"/>
-      </serial>
-      ...
-      <serial type="tcp">
-        <source mode="bind" host="127.0.0.1" service="2445"/>
-        <protocol type="telnet"/>
-        <target port="1"/>
-      </serial>
-      ...
-
- UDP network console -
-

- The character device acts as a UDP netconsole service, - sending and receiving packets. This is a lossy service. -

-
-      ...
-      <serial type="udp">
-        <source mode="bind" host="0.0.0.0" service="2445"/>
-        <source mode="connect" host="0.0.0.0" service="2445"/>
-        <target port="1"/>
-      </serial>
-      ...
-
- UNIX domain socket client/server -
-

- The character device acts as a UNIX domain socket server, - accepting connections from local clients. -

-
-      ...
-      <serial type="unix">
-        <source mode="bind" path="/tmp/foo"/>
-        <target port="1"/>
-      </serial>
-      ...
-

- Sound devices -

-

- A virtual sound card can be attached to the host via the - sound element. Since 0.4.3 -

-
-      ...
-      <sound model='es1370'/>
-      ...
-
sound
- The sound element has one mandatory attribute, - model, which specifies what real sound device is emulated. - Valid values are specific to the underlying hypervisor, though typical - choices are 'es1370', 'sb16', and 'ac97' - ('ac97' only since 0.6.0) -
-

- Example configs -

-

- Example configurations for each driver are provide on the - driver specific pages listed below -

- -
-
- - - diff --git a/docs/formatnetwork.html b/docs/formatnetwork.html deleted file mode 100644 index 845e55855e..0000000000 --- a/docs/formatnetwork.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - - - libvirt: Network XML format - - - - -
- -
-

Network XML format

- -

- This page provides an introduction to the network XML format. For background - information on the concepts referred to here, consult the network driver architecture - page. -

-

- Element and attribute overview -

-

- The root element required for all virtual networks is - named network and has no attributes. - The network XML format is available since 0.3.0 -

-

- General metadata -

-

- The first elements provide basic metadata about the virtual - network. -

-
-      <network>
-        <name>default</name>
-        <uuid>3e3fce45-4f53-4fa7-bb32-11f34168b82b</uuid>
-        ...
-
name
The content of the name 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. Since 0.3.0
uuid
The content of the uuid element provides - a globally unique identifier for the virtual network. - The format must be RFC 4122 compliant, eg 3e3fce45-4f53-4fa7-bb32-11f34168b82b. - If omitted when defining/creating a new network, a random - UUID is generated. Since 0.3.0
-

- Connectivity -

-

- The next set of elements control how a virtual network is - provided connectivity to the physical LAN (if at all). -

-
-        ...
-        <bridge name="virbr0" />
-	<forward mode="nat" dev="eth0"/>
-	...
-
bridge
The name attribute on the bridge 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 vir, but the name - virbr0 is reserved for the "default" virtual network. - This element should always be provided when defining a new network. - Since 0.3.0 -
forward
Inclusion of the forward 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 dev attribute - is set, the firewall rules will restrict forwarding to the named - device only. If the mode attribute is set to route - 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. Since 0.3.0; 'mode' attribute since - 0.4.2
-

- Addressing -

-

- The final set of elements define the IPv4 address range available, - and optionally enable DHCP sevices. -

-
-        ...
-	<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>
-
ip
The address 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 netmask - attribute defines the significant bits of the network address, - again specified in dotted-decimal format. Since 0.3.0 -
dhcp
Immediately within the ip element there is an - optional dhcp element. The presence of this element - enables DHCP services on the virtual network. It will further - contain one or more range elements. - Since 0.3.0 -
range
The start and end attributes on the - range 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 - ip element. Since 0.3.0 -
host
Within the dhcp element there may be zero or more - host 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 mac attribute), the IP to be - assigned to that host (via the ip attribute), and the - name to be given that host by the DHCP server (via the - name attribute). Since 0.4.5 -
-

- Example configuration -

-

- NAT based network -

-

- 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. -

-
-      <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>
-

- Routed network config -

-

- 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 - eth1 host network device. -

-
-      <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>
-

- Isolated network config -

-

- 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 forward element in the XML - description. -

-
-      <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>
-
-
- - - diff --git a/docs/formatnode.html b/docs/formatnode.html deleted file mode 100644 index b269baa0d7..0000000000 --- a/docs/formatnode.html +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - libvirt: Node devices XML format - - - - -
- -
-

Node devices XML format

-
-
- - - diff --git a/docs/formatsecret.html b/docs/formatsecret.html deleted file mode 100644 index 5fd62227b7..0000000000 --- a/docs/formatsecret.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - libvirt: Secret XML format - - - - -
- -
-

Secret XML format

- -

- Secret XML -

-

- Secrets stored by libvirt may have attributes associated with them, using - the secret element. The secret element has two - optional attributes, each with values 'yes' and - 'no', and defaulting to 'no': -

-
ephemeral
This secret must only be kept in memory, never stored persistently. -
private
The value of the secret must not be revealed to any caller of libvirt, - nor to any other node. -
-

- The top-level secret element may contain the following - elements: -

-
uuid
- An unique identifier for this secret (not necessarily in the UUID - format). If omitted when defining a new secret, a random UUID is - generated. -
description
A human-readable description of the purpose of the secret. -
usage
- Specifies what this secret is used for. A mandatory - type attribute specifies the usage category, currently - only volume is defined. Specific usage categories are - described below. -
-

Usage type "volume"

-

- This secret is associated with a volume, and it is safe to delete the - secret after the volume is deleted. The <usage - type='volume'> element must contain a - single volume element that specifies the key of the volume - this secret is associated with. -

-

- Example -

-
-      <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>
-
-
- - - diff --git a/docs/formatstorage.html b/docs/formatstorage.html deleted file mode 100644 index cb95263f3f..0000000000 --- a/docs/formatstorage.html +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - - - - libvirt: Storage pool and volume XML format - - - - -
- -
-

Storage pool and volume XML format

- -

- Storage pool XML -

-

- 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. -

-

- The is the top level tag for a storage pool document is 'pool'. It has - a single attribute type, which is one of dir, - fs,netfs,disk,iscsi, - logical. This corresponds to the storage backend drivers - listed further along in this document. - The storage pool XML format is available since 0.4.1 -

-

- General metadata -

-
-      <pool type="iscsi">
-        <name>virtimages</name>
-        <uuid>3e3fce45-4f53-4fa7-bb32-11f34168b82b</uuid>
-        <allocation>10000000</allocation>
-        <capacity>50000000</capacity>
-        <available>40000000</available>
-        ...
-
name
Providing a name for the pool which is unique to the host. - This is mandatory when defining a pool. Since 0.4.1
uuid
Providing an identifier for the pool which is globally unique. - This is optional when defining a pool, a UUID will be generated if - omitted. Since 0.4.1
allocation
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. Since 0.4.1
capacity
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. Since 0.4.1
available
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. Since 0.4.1
-

- Source elements -

-

- A single source element is contained within the top level - pool element. This tag is used to describe the source of - the storage pool. It can contain the following child elements: -

-
-        ...
-        <source>
-          <host name="iscsi.example.com"/>
-          <device path="demo-target"/>
-        </source>
-	...
-
device
Provides the source for pools backed by physical devices. - May be repeated multiple times depending on backend driver. Contains - a single attribute path which is the fully qualified - path to the block device node. Since 0.4.1
directory
Provides the source for pools backed by directories. May - only occur once. Contains a single attribute path - which is the fully qualified path to the block device node. - Since 0.4.1
host
Provides the source for pools backed by storage from a - remote server. Will be used in combination with a directory - or device element. Contains an attribute name - which is the hostname or IP address of the server. May optionally - contain a port attribute for the protocol specific - port number. Since 0.4.1
name
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. - Since 0.4.5
format
Provides information about the format of the pool. This - contains a single attribute type 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. Since 0.4.1
-

- Target elements -

-

- A single target element is contained within the top level - pool element. This tag is used to describe the mapping of - the storage pool into the host filesystem. It can contain the following - child elements: -

-
-        ...
-        <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>
-
path
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 /dev/ 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 /dev/disk/by-{path,id,uuid,label locations. - Since 0.4.1 -
permissions
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 - mode element contains the octal permission set. The - owner element contains the numeric user ID. The group - element contains the numeric group ID. The label element - contains the MAC (eg SELinux) label string. - Since 0.4.1 -
encryption
If present, specifies how the volume is encrypted. See - the Storage Encryption page - for more information. -
-

- Device extents -

-

- If a storage pool exposes information about its underlying - placement / allocation scheme, the device element - within the source 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 -

-

- For storage pools supporting extent information, within each - device element there will be zero or more freeExtent - elements. Each of these elements contains two attributes, start - and end which provide the boundaries of the extent on the - device, measured in bytes. Since 0.4.1 -

-

- Storage volume XML -

-

- A storage volume will be either a file or a device node. - The storage volume XML format is available since 0.4.1 -

-

- General metadata -

-
-      <volume>
-	<name>sparse.img</name>
-	<key>/var/lib/xen/images/sparse.img</key>
-        <allocation>0</allocation>
-	<capacity unit="T">1</capacity>
-        ...
-
name
Providing a name for the volume which is unique to the pool. - This is mandatory when defining a volume. Since 0.4.1
key
Providing an identifier for the volume which is globally unique. - This is optional when defining a volume, a key will be generated if - omitted. Since 0.4.1
allocation
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 option of deciding - to sparsely allocate a volume. It does not have to honour requests - for sparse allocation though. Since 0.4.1
capacity
Providing the logical capacity for the volume. This value is - in bytes. This is compulsory when creating a volume. - Since 0.4.1
source
Provides information about the underlying storage allocation - of the volume. This may not be available for some pool types. - Since 0.4.1
target
Provides information about the representation of the volume - on the local host. Since 0.4.1
-

- Target elements -

-

- A single target element is contained within the top level - volume element. This tag is used to describe the mapping of - the storage volume into the host filesystem. It can contain the following - child elements: -

-
-        ...
-	<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>
-
path
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. - Since 0.4.1
format
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 type attribute. Consult the pool-specific docs for - the list of valid values. Since 0.4.1
permissions
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 - mode element contains the octal permission set. The - owner element contains the numeric user ID. The group - element contains the numeric group ID. The label element - contains the MAC (eg SELinux) label string. - Since 0.4.1 -
-

- Backing store elements -

-

- A single backingStore element is contained within the top level - volume 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: -

-
-        ...
-        <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>
-
path
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. - Since 0.6.0
format
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. - Since 0.6.0
permissions
Provides information about the permissions of the backing file. - It contains 4 child elements. The - mode element contains the octal permission set. The - owner element contains the numeric user ID. The group - element contains the numeric group ID. The label element - contains the MAC (eg SELinux) label string. - Since 0.6.0 -
-

- Example configuration -

-

- Here are a couple of examples, for a more complete set demonstrating - every type of storage pool, consult the storage driver page -

-

- File based storage pool -

-
-      <pool type="dir">
-        <name>virtimages</name>
-        <target>
-          <path>/var/lib/virt/images</path>
-        </target>
-      </pool>
-

- iSCSI based storage pool -

-
-      <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>
-

- Storage volume -

-
-      <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>
-
-
- - - diff --git a/docs/formatstorageencryption.html b/docs/formatstorageencryption.html deleted file mode 100644 index 15175fe5fb..0000000000 --- a/docs/formatstorageencryption.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - - libvirt: Storage volume encryption XML format - - - - -
- -
-

Storage volume encryption XML format

- -

- Storage volume encryption XML -

-

- 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. -

-

- The top-level tag of volume encryption specification - is encryption, with a mandatory - attribute format. Currently defined values - of format are default and qcow. - Each value of format implies some expectations about the - content of the encryption tag. Other format values may be - defined in the future. -

-

- The encryption tag can currently contain a sequence of - secret tags, each with mandatory attributes type - and uuid. The only currently defined value of - type is passphrase. uuid - refers to a secret known to libvirt. libvirt can use a secret value - previously set using virSecretSetValue(), 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 uuid. -

-

-

-

- "default" format -

-

- <encryption type="default"/> 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 encryption tag will be updated. - The unmodified contents of the encryption tag can be used - in later operations with the volume, or when setting up a domain that - uses the volume. -

-

- "qcow" format -

-

- The qcow format specifies that the built-in encryption - support in qcow- or qcow2-formatted volume - images should be used. A single - <secret type='passphrase'> element is expected. If - the secret element is not present during volume creation, - a secret is automatically generated and attached to the volume. -

-

- Example -

-

- Here is a simple example, specifying use of the qcow format: -

-
-      <encryption format='qcow'>
-         <secret type='passphrase' uuid='c1f11a6d-8c5d-4a3e-ac7a-4e171c5e0d4a' />
-      </encryption>
-
-
- - - diff --git a/docs/goals.html b/docs/goals.html deleted file mode 100644 index b25b0d3334..0000000000 --- a/docs/goals.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - libvirt: Terminology and goals - - - - -
- -
-

Terminology and goals

-

To avoid ambiguity about the terms used, here are the definitions - for some of the specific concepts used in libvirt documentation:

- -

- Hypervisor and domains running on a node

-

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.

-

This implies the following sub-goals:

- -

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).

-
-
- - - diff --git a/docs/hacking.html b/docs/hacking.html deleted file mode 100644 index ee4b094a95..0000000000 --- a/docs/hacking.html +++ /dev/null @@ -1,489 +0,0 @@ - - - - - - - - - libvirt: Contributor guidelines - - - - -
- -
-

Contributor guidelines

- -

- General tips for contributing patches -

-
  1. Discuss any large changes on the mailing list first. Post patches - early and listen to feedback.
  2. Post patches in unified diff format. A command similar to this - should work:

    -
    -  diff -urp libvirt.orig/ libvirt.modified/ > libvirt-myfeature.patch
    -
    -

    - or: -

    -
    -  cvs diff -up > libvirt-myfeature.patch
    -
  3. 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.
  4. Make sure your patches apply against libvirt CVS. Developers - only follow CVS and don't care much about released versions.
  5. Run the automated tests on your code before submitting any changes. - In particular, configure with compile warnings set to -Werror:

    -
    -  ./configure --enable-compile-warnings=error
    -
    -

    - and run the tests: -

    -
    -  make check
    -  make syntax-check
    -  make -C tests valgrind
    -
    -

    - The latter test checks for memory leaks. -

    - -
  6. Update tests and/or documentation, particularly if you are adding - a new feature or changing the output of a program.
-

- There is more on this subject, including lots of links to background - reading on the subject, on - - Richard Jones' guide to working with open source projects -

-

- Code indentation -

-

- 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. -

-

- 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: -

-
-  ;;; 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))))
-
-

- Code formatting (especially for new code) -

-

- 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: -

-
-  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 "$@"
-  }
-
-

- 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. -

-

- C types -

-

- Use the right type. -

-

Scalars

- -

- 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. -

-

- 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. -

-

- 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. -

-

Pointers

-

- 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. -

-

- Low level memory management -

-

- 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 -

- -

- String comparisons -

-

- Do not use the strcmp, strncmp, etc functions directly. Instead use - one of the following semantically named macros -

- -

- Variable length string buffer -

-

- 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 -

-

eg typical usage is as follows:

-
-  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);
-  }
-
-

- Include files -

-

- 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: -

-
-  /*
-   * 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.
-  {
-    ...
-
-

- 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. -

-

- Printf-style functions -

-

- 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: -

-
-    int virAsprintf(char **strp, const char *fmt, ...)
-	ATTRIBUTE_FORMAT(printf, 2, 3);
-
-

- 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. -

-

- Libvirt commiters guidelines -

-

- The AUTHORS files indicates the list of people with commit acces right - who can actually merge the patches. -

-

- 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 -

-

- Exceptions to that 'review and approval on the list first' is fixing failures - to build: -

- -
-
- - - diff --git a/docs/html/.gitignore b/docs/html/.gitignore new file mode 100644 index 0000000000..2d19fc766d --- /dev/null +++ b/docs/html/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/docs/html/index.html b/docs/html/index.html deleted file mode 100644 index 586c0ac615..0000000000 --- a/docs/html/index.html +++ /dev/null @@ -1,7 +0,0 @@ - - -libvirt: Reference Manual for libvirt

Reference Manual for libvirt

Table of Contents

diff --git a/docs/html/libvirt-libvirt.html b/docs/html/libvirt-libvirt.html deleted file mode 100644 index e42fa738e7..0000000000 --- a/docs/html/libvirt-libvirt.html +++ /dev/null @@ -1,606 +0,0 @@ - - -libvirt: Module libvirt from libvirt

Module libvirt from libvirt

Provides the interfaces of the libvirt library to handle virtualized domains

Table of Contents

Macros

#define LIBVIR_VERSION_NUMBER
-#define VIR_COPY_CPUMAP
-#define VIR_CPU_MAPLEN
-#define VIR_CPU_USABLE
-#define VIR_DOMAIN_SCHED_FIELD_LENGTH
-#define VIR_GET_CPUMAP
-#define VIR_NODEINFO_MAXCPUS
-#define VIR_SECURITY_DOI_BUFLEN
-#define VIR_SECURITY_LABEL_BUFLEN
-#define VIR_SECURITY_MODEL_BUFLEN
-#define VIR_UNUSE_CPU
-#define VIR_USE_CPU
-#define VIR_UUID_BUFLEN
-#define VIR_UUID_STRING_BUFLEN
-

Types

typedef struct _virConnect virConnect
-typedef struct _virConnectAuth virConnectAuth
-typedef virConnectAuth * virConnectAuthPtr
-typedef struct _virConnectCredential virConnectCredential
-typedef virConnectCredential * virConnectCredentialPtr
-typedef enum virConnectCredentialType
-typedef enum virConnectFlags
-typedef virConnect * virConnectPtr
-typedef struct _virDomain virDomain
-typedef virDomainBlockStatsStruct * virDomainBlockStatsPtr
-typedef struct _virDomainBlockStats virDomainBlockStatsStruct
-typedef enum virDomainCreateFlags
-typedef enum virDomainEventDefinedDetailType
-typedef enum virDomainEventResumedDetailType
-typedef enum virDomainEventStartedDetailType
-typedef enum virDomainEventStoppedDetailType
-typedef enum virDomainEventSuspendedDetailType
-typedef enum virDomainEventType
-typedef enum virDomainEventUndefinedDetailType
-typedef struct _virDomainInfo virDomainInfo
-typedef virDomainInfo * virDomainInfoPtr
-typedef virDomainInterfaceStatsStruct * virDomainInterfaceStatsPtr
-typedef struct _virDomainInterfaceStats virDomainInterfaceStatsStruct
-typedef enum virDomainMemoryFlags
-typedef enum virDomainMigrateFlags
-typedef virDomain * virDomainPtr
-typedef enum virDomainState
-typedef enum virDomainXMLFlags
-typedef enum virEventHandleType
-typedef struct _virInterface virInterface
-typedef virInterface * virInterfacePtr
-typedef struct _virNetwork virNetwork
-typedef virNetwork * virNetworkPtr
-typedef struct _virNodeDevice virNodeDevice
-typedef virNodeDevice * virNodeDevicePtr
-typedef struct _virNodeInfo virNodeInfo
-typedef virNodeInfo * virNodeInfoPtr
-typedef struct _virSchedParameter virSchedParameter
-typedef virSchedParameter * virSchedParameterPtr
-typedef enum virSchedParameterType
-typedef struct _virSecret virSecret
-typedef virSecret * virSecretPtr
-typedef enum virSecretUsageType
-typedef struct _virSecurityLabel virSecurityLabel
-typedef virSecurityLabel * virSecurityLabelPtr
-typedef struct _virSecurityModel virSecurityModel
-typedef virSecurityModel * virSecurityModelPtr
-typedef struct _virStoragePool virStoragePool
-typedef enum virStoragePoolBuildFlags
-typedef enum virStoragePoolDeleteFlags
-typedef struct _virStoragePoolInfo virStoragePoolInfo
-typedef virStoragePoolInfo * virStoragePoolInfoPtr
-typedef virStoragePool * virStoragePoolPtr
-typedef enum virStoragePoolState
-typedef struct _virStorageVol virStorageVol
-typedef enum virStorageVolDeleteFlags
-typedef struct _virStorageVolInfo virStorageVolInfo
-typedef virStorageVolInfo * virStorageVolInfoPtr
-typedef virStorageVol * virStorageVolPtr
-typedef enum virStorageVolType
-typedef struct _virVcpuInfo virVcpuInfo
-typedef virVcpuInfo * virVcpuInfoPtr
-typedef enum virVcpuState
-

Functions

typedef virConnectAuthCallbackPtr
-int	virConnectAuthCallbackPtr	(virConnectCredentialPtr cred, 
unsigned int ncred,
void * cbdata) - -int virConnectClose (virConnectPtr conn) -typedef virConnectDomainEventCallback -int virConnectDomainEventCallback (virConnectPtr conn,
virDomainPtr dom,
int event,
int detail,
void * opaque) - -int virConnectDomainEventDeregister (virConnectPtr conn,
virConnectDomainEventCallback cb) -int virConnectDomainEventRegister (virConnectPtr conn,
virConnectDomainEventCallback cb,
void * opaque,
virFreeCallback freecb) -char * virConnectDomainXMLFromNative (virConnectPtr conn,
const char * nativeFormat,
const char * nativeConfig,
unsigned int flags) -char * virConnectDomainXMLToNative (virConnectPtr conn,
const char * nativeFormat,
const char * domainXml,
unsigned int flags) -char * virConnectFindStoragePoolSources (virConnectPtr conn,
const char * type,
const char * srcSpec,
unsigned int flags) -char * virConnectGetCapabilities (virConnectPtr conn) -char * virConnectGetHostname (virConnectPtr conn) -int virConnectGetMaxVcpus (virConnectPtr conn,
const char * type) -const char * virConnectGetType (virConnectPtr conn) -char * virConnectGetURI (virConnectPtr conn) -int virConnectGetVersion (virConnectPtr conn,
unsigned long * hvVer) -int virConnectListDefinedDomains (virConnectPtr conn,
char ** const names,
int maxnames) -int virConnectListDefinedInterfaces (virConnectPtr conn,
char ** const names,
int maxnames) -int virConnectListDefinedNetworks (virConnectPtr conn,
char ** const names,
int maxnames) -int virConnectListDefinedStoragePools (virConnectPtr conn,
char ** const names,
int maxnames) -int virConnectListDomains (virConnectPtr conn,
int * ids,
int maxids) -int virConnectListInterfaces (virConnectPtr conn,
char ** const names,
int maxnames) -int virConnectListNetworks (virConnectPtr conn,
char ** const names,
int maxnames) -int virConnectListSecrets (virConnectPtr conn,
char ** uuids,
int maxuuids) -int virConnectListStoragePools (virConnectPtr conn,
char ** const names,
int maxnames) -int virConnectNumOfDefinedDomains (virConnectPtr conn) -int virConnectNumOfDefinedInterfaces (virConnectPtr conn) -int virConnectNumOfDefinedNetworks (virConnectPtr conn) -int virConnectNumOfDefinedStoragePools (virConnectPtr conn) -int virConnectNumOfDomains (virConnectPtr conn) -int virConnectNumOfInterfaces (virConnectPtr conn) -int virConnectNumOfNetworks (virConnectPtr conn) -int virConnectNumOfSecrets (virConnectPtr conn) -int virConnectNumOfStoragePools (virConnectPtr conn) -virConnectPtr virConnectOpen (const char * name) -virConnectPtr virConnectOpenAuth (const char * name,
virConnectAuthPtr auth,
int flags) -virConnectPtr virConnectOpenReadOnly (const char * name) -int virConnectRef (virConnectPtr conn) -int virDomainAttachDevice (virDomainPtr domain,
const char * xml) -int virDomainBlockPeek (virDomainPtr dom,
const char * path,
unsigned long long offset,
size_t size,
void * buffer,
unsigned int flags) -int virDomainBlockStats (virDomainPtr dom,
const char * path,
virDomainBlockStatsPtr stats,
size_t size) -int virDomainCoreDump (virDomainPtr domain,
const char * to,
int flags) -int virDomainCreate (virDomainPtr domain) -virDomainPtr virDomainCreateLinux (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags) -virDomainPtr virDomainCreateXML (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags) -virDomainPtr virDomainDefineXML (virConnectPtr conn,
const char * xml) -int virDomainDestroy (virDomainPtr domain) -int virDomainDetachDevice (virDomainPtr domain,
const char * xml) -int virDomainFree (virDomainPtr domain) -int virDomainGetAutostart (virDomainPtr domain,
int * autostart) -virConnectPtr virDomainGetConnect (virDomainPtr dom) -unsigned int virDomainGetID (virDomainPtr domain) -int virDomainGetInfo (virDomainPtr domain,
virDomainInfoPtr info) -unsigned long virDomainGetMaxMemory (virDomainPtr domain) -int virDomainGetMaxVcpus (virDomainPtr domain) -const char * virDomainGetName (virDomainPtr domain) -char * virDomainGetOSType (virDomainPtr domain) -int virDomainGetSchedulerParameters (virDomainPtr domain,
virSchedParameterPtr params,
int * nparams) -char * virDomainGetSchedulerType (virDomainPtr domain,
int * nparams) -int virDomainGetSecurityLabel (virDomainPtr domain,
virSecurityLabelPtr seclabel) -int virDomainGetUUID (virDomainPtr domain,
unsigned char * uuid) -int virDomainGetUUIDString (virDomainPtr domain,
char * buf) -int virDomainGetVcpus (virDomainPtr domain,
virVcpuInfoPtr info,
int maxinfo,
unsigned char * cpumaps,
int maplen) -char * virDomainGetXMLDesc (virDomainPtr domain,
int flags) -int virDomainInterfaceStats (virDomainPtr dom,
const char * path,
virDomainInterfaceStatsPtr stats,
size_t size) -virDomainPtr virDomainLookupByID (virConnectPtr conn,
int id) -virDomainPtr virDomainLookupByName (virConnectPtr conn,
const char * name) -virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
const unsigned char * uuid) -virDomainPtr virDomainLookupByUUIDString (virConnectPtr conn,
const char * uuidstr) -int virDomainMemoryPeek (virDomainPtr dom,
unsigned long long start,
size_t size,
void * buffer,
unsigned int flags) -virDomainPtr virDomainMigrate (virDomainPtr domain,
virConnectPtr dconn,
unsigned long flags,
const char * dname,
const char * uri,
unsigned long bandwidth) -int virDomainPinVcpu (virDomainPtr domain,
unsigned int vcpu,
unsigned char * cpumap,
int maplen) -int virDomainReboot (virDomainPtr domain,
unsigned int flags) -int virDomainRef (virDomainPtr domain) -int virDomainRestore (virConnectPtr conn,
const char * from) -int virDomainResume (virDomainPtr domain) -int virDomainSave (virDomainPtr domain,
const char * to) -int virDomainSetAutostart (virDomainPtr domain,
int autostart) -int virDomainSetMaxMemory (virDomainPtr domain,
unsigned long memory) -int virDomainSetMemory (virDomainPtr domain,
unsigned long memory) -int virDomainSetSchedulerParameters (virDomainPtr domain,
virSchedParameterPtr params,
int nparams) -int virDomainSetVcpus (virDomainPtr domain,
unsigned int nvcpus) -int virDomainShutdown (virDomainPtr domain) -int virDomainSuspend (virDomainPtr domain) -int virDomainUndefine (virDomainPtr domain) -typedef virEventAddHandleFunc -int virEventAddHandleFunc (int fd,
int event,
virEventHandleCallback cb,
void * opaque,
virFreeCallback ff) - -typedef virEventAddTimeoutFunc -int virEventAddTimeoutFunc (int timeout,
virEventTimeoutCallback cb,
void * opaque,
virFreeCallback ff) - -typedef virEventHandleCallback -void virEventHandleCallback (int watch,
int fd,
int events,
void * opaque) - -void virEventRegisterImpl (virEventAddHandleFunc addHandle,
virEventUpdateHandleFunc updateHandle,
virEventRemoveHandleFunc removeHandle,
virEventAddTimeoutFunc addTimeout,
virEventUpdateTimeoutFunc updateTimeout,
virEventRemoveTimeoutFunc removeTimeout) -typedef virEventRemoveHandleFunc -int virEventRemoveHandleFunc (int watch) - -typedef virEventRemoveTimeoutFunc -int virEventRemoveTimeoutFunc (int timer) - -typedef virEventTimeoutCallback -void virEventTimeoutCallback (int timer,
void * opaque) - -typedef virEventUpdateHandleFunc -void virEventUpdateHandleFunc (int watch,
int event) - -typedef virEventUpdateTimeoutFunc -void virEventUpdateTimeoutFunc (int timer,
int timeout) - -typedef virFreeCallback -void virFreeCallback (void * opaque) - -int virGetVersion (unsigned long * libVer,
const char * type,
unsigned long * typeVer) -int virInitialize (void) -int virInterfaceCreate (virInterfacePtr iface,
unsigned int flags) -virInterfacePtr virInterfaceDefineXML (virConnectPtr conn,
const char * xml,
unsigned int flags) -int virInterfaceDestroy (virInterfacePtr iface,
unsigned int flags) -int virInterfaceFree (virInterfacePtr iface) -virConnectPtr virInterfaceGetConnect (virInterfacePtr iface) -const char * virInterfaceGetMACString (virInterfacePtr iface) -const char * virInterfaceGetName (virInterfacePtr iface) -char * virInterfaceGetXMLDesc (virInterfacePtr iface,
unsigned int flags) -virInterfacePtr virInterfaceLookupByMACString (virConnectPtr conn,
const char * macstr) -virInterfacePtr virInterfaceLookupByName (virConnectPtr conn,
const char * name) -int virInterfaceRef (virInterfacePtr iface) -int virInterfaceUndefine (virInterfacePtr iface) -int virNetworkCreate (virNetworkPtr network) -virNetworkPtr virNetworkCreateXML (virConnectPtr conn,
const char * xmlDesc) -virNetworkPtr virNetworkDefineXML (virConnectPtr conn,
const char * xml) -int virNetworkDestroy (virNetworkPtr network) -int virNetworkFree (virNetworkPtr network) -int virNetworkGetAutostart (virNetworkPtr network,
int * autostart) -char * virNetworkGetBridgeName (virNetworkPtr network) -virConnectPtr virNetworkGetConnect (virNetworkPtr net) -const char * virNetworkGetName (virNetworkPtr network) -int virNetworkGetUUID (virNetworkPtr network,
unsigned char * uuid) -int virNetworkGetUUIDString (virNetworkPtr network,
char * buf) -char * virNetworkGetXMLDesc (virNetworkPtr network,
int flags) -virNetworkPtr virNetworkLookupByName (virConnectPtr conn,
const char * name) -virNetworkPtr virNetworkLookupByUUID (virConnectPtr conn,
const unsigned char * uuid) -virNetworkPtr virNetworkLookupByUUIDString (virConnectPtr conn,
const char * uuidstr) -int virNetworkRef (virNetworkPtr network) -int virNetworkSetAutostart (virNetworkPtr network,
int autostart) -int virNetworkUndefine (virNetworkPtr network) -virNodeDevicePtr virNodeDeviceCreateXML (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags) -int virNodeDeviceDestroy (virNodeDevicePtr dev) -int virNodeDeviceDettach (virNodeDevicePtr dev) -int virNodeDeviceFree (virNodeDevicePtr dev) -const char * virNodeDeviceGetName (virNodeDevicePtr dev) -const char * virNodeDeviceGetParent (virNodeDevicePtr dev) -char * virNodeDeviceGetXMLDesc (virNodeDevicePtr dev,
unsigned int flags) -int virNodeDeviceListCaps (virNodeDevicePtr dev,
char ** const names,
int maxnames) -virNodeDevicePtr virNodeDeviceLookupByName (virConnectPtr conn,
const char * name) -int virNodeDeviceNumOfCaps (virNodeDevicePtr dev) -int virNodeDeviceReAttach (virNodeDevicePtr dev) -int virNodeDeviceRef (virNodeDevicePtr dev) -int virNodeDeviceReset (virNodeDevicePtr dev) -int virNodeGetCellsFreeMemory (virConnectPtr conn,
unsigned long long * freeMems,
int startCell,
int maxCells) -unsigned long long virNodeGetFreeMemory (virConnectPtr conn) -int virNodeGetInfo (virConnectPtr conn,
virNodeInfoPtr info) -int virNodeGetSecurityModel (virConnectPtr conn,
virSecurityModelPtr secmodel) -int virNodeListDevices (virConnectPtr conn,
const char * cap,
char ** const names,
int maxnames,
unsigned int flags) -int virNodeNumOfDevices (virConnectPtr conn,
const char * cap,
unsigned int flags) -virSecretPtr virSecretDefineXML (virConnectPtr conn,
const char * xml,
unsigned int flags) -int virSecretFree (virSecretPtr secret) -virConnectPtr virSecretGetConnect (virSecretPtr secret) -int virSecretGetUUID (virSecretPtr secret,
unsigned char * uuid) -int virSecretGetUUIDString (virSecretPtr secret,
char * buf) -const char * virSecretGetUsageID (virSecretPtr secret) -int virSecretGetUsageType (virSecretPtr secret) -unsigned char * virSecretGetValue (virSecretPtr secret,
size_t * value_size,
unsigned int flags) -char * virSecretGetXMLDesc (virSecretPtr secret,
unsigned int flags) -virSecretPtr virSecretLookupByUUID (virConnectPtr conn,
const unsigned char * uuid) -virSecretPtr virSecretLookupByUUIDString (virConnectPtr conn,
const char * uuidstr) -virSecretPtr virSecretLookupByUsage (virConnectPtr conn,
int usageType,
const char * usageID) -int virSecretRef (virSecretPtr secret) -int virSecretSetValue (virSecretPtr secret,
const unsigned char * value,
size_t value_size,
unsigned int flags) -int virSecretUndefine (virSecretPtr secret) -int virStoragePoolBuild (virStoragePoolPtr pool,
unsigned int flags) -int virStoragePoolCreate (virStoragePoolPtr pool,
unsigned int flags) -virStoragePoolPtr virStoragePoolCreateXML (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags) -virStoragePoolPtr virStoragePoolDefineXML (virConnectPtr conn,
const char * xml,
unsigned int flags) -int virStoragePoolDelete (virStoragePoolPtr pool,
unsigned int flags) -int virStoragePoolDestroy (virStoragePoolPtr pool) -int virStoragePoolFree (virStoragePoolPtr pool) -int virStoragePoolGetAutostart (virStoragePoolPtr pool,
int * autostart) -virConnectPtr virStoragePoolGetConnect (virStoragePoolPtr pool) -int virStoragePoolGetInfo (virStoragePoolPtr pool,
virStoragePoolInfoPtr info) -const char * virStoragePoolGetName (virStoragePoolPtr pool) -int virStoragePoolGetUUID (virStoragePoolPtr pool,
unsigned char * uuid) -int virStoragePoolGetUUIDString (virStoragePoolPtr pool,
char * buf) -char * virStoragePoolGetXMLDesc (virStoragePoolPtr pool,
unsigned int flags) -int virStoragePoolListVolumes (virStoragePoolPtr pool,
char ** const names,
int maxnames) -virStoragePoolPtr virStoragePoolLookupByName (virConnectPtr conn,
const char * name) -virStoragePoolPtr virStoragePoolLookupByUUID (virConnectPtr conn,
const unsigned char * uuid) -virStoragePoolPtr virStoragePoolLookupByUUIDString (virConnectPtr conn,
const char * uuidstr) -virStoragePoolPtr virStoragePoolLookupByVolume (virStorageVolPtr vol) -int virStoragePoolNumOfVolumes (virStoragePoolPtr pool) -int virStoragePoolRef (virStoragePoolPtr pool) -int virStoragePoolRefresh (virStoragePoolPtr pool,
unsigned int flags) -int virStoragePoolSetAutostart (virStoragePoolPtr pool,
int autostart) -int virStoragePoolUndefine (virStoragePoolPtr pool) -virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool,
const char * xmldesc,
unsigned int flags) -virStorageVolPtr virStorageVolCreateXMLFrom (virStoragePoolPtr pool,
const char * xmldesc,
virStorageVolPtr clonevol,
unsigned int flags) -int virStorageVolDelete (virStorageVolPtr vol,
unsigned int flags) -int virStorageVolFree (virStorageVolPtr vol) -virConnectPtr virStorageVolGetConnect (virStorageVolPtr vol) -int virStorageVolGetInfo (virStorageVolPtr vol,
virStorageVolInfoPtr info) -const char * virStorageVolGetKey (virStorageVolPtr vol) -const char * virStorageVolGetName (virStorageVolPtr vol) -char * virStorageVolGetPath (virStorageVolPtr vol) -char * virStorageVolGetXMLDesc (virStorageVolPtr vol,
unsigned int flags) -virStorageVolPtr virStorageVolLookupByKey (virConnectPtr conn,
const char * key) -virStorageVolPtr virStorageVolLookupByName (virStoragePoolPtr pool,
const char * name) -virStorageVolPtr virStorageVolLookupByPath (virConnectPtr conn,
const char * path) -int virStorageVolRef (virStorageVolPtr vol) -

Description

Macros

LIBVIR_VERSION_NUMBER

#define LIBVIR_VERSION_NUMBER

Macro providing the version of the library as version * 1,000,000 + minor * 1000 + micro

VIR_COPY_CPUMAP

#define VIR_COPY_CPUMAP

This macro is to be used in conjunction with virDomainGetVcpus() and virDomainPinVcpu() APIs. VIR_COPY_CPUMAP macro extract the cpumap of the specified vcpu from cpumaps array and copy it into cpumap to be used later by virDomainPinVcpu() API.

VIR_CPU_MAPLEN

#define VIR_CPU_MAPLEN

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.

VIR_CPU_USABLE

#define VIR_CPU_USABLE

This macro is to be used in conjunction with virDomainGetVcpus() API. VIR_CPU_USABLE macro returns a non zero value (true) if the cpu is usable by the vcpu, and 0 otherwise.

VIR_DOMAIN_SCHED_FIELD_LENGTH

#define VIR_DOMAIN_SCHED_FIELD_LENGTH

Macro providing the field length of virSchedParameter

VIR_GET_CPUMAP

#define VIR_GET_CPUMAP

This macro is to be used in conjunction with virDomainGetVcpus() and virDomainPinVcpu() APIs. VIR_GET_CPUMAP macro returns a pointer to the cpumap of the specified vcpu from cpumaps array.

VIR_NODEINFO_MAXCPUS

#define VIR_NODEINFO_MAXCPUS

This macro is to calculate the total number of CPUs supported but not necessary active in the host.

VIR_SECURITY_DOI_BUFLEN

#define VIR_SECURITY_DOI_BUFLEN

Macro providing the maximum length of the virSecurityModel doi string.

VIR_SECURITY_LABEL_BUFLEN

#define VIR_SECURITY_LABEL_BUFLEN

Macro providing the maximum length of the virSecurityLabel label string. Note that this value is based on that used by Labeled NFS.

VIR_SECURITY_MODEL_BUFLEN

#define VIR_SECURITY_MODEL_BUFLEN

Macro providing the maximum length of the virSecurityModel model string.

VIR_UNUSE_CPU

#define VIR_UNUSE_CPU

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.

VIR_USE_CPU

#define VIR_USE_CPU

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.

VIR_UUID_BUFLEN

#define VIR_UUID_BUFLEN

This macro provides the length of the buffer required for virDomainGetUUID()

VIR_UUID_STRING_BUFLEN

#define VIR_UUID_STRING_BUFLEN

This macro provides the length of the buffer required for virDomainGetUUIDString()

Types

virConnect

struct virConnect{
-
The content of this structure is not made public by the API
-}
-

virConnectAuth

struct virConnectAuth{
-
int *credtype : List of supported virConnectCredentialType values
unsigned intncredtype
virConnectAuthCallbackPtrcb : Callback used to collect credentials
void *cbdata
-}
-

virConnectCredential

struct virConnectCredential{
-
inttype : One of virConnectCredentialType constants
const char *prompt : Prompt to show to user
const char *challenge : Additional challenge to show
const char *defresult : Optional default result
char *result : Result to be filled with user response (or defresult)
unsigned intresultlen : Length of the result
-}
-

virConnectCredentialType

enum virConnectCredentialType {
-
VIR_CRED_USERNAME = 1 : Identity to act as
VIR_CRED_AUTHNAME = 2 : Identify to authorize as
VIR_CRED_LANGUAGE = 3 : RFC 1766 languages, comma separated
VIR_CRED_CNONCE = 4 : client supplies a nonce
VIR_CRED_PASSPHRASE = 5 : Passphrase secret
VIR_CRED_ECHOPROMPT = 6 : Challenge response
VIR_CRED_NOECHOPROMPT = 7 : Challenge response
VIR_CRED_REALM = 8 : Authentication realm
VIR_CRED_EXTERNAL = 9 : Externally managed credential More may be added - expect the unexpected
}
-

virConnectFlags

enum virConnectFlags {
-
VIR_CONNECT_RO = 1 : A readonly connection
}
-

virDomain

struct virDomain{
-
The content of this structure is not made public by the API
-}
-

virDomainBlockStatsStruct

struct virDomainBlockStatsStruct{
-
long longrd_req : number of read requests
long longrd_bytes : number of read bytes
long longwr_req : number of write requests
long longwr_bytes : number of written bytes
long longerrs : In Xen this returns the mysterious 'oo_req'.
-}
-

virDomainCreateFlags

enum virDomainCreateFlags {
-
VIR_DOMAIN_NONE = 0
}
-

virDomainEventDefinedDetailType

enum virDomainEventDefinedDetailType {
-
VIR_DOMAIN_EVENT_DEFINED_ADDED = 0 : Newly created config file
VIR_DOMAIN_EVENT_DEFINED_UPDATED = 1 : Changed config file
}
-

virDomainEventResumedDetailType

enum virDomainEventResumedDetailType {
-
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED = 0 : Normal resume due to admin unpause
VIR_DOMAIN_EVENT_RESUMED_MIGRATED = 1 : Resumed for completion of migration
}
-

virDomainEventStartedDetailType

enum virDomainEventStartedDetailType {
-
VIR_DOMAIN_EVENT_STARTED_BOOTED = 0 : Normal startup from boot
VIR_DOMAIN_EVENT_STARTED_MIGRATED = 1 : Incoming migration from another host
VIR_DOMAIN_EVENT_STARTED_RESTORED = 2 : Restored from a state file
}
-

virDomainEventStoppedDetailType

enum virDomainEventStoppedDetailType {
-
VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN = 0 : Normal shutdown
VIR_DOMAIN_EVENT_STOPPED_DESTROYED = 1 : Forced poweroff from host
VIR_DOMAIN_EVENT_STOPPED_CRASHED = 2 : Guest crashed
VIR_DOMAIN_EVENT_STOPPED_MIGRATED = 3 : Migrated off to another host
VIR_DOMAIN_EVENT_STOPPED_SAVED = 4 : Saved to a state file
VIR_DOMAIN_EVENT_STOPPED_FAILED = 5 : Host emulator/mgmt failed
}
-

virDomainEventSuspendedDetailType

enum virDomainEventSuspendedDetailType {
-
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED = 0 : Normal suspend due to admin pause
VIR_DOMAIN_EVENT_SUSPENDED_MIGRATED = 1 : Suspended for offline migration
}
-

virDomainEventType

virDomainEventUndefinedDetailType

enum virDomainEventUndefinedDetailType {
-
VIR_DOMAIN_EVENT_UNDEFINED_REMOVED = 0 : Deleted the config file
}
-

virDomainInfo

struct virDomainInfo{
-
unsigned charstate : the running state, one of virDomainState
unsigned longmaxMem : the maximum memory in KBytes allowed
unsigned longmemory : the memory in KBytes used by the domain
unsigned shortnrVirtCpu : the number of virtual CPUs for the domain
unsigned long longcpuTime : the CPU time used in nanoseconds
-}
-

virDomainInterfaceStatsStruct

struct virDomainInterfaceStatsStruct{
-
long longrx_bytes
long longrx_packets
long longrx_errs
long longrx_drop
long longtx_bytes
long longtx_packets
long longtx_errs
long longtx_drop
-}
-

virDomainMemoryFlags

enum virDomainMemoryFlags {
-
VIR_MEMORY_VIRTUAL = 1 : addresses are virtual addresses
VIR_MEMORY_PHYSICAL = 2 : addresses are physical addresses
}
-

virDomainMigrateFlags

enum virDomainMigrateFlags {
-
VIR_MIGRATE_LIVE = 1 : live migration
}
-

virDomainState

enum virDomainState {
-
VIR_DOMAIN_NOSTATE = 0 : no state
VIR_DOMAIN_RUNNING = 1 : the domain is running
VIR_DOMAIN_BLOCKED = 2 : the domain is blocked on resource
VIR_DOMAIN_PAUSED = 3 : the domain is paused by user
VIR_DOMAIN_SHUTDOWN = 4 : the domain is being shut down
VIR_DOMAIN_SHUTOFF = 5 : the domain is shut off
VIR_DOMAIN_CRASHED = 6 : the domain is crashed
}
-

virDomainXMLFlags

enum virDomainXMLFlags {
-
VIR_DOMAIN_XML_SECURE = 1 : dump security sensitive information too
VIR_DOMAIN_XML_INACTIVE = 2 : dump inactive domain information
}
-

virEventHandleType

virInterface

struct virInterface{
-
The content of this structure is not made public by the API
-}
-

virNetwork

struct virNetwork{
-
The content of this structure is not made public by the API
-}
-

virNodeDevice

struct virNodeDevice{
-
The content of this structure is not made public by the API
-}
-

virNodeInfo

struct virNodeInfo{
-
charmodel[32]model : string indicating the CPU model
unsigned longmemory : memory size in kilobytes
unsigned intcpus : the number of active CPUs
unsigned intmhz : expected CPU frequency
unsigned intnodes : the number of NUMA cell, 1 for uniform mem access
unsigned intsockets : number of CPU socket per node
unsigned intcores : number of core per socket
unsigned intthreads : number of threads per core
-}
-

virSchedParameter

struct virSchedParameter{
-
charfield[VIR_DOMAIN_SCHED_FIELD_LENGTH]field : parameter name
inttype : parameter type
-}
-

virSchedParameterType

enum virSchedParameterType {
-
VIR_DOMAIN_SCHED_FIELD_INT = 1 : integer case
VIR_DOMAIN_SCHED_FIELD_UINT = 2 : unsigned integer case
VIR_DOMAIN_SCHED_FIELD_LLONG = 3 : long long case
VIR_DOMAIN_SCHED_FIELD_ULLONG = 4 : unsigned long long case
VIR_DOMAIN_SCHED_FIELD_DOUBLE = 5 : double case
VIR_DOMAIN_SCHED_FIELD_BOOLEAN = 6 : boolean(character) case
}
-

virSecret

struct virSecret{
-
The content of this structure is not made public by the API
-}
-

virSecretUsageType

enum virSecretUsageType {
-
VIR_SECRET_USAGE_TYPE_NONE = 0
VIR_SECRET_USAGE_TYPE_VOLUME = 1 : Expect more owner types later...
}
-

virSecurityLabel

struct virSecurityLabel{
-
The content of this structure is not made public by the API
-}
-

virSecurityModel

struct virSecurityModel{
-
The content of this structure is not made public by the API
-}
-

virStoragePool

struct virStoragePool{
-
The content of this structure is not made public by the API
-}
-

virStoragePoolBuildFlags

enum virStoragePoolBuildFlags {
-
VIR_STORAGE_POOL_BUILD_NEW = 0 : Regular build from scratch
VIR_STORAGE_POOL_BUILD_REPAIR = 1 : Repair / reinitialize
VIR_STORAGE_POOL_BUILD_RESIZE = 2 : Extend existing pool
}
-

virStoragePoolDeleteFlags

enum virStoragePoolDeleteFlags {
-
VIR_STORAGE_POOL_DELETE_NORMAL = 0 : Delete metadata only (fast)
VIR_STORAGE_POOL_DELETE_ZEROED = 1 : Clear all data to zeros (slow)
}
-

virStoragePoolInfo

struct virStoragePoolInfo{
-
intstate : virStoragePoolState flags
unsigned long longcapacity : Logical size bytes
unsigned long longallocation : Current allocation bytes
unsigned long longavailable : Remaining free space bytes
-}
-

virStoragePoolState

enum virStoragePoolState {
-
VIR_STORAGE_POOL_INACTIVE = 0 : Not running
VIR_STORAGE_POOL_BUILDING = 1 : Initializing pool, not available
VIR_STORAGE_POOL_RUNNING = 2 : Running normally
VIR_STORAGE_POOL_DEGRADED = 3 : Running degraded
}
-

virStorageVol

struct virStorageVol{
-
The content of this structure is not made public by the API
-}
-

virStorageVolDeleteFlags

enum virStorageVolDeleteFlags {
-
VIR_STORAGE_VOL_DELETE_NORMAL = 0 : Delete metadata only (fast)
VIR_STORAGE_VOL_DELETE_ZEROED = 1 : Clear all data to zeros (slow)
}
-

virStorageVolInfo

struct virStorageVolInfo{
-
inttype : virStorageVolType flags
unsigned long longcapacity : Logical size bytes
unsigned long longallocation : Current allocation bytes
-}
-

virStorageVolType

enum virStorageVolType {
-
VIR_STORAGE_VOL_FILE = 0 : Regular file based volumes
VIR_STORAGE_VOL_BLOCK = 1 : Block based volumes
}
-

virVcpuInfo

struct virVcpuInfo{
-
unsigned intnumber : virtual CPU number
intstate : value from virVcpuState
unsigned long longcpuTime : CPU time used, in nanoseconds
intcpu : real CPU number, or -1 if offline
-}
-

virVcpuState

enum virVcpuState {
-
VIR_VCPU_OFFLINE = 0 : the virtual CPU is offline
VIR_VCPU_RUNNING = 1 : the virtual CPU is running
VIR_VCPU_BLOCKED = 2 : the virtual CPU is blocked on resource
}
-

Functions

virConnectAuthCallbackPtr

typedef int	(*virConnectAuthCallbackPtr)	(virConnectCredentialPtr cred, 
unsigned int ncred,
void * cbdata) -

cred:
ncred:
cbdata:
Returns:

virConnectClose

int	virConnectClose			(virConnectPtr conn)
-

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.

conn:pointer to the hypervisor connection
Returns:0 in case of success or -1 in case of error.

virConnectDomainEventCallback

typedef int	(*virConnectDomainEventCallback)	(virConnectPtr conn, 
virDomainPtr dom,
int event,
int detail,
void * opaque) -

A callback function to be registered, and called when a domain event occurs

conn:virConnect connection
dom:The domain on which the event occured
event:The specfic virDomainEventType which occured
detail:event specific detail information
opaque:opaque user data
Returns:

virConnectDomainEventDeregister

int	virConnectDomainEventDeregister	(virConnectPtr conn, 
virConnectDomainEventCallback cb)
-

Removes a Domain Event Callback. De-registering for a domain callback will disable delivery of this event type

conn:pointer to the connection
cb:callback to the function handling domain events
Returns:0 on success, -1 on failure

virConnectDomainEventRegister

int	virConnectDomainEventRegister	(virConnectPtr conn, 
virConnectDomainEventCallback cb,
void * opaque,
virFreeCallback freecb)
-

Adds a Domain Event Callback. Registering for a domain callback will enable delivery of the events The virDomainPtr 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

conn:pointer to the connection
cb:callback to the function handling domain events
opaque:opaque data to pass on to the callback
freecb:optional function to deallocate opaque when not used anymore
Returns: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

virConnectDomainXMLFromNative

char *	virConnectDomainXMLFromNative	(virConnectPtr conn, 
const char * nativeFormat,
const char * nativeConfig,
unsigned int flags)
-

Reads native configuration data describing a domain, and generates libvirt domain XML. The format of the native data is hypervisor dependant.

conn:a connection object
nativeFormat:configuration format importing from
nativeConfig:the configuration data to import
flags:currently unused, pass 0
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.

virConnectDomainXMLToNative

char *	virConnectDomainXMLToNative	(virConnectPtr conn, 
const char * nativeFormat,
const char * domainXml,
unsigned int flags)
-

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.

conn:a connection object
nativeFormat:configuration format exporting to
domainXml:the domain configuration to export
flags:currently unused, pass 0
Returns:a 0 terminated UTF-8 encoded native config datafile, or NULL in case of error. the caller must free() the returned value.

virConnectFindStoragePoolSources

char *	virConnectFindStoragePoolSources	(virConnectPtr conn, 
const char * type,
const char * srcSpec,
unsigned int flags)
-

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)

conn:pointer to hypervisor connection
type:type of storage pool sources to discover
srcSpec:XML document specifying discovery source
flags:flags for discovery (unused, pass 0)
Returns:an xml document consisting of a SourceList element containing a source document appropriate to the given pool type for each discovered source.

virConnectGetCapabilities

char *	virConnectGetCapabilities	(virConnectPtr conn)
-

Provides capabilities of the hypervisor / driver.

conn:pointer to the hypervisor connection
Returns:NULL in case of error, or an XML string defining the capabilities. The client must free the returned string after use.

virConnectGetHostname

char *	virConnectGetHostname		(virConnectPtr conn)
-

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.

conn:pointer to a hypervisor connection
Returns:the hostname which must be freed by the caller, or NULL if there was an error.

virConnectGetMaxVcpus

int	virConnectGetMaxVcpus		(virConnectPtr conn, 
const char * type)
-

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.

conn:pointer to the hypervisor connection
type:value of the 'type' attribute in the <domain> element
Returns:the maximum of virtual CPU or -1 in case of error.

virConnectGetType

const char *	virConnectGetType	(virConnectPtr conn)
-

Get the name of the Hypervisor software used.

conn:pointer to the hypervisor connection
Returns:NULL in case of error, a static zero terminated string otherwise. See also: http://www.redhat.com/archives/libvir-list/2007-February/msg00096.html

virConnectGetURI

char *	virConnectGetURI		(virConnectPtr conn)
-

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.

conn:pointer to a hypervisor connection
Returns:the URI string which must be freed by the caller, or NULL if there was an error.

virConnectGetVersion

int	virConnectGetVersion		(virConnectPtr conn, 
unsigned long * hvVer)
-

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.

conn:pointer to the hypervisor connection
hvVer:return value for the version of the running hypervisor (OUT)
Returns:-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release

virConnectListDefinedDomains

int	virConnectListDefinedDomains	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

list the defined but inactive domains, stores the pointers to the names in @names

conn:pointer to the hypervisor connection
names:pointer to an array to store the names
maxnames:size of the array
Returns:the number of names provided in the array or -1 in case of error

virConnectListDefinedInterfaces

int	virConnectListDefinedInterfaces	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Collect the list of defined (inactive) physical host interfaces, and store their names in @names.

conn:pointer to the hypervisor connection
names:array to collect the list of names of interfaces
maxnames:size of @names
Returns:the number of interfaces found or -1 in case of error

virConnectListDefinedNetworks

int	virConnectListDefinedNetworks	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

list the inactive networks, stores the pointers to the names in @names

conn:pointer to the hypervisor connection
names:pointer to an array to store the names
maxnames:size of the array
Returns:the number of names provided in the array or -1 in case of error

virConnectListDefinedStoragePools

int	virConnectListDefinedStoragePools	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Provides the list of names of inactive storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.

conn:pointer to hypervisor connection
names:array of char * to fill with pool names (allocated by caller)
maxnames:size of the names array
Returns:0 on success, -1 on error

virConnectListDomains

int	virConnectListDomains		(virConnectPtr conn, 
int * ids,
int maxids)
-

Collect the list of active domains, and store their ID in @maxids

conn:pointer to the hypervisor connection
ids:array to collect the list of IDs of active domains
maxids:size of @ids
Returns:the number of domain found or -1 in case of error

virConnectListInterfaces

int	virConnectListInterfaces	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Collect the list of active physical host interfaces, and store their names in @names

conn:pointer to the hypervisor connection
names:array to collect the list of names of interfaces
maxnames:size of @names
Returns:the number of interfaces found or -1 in case of error

virConnectListNetworks

int	virConnectListNetworks		(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Collect the list of active networks, and store their names in @names

conn:pointer to the hypervisor connection
names:array to collect the list of names of active networks
maxnames:size of @names
Returns:the number of networks found or -1 in case of error

virConnectListSecrets

int	virConnectListSecrets		(virConnectPtr conn, 
char ** uuids,
int maxuuids)
-

List UUIDs of defined secrets, store pointers to names in uuids.

conn:virConnect connection
uuids:Pointer to an array to store the UUIDs
maxuuids:size of the array.
Returns:the number of UUIDs provided in the array, or -1 on failure.

virConnectListStoragePools

int	virConnectListStoragePools	(virConnectPtr conn, 
char ** const names,
int maxnames)
-

Provides the list of names of active storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.

conn:pointer to hypervisor connection
names:array of char * to fill with pool names (allocated by caller)
maxnames:size of the names array
Returns:0 on success, -1 on error

virConnectNumOfDefinedDomains

int	virConnectNumOfDefinedDomains	(virConnectPtr conn)
-

Provides the number of defined but inactive domains.

conn:pointer to the hypervisor connection
Returns:the number of domain found or -1 in case of error

virConnectNumOfDefinedInterfaces

int	virConnectNumOfDefinedInterfaces	(virConnectPtr conn)
-

Provides the number of defined (inactive) interfaces on the physical host.

conn:pointer to the hypervisor connection
Returns:the number of defined interface found or -1 in case of error

virConnectNumOfDefinedNetworks

int	virConnectNumOfDefinedNetworks	(virConnectPtr conn)
-

Provides the number of inactive networks.

conn:pointer to the hypervisor connection
Returns:the number of networks found or -1 in case of error

virConnectNumOfDefinedStoragePools

int	virConnectNumOfDefinedStoragePools	(virConnectPtr conn)
-

Provides the number of inactive storage pools

conn:pointer to hypervisor connection
Returns:the number of pools found, or -1 on error

virConnectNumOfDomains

int	virConnectNumOfDomains		(virConnectPtr conn)
-

Provides the number of active domains.

conn:pointer to the hypervisor connection
Returns:the number of domain found or -1 in case of error

virConnectNumOfInterfaces

int	virConnectNumOfInterfaces	(virConnectPtr conn)
-

Provides the number of active interfaces on the physical host.

conn:pointer to the hypervisor connection
Returns:the number of active interfaces found or -1 in case of error

virConnectNumOfNetworks

int	virConnectNumOfNetworks		(virConnectPtr conn)
-

Provides the number of active networks.

conn:pointer to the hypervisor connection
Returns:the number of network found or -1 in case of error

virConnectNumOfSecrets

int	virConnectNumOfSecrets		(virConnectPtr conn)
-

Fetch number of currently defined secrets.

conn:virConnect connection
Returns:the number currently defined secrets.

virConnectNumOfStoragePools

int	virConnectNumOfStoragePools	(virConnectPtr conn)
-

Provides the number of active storage pools

conn:pointer to hypervisor connection
Returns:the number of pools found, or -1 on error

virConnectOpen

virConnectPtr	virConnectOpen		(const char * name)
-

This function should be called first to get a connection to the Hypervisor and xen store

name:URI of the hypervisor
Returns: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

virConnectOpenAuth

virConnectPtr	virConnectOpenAuth	(const char * name, 
virConnectAuthPtr auth,
int flags)
-

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 virConnectOpen for notes about environment variables which can have an effect on opening drivers

name:URI of the hypervisor
auth:Authenticate callback parameters
flags:Open flags
Returns:a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html

virConnectOpenReadOnly

virConnectPtr	virConnectOpenReadOnly	(const char * name)
-

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 virConnectOpen for notes about environment variables which can have an effect on opening drivers

name:URI of the hypervisor
Returns:a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html

virConnectRef

int	virConnectRef			(virConnectPtr conn)
-

Increment the reference count on the connection. For each additional call to this method, there shall be a corresponding call to virConnectClose 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.

conn:the connection to hold a reference on
Returns:0 in case of success, -1 in case of failure

virDomainAttachDevice

int	virDomainAttachDevice		(virDomainPtr domain, 
const char * xml)
-

Create a virtual device attachment to backend.

domain:pointer to domain object
xml:pointer to XML description of one device
Returns:0 in case of success, -1 in case of failure.

virDomainBlockPeek

int	virDomainBlockPeek		(virDomainPtr dom, 
const char * path,
unsigned long long offset,
size_t size,
void * buffer,
unsigned int flags)
-

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.

dom:pointer to the domain object
path:path to the block device
offset:offset within block device
size:size to read
buffer:return buffer (must be at least size bytes)
flags:unused, always pass 0
Returns:0 in case of success or -1 in case of failure. really 64 bits

virDomainBlockStats

int	virDomainBlockStats		(virDomainPtr dom, 
const char * path,
virDomainBlockStatsPtr stats,
size_t size)
-

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 virDomainGetXMLDesc 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.

dom:pointer to the domain object
path:path to the block device
stats:block device stats (returned)
size:size of stats structure
Returns:0 in case of success or -1 in case of failure.

virDomainCoreDump

int	virDomainCoreDump		(virDomainPtr domain, 
const char * to,
int flags)
-

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.

domain:a domain object
to:path for the core file
flags:extra flags, currently unused
Returns:0 in case of success and -1 in case of failure.

virDomainCreate

int	virDomainCreate			(virDomainPtr domain)
-

launch a defined domain. If the call succeed the domain moves from the defined to the running domains pools.

domain:pointer to a defined domain
Returns:0 in case of success, -1 in case of error

virDomainCreateLinux

virDomainPtr	virDomainCreateLinux	(virConnectPtr conn, 
const char * xmlDesc,
unsigned int flags)
-

Deprecated after 0.4.6. Renamed to virDomainCreateXML() providing identical functionality. This existing name will left indefinitely for API compatability.

conn:pointer to the hypervisor connection
xmlDesc:string containing an XML description of the domain
flags:callers should always pass 0
Returns:a new domain object or NULL in case of failure

virDomainCreateXML

virDomainPtr	virDomainCreateXML	(virConnectPtr conn, 
const char * xmlDesc,
unsigned int flags)
-

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).

conn:pointer to the hypervisor connection
xmlDesc:string containing an XML description of the domain
flags:callers should always pass 0
Returns:a new domain object or NULL in case of failure

virDomainDefineXML

virDomainPtr	virDomainDefineXML	(virConnectPtr conn, 
const char * xml)
-

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.

conn:pointer to the hypervisor connection
xml:the XML description for the domain, preferably in UTF-8
Returns:NULL in case of error, a pointer to the domain otherwise

virDomainDestroy

int	virDomainDestroy		(virDomainPtr domain)
-

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 virDomainPtr object. This function may require privileged access

domain:a domain object
Returns:0 in case of success and -1 in case of failure.

virDomainDetachDevice

int	virDomainDetachDevice		(virDomainPtr domain, 
const char * xml)
-

Destroy a virtual device attachment to backend.

domain:pointer to domain object
xml:pointer to XML description of one device
Returns:0 in case of success, -1 in case of failure.

virDomainFree

int	virDomainFree			(virDomainPtr domain)
-

Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.

domain:a domain object
Returns:0 in case of success and -1 in case of failure.

virDomainGetAutostart

int	virDomainGetAutostart		(virDomainPtr domain, 
int * autostart)
-

Provides a boolean value indicating whether the domain configured to be automatically started when the host machine boots.

domain:a domain object
autostart:the value returned
Returns:-1 in case of error, 0 in case of success

virDomainGetConnect

virConnectPtr	virDomainGetConnect	(virDomainPtr dom)
-

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.

dom:pointer to a domain
Returns:the virConnectPtr or NULL in case of failure.

virDomainGetID

unsigned int	virDomainGetID		(virDomainPtr domain)
-

Get the hypervisor ID number for the domain

domain:a domain object
Returns:the domain ID number or (unsigned int) -1 in case of error

virDomainGetInfo

int	virDomainGetInfo		(virDomainPtr domain, 
virDomainInfoPtr info)
-

Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.

domain:a domain object
info:pointer to a virDomainInfo structure allocated by the user
Returns:0 in case of success and -1 in case of failure.

virDomainGetMaxMemory

unsigned long	virDomainGetMaxMemory	(virDomainPtr domain)
-

Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.

domain:a domain object or NULL
Returns:the memory size in kilobytes or 0 in case of error.

virDomainGetMaxVcpus

int	virDomainGetMaxVcpus		(virDomainPtr domain)
-

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.

domain:pointer to domain object
Returns:the maximum of virtual CPU or -1 in case of error.

virDomainGetName

const char *	virDomainGetName	(virDomainPtr domain)
-

Get the public name for that domain

domain:a domain object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.

virDomainGetOSType

char *	virDomainGetOSType		(virDomainPtr domain)
-

Get the type of domain operation system.

domain:a domain object
Returns:the new string or NULL in case of error, the string must be freed by the caller.

virDomainGetSchedulerParameters

int	virDomainGetSchedulerParameters	(virDomainPtr domain, 
virSchedParameterPtr params,
int * nparams)
-

Get the scheduler parameters, the @params array will be filled with the values.

domain:pointer to domain object
params:pointer to scheduler parameter object (return value)
nparams:pointer to number of scheduler parameter (this value should be same than the returned value nparams of virDomainGetSchedulerType)
Returns:-1 in case of error, 0 in case of success.

virDomainGetSchedulerType

char *	virDomainGetSchedulerType	(virDomainPtr domain, 
int * nparams)
-

Get the scheduler type.

domain:pointer to domain object
nparams:number of scheduler parameters(return value)
Returns:NULL in case of error. The caller must free the returned string.

virDomainGetSecurityLabel

int	virDomainGetSecurityLabel	(virDomainPtr domain, 
virSecurityLabelPtr seclabel)
-

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.

domain:a domain object
seclabel:pointer to a virSecurityLabel structure
Returns:0 in case of success, -1 in case of failure

virDomainGetUUID

int	virDomainGetUUID		(virDomainPtr domain, 
unsigned char * uuid)
-

Get the UUID for a domain

domain:a domain object
uuid:pointer to a VIR_UUID_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success

virDomainGetUUIDString

int	virDomainGetUUIDString		(virDomainPtr domain, 
char * buf)
-

Get the UUID for a domain as string. For more information about UUID see RFC4122.

domain:a domain object
buf:pointer to a VIR_UUID_STRING_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success

virDomainGetVcpus

int	virDomainGetVcpus		(virDomainPtr domain, 
virVcpuInfoPtr info,
int maxinfo,
unsigned char * cpumaps,
int maplen)
-

Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer isn't NULL.

domain:pointer to domain object, or NULL for Domain0
info:pointer to an array of virVcpuInfo structures (OUT)
maxinfo:number of structures in info array
cpumaps:pointer to an bit map of real CPUs for all vcpus of this domain (in 8-bit bytes) (OUT) If cpumaps is NULL, then no 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.
maplen:number of bytes in one cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...).
Returns:the number of info filled in case of success, -1 in case of failure.

virDomainGetXMLDesc

char *	virDomainGetXMLDesc		(virDomainPtr domain, 
int flags)
-

Provide an XML description of the domain. The description may be reused later to relaunch the domain with virDomainCreateXML().

domain:a domain object
flags:an OR'ed set of virDomainXMLFlags
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.

virDomainInterfaceStats

int	virDomainInterfaceStats		(virDomainPtr dom, 
const char * path,
virDomainInterfaceStatsPtr stats,
size_t size)
-

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.

dom:pointer to the domain object
path:path to the interface
stats:network interface stats (returned)
size:size of stats structure
Returns:0 in case of success or -1 in case of failure.

virDomainLookupByID

virDomainPtr	virDomainLookupByID	(virConnectPtr conn, 
int id)
-

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.

conn:pointer to the hypervisor connection
id:the domain ID number
Returns:a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.

virDomainLookupByName

virDomainPtr	virDomainLookupByName	(virConnectPtr conn, 
const char * name)
-

Try to lookup a domain on the given hypervisor based on its name.

conn:pointer to the hypervisor connection
name:name for the domain
Returns:a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.

virDomainLookupByUUID

virDomainPtr	virDomainLookupByUUID	(virConnectPtr conn, 
const unsigned char * uuid)
-

Try to lookup a domain on the given hypervisor based on its UUID.

conn:pointer to the hypervisor connection
uuid:the raw UUID for the domain
Returns:a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.

virDomainLookupByUUIDString

virDomainPtr	virDomainLookupByUUIDString	(virConnectPtr conn, 
const char * uuidstr)
-

Try to lookup a domain on the given hypervisor based on its UUID.

conn:pointer to the hypervisor connection
uuidstr:the string UUID for the domain
Returns:a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.

virDomainMemoryPeek

int	virDomainMemoryPeek		(virDomainPtr dom, 
unsigned long long start,
size_t size,
void * buffer,
unsigned int flags)
-

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 VIR_MEMORY_VIRTUAL 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.

dom:pointer to the domain object
start:start of memory to peek
size:size of memory to peek
buffer:return buffer (must be at least size bytes)
flags:flags, see below
Returns:0 in case of success or -1 in case of failure. really 64 bits

virDomainMigrate

virDomainPtr	virDomainMigrate	(virDomainPtr domain, 
virConnectPtr dconn,
unsigned long flags,
const char * dname,
const char * uri,
unsigned long bandwidth)
-

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: VIR_MIGRATE_LIVE 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.

domain:a domain object
dconn:destination host (a connection object)
flags:flags
dname:(optional) rename domain to this at destination
uri:(optional) dest hostname/URI as seen from the source host
bandwidth:(optional) specify migration bandwidth limit in Mbps
Returns: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).

virDomainPinVcpu

int	virDomainPinVcpu		(virDomainPtr domain, 
unsigned int vcpu,
unsigned char * cpumap,
int maplen)
-

Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires privileged access to the hypervisor.

domain:pointer to domain object, or NULL for Domain0
vcpu:virtual CPU number
cpumap:pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.
maplen:number of bytes in cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...). If maplen < size, missing bytes are set to zero. If maplen > size, failure code is returned.
Returns:0 in case of success, -1 in case of failure.

virDomainReboot

int	virDomainReboot			(virDomainPtr domain, 
unsigned int flags)
-

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.

domain:a domain object
flags:extra flags for the reboot operation, not used yet
Returns:0 in case of success and -1 in case of failure.

virDomainRef

int	virDomainRef			(virDomainPtr domain)
-

Increment the reference count on the domain. For each additional call to this method, there shall be a corresponding call to virDomainFree 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.

domain:the domain to hold a reference on
Returns:0 in case of success and -1 in case of failure.

virDomainRestore

int	virDomainRestore		(virConnectPtr conn, 
const char * from)
-

This method will restore a domain saved to disk by virDomainSave().

conn:pointer to the hypervisor connection
from:path to the
Returns:0 in case of success and -1 in case of failure.

virDomainResume

int	virDomainResume			(virDomainPtr domain)
-

Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires privileged access

domain:a domain object
Returns:0 in case of success and -1 in case of failure.

virDomainSave

int	virDomainSave			(virDomainPtr domain, 
const char * to)
-

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.

domain:a domain object
to:path for the output file
Returns:0 in case of success and -1 in case of failure.

virDomainSetAutostart

int	virDomainSetAutostart		(virDomainPtr domain, 
int autostart)
-

Configure the domain to be automatically started when the host machine boots.

domain:a domain object
autostart:whether the domain should be automatically started 0 or 1
Returns:-1 in case of error, 0 in case of success

virDomainSetMaxMemory

int	virDomainSetMaxMemory		(virDomainPtr domain, 
unsigned long memory)
-

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.

domain:a domain object or NULL
memory:the memory size in kilobytes
Returns:0 in case of success and -1 in case of failure.

virDomainSetMemory

int	virDomainSetMemory		(virDomainPtr domain, 
unsigned long memory)
-

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.

domain:a domain object or NULL
memory:the memory size in kilobytes
Returns:0 in case of success and -1 in case of failure.

virDomainSetSchedulerParameters

int	virDomainSetSchedulerParameters	(virDomainPtr domain, 
virSchedParameterPtr params,
int nparams)
-

Change the scheduler parameters

domain:pointer to domain object
params:pointer to scheduler parameter objects
nparams:number of scheduler parameter (this value should be same or less than the returned value nparams of virDomainGetSchedulerType)
Returns:-1 in case of error, 0 in case of success.

virDomainSetVcpus

int	virDomainSetVcpus		(virDomainPtr domain, 
unsigned int nvcpus)
-

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.

domain:pointer to domain object, or NULL for Domain0
nvcpus:the new number of virtual CPUs for this domain
Returns:0 in case of success, -1 in case of failure.

virDomainShutdown

int	virDomainShutdown		(virDomainPtr domain)
-

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 ?

domain:a domain object
Returns:0 in case of success and -1 in case of failure.

virDomainSuspend

int	virDomainSuspend		(virDomainPtr domain)
-

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.

domain:a domain object
Returns:0 in case of success and -1 in case of failure.

virDomainUndefine

int	virDomainUndefine		(virDomainPtr domain)
-

Undefine a domain but does not stop it if it is running

domain:pointer to a defined domain
Returns:0 in case of success, -1 in case of error

virEventAddHandleFunc

typedef int	(*virEventAddHandleFunc	)	(int fd, 
int event,
virEventHandleCallback cb,
void * opaque,
virFreeCallback ff) -

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.

fd:file descriptor to listen on
event:bitset of events on which to fire the callback
cb:the callback to be called when an event occurrs
opaque:user data to pass to the callback
ff:the callback invoked to free opaque data blob
Returns:a handle watch number to be used for updating and unregistering for events

virEventAddTimeoutFunc

typedef int	(*virEventAddTimeoutFunc	)	(int timeout, 
virEventTimeoutCallback cb,
void * opaque,
virFreeCallback ff) -

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.

timeout:The timeout to monitor
cb:the callback to call when timeout has expired
opaque:user data to pass to the callback
ff:the callback invoked to free opaque data blob
Returns:a timer value

virEventHandleCallback

typedef void	(*virEventHandleCallback	)	(int watch, 
int fd,
int events,
void * opaque) -

Callback for receiving file handle events. The callback will be invoked once for each event which is pending.

watch:watch on which the event occurred
fd:file handle on which the event occurred
events:bitset of events from virEventHandleType constants
opaque:user data registered with handle

virEventRegisterImpl

void	virEventRegisterImpl		(virEventAddHandleFunc addHandle, 
virEventUpdateHandleFunc updateHandle,
virEventRemoveHandleFunc removeHandle,
virEventAddTimeoutFunc addTimeout,
virEventUpdateTimeoutFunc updateTimeout,
virEventRemoveTimeoutFunc removeTimeout)
-

addHandle:
updateHandle:
removeHandle:
addTimeout:
updateTimeout:
removeTimeout:

virEventRemoveHandleFunc

typedef int	(*virEventRemoveHandleFunc)	(int watch)
-

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.

watch:file descriptor watch to stop listening on
Returns:

virEventRemoveTimeoutFunc

typedef int	(*virEventRemoveTimeoutFunc)	(int timer)
-

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.

timer:the timer to remove
Returns:0 on success, -1 on failure

virEventTimeoutCallback

typedef void	(*virEventTimeoutCallback	)	(int timer, 
void * opaque) -

callback for receiving timer events

timer:timer id emitting the event
opaque:user data registered with handle

virEventUpdateHandleFunc

typedef void	(*virEventUpdateHandleFunc)	(int watch, 
int event) -

Part of the EventImpl, this user-provided callback is notified when events to listen on change

watch:file descriptor watch to modify
event:new events to listen on

virEventUpdateTimeoutFunc

typedef void	(*virEventUpdateTimeoutFunc)	(int timer, 
int timeout) -

Part of the EventImpl, this user-defined callback updates an event timeout.

timer:the timer to modify
timeout:the new timeout value

virFreeCallback

typedef void	(*virFreeCallback		)	(void * opaque)
-

opaque:

virGetVersion

int	virGetVersion			(unsigned long * libVer, 
const char * type,
unsigned long * typeVer)
-

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.

libVer:return value for the library version (OUT)
type:the type of connection/driver looked at
typeVer:return value for the version of the hypervisor (OUT)
Returns:-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.

virInitialize

int	virInitialize			(void)
-

Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.

Returns:0 in case of success, -1 in case of error

virInterfaceCreate

int	virInterfaceCreate		(virInterfacePtr iface, 
unsigned int flags)
-

Activate an interface (ie call "ifup")

iface:pointer to a defined interface
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success, -1 in case of error

virInterfaceDefineXML

virInterfacePtr	virInterfaceDefineXML	(virConnectPtr conn, 
const char * xml,
unsigned int flags)
-

Define an interface (or modify existing interface configuration)

conn:pointer to the hypervisor connection
xml:the XML description for the interface, preferably in UTF-8
flags:and OR'ed set of extraction flags, not used yet
Returns:NULL in case of error, a pointer to the interface otherwise

virInterfaceDestroy

int	virInterfaceDestroy		(virInterfacePtr iface, 
unsigned int flags)
-

deactivate an interface (ie call "ifdown") This does not remove the interface from the config, and does not free the associated virInterfacePtr object.

iface:an interface object
flags:and OR'ed set of extraction flags, not used yet
Returns:0 in case of success and -1 in case of failure.

virInterfaceFree

int	virInterfaceFree		(virInterfacePtr iface)
-

Free the interface object. The interface itself is unaltered. The data structure is freed and should not be used thereafter.

iface:an interface object
Returns:0 in case of success and -1 in case of failure.

virInterfaceGetConnect

virConnectPtr	virInterfaceGetConnect	(virInterfacePtr iface)
-

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.

iface:pointer to an interface
Returns:the virConnectPtr or NULL in case of failure.

virInterfaceGetMACString

const char *	virInterfaceGetMACString	(virInterfacePtr iface)
-

Get the MAC for an interface as string. For more information about MAC see RFC4122.

iface:an interface object
Returns: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.

virInterfaceGetName

const char *	virInterfaceGetName	(virInterfacePtr iface)
-

Get the public name for that interface

iface:an interface object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the interface object.

virInterfaceGetXMLDesc

char *	virInterfaceGetXMLDesc		(virInterfacePtr iface, 
unsigned int flags)
-

Provide an XML description of the interface. The description may be reused later to redefine the interface with virInterfaceDefineXML().

iface:an interface object
flags:an OR'ed set of extraction flags, not used yet
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.

virInterfaceLookupByMACString

virInterfacePtr	virInterfaceLookupByMACString	(virConnectPtr conn, 
const char * macstr)
-

Try to lookup an interface on the given hypervisor based on its MAC.

conn:pointer to the hypervisor connection
macstr:the MAC for the interface (null-terminated ASCII format)
Returns:a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.

virInterfaceLookupByName

virInterfacePtr	virInterfaceLookupByName	(virConnectPtr conn, 
const char * name)
-

Try to lookup an interface on the given hypervisor based on its name.

conn:pointer to the hypervisor connection
name:name for the interface
Returns:a new interface object or NULL in case of failure. If the interface cannot be found, then VIR_ERR_NO_INTERFACE error is raised.

virInterfaceRef

int	virInterfaceRef			(virInterfacePtr iface)
-

Increment the reference count on the interface. For each additional call to this method, there shall be a corresponding call to virInterfaceFree 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.

iface:the interface to hold a reference on
Returns:0 in case of success, -1 in case of failure.

virInterfaceUndefine

int	virInterfaceUndefine		(virInterfacePtr iface)
-

Undefine an interface, ie remove it from the config. This does not free the associated virInterfacePtr object.

iface:pointer to a defined interface
Returns:0 in case of success, -1 in case of error

virNetworkCreate

int	virNetworkCreate		(virNetworkPtr network)
-

Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.

network:pointer to a defined network
Returns:0 in case of success, -1 in case of error

virNetworkCreateXML

virNetworkPtr	virNetworkCreateXML	(virConnectPtr conn, 
const char * xmlDesc)
-

Create and start a new virtual network, based on an XML description similar to the one returned by virNetworkGetXMLDesc()

conn:pointer to the hypervisor connection
xmlDesc:an XML description of the network
Returns:a new network object or NULL in case of failure

virNetworkDefineXML

virNetworkPtr	virNetworkDefineXML	(virConnectPtr conn, 
const char * xml)
-

Define a network, but does not create it

conn:pointer to the hypervisor connection
xml:the XML description for the network, preferably in UTF-8
Returns:NULL in case of error, a pointer to the network otherwise

virNetworkDestroy

int	virNetworkDestroy		(virNetworkPtr network)
-

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 virNetworkPtr object. This function may require privileged access

network:a network object
Returns:0 in case of success and -1 in case of failure.

virNetworkFree

int	virNetworkFree			(virNetworkPtr network)
-

Free the network object. The running instance is kept alive. The data structure is freed and should not be used thereafter.

network:a network object
Returns:0 in case of success and -1 in case of failure.

virNetworkGetAutostart

int	virNetworkGetAutostart		(virNetworkPtr network, 
int * autostart)
-

Provides a boolean value indicating whether the network configured to be automatically started when the host machine boots.

network:a network object
autostart:the value returned
Returns:-1 in case of error, 0 in case of success

virNetworkGetBridgeName

char *	virNetworkGetBridgeName		(virNetworkPtr network)
-

Provides a bridge interface name to which a domain may connect a network interface in order to join the network.

network:a network object
Returns:a 0 terminated interface name, or NULL in case of error. the caller must free() the returned value.

virNetworkGetConnect

virConnectPtr	virNetworkGetConnect	(virNetworkPtr net)
-

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.

net:pointer to a network
Returns:the virConnectPtr or NULL in case of failure.

virNetworkGetName

const char *	virNetworkGetName	(virNetworkPtr network)
-

Get the public name for that network

network:a network object
Returns:a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the network object.

virNetworkGetUUID

int	virNetworkGetUUID		(virNetworkPtr network, 
unsigned char * uuid)
-

Get the UUID for a network

network:a network object
uuid:pointer to a VIR_UUID_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success

virNetworkGetUUIDString

int	virNetworkGetUUIDString		(virNetworkPtr network, 
char * buf)
-

Get the UUID for a network as string. For more information about UUID see RFC4122.

network:a network object
buf:pointer to a VIR_UUID_STRING_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success

virNetworkGetXMLDesc

char *	virNetworkGetXMLDesc		(virNetworkPtr network, 
int flags)
-

Provide an XML description of the network. The description may be reused later to relaunch the network with virNetworkCreateXML().

network:a network object
flags:an OR'ed set of extraction flags, not used yet
Returns:a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.

virNetworkLookupByName

virNetworkPtr	virNetworkLookupByName	(virConnectPtr conn, 
const char * name)
-

Try to lookup a network on the given hypervisor based on its name.

conn:pointer to the hypervisor connection
name:name for the network
Returns:a new network object or NULL in case of failure. If the network cannot be found, then VIR_ERR_NO_NETWORK error is raised.

virNetworkLookupByUUID

virNetworkPtr	virNetworkLookupByUUID	(virConnectPtr conn, 
const unsigned char * uuid)
-

Try to lookup a network on the given hypervisor based on its UUID.

conn:pointer to the hypervisor connection
uuid:the raw UUID for the network
Returns:a new network object or NULL in case of failure. If the network cannot be found, then VIR_ERR_NO_NETWORK error is raised.

virNetworkLookupByUUIDString

virNetworkPtr	virNetworkLookupByUUIDString	(virConnectPtr conn, 
const char * uuidstr)
-

Try to lookup a network on the given hypervisor based on its UUID.

conn:pointer to the hypervisor connection
uuidstr:the string UUID for the network
Returns:a new network object or NULL in case of failure. If the network cannot be found, then VIR_ERR_NO_NETWORK error is raised.

virNetworkRef

int	virNetworkRef			(virNetworkPtr network)
-

Increment the reference count on the network. For each additional call to this method, there shall be a corresponding call to virNetworkFree 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.

network:the network to hold a reference on
Returns:0 in case of success, -1 in case of failure.

virNetworkSetAutostart

int	virNetworkSetAutostart		(virNetworkPtr network, 
int autostart)
-

Configure the network to be automatically started when the host machine boots.

network:a network object
autostart:whether the network should be automatically started 0 or 1
Returns:-1 in case of error, 0 in case of success

virNetworkUndefine

int	virNetworkUndefine		(virNetworkPtr network)
-

Undefine a network but does not stop it if it is running

network:pointer to a defined network
Returns:0 in case of success, -1 in case of error

virNodeDeviceCreateXML

virNodeDevicePtr	virNodeDeviceCreateXML	(virConnectPtr conn, 
const char * xmlDesc,
unsigned int flags)
-

Create a new device on the VM host machine, for example, virtual HBAs created using vport_create.

conn:pointer to the hypervisor connection
xmlDesc:string containing an XML description of the device to be created
flags:callers should always pass 0
Returns:a node device object if successful, NULL in case of failure

virNodeDeviceDestroy

int	virNodeDeviceDestroy		(virNodeDevicePtr dev)
-

Destroy the device object. The virtual device is removed from the host operating system. This function may require privileged access

dev:a device object
Returns:0 in case of success and -1 in case of failure.

virNodeDeviceDettach

int	virNodeDeviceDettach		(virNodeDevicePtr dev)
-

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.

dev:pointer to the node device
Returns:0 in case of success, -1 in case of failure.

virNodeDeviceFree

int	virNodeDeviceFree		(virNodeDevicePtr dev)
-

Drops a reference to the node device, freeing it if this was the last reference.

dev:pointer to the node device
Returns:the 0 for success, -1 for error.

virNodeDeviceGetName

const char *	virNodeDeviceGetName	(virNodeDevicePtr dev)
-

Just return the device name

dev:the device
Returns:the device name or NULL in case of error

virNodeDeviceGetParent

const char *	virNodeDeviceGetParent	(virNodeDevicePtr dev)
-

Accessor for the parent of the device

dev:the device
Returns:the name of the device's parent, or NULL if the device has no parent.

virNodeDeviceGetXMLDesc

char *	virNodeDeviceGetXMLDesc		(virNodeDevicePtr dev, 
unsigned int flags)
-

Fetch an XML document describing all aspects of the device.

dev:pointer to the node device
flags:flags for XML generation (unused, pass 0)
Returns:the XML document, or NULL on error

virNodeDeviceListCaps

int	virNodeDeviceListCaps		(virNodeDevicePtr dev, 
char ** const names,
int maxnames)
-

Lists the names of the capabilities supported by the device.

dev:the device
names:array to collect the list of capability names
maxnames:size of @names
Returns:the number of capability names listed in @names.

virNodeDeviceLookupByName

virNodeDevicePtr	virNodeDeviceLookupByName	(virConnectPtr conn, 
const char * name)
-

Lookup a node device by its name.

conn:pointer to the hypervisor connection
name:unique device name
Returns:a virNodeDevicePtr if found, NULL otherwise.

virNodeDeviceNumOfCaps

int	virNodeDeviceNumOfCaps		(virNodeDevicePtr dev)
-

Accessor for the number of capabilities supported by the device.

dev:the device
Returns:the number of capabilities supported by the device.

virNodeDeviceReAttach

int	virNodeDeviceReAttach		(virNodeDevicePtr dev)
-

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.

dev:pointer to the node device
Returns:0 in case of success, -1 in case of failure.

virNodeDeviceRef

int	virNodeDeviceRef		(virNodeDevicePtr dev)
-

Increment the reference count on the dev. For each additional call to this method, there shall be a corresponding call to virNodeDeviceFree 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.

dev:the dev to hold a reference on
Returns:0 in case of success, -1 in case of failure.

virNodeDeviceReset

int	virNodeDeviceReset		(virNodeDevicePtr dev)
-

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.

dev:pointer to the node device
Returns:0 in case of success, -1 in case of failure.

virNodeGetCellsFreeMemory

int	virNodeGetCellsFreeMemory	(virConnectPtr conn, 
unsigned long long * freeMems,
int startCell,
int maxCells)
-

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.

conn:pointer to the hypervisor connection
freeMems:pointer to the array of unsigned long long
startCell:index of first cell to return freeMems info on.
maxCells:Maximum number of cells for which freeMems information can be returned.
Returns:the number of entries filled in freeMems, or -1 in case of error.

virNodeGetFreeMemory

unsigned long long	virNodeGetFreeMemory	(virConnectPtr conn)
-

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.

conn:pointer to the hypervisor connection
Returns:the available free memory in bytes or 0 in case of error

virNodeGetInfo

int	virNodeGetInfo			(virConnectPtr conn, 
virNodeInfoPtr info)
-

Extract hardware information about the node.

conn:pointer to the hypervisor connection
info:pointer to a virNodeInfo structure allocated by the user
Returns:0 in case of success and -1 in case of failure.

virNodeGetSecurityModel

int	virNodeGetSecurityModel		(virConnectPtr conn, 
virSecurityModelPtr secmodel)
-

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.

conn:a connection object
secmodel:pointer to a virSecurityModel structure
Returns:0 in case of success, -1 in case of failure

virNodeListDevices

int	virNodeListDevices		(virConnectPtr conn, 
const char * cap,
char ** const names,
int maxnames,
unsigned int flags)
-

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

conn:pointer to the hypervisor connection
cap:capability name
names:array to collect the list of node device names
maxnames:size of @names
flags:flags (unused, pass 0)
Returns:the number of node devices found or -1 in case of error

virNodeNumOfDevices

int	virNodeNumOfDevices		(virConnectPtr conn, 
const char * cap,
unsigned int flags)
-

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

conn:pointer to the hypervisor connection
cap:capability name
flags:flags (unused, pass 0)
Returns:the number of node devices or -1 in case of error

virSecretDefineXML

virSecretPtr	virSecretDefineXML	(virConnectPtr conn, 
const char * xml,
unsigned int flags)
-

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.

conn:virConnect connection
xml:XML describing the secret.
flags:flags, use 0 for now
Returns:a the secret on success, NULL on failure.

virSecretFree

int	virSecretFree			(virSecretPtr secret)
-

Release the secret handle. The underlying secret continues to exist.

secret:pointer to a secret
Returns:0 on success, or -1 on error

virSecretGetConnect

virConnectPtr	virSecretGetConnect	(virSecretPtr secret)
-

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.

secret:A virSecret secret
Returns:the virConnectPtr or NULL in case of failure.

virSecretGetUUID

int	virSecretGetUUID		(virSecretPtr secret, 
unsigned char * uuid)
-

Fetches the UUID of the secret.

secret:A virSecret secret
uuid:buffer of VIR_UUID_BUFLEN bytes in size
Returns:0 on success with the uuid buffer being filled, or -1 upon failure.

virSecretGetUUIDString

int	virSecretGetUUIDString		(virSecretPtr secret, 
char * buf)
-

Get the UUID for a secret as string. For more information about UUID see RFC4122.

secret:a secret object
buf:pointer to a VIR_UUID_STRING_BUFLEN bytes array
Returns:-1 in case of error, 0 in case of success

virSecretGetUsageID

const char *	virSecretGetUsageID	(virSecretPtr secret)
-

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 VIR_SECRET_USAGE_TYPE_VOLUME 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.

secret:a secret object
Returns:a string identifying the object using the secret, or NULL upon error

virSecretGetUsageType

int	virSecretGetUsageType		(virSecretPtr secret)
-

Get the type of object which uses this secret. The returned value is one of the constants defined in the virSecretUsageType 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.

secret:a secret object
Returns:a positive integer identifying the type of object, or -1 upon error.

virSecretGetValue

unsigned char *	virSecretGetValue	(virSecretPtr secret, 
size_t * value_size,
unsigned int flags)
-

Fetches the value of a secret.

secret:A virSecret connection
value_size:Place for storing size of the secret value
flags:flags, use 0 for now
Returns:the secret value on success, NULL on failure. The caller must free() the secret value.

virSecretGetXMLDesc

char *	virSecretGetXMLDesc		(virSecretPtr secret, 
unsigned int flags)
-

Fetches an XML document describing attributes of the secret.

secret:A virSecret secret
flags:flags, use 0 for now
Returns:the XML document on success, NULL on failure. The caller must free() the XML.

virSecretLookupByUUID

virSecretPtr	virSecretLookupByUUID	(virConnectPtr conn, 
const unsigned char * uuid)
-

Try to lookup a secret on the given hypervisor based on its UUID. Uses the 16 bytes of raw data to describe the UUID

conn:pointer to the hypervisor connection
uuid:the raw UUID for the secret
Returns:a new secret object or NULL in case of failure. If the secret cannot be found, then VIR_ERR_NO_SECRET error is raised.

virSecretLookupByUUIDString

virSecretPtr	virSecretLookupByUUIDString	(virConnectPtr conn, 
const char * uuidstr)
-

Try to lookup a secret on the given hypervisor based on its UUID. Uses the printable string value to describe the UUID

conn:pointer to the hypervisor connection
uuidstr:the string UUID for the secret
Returns:a new secret object or NULL in case of failure. If the secret cannot be found, then VIR_ERR_NO_SECRET error is raised.

virSecretLookupByUsage

virSecretPtr	virSecretLookupByUsage	(virConnectPtr conn, 
int usageType,
const char * usageID)
-

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.

conn:pointer to the hypervisor connection
usageType:the type of secret usage
usageID:identifier of the object using the secret
Returns:a new secret object or NULL in case of failure. If the secret cannot be found, then VIR_ERR_NO_SECRET error is raised.

virSecretRef

int	virSecretRef			(virSecretPtr secret)
-

Increment the reference count on the secret. For each additional call to this method, there shall be a corresponding call to virSecretFree 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.

secret:the secret to hold a reference on
Returns:0 in case of success, -1 in case of failure.

virSecretSetValue

int	virSecretSetValue		(virSecretPtr secret, 
const unsigned char * value,
size_t value_size,
unsigned int flags)
-

Sets the value of a secret.

secret:A virSecret secret
value:Value of the secret
value_size:Size of the value
flags:flags, use 0 for now
Returns:0 on success, -1 on failure.

virSecretUndefine

int	virSecretUndefine		(virSecretPtr secret)
-

Deletes the specified secret. This does not free the associated virSecretPtr object.

secret:A virSecret secret
Returns:0 on success, -1 on failure.

virStoragePoolBuild

int	virStoragePoolBuild		(virStoragePoolPtr pool, 
unsigned int flags)
-

Build the underlying storage pool

pool:pointer to storage pool
flags:future flags, use 0 for now
Returns:0 on success, or -1 upon failure

virStoragePoolCreate

int	virStoragePoolCreate		(virStoragePoolPtr pool, 
unsigned int flags)
-

Starts an inactive storage pool

pool:pointer to storage pool
flags:future flags, use 0 for now
Returns:0 on success, or -1 if it could not be started

virStoragePoolCreateXML

virStoragePoolPtr	virStoragePoolCreateXML	(virConnectPtr conn, 
const char * xmlDesc,
unsigned int flags)
-

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

conn:pointer to hypervisor connection
xmlDesc:XML description for new pool
flags:future flags, use 0 for now
Returns:a virStoragePoolPtr object, or NULL if creation failed

virStoragePoolDefineXML

virStoragePoolPtr	virStoragePoolDefineXML	(virConnectPtr conn, 
const char * xml,
unsigned int flags)
-

Define a new inactive storage pool based on its XML description. The pool is persistent, until explicitly undefined.

conn:pointer to hypervisor connection
xml:XML description for new pool
flags:future flags, use 0 for now
Returns:a virStoragePoolPtr object, or NULL if creation failed

virStoragePoolDelete

int	virStoragePoolDelete		(virStoragePoolPtr pool, 
unsigned int flags)
-

Delete the underlying pool resources. This is a non-recoverable operation. The virStoragePoolPtr object itself is not free'd.

pool:pointer to storage pool
flags:flags for obliteration process
Returns:0 on success, or -1 if it could not be obliterate

virStoragePoolDestroy

int	virStoragePoolDestroy		(virStoragePoolPtr pool)
-

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 virStoragePoolPtr object.

pool:pointer to storage pool
Returns:0 on success, or -1 if it could not be destroyed

virStoragePoolFree

int	virStoragePoolFree		(virStoragePoolPtr pool)
-

Free a storage pool object, releasing all memory associated with it. Does not change the state of the pool on the host.

pool:pointer to storage pool
Returns:0 on success, or -1 if it could not be free'd.

virStoragePoolGetAutostart

int	virStoragePoolGetAutostart	(virStoragePoolPtr pool, 
int * autostart)
-

Fetches the value of the autostart flag, which determines whether the pool is automatically started at boot time

pool:pointer to storage pool
autostart:location in which to store autostart flag
Returns:0 on success, -1 on failure

virStoragePoolGetConnect

virConnectPtr	virStoragePoolGetConnect	(virStoragePoolPtr pool)
-

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.

pool:pointer to a pool
Returns:the virConnectPtr or NULL in case of failure.

virStoragePoolGetInfo

int	virStoragePoolGetInfo		(virStoragePoolPtr pool, 
virStoragePoolInfoPtr info)
-

Get volatile information about the storage pool such as free space / usage summary

pool:pointer to storage pool
info:pointer at which to store info
Returns:0 on success, or -1 on failure.

virStoragePoolGetName

const char *	virStoragePoolGetName	(virStoragePoolPtr pool)
-

Fetch the locally unique name of the storage pool

pool:pointer to storage pool
Returns:the name of the pool, or NULL on error

virStoragePoolGetUUID

int	virStoragePoolGetUUID		(virStoragePoolPtr pool, 
unsigned char * uuid)
-

Fetch the globally unique ID of the storage pool

pool:pointer to storage pool
uuid:buffer of VIR_UUID_BUFLEN bytes in size
Returns:0 on success, or -1 on error;

virStoragePoolGetUUIDString

int	virStoragePoolGetUUIDString	(virStoragePoolPtr pool, 
char * buf)
-

Fetch the globally unique ID of the storage pool as a string

pool:pointer to storage pool
buf:buffer of VIR_UUID_STRING_BUFLEN bytes in size
Returns:0 on success, or -1 on error;

virStoragePoolGetXMLDesc

char *	virStoragePoolGetXMLDesc	(virStoragePoolPtr pool, 
unsigned int flags)
-

Fetch an XML document describing all aspects of the storage pool. This is suitable for later feeding back into the virStoragePoolCreateXML method.

pool:pointer to storage pool
flags:flags for XML format options (set of virDomainXMLFlags)
Returns:a XML document, or NULL on error

virStoragePoolListVolumes

int	virStoragePoolListVolumes	(virStoragePoolPtr pool, 
char ** const names,
int maxnames)
-

Fetch list of storage volume names, limiting to at most maxnames.

pool:pointer to storage pool
names:array in which to storage volume names
maxnames:size of names array
Returns:the number of names fetched, or -1 on error

virStoragePoolLookupByName

virStoragePoolPtr	virStoragePoolLookupByName	(virConnectPtr conn, 
const char * name)
-

Fetch a storage pool based on its unique name

conn:pointer to hypervisor connection
name:name of pool to fetch
Returns:a virStoragePoolPtr object, or NULL if no matching pool is found

virStoragePoolLookupByUUID

virStoragePoolPtr	virStoragePoolLookupByUUID	(virConnectPtr conn, 
const unsigned char * uuid)
-

Fetch a storage pool based on its globally unique id

conn:pointer to hypervisor connection
uuid:globally unique id of pool to fetch
Returns:a virStoragePoolPtr object, or NULL if no matching pool is found

virStoragePoolLookupByUUIDString

virStoragePoolPtr	virStoragePoolLookupByUUIDString	(virConnectPtr conn, 
const char * uuidstr)
-

Fetch a storage pool based on its globally unique id

conn:pointer to hypervisor connection
uuidstr:globally unique id of pool to fetch
Returns:a virStoragePoolPtr object, or NULL if no matching pool is found

virStoragePoolLookupByVolume

virStoragePoolPtr	virStoragePoolLookupByVolume	(virStorageVolPtr vol)
-

Fetch a storage pool which contains a particular volume

vol:pointer to storage volume
Returns:a virStoragePoolPtr object, or NULL if no matching pool is found

virStoragePoolNumOfVolumes

int	virStoragePoolNumOfVolumes	(virStoragePoolPtr pool)
-

Fetch the number of storage volumes within a pool

pool:pointer to storage pool
Returns:the number of storage pools, or -1 on failure

virStoragePoolRef

int	virStoragePoolRef		(virStoragePoolPtr pool)
-

Increment the reference count on the pool. For each additional call to this method, there shall be a corresponding call to virStoragePoolFree 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.

pool:the pool to hold a reference on
Returns:0 in case of success, -1 in case of failure.

virStoragePoolRefresh

int	virStoragePoolRefresh		(virStoragePoolPtr pool, 
unsigned int flags)
-

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

pool:pointer to storage pool
flags:flags to control refresh behaviour (currently unused, use 0)
Returns:0 if the volume list was refreshed, -1 on failure

virStoragePoolSetAutostart

int	virStoragePoolSetAutostart	(virStoragePoolPtr pool, 
int autostart)
-

Sets the autostart flag

pool:pointer to storage pool
autostart:new flag setting
Returns:0 on success, -1 on failure

virStoragePoolUndefine

int	virStoragePoolUndefine		(virStoragePoolPtr pool)
-

Undefine an inactive storage pool

pool:pointer to storage pool
Returns:0 on success, -1 on failure

virStorageVolCreateXML

virStorageVolPtr	virStorageVolCreateXML	(virStoragePoolPtr pool, 
const char * xmldesc,
unsigned int flags)
-

Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes

pool:pointer to storage pool
xmldesc:description of volume to create
flags:flags for creation (unused, pass 0)
Returns:the storage volume, or NULL on error

virStorageVolCreateXMLFrom

virStorageVolPtr	virStorageVolCreateXMLFrom	(virStoragePoolPtr pool, 
const char * xmldesc,
virStorageVolPtr clonevol,
unsigned int flags)
-

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.

pool:pointer to parent pool for the new volume
xmldesc:description of volume to create
clonevol:storage volume to use as input
flags:flags for creation (unused, pass 0)
Returns:the storage volume, or NULL on error

virStorageVolDelete

int	virStorageVolDelete		(virStorageVolPtr vol, 
unsigned int flags)
-

Delete the storage volume from the pool

vol:pointer to storage volume
flags:future flags, use 0 for now
Returns:0 on success, or -1 on error

virStorageVolFree

int	virStorageVolFree		(virStorageVolPtr vol)
-

Release the storage volume handle. The underlying storage volume continues to exist.

vol:pointer to storage volume
Returns:0 on success, or -1 on error

virStorageVolGetConnect

virConnectPtr	virStorageVolGetConnect	(virStorageVolPtr vol)
-

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.

vol:pointer to a pool
Returns:the virConnectPtr or NULL in case of failure.

virStorageVolGetInfo

int	virStorageVolGetInfo		(virStorageVolPtr vol, 
virStorageVolInfoPtr info)
-

Fetches volatile information about the storage volume such as its current allocation

vol:pointer to storage volume
info:pointer at which to store info
Returns:0 on success, or -1 on failure

virStorageVolGetKey

const char *	virStorageVolGetKey	(virStorageVolPtr vol)
-

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

vol:pointer to storage volume
Returns:the volume key, or NULL on error

virStorageVolGetName

const char *	virStorageVolGetName	(virStorageVolPtr vol)
-

Fetch the storage volume name. This is unique within the scope of a pool

vol:pointer to storage volume
Returns:the volume name, or NULL on error

virStorageVolGetPath

char *	virStorageVolGetPath		(virStorageVolPtr vol)
-

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

vol:pointer to storage volume
Returns:the storage volume path, or NULL on error

virStorageVolGetXMLDesc

char *	virStorageVolGetXMLDesc		(virStorageVolPtr vol, 
unsigned int flags)
-

Fetch an XML document describing all aspects of the storage volume

vol:pointer to storage volume
flags:flags for XML generation (unused, pass 0)
Returns:the XML document, or NULL on error

virStorageVolLookupByKey

virStorageVolPtr	virStorageVolLookupByKey	(virConnectPtr conn, 
const char * key)
-

Fetch a pointer to a storage volume based on its globally unique key

conn:pointer to hypervisor connection
key:globally unique key
Returns:a storage volume, or NULL if not found / error

virStorageVolLookupByName

virStorageVolPtr	virStorageVolLookupByName	(virStoragePoolPtr pool, 
const char * name)
-

Fetch a pointer to a storage volume based on its name within a pool

pool:pointer to storage pool
name:name of storage volume
Returns:a storage volume, or NULL if not found / error

virStorageVolLookupByPath

virStorageVolPtr	virStorageVolLookupByPath	(virConnectPtr conn, 
const char * path)
-

Fetch a pointer to a storage volume based on its locally (host) unique path

conn:pointer to hypervisor connection
path:locally unique path
Returns:a storage volume, or NULL if not found / error

virStorageVolRef

int	virStorageVolRef		(virStorageVolPtr vol)
-

Increment the reference count on the vol. For each additional call to this method, there shall be a corresponding call to virStorageVolFree 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.

vol:the vol to hold a reference on
Returns:0 in case of success, -1 in case of failure.
diff --git a/docs/html/libvirt-virterror.html b/docs/html/libvirt-virterror.html deleted file mode 100644 index aac55a047c..0000000000 --- a/docs/html/libvirt-virterror.html +++ /dev/null @@ -1,49 +0,0 @@ - - -libvirt: Module virterror from libvirt

Module virterror from libvirt

Provides the interfaces of the libvirt library to handle errors raised while using the library.

Table of Contents

Types

typedef struct _virError virError
-typedef enum virErrorDomain
-typedef enum virErrorLevel
-typedef enum virErrorNumber
-typedef virError * virErrorPtr
-

Functions

int	virConnCopyLastError		(virConnectPtr conn, 
virErrorPtr to) -virErrorPtr virConnGetLastError (virConnectPtr conn) -void virConnResetLastError (virConnectPtr conn) -void virConnSetErrorFunc (virConnectPtr conn,
void * userData,
virErrorFunc handler) -int virCopyLastError (virErrorPtr to) -void virDefaultErrorFunc (virErrorPtr err) -typedef virErrorFunc -void virErrorFunc (void * userData,
virErrorPtr error) - -void virFreeError (virErrorPtr err) -virErrorPtr virGetLastError (void) -void virResetError (virErrorPtr err) -void virResetLastError (void) -virErrorPtr virSaveLastError (void) -void virSetErrorFunc (void * userData,
virErrorFunc handler) -

Description

Types

virError

struct virError{
-
intcode : The error code, a virErrorNumber
intdomain : What part of the library raised this error
char *message : human-readable informative error message
virErrorLevellevel : how consequent is the error
virConnectPtrconn : connection if available, deprecated see note above
virDomainPtrdom : domain if available, deprecated see note above
char *str1 : extra string information
char *str2 : extra string information
char *str3 : extra string information
intint1 : extra number information
intint2 : extra number information
virNetworkPtrnet : network if available, deprecated see note above
-}
-

virErrorDomain

enum virErrorDomain {
-
VIR_FROM_NONE = 0
VIR_FROM_XEN = 1 : Error at Xen hypervisor layer
VIR_FROM_XEND = 2 : Error at connection with xend daemon
VIR_FROM_XENSTORE = 3 : Error at connection with xen store
VIR_FROM_SEXPR = 4 : Error in the S-Expression code
VIR_FROM_XML = 5 : Error in the XML code
VIR_FROM_DOM = 6 : Error when operating on a domain
VIR_FROM_RPC = 7 : Error in the XML-RPC code
VIR_FROM_PROXY = 8 : Error in the proxy code
VIR_FROM_CONF = 9 : Error in the configuration file handling
VIR_FROM_QEMU = 10 : Error at the QEMU daemon
VIR_FROM_NET = 11 : Error when operating on a network
VIR_FROM_TEST = 12 : Error from test driver
VIR_FROM_REMOTE = 13 : Error from remote driver
VIR_FROM_OPENVZ = 14 : Error from OpenVZ driver
VIR_FROM_XENXM = 15 : Error at Xen XM layer
VIR_FROM_STATS_LINUX = 16 : Error in the Linux Stats code
VIR_FROM_LXC = 17 : Error from Linux Container driver
VIR_FROM_STORAGE = 18 : Error from storage driver
VIR_FROM_NETWORK = 19 : Error from network config
VIR_FROM_DOMAIN = 20 : Error from domain config
VIR_FROM_UML = 21 : Error at the UML driver
VIR_FROM_NODEDEV = 22 : Error from node device monitor
VIR_FROM_XEN_INOTIFY = 23 : Error from xen inotify layer
VIR_FROM_SECURITY = 24 : Error from security framework
VIR_FROM_VBOX = 25 : Error from VirtualBox driver
VIR_FROM_INTERFACE = 26 : Error when operating on an interface
VIR_FROM_ONE = 27 : Error from OpenNebula driver
VIR_FROM_ESX = 28 : Error from ESX driver
VIR_FROM_PHYP = 29 : Error from IBM power hypervisor
VIR_FROM_SECRET = 30 : Error from secret storage
}
-

virErrorLevel

enum virErrorLevel {
-
VIR_ERR_NONE = 0
VIR_ERR_WARNING = 1 : A simple warning
VIR_ERR_ERROR = 2 : An error
}
-

virErrorNumber

enum virErrorNumber {
-
VIR_ERR_OK = 0
VIR_ERR_INTERNAL_ERROR = 1 : internal error
VIR_ERR_NO_MEMORY = 2 : memory allocation failure
VIR_ERR_NO_SUPPORT = 3 : no support for this function
VIR_ERR_UNKNOWN_HOST = 4 : could not resolve hostname
VIR_ERR_NO_CONNECT = 5 : can't connect to hypervisor
VIR_ERR_INVALID_CONN = 6 : invalid connection object
VIR_ERR_INVALID_DOMAIN = 7 : invalid domain object
VIR_ERR_INVALID_ARG = 8 : invalid function argument
VIR_ERR_OPERATION_FAILED = 9 : a command to hypervisor failed
VIR_ERR_GET_FAILED = 10 : a HTTP GET command to failed
VIR_ERR_POST_FAILED = 11 : a HTTP POST command to failed
VIR_ERR_HTTP_ERROR = 12 : unexpected HTTP error code
VIR_ERR_SEXPR_SERIAL = 13 : failure to serialize an S-Expr
VIR_ERR_NO_XEN = 14 : could not open Xen hypervisor control
VIR_ERR_XEN_CALL = 15 : failure doing an hypervisor call
VIR_ERR_OS_TYPE = 16 : unknown OS type
VIR_ERR_NO_KERNEL = 17 : missing kernel information
VIR_ERR_NO_ROOT = 18 : missing root device information
VIR_ERR_NO_SOURCE = 19 : missing source device information
VIR_ERR_NO_TARGET = 20 : missing target device information
VIR_ERR_NO_NAME = 21 : missing domain name information
VIR_ERR_NO_OS = 22 : missing domain OS information
VIR_ERR_NO_DEVICE = 23 : missing domain devices information
VIR_ERR_NO_XENSTORE = 24 : could not open Xen Store control
VIR_ERR_DRIVER_FULL = 25 : too many drivers registered
VIR_ERR_CALL_FAILED = 26 : not supported by the drivers (DEPRECATED)
VIR_ERR_XML_ERROR = 27 : an XML description is not well formed or broken
VIR_ERR_DOM_EXIST = 28 : the domain already exist
VIR_ERR_OPERATION_DENIED = 29 : operation forbidden on read-only connections
VIR_ERR_OPEN_FAILED = 30 : failed to open a conf file
VIR_ERR_READ_FAILED = 31 : failed to read a conf file
VIR_ERR_PARSE_FAILED = 32 : failed to parse a conf file
VIR_ERR_CONF_SYNTAX = 33 : failed to parse the syntax of a conf file
VIR_ERR_WRITE_FAILED = 34 : failed to write a conf file
VIR_ERR_XML_DETAIL = 35 : detail of an XML error
VIR_ERR_INVALID_NETWORK = 36 : invalid network object
VIR_ERR_NETWORK_EXIST = 37 : the network already exist
VIR_ERR_SYSTEM_ERROR = 38 : general system call failure
VIR_ERR_RPC = 39 : some sort of RPC error
VIR_ERR_GNUTLS_ERROR = 40 : error from a GNUTLS call
VIR_WAR_NO_NETWORK = 41 : failed to start network
VIR_ERR_NO_DOMAIN = 42 : domain not found or unexpectedly disappeared
VIR_ERR_NO_NETWORK = 43 : network not found
VIR_ERR_INVALID_MAC = 44 : invalid MAC address
VIR_ERR_AUTH_FAILED = 45 : authentication failed
VIR_ERR_INVALID_STORAGE_POOL = 46 : invalid storage pool object
VIR_ERR_INVALID_STORAGE_VOL = 47 : invalid storage vol object
VIR_WAR_NO_STORAGE = 48 : failed to start storage
VIR_ERR_NO_STORAGE_POOL = 49 : storage pool not found
VIR_ERR_NO_STORAGE_VOL = 50 : storage pool not found
VIR_WAR_NO_NODE = 51 : failed to start node driver
VIR_ERR_INVALID_NODE_DEVICE = 52 : invalid node device object
VIR_ERR_NO_NODE_DEVICE = 53 : node device not found
VIR_ERR_NO_SECURITY_MODEL = 54 : security model not found
VIR_ERR_OPERATION_INVALID = 55 : operation is not applicable at this time
VIR_WAR_NO_INTERFACE = 56 : failed to start interface driver
VIR_ERR_NO_INTERFACE = 57 : interface driver not running
VIR_ERR_INVALID_INTERFACE = 58 : invalid interface object
VIR_ERR_MULTIPLE_INTERFACES = 59 : more than one matching interface found
VIR_WAR_NO_SECRET = 60 : failed to start secret storage
VIR_ERR_INVALID_SECRET = 61 : invalid secret
VIR_ERR_NO_SECRET = 62 : secret not found
}
-

Functions

virConnCopyLastError

int	virConnCopyLastError		(virConnectPtr conn, 
virErrorPtr to)
-

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()

conn:pointer to the hypervisor connection
to:target to receive the copy
Returns:0 if no error was found and the error code otherwise and -1 in case of parameter error.

virConnGetLastError

virErrorPtr	virConnGetLastError	(virConnectPtr conn)
-

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.

conn:pointer to the hypervisor connection
Returns:a pointer to the last error or NULL if none occurred.

virConnResetLastError

void	virConnResetLastError		(virConnectPtr conn)
-

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

conn:pointer to the hypervisor connection

virConnSetErrorFunc

void	virConnSetErrorFunc		(virConnectPtr conn, 
void * userData,
virErrorFunc handler)
-

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.

conn:pointer to the hypervisor connection
userData:pointer to the user data provided in the handler callback
handler:the function to get called in case of error or NULL

virCopyLastError

int	virCopyLastError		(virErrorPtr to)
-

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()

to:target to receive the copy
Returns:0 if no error was found and the error code otherwise and -1 in case of parameter error.

virDefaultErrorFunc

void	virDefaultErrorFunc		(virErrorPtr err)
-

Default routine reporting an error to stderr.

err:pointer to the error.

virErrorFunc

typedef void	(*virErrorFunc		)	(void * userData, 
virErrorPtr error) -

Signature of a function to use when there is an error raised by the library.

userData:user provided data for the error callback
error:the error being raised.

virFreeError

void	virFreeError			(virErrorPtr err)
-

Resets and frees the given error.

err:error to free

virGetLastError

virErrorPtr	virGetLastError		(void)
-

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.

Returns:a pointer to the last error or NULL if none occurred.

virResetError

void	virResetError			(virErrorPtr err)
-

Reset the error being pointed to

err:pointer to the virError to clean up

virResetLastError

void	virResetLastError		(void)
-

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.

virSaveLastError

virErrorPtr	virSaveLastError	(void)
-

Save the last error into a new error object.

Returns:a pointer to the copied error or NULL if allocation failed. It is the caller's responsibility to free the error with virFreeError().

virSetErrorFunc

void	virSetErrorFunc			(void * userData, 
virErrorFunc handler)
-

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.

userData:pointer to the user data provided in the handler callback
handler:the function to get called in case of error or NULL
diff --git a/docs/hvsupport.html b/docs/hvsupport.html deleted file mode 100644 index 0a05cf5ee1..0000000000 --- a/docs/hvsupport.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - libvirt: Driver support matrix - - - - -
- -
-

Driver support matrix

-

-This page documents which libvirt calls work on -which libvirt drivers / hypervisors, and which version the API appeared -in. -

-

-This information changes frequently. This page was last checked or -updated on 2008-06-05. -

-

Domain functions

-

x = not supported; empty cell means no information

-
Function Since XenQEMUKVMRemoteVirtualBoxONE
virConnectClose All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectGetCapabilities 0.2.1 ≥ 0.2.1 ≥ 0.2.1 ≥ 0.2.1 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectGetHostname 0.3.0 ≥ 0.3.0 ≥ 0.3.3 ≥ 0.3.3 ≥ 0.3.0 ≥ 0.6.3 x
virConnectGetMaxVcpus 0.2.1 ≥ 0.2.1 x x ≥ 0.3.0 x x
virConnectGetType All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectGetURI 0.3.0 ≥ 0.3.0 ≥ 0.3.0 ≥ 0.3.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectGetVersion All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectListDefinedDomains 0.1.5 ≥ 0.1.9 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectListDomains All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectNumOfDefinedDomains 0.1.5 ≥ 0.1.9 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectNumOfDomains All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectOpen All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virConnectOpenAuth
virConnectOpenReadOnly All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 x x
virDomainAttachDevice 0.1.9 ≥ 0.1.9 x x ≥ 0.3.0 ≥ 0.6.3 x
virDomainBlockPeek 0.4.3 0.4.3 0.4.3 0.4.3 x x x
virDomainBlockStats 0.3.2 ≥ 0.3.2 x x ≥ 0.3.2 x x
virDomainCoreDump 0.1.9 ≥ 0.1.9 x x ≥ 0.3.0 x x
virDomainCreate 0.1.5 ≥ 0.1.9 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainCreateLinux All ≥ 0.0.5 x x ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainDefineXML 0.1.5 ≥ 0.1.9 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainDestroy All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainDetachDevice 0.1.9 ≥ 0.1.9 x x ≥ 0.3.0 ≥ 0.6.3 x
virDomainFree All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainGetAutostart 0.2.1 x ≥ 0.2.1 ≥ 0.2.1 ≥ 0.3.0 x x
virDomainGetConnect 0.3.0 not a HV function
virDomainGetID All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainGetInfo All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainGetMaxMemory All All x x ≥ 0.3.0 ≥ 0.6.3 x
virDomainGetMaxVcpus 0.2.1 ≥ 0.2.1 x x ≥ 0.3.0 x x
virDomainGetName All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainGetOSType All All x x ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainGetSchedulerParameters 0.2.3 ≥ 0.2.3 x x ≥ 0.3.0 x x
virDomainGetSchedulerType 0.2.3 ≥ 0.2.3 x x ≥ 0.3.0 x x
virDomainGetUUID 0.1.10 ≥ 0.1.10 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainGetUUIDString 0.1.10 ≥ 0.1.10 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainGetVcpus 0.1.4 ≥ 0.1.4 x x ≥ 0.3.0 x x
virDomainInterfaceStats 0.3.2 ≥ 0.3.2 x x ≥ 0.3.2 x x
virDomainGetXMLDesc All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 x
virDomainLookupByID All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainLookupByName All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainLookupByUUID 0.1.10 ≥ 0.1.10 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainLookupByUUIDString 0.1.10 ≥ 0.1.10 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainMigrate 0.3.2 ≥ 0.3.2 x x 0.3.2 x x
virDomainPinVcpu 0.1.4 ≥ 0.1.4 x x ≥ 0.3.0 x x
virDomainReboot 0.1.0 ≥ 0.1.0 x x ≥ 0.3.0 ≥ 0.6.3 x
virDomainRestore All All x ≥ 0.3.2 ≥ 0.3.0 x x
virDomainResume All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainSave All All x ≥ 0.3.2 ≥ 0.3.0 ≥ 0.6.3 x
virDomainSetAutostart 0.2.1 x ≥ 0.2.1 ≥ 0.2.1 ≥ 0.3.0 x x
virDomainSetMaxMemory All All x x ≥ 0.3.0 x
virDomainSetMemory 0.1.1 ≥ 0.1.1 x x ≥ 0.3.0 ≥ 0.6.3 x
virDomainSetSchedulerParameters 0.2.3 ≥ 0.2.3 x x ≥ 0.3.0 x x
virDomainSetVcpus 0.1.4 ≥ 0.1.4 x x ≥ 0.3.0 x x
virDomainShutdown All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainSuspend All All ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virDomainUndefine 0.1.5 ≥ 0.1.9 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 ≥ 0.6.4
virGetVersion All All Returns -1 if HV unsupported.
virInitialize 0.1.0 not a HV function
virDomainMemoryPeek 0.4.3 x 0.4.3 0.4.3 x x x
virNodeGetInfo 0.1.0 ≥ 0.1.0 ≥ 0.2.0 ≥ 0.2.0 ≥ 0.3.0 ≥ 0.6.3 x
virNodeGetFreeMemory 0.3.3 ≥ 0.3.3 x x x x x
virNodeGetCellsFreeMemory 0.3.3 ≥ 0.3.3 x x x x x
-

Network functions

-

-Network functions are not hypervisor-specific.They require the libvirtd -daemon to be running. Most network functions first appeared in libvirt 0.2.0. -

-
Function Since
virConnectNumOfNetworks 0.2.0
virConnectListNetworks 0.2.0
virConnectNumOfDefinedNetworks 0.2.0
virConnectListDefinedNetworks 0.2.0
virNetworkCreate 0.2.0
virNetworkCreateXML 0.2.0
virNetworkDefineXML 0.2.0
virNetworkDestroy 0.2.0
virNetworkFree 0.2.0
virNetworkGetAutostart 0.2.1
virNetworkGetConnect 0.3.0
virNetworkGetBridgeName 0.2.0
virNetworkGetName 0.2.0
virNetworkGetUUID 0.2.0
virNetworkGetUUIDString 0.2.0
virNetworkGetXMLDesc 0.2.0
virNetworkLookupByName 0.2.0
virNetworkLookupByUUID 0.2.0
virNetworkLookupByUUIDString 0.2.0
virNetworkSetAutostart 0.2.1
virNetworkUndefine 0.2.0
-
-
- - - diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 8cc3ffd7cf..0000000000 --- a/docs/index.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - - libvirt: The virtualization API - - - - -
- -
-

The virtualization API

-

libvirt is:

- -

libvirt supports:

- -

libvirt provides:

- -

- libvirt Logo

-
-
- - - diff --git a/docs/internals.html b/docs/internals.html deleted file mode 100644 index 44bbefc9df..0000000000 --- a/docs/internals.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - - - - libvirt: libvirt internals - - - - -
- -
-

libvirt internals

-

- 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. -

-
-
- - - diff --git a/docs/intro.html b/docs/intro.html deleted file mode 100644 index 524f73dd4a..0000000000 --- a/docs/intro.html +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - libvirt: Architecture - - - - -
- -
-

Architecture

-

Libvirt is a C toolkit manage the virtualization capabilities - of recent versions of Linux (and other OSes).

-

To avoid ambiguity about the goals, terms and specific concepts used - in libvirt documentation please see the Goal - section. -

-
-
- - - diff --git a/docs/java.html b/docs/java.html deleted file mode 100644 index dbb830c219..0000000000 --- a/docs/java.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - libvirt: Java API bindings - - - - -
- -
-

Java API bindings

-

Presentation

-

The Java bindings make use of JNA - to expose the C API in a Java friendly way. The bindings are are based on - work initiated by Toth Istvan.

-

Getting it

-

- The latest versions of the libvirt Java bindings can be downloaded from: -

- -

Maven

-

A maven repository is located at http://www.libvirt.org/maven2/ -which you can use to include this in your maven projects.

-

GIT source repository

-

The Java bindings code source is now maintained in a git repository available on -libvirt.org: -

-
-git clone git://libvirt.org/libvirt-java.git
-
-

-It can also be browsed at -

-
-
-http://libvirt.org/git/?p=libvirt-java.git;a=summary
-
-

-

GIT repository mirror

-

- The source code is also mirrored on gitorious - to aid in public development. You clone the repo with -

-
-  git clone git://gitorious.org/libvirt/libvirt-java.git
-
-

- It can also be browsed at -

-
-
-  http://gitorious.org/libvirt/libvirt-java
-
-

-

CVS repository access (Deprecated)

-

The old source repository uses CVS and anonymous access -is provided. Prior to accessing the server is it necessary to authenticate -using the password anoncvs. This can be accomplished with -the cvs login command: -

-
-  # cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs login
-
-

- Once authenticated, a checkout can be obtained using -

-
-  # cvs -d :pserver:anoncvs@libvirt.org:2401/data/cvs co libvirt-java
-
-

-

Building

-

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

-
-
-% cd libvirt-java
-% ant build
-
-

Content

-

The bindings are articulated around a few -classes in the org/libvirt package, notably the -Connect, Domain and Network -ones. Functions in the C API -taking virConnectPtr, virDomainPtr or -virNetworkPtr 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:

-

- int virConnectNumOfDomains -(virConnectPtr conn); -

-

- int virDomainSetMaxMemory -(virDomainPtr domain, unsigned long memory); -

-

become

-

- virConn.numOfDomains() -

-

- virDomain.setMaxMemory(long memory) -

-

There is of course some functions where the mapping is less direct -and using extra classes to map complex arguments. The Javadoc is available online or as -part of a separate libvirt-java-javadoc package.

-

So let's look at a simple example inspired from the -test.java test found in src in the source tree:

-
import org.libvirt.*;
-public class minitest {
-    public static void main(String[] args) {
-        Connect conn=null;
-        try{
-            conn = new Connect("test:///default", true);
-        } catch (LibvirtException e){
-            System.out.println("exception caught:"+e);
-            System.out.println(e.getError());
-        }
-        try{
-            Domain testDomain=conn.domainLookupByName("test");
-            System.out.println("Domain:" + testDomain.getName() + " id " +
-                               testDomain.getID() + " running " +
-                               testDomain.getOSType());
-        } catch (LibvirtException e){
-            System.out.println("exception caught:"+e);
-            System.out.println(e.getError());
-        }
-    }
-}
-
-

There is not much to comment about it, it really is a straight mapping -from the C API, the only points to notice are:

- -
-
- - - diff --git a/docs/logging.html b/docs/logging.html deleted file mode 100644 index 0a11c274f6..0000000000 --- a/docs/logging.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - libvirt: Logging in the library and the daemon - - - - -
- -
-

Logging in the library and the daemon

-

Libvirt includes logging facilities starting from version 0.6.0, - this complements the error handling - mechanism and APIs to allow tracing though the execution of the - library as well as in the libvirtd daemon.

-

The logging functionalities in libvirt are based on 3 key concepts, - similar to the one present in other generic logging facilities like - log4j:

- -

The library configuration of logging is though 3 environment variables - allowing to control the logging behaviour:

- -

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.

-

Similary the daemon logging behaviour can be tuned using 3 config - variables, stored in the configuration file: -

- -

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.

-

Libvirtd does not reload its logging configuration when issued a SIGHUP. - If you want to reload the configuration, you must do a service - libvirtd restart or manually stop and restart the daemon - yourself.

-

The syntax for filters and outputs is the same for both types of - variables.

-

The format for a filter is:

-
x:name
-

where name is a match string e.g. remote or - qemu and the x is the minimal level where matching messages - should be logged:

- -

Multiple filters can be defined in a single string, they just need to be - separated by spaces, e.g: "3:remote 4:event" to only get - warning or errors from the remote layer and only errors from the event - layer.

-

-

-

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.

-

The format for an output can be one of those 3 forms:

- -

In all cases the x prefix is the minimal level, acting as a filter:

- -

Multiple output can be defined , they just need to be separated by - spaces, e.g.: "3:syslog:libvirtd 1:file:/tmp/libvirt.log" - will log all warnings and errors to syslog under the libvirtd ident - but also log everything debugging and informations included in the - file /tmp/libvirt.log

-

For example setting up the following:

-
export LIBVIRT_DEBUG=1
-export LIBVIRT_LOG_OUTPUTS="1:file:virsh.log"
-

and then running virsh will accumulate the logs in the - virsh.log file in a way similar to:

-
14:29:04.771: debug : virInitialize:278 : register drivers
-14:29:04.771: debug : virRegisterDriver:618 : registering Test as driver 0
-

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.

-
-
- - - diff --git a/docs/news.html b/docs/news.html deleted file mode 100644 index 127365819a..0000000000 --- a/docs/news.html +++ /dev/null @@ -1,1431 +0,0 @@ - - - - - - - - - libvirt: Releases - - - - -
- -
-

Releases

-

Here is the list of official releases, however since it is early on in the -development of libvirt, it is preferable when possible to just use the CVS version or snapshot, contact the mailing list -and check the ChangeLog to gauge progress.

-

0.7.1: Sep 15 2009

- -

0.7.0: Aug 5 2009

- -

0.6.5: Jul 3 2009

- -

0.6.4: May 29 2009

- -

0.6.3: Apr 24 2009

- -

0.6.2: Apr 3 2009

- -

0.6.1: Mar 3 2009

- -

0.6.0: Jan 31 2009

- -

0.5.1: Dec 4 2008

- -

0.5.0: Nov 25 2008

- -

0.4.6: Sep 23 2008

- -

0.4.5: Sep 8 2008

- -

0.4.4: Jun 25 2008

- -

0.4.3: Jun 12 2008

- -

0.4.2: Apr 8 2008

- -

0.4.1: Mar 3 2008

- -

0.4.0: Dec 18 2007

- -

0.3.3: Sep 30 2007

- -

0.3.2: Aug 21 2007

- -

0.3.1: Jul 24 2007

- -

0.3.0: Jul 9 2007

- -

0.2.3: Jun 8 2007

- -

0.2.2: Apr 17 2007

- -

0.2.1: Mar 16 2007

- -

0.2.0: Feb 14 2007

- -

0.1.11: Jan 22 2007

- -

0.1.10: Dec 20 2006

- -

0.1.9: Nov 29 2006

- -

0.1.8: Oct 16 2006

- -

0.1.7: Sep 29 2006

- -

0.1.6: Sep 22 2006

- -

0.1.5: Sep 5 2006

- -

0.1.4: Aug 16 2006

- -

0.1.3: Jul 11 2006

- -

0.1.2: Jul 3 2006

- -

0.1.1: Jun 21 2006

- -

0.1.0: Apr 10 2006

- -

0.0.6: Feb 28 2006

- -

0.0.5: Feb 23 2006

- -

0.0.4: Feb 10 2006

- -

0.0.3: Feb 9 2006

- -

0.0.2: Jan 29 2006

- -

0.0.1: Dec 19 2005

- -
-
- - - diff --git a/docs/python.html b/docs/python.html deleted file mode 100644 index e44e8c7d25..0000000000 --- a/docs/python.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - libvirt: Python API bindings - - - - -
- -
-

Python API bindings

-

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 virConnect 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:

-

- int virConnectNumOfDomains -(virConnectPtr conn); -

-

- int virDomainSetMaxMemory -(virDomainPtr domain, unsigned long memory); -

-

become

-

- virConn::numOfDomains(self) -

-

- virDomain::setMaxMemory(self, memory) -

-

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:

- -

So let's look at a simple example inspired from the basic.py -test found in python/tests/ in the source tree:

-
import libvirt
-import sys
-
-conn = libvirt.openReadOnly(None)
-if conn == None:
-    print 'Failed to open connection to the hypervisor'
-    sys.exit(1)
-
-try:
-    dom0 = conn.lookupByName("Domain-0")
-except:
-    print 'Failed to find the main domain'
-    sys.exit(1)
-
-print "Domain 0: id %d running %s" % (dom0.ID(), dom0.OSType())
-print dom0.info()
-

There is not much to comment about it, it really is a straight mapping -from the C API, the only points to notice are:

- -
-
- - - diff --git a/docs/relatedlinks.html b/docs/relatedlinks.html deleted file mode 100644 index 96796ba8fe..0000000000 --- a/docs/relatedlinks.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - libvirt: Related links - - - - -
- -
-

Related links

-

- This page contains some links of interest in the area of virtualization. - There are separate pages covering applications using libvirt - and language bindings for libvirt. -

-

Other library bindings

- -

Hypervisors / emulators / containers

- -

Virtualization technology

- -
-
- - - diff --git a/docs/remote.html b/docs/remote.html deleted file mode 100644 index 57fc5376c4..0000000000 --- a/docs/remote.html +++ /dev/null @@ -1,752 +0,0 @@ - - - - - - - - - libvirt: Remote support - - - - -
- -
-

Remote support

-

-Libvirt allows you to access hypervisors running on remote -machines through authenticated and encrypted connections. -

- -

- Basic usage -

-

-On the remote machine, libvirtd should be running. -See the section -on configuring libvirtd for more information. -

-

-To tell libvirt that you want to access a remote resource, -you should supply a hostname in the normal URI that is passed -to virConnectOpen (or virsh -c ...). -For example, if you normally use qemu:///system -to access the system-wide QEMU daemon, then to access -the system-wide QEMU daemon on a remote machine called -oirase you would use qemu://oirase/system. -

-

-The section on remote URIs -describes in more detail these remote URIs. -

-

-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: -

- -

- Transports -

-

-Remote libvirt supports a range of transports: -

-
tls
TLS - 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 - generate client and - server certificates. - The standard port is 16514. -
unix
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 - /var/run/libvirt/libvirt-sock and - /var/run/libvirt/libvirt-sock-ro (the latter - for read-only connections). -
ssh
Transported over an ordinary - ssh - (secure shell) connection. - Requires Netcat (nc) - installed and libvirtd should be running - on the remote machine. You should use some sort of - ssh key management (eg. - ssh-agent) - otherwise programs which use - this transport will stop to ask for a password.
ext
Any external program which can make a connection to the - remote machine by means outside the scope of libvirt.
tcp
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. -
-

-The default transport, if no other is specified, is tls. -

-

- Remote URIs -

-

-See also: documentation on ordinary ("local") URIs. -

-

-Remote URIs have the general form ("[...]" meaning an optional part): -

-

driver[+transport]://[username@][hostname][:port]/[path][?extraparameters] -

-

-Either the transport or the hostname must be given in order -to distinguish this from a local URI. -

-

-Some examples: -

- -

- Extra parameters -

-

-Extra parameters can be added to remote URIs as part -of the query string (the part following ?). -Remote URIs understand the extra parameters shown below. -Any others are passed unmodified through to the back end. -Note that parameter values must be -URI-escaped. -

-
Name Transports Meaning
- name - - any transport - - 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. -
Example: name=qemu:///system
- command - ssh, ext - The external command. For ext transport this is required. - For ssh the default is ssh. - The PATH is searched for the command. -
Example: command=/opt/openssh/bin/ssh
- socket - unix, ssh - 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). -
Example: socket=/opt/libvirt/run/libvirt/libvirt-sock
- netcat - ssh - The name of the netcat command on the remote machine. - The default is nc. For ssh transport, libvirt - constructs an ssh command which looks like: - -
command -p port [-l username] hostname netcat -U socket
-
- - where port, username, hostname can be - specified as part of the remote URI, and command, netcat - and socket come from extra parameters (or - sensible defaults). - -
Example: netcat=/opt/netcat/bin/nc
- no_verify - tls - 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 - change the libvirtd - configuration. -
Example: no_verify=1
- no_tty - ssh - 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. -
Example: no_tty=1
-

- Generating TLS certificates -

-

- Public Key Infrastructure set up -

-

-If you are unsure how to create TLS certificates, skip to the -next section. -

-
Location Machine Description Required fields
- /etc/pki/CA/cacert.pem - Installed on all clients and servers CA's certificate (more info) n/a
- /etc/pki/libvirt/ private/serverkey.pem - Installed on the server Server's private key (more info) n/a
- /etc/pki/libvirt/ servercert.pem - Installed on the server Server's certificate signed by the CA. - (more info) CommonName (CN) must be the hostname of the server as it - is seen by clients.
- /etc/pki/libvirt/ private/clientkey.pem - Installed on the client Client's private key. (more info) n/a
- /etc/pki/libvirt/ clientcert.pem - Installed on the client Client's certificate signed by the CA - (more info) Distinguished Name (DN) can be checked against an access - control list (tls_allowed_dn_list). -
-

- Background to TLS certificates -

-

-Libvirt supports TLS certificates for verifying the identity -of the server and clients. There are two distinct checks involved: -

- -

-For full certificate checking you will need to have certificates -issued by a recognised Certificate -Authority (CA) 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. -

-

-Be aware that the default -configuration for libvirtd 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. -

-

- Setting up a Certificate Authority (CA) -

-

-You will need the GnuTLS -certtool program documented here. In Fedora, it is in the -gnutls-utils package. -

-

-Create a private key for your CA: -

-
-certtool --generate-privkey > cakey.pem
-
-

-and self-sign it by creating a file with the -signature details called -ca.info containing: -

-
-cn = Name of your organization
-ca
-cert_signing_key
-
-
-certtool --generate-self-signed --load-privkey cakey.pem \
-  --template ca.info --outfile cacert.pem
-
-

-(You can delete ca.info file now if you -want). -

-

-Now you have two files which matter: -

- -

cacert.pem has to be installed on clients and -server(s) to let them know that they can trust certificates issued by -your CA. -

-

-The normal installation directory for cacert.pem -is /etc/pki/CA/cacert.pem on all clients and servers. -

-

-To see the contents of this file, do: -

-
certtool -i --infile cacert.pem
-
-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
-[etc]
-
-

-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. -

-

- Issuing server certificates -

-

-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. -

-

-In the example below, clients will be connecting to the -server using a URI of -xen://oirase/, so the CN must be "oirase". -

-

-Make a private key for the server: -

-
-certtool --generate-privkey > serverkey.pem
-
-

-and sign that key with the CA's private key by first -creating a template file called server.info -(only the CN field matters, which as explained above must -be the server's hostname): -

-
-organization = Name of your organization
-cn = oirase
-tls_www_server
-encryption_key
-signing_key
-
-

-and sign: -

-
-certtool --generate-certificate --load-privkey serverkey.pem \
-  --load-ca-certificate cacert.pem --load-ca-privkey cakey.pem \
-  --template server.info --outfile servercert.pem
-
-

-This gives two files: -

- -

-We can examine this certificate and its signature: -

-
certtool -i --infile servercert.pem
-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
-
-

-Note the "Issuer" CN is "Red Hat Emerging Technologies" (the CA) and -the "Subject" CN is "oirase" (the server). -

-

-Finally we have two files to install: -

- -

- Issuing client certificates -

-

-For each client (ie. any program linked with libvirt, such as -virt-manager) -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: -

-
-C=GB,ST=London,L=London,O=Red Hat,CN=name_of_client
-
-

-The process is the same as for -setting up the -server certificate so here we just briefly cover the -steps. -

-
  1. -Make a private key: -
    -certtool --generate-privkey > clientkey.pem
    -
    -
  2. -Act as CA and sign the certificate. Create client.info containing: -
    -country = GB
    -state = London
    -locality = London
    -organization = Red Hat
    -cn = client1
    -tls_www_client
    -encryption_key
    -signing_key
    -
    -and sign by doing: -
    -certtool --generate-certificate --load-privkey clientkey.pem \
    -  --load-ca-certificate cacert.pem --load-ca-privkey cakey.pem \
    -  --template client.info --outfile clientcert.pem
    -
    -
  3. -Install the certificates on the client machine: -
    -cp clientkey.pem /etc/pki/libvirt/private/clientkey.pem
    -cp clientcert.pem /etc/pki/libvirt/clientcert.pem
    -
    -
-

- Troubleshooting TLS certificate problems -

-
failed to verify client's certificate
-

-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. -

-
-

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.

-

- libvirtd configuration file -

-

-Libvirtd (the remote daemon) is configured from a file called -/etc/libvirt/libvirtd.conf, or specified on -the command line using -f filename or ---config filename. -

-

-This file should contain lines of the form below. -Blank lines and comments beginning with # are ignored. -

-
setting = value
-

The following settings, values and default are:

-
Line Default Meaning
listen_tls [0|1] 1 (on) - 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. -
listen_tcp [0|1] 0 (off) - Listen for unencrypted TCP connections on the public TCP/IP port. - Note: it is also necessary to start the server in listening mode. -
tls_port "service" "16514" - The port number or service name to listen on for secure TLS connections. -
tcp_port "service" "16509" - The port number or service name to listen on for unencrypted TCP connections. -
mdns_adv [0|1] 1 (advertise with mDNS) - If set to 1 then the virtualization service will be advertised over - mDNS to hosts on the local LAN segment. -
mdns_name "name" "Virtualization Host HOSTNAME" - 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. -
unix_sock_group "groupname" "root" - 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 -
unix_sock_ro_perms "octal-perms" "0777" - The permissions for the UNIX domain socket for read-only client connections. - The default allows any user to monitor domains. -
unix_sock_rw_perms "octal-perms" "0700" - The permissions for the UNIX domain socket for read-write client connections. - The default allows only root to manage domains. -
tls_no_verify_certificate [0|1] 0 (certificates are verified) - If set to 1 then if a client certificate check fails, it is not an error. -
tls_no_verify_address [0|1] 0 (addresses are verified) - If set to 1 then if a client IP address check fails, it is not an error. -
key_file "filename" "/etc/pki/libvirt/ private/serverkey.pem" - 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. -
cert_file "filename" "/etc/pki/libvirt/ servercert.pem" - Change the path used to find the server's certificate. - If you set this to an empty string, then no certificate is loaded. -
ca_file "filename" "/etc/pki/CA/cacert.pem" - 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. -
crl_file "filename" (no CRL file is used) - 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. -
tls_allowed_dn_list ["DN1", "DN2"] (none - DNs are not checked) -

- Enable an access control list of client certificate Distinguished - Names (DNs) which can connect to the TLS port on this server. -

-

- The default is that DNs are not checked. -

-

- This list may contain wildcards such as "C=GB,ST=London,L=London,O=Red Hat,CN=*" - See the POSIX fnmatch function for the format - of the wildcards. -

-

- Note that if this is an empty list, no client can connect. -

-

- Note also that GnuTLS returns DNs without spaces - after commas between the fields (and this is what we check against), - but the openssl x509 tool shows spaces. -

-
-

- IPv6 support -

-

-The libvirtd service and libvirt remote client driver both use the -getaddrinfo() 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)'. -

-

- Limitations -

- -

-Please come and discuss these issues and more on the mailing list. -

-

- Implementation notes -

-

-The current implementation uses XDR-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. -

-

-The implementation should be considered strictly internal to -libvirt and subject to change at any time without notice. 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 the mailing list. -

-

-The messaging protocol is described in -qemud/remote_protocol.x. -

-

-Authentication and encryption (for TLS) is done using GnuTLS and the RPC protocol is unaware of this layer. -

-

-Protocol messages are sent using a simple 32 bit length word (encoded -XDR int) followed by the message header (XDR -remote_message_header) followed by the message body. The -length count includes the length word itself, and is measured in -bytes. Maximum message size is REMOTE_MESSAGE_MAX and to -avoid denial of services attacks on the XDR decoders strings are -individually limited to REMOTE_STRING_MAX 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 REMOTE_CALL message is sent from client to -server, and the server then replies synchronously with a single -REMOTE_REPLY message, but other forms of messaging are -also possible. -

-

-The protocol contains support for multiple program types and protocol -versioning, modelled after SunRPC. -

-
-
- - - diff --git a/docs/sitemap.html b/docs/sitemap.html deleted file mode 100644 index 24300d56db..0000000000 --- a/docs/sitemap.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - - libvirt: Sitemap - - - - -
- -
-

Sitemap

-
-
  • - Home - Front page of the libvirt website -
  • - News - Details of new features and bugs fixed in each release -
    • - Changelog - Latest commit messages from the source repository -
  • - Downloads - Get the latest source releases, binary builds and get access to the source repository -
  • - Documentation - Information for users, administrators and developers -
    • - Deployment - Information about deploying and using libvirt -
      • - URI format - The URI formats used for connecting to libvirt -
      • - Remote access - Enable remote access over TCP -
      • - Authentication - Configure authentication for the libvirt daemon -
      • - Windows port - Access the libvirt daemon from a native Windows client -
      • - Logging - The library and the daemon logging support -
    • - Architecture - Overview of the logical subsystems in the libvirt API -
      • - Goals - Terminology and goals of libvirt API -
      • - API concepts - The libvirt API concepts -
      • - Domains - Managing virtual machines -
      • - Network - Providing isolated networks and NAT based network connectivity -
      • - Storage - Managing storage pools and volumes -
      • - Node Devices - Enumerating host node devices -
    • - XML format - Description of the XML formats used in libvirt -
    • - Drivers - Hypervisor specific driver information -
      • - Xen - Driver the Xen hypervisor -
      • - QEMU / KVM - Driver for QEMU, KQEMU, KVM and Xenner -
      • - Linux Container - Driver for the Linux native container API -
      • - Test - Psuedo-driver simulating APIs in memory for test suites -
      • - Remote - Driver providing secure remote to the libvirt APIs -
      • - OpenVZ - Driver for the OpenVZ container technology -
      • - UML - Driver for the User Mode Linux technology -
      • - Storage - Driver for the storage management APIs -
      • - VirtualBox - Driver for VirtualBox -
      • - OpenNebula - Driver for OpenNebula -
    • - API reference - Reference manual for the C public API - -
      • - libvirt - core interfaces for the libvirt library -
      • - virterror - error handling interfaces for the libvirt library -
      • - Driver support - matrix of API support per hypervisor per release -
    • - Language bindings - Bindings of the libvirt API for other languages -
      • - Python - overview of the python API bindings -
      • - Java - overview of the Java API bindings -
    • - Internals - Working on the internals of libvirt API, driver and daemon code -
  • - Wiki - User contributed content -
  • - FAQ - Frequently asked questions -
  • - Bug reports - How and where to report bugs and request features -
  • - Contact - How to contact the developers via email and IRC -
  • - Related Links - Miscellaneous links of interest related to libvirt -
    • - Applications - Overview of applications using the libvirt APIs -
  • - Sitemap - Overview of all content on the website -
-
-
- - - diff --git a/docs/storage.html b/docs/storage.html deleted file mode 100644 index fd073c0aa7..0000000000 --- a/docs/storage.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - - - - libvirt: Storage Management - - - - -
- -
-

Storage Management

-

-This page describes the backends for the storage management capabilities in -libvirt. -

- -

- Directory pool -

-

- A pool with a type of dir 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 qcow,qcow2,vmdk, - cow, etc as supported by the qemu-img - program. If the directory does not exist at the time the pool is - defined, the build operation can be used to create it. -

-

Example pool input definition

-
-      <pool type="dir">
-        <name>virtimages</name>
-        <target>
-          <path>/var/lib/virt/images</path>
-        </target>
-      </pool>
-    
-

Valid pool format types

-

- The directory pool does not use the pool format type element. -

-

Valid volume format types

-

- One of the following options: -

- -

- When listing existing volumes all these formats are supported - natively. When creating new volumes, only a subset may be - available. The raw type is guaranteed always - available. The qcow2 type can be created if - either qemu-img or qcow-create tools - are present. The others are dependent on support of the - qemu-img tool. - -

-

- Filesystem pool -

-

- 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. -

-

Example pool input

-
-      <pool type="fs">
-        <name>virtimages</name>
-        <source>
-          <device path="/dev/VolGroup00/VirtImages"/>
-        </source>
-        <target>
-          <path>/var/lib/virt/images</path>
-        </target>
-      </pool>
-    
-

Valid pool format types

-

- The filesystem pool supports the following formats: -

- -

Valid volume format types

-

- The valid volume types are the same as for the directory - pool type. -

-

- Network filesystem pool -

-

- 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. -

-

Example pool input

-
-      <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>
-    
-

Valid pool format types

-

- The network filesystem pool supports the following formats: -

- -

Valid volume format types

-

- The valid volume types are the same as for the directory - pool type. -

-

- Logical volume pools -

-

- 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. -

-

Example pool input

-
-      <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>
-    
-

Valid pool format types

-

- The logical volume pool does not use the pool format type element. -

-

Valid volume format types

-

- The logical volume pool does not use the volume format type element. -

-

- Disk volume pools -

-

- 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. -

-

Example pool input

-
-      <pool type="disk">
-        <name>sda</name>
-        <source>
-          <device path='/dev/sda'/>
-        </source>
-        <target>
-          <path>/dev</path>
-        </target>
-      </pool>
-    
-

Valid pool format types

-

- The disk volume pool accepts the following pool format types, representing - the common partition table types: -

- -

- The dos or gpt formats are recommended for - best portability - the latter is needed for disks larger than 2TB. -

-

Valid volume format types

-

- The disk volume pool accepts the following volume format types, representing - the common partition entry types: -

- -

- iSCSI volume pools -

-

- 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 /dev/disk/by-path or /dev/disk/by-id - for the target path. These provide persistent stable naming for LUNs -

-

Example pool input

-
-      <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>
-    
-

Valid pool format types

-

- The iSCSI volume pool does not use the pool format type element. -

-

Valid volume format types

-

- The iSCSI volume pool does not use the volume format type element. -

-
-
- - - diff --git a/docs/uri.html b/docs/uri.html deleted file mode 100644 index ee25bfc86d..0000000000 --- a/docs/uri.html +++ /dev/null @@ -1,386 +0,0 @@ - - - - - - - - - libvirt: Connection URIs - - - - -
- -
-

Connection URIs

-

-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. -

-

-To this end, libvirt uses URIs as used on the Web and as defined in RFC 2396. This page -documents libvirt URIs. -

- -

- Specifying URIs to libvirt -

-

-The URI is passed as the name parameter to virConnectOpen or virConnectOpenReadOnly. For example: -

-
-virConnectPtr conn = virConnectOpenReadOnly ("test:///default");
-
-

- Specifying URIs to virsh, virt-manager and virt-install -

-

-In virsh use the -c or --connect option: -

-
-virsh -c test:///default list
-
-

-If virsh finds the environment variable -VIRSH_DEFAULT_CONNECT_URI set, it will try this URI by -default. -

-

-When using the interactive virsh shell, you can also use the -connect URI command to reconnect to another -hypervisor. -

-

-In virt-manager use the -c or --connect=URI option: -

-
-virt-manager -c test:///default
-
-

-In virt-install use the --connect=URI option: -

-
-virt-install --connect=test:///default [other options]
-
-

- xen:/// URI -

-

- This section describes a feature which is new in libvirt > -0.2.3. For libvirt ≤ 0.2.3 use "xen". -

-

-To access a Xen hypervisor running on the local machine -use the URI xen:///. -

-

- qemu:///... QEMU and KVM URIs -

-

-To use QEMU support in libvirt you must be running the -libvirtd daemon (named libvirt_qemud -in releases prior to 0.3.0). The purpose of this -daemon is to manage qemu instances. -

-

-The libvirtd daemon should be started by the -init scripts when the machine boots. It should appear as -a process libvirtd --daemon running as root -in the background and will handle qemu instances on behalf -of all users of the machine (among other things).

-

-So to connect to the daemon, one of two different URIs is used: -

- -

-(If you do libvirtd --help, the daemon will print -out the paths of the Unix domain socket(s) that it listens on in -the various different modes). -

-

-KVM URIs are identical. You select between qemu, qemu accelerated and -KVM guests in the guest XML as described -here. -

-

- Remote URIs -

-

-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: -

-
Local URI Remote URI Meaning
- xen:/// - - xen://oirase/ - Connect to the Xen hypervisor running on host oirase - using TLS.
- NULL - - remote://oirase/ - Connect to the "default" hypervisor running on host oirase - using TLS.
- xen:/// - - xen+ssh://oirase/ - Connect to the Xen hypervisor running on host oirase - by going over an ssh connection.
- test:///default - - test+tcp://oirase/default - Connect to the test driver on host oirase - using an unsecured TCP connection.
-

-Remote URIs in libvirt offer a rich syntax and many features. -We refer you to the libvirt -remote URI reference and full documentation -for libvirt remote support. -

-

- test:///... Test URIs -

-

-The test driver is a dummy hypervisor for test purposes. -The URIs supported are: -

- -

- Other & legacy URI formats -

-

- NULL and empty string URIs -

-

-Libvirt allows you to pass a NULL pointer to -virConnectOpen*. Empty string ("") acts in -the same way. Traditionally this has meant -connect to the local Xen hypervisor. However in future this -may change to mean connect to the best available hypervisor. -

-

-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. -

-

-In any case applications linked to libvirt can continue to pass -NULL 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 xen:/// URI. -

-

- File paths (xend-unix-server) -

-

-If XenD is running and configured in /etc/xen/xend-config.sxp: -

-
-(xend-unix-server yes)
-
-

-then it listens on a Unix domain socket, usually at -/var/lib/xend/xend-socket. You may pass a different path -using a file URI such as: -

-
-virsh -c ///var/run/xend/xend-socket
-
-

- Legacy: http://... (xend-http-server) -

-

-If XenD is running and configured in /etc/xen/xend-config.sxp: - -

-
-(xend-http-server yes)
-
-

-then it listens on TCP port 8000. libvirt allows you to -try to connect to xend running on remote machines by passing -http://hostname[:port]/, for example: - -

-
-virsh -c http://oirase/ list
-
-

-This method is unencrypted and insecure and is definitely not -recommended for production use. Instead use libvirt's remote support. -

-

-Notes: -

-
  1. The HTTP client does not fully support IPv6.
  2. Many features do not work as expected across HTTP connections, in - particular, virConnectGetCapabilities. - The remote support however does work - correctly.
  3. 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".
-

- Legacy: "xen" -

-

-Another legacy URI is to specify name as the string -"xen". This will continue to refer to the Xen -hypervisor. However you should prefer a full xen:/// URI in all future code. -

-

- Legacy: Xen proxy -

-

-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. -

-

-There is no specific "Xen proxy" URI. However if a Xen URI of any of -the ordinary or legacy forms is used (eg. NULL, -"", "xen", ...) which fails, and the -user is not root, and the Xen proxy socket can be connected to -(/tmp/libvirt_proxy_conn), then libvirt will use a proxy -connection. -

-

-You should consider using libvirt remote support -in future. -

-
-
- - - diff --git a/docs/windows.html b/docs/windows.html deleted file mode 100644 index 39dd1f6ed6..0000000000 --- a/docs/windows.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - libvirt: Windows support - - - - -
- -
-

Windows support

-

- Libvirt can be compiled on Windows - using the free MinGW compiler. - You can also cross-compile to a Windows target - from a Fedora machine using the packages available - from - the Fedora MinGW project - (which includes a working libvirt specfile). -

-

- Libvirt can only be built as a client on Windows - allowing remote access to systems libvirt servers. - Configure libvirt like this: -

-
-./configure \
-  --without-sasl \
-  --without-avahi \
-  --without-polkit \
-  --without-python \
-  --without-xen \
-  --without-qemu \
-  --without-lxc \
-  --without-openvz \
-  --without-libvirtd
-
-

- We intend to supply Windows binaries on this page - later, but at the moment you have to compile from source. -

-
-
- - -