From 9cae1d5ed66b759fa33d8381c0de9dc6fdedaea8 Mon Sep 17 00:00:00 2001
From: Daniel Veillard
Date: Fri, 24 Apr 2009 14:04:54 +0000
Subject: [PATCH] release of 0.6.3 * NEWS configure.in libvirt.spec.in docs/*:
release of 0.6.3 * po/*: regenerated * src/libvirt.c src/virterror.c: fixed
some function comments Daniel
---
ChangeLog | 6 +
NEWS | 33 ++
configure.in | 2 +-
docs/apibuild.py | 1 +
docs/devhelp/libvirt-libvirt.html | 30 +-
docs/html/libvirt-libvirt.html | 24 +-
docs/index.html | 2 +
docs/index.html.in | 3 +
docs/libvirt-api.xml | 46 ++-
docs/libvirt-refs.xml | 108 +++++-
docs/news.html | 26 ++
docs/news.html.in | 33 ++
include/libvirt/libvirt.h | 2 +-
libvirt.spec.in | 4 +
po/af.po | 524 +++++++++++++-------------
po/am.po | 524 +++++++++++++-------------
po/ar.po | 524 +++++++++++++-------------
po/as.po | 524 +++++++++++++-------------
po/be.po | 524 +++++++++++++-------------
po/bg.po | 524 +++++++++++++-------------
po/bn.po | 524 +++++++++++++-------------
po/bn_IN.po | 524 +++++++++++++-------------
po/bs.po | 524 +++++++++++++-------------
po/ca.po | 524 +++++++++++++-------------
po/cs.po | 524 +++++++++++++-------------
po/cy.po | 524 +++++++++++++-------------
po/da.po | 524 +++++++++++++-------------
po/de.po | 524 +++++++++++++-------------
po/el.po | 524 +++++++++++++-------------
po/en_GB.po | 524 +++++++++++++-------------
po/es.po | 524 +++++++++++++-------------
po/et.po | 524 +++++++++++++-------------
po/eu_ES.po | 524 +++++++++++++-------------
po/fa.po | 524 +++++++++++++-------------
po/fi.po | 524 +++++++++++++-------------
po/fr.po | 524 +++++++++++++-------------
po/gl.po | 524 +++++++++++++-------------
po/gu.po | 524 +++++++++++++-------------
po/he.po | 524 +++++++++++++-------------
po/hi.po | 524 +++++++++++++-------------
po/hr.po | 524 +++++++++++++-------------
po/hu.po | 524 +++++++++++++-------------
po/hy.po | 524 +++++++++++++-------------
po/id.po | 524 +++++++++++++-------------
po/is.po | 524 +++++++++++++-------------
po/it.po | 524 +++++++++++++-------------
po/ja.po | 524 +++++++++++++-------------
po/ka.po | 524 +++++++++++++-------------
po/kn.po | 524 +++++++++++++-------------
po/ko.po | 524 +++++++++++++-------------
po/ku.po | 524 +++++++++++++-------------
po/libvirt.pot | 606 +++++++++++++++---------------
po/lo.po | 524 +++++++++++++-------------
po/lt.po | 524 +++++++++++++-------------
po/lv.po | 524 +++++++++++++-------------
po/mk.po | 524 +++++++++++++-------------
po/ml.po | 524 +++++++++++++-------------
po/mr.po | 524 +++++++++++++-------------
po/ms.po | 524 +++++++++++++-------------
po/my.po | 524 +++++++++++++-------------
po/nb.po | 524 +++++++++++++-------------
po/nl.po | 606 +++++++++++++++---------------
po/nn.po | 524 +++++++++++++-------------
po/nso.po | 524 +++++++++++++-------------
po/or.po | 524 +++++++++++++-------------
po/pa.po | 524 +++++++++++++-------------
po/pl.po | 524 +++++++++++++-------------
po/pt.po | 524 +++++++++++++-------------
po/pt_BR.po | 524 +++++++++++++-------------
po/ro.po | 524 +++++++++++++-------------
po/ru.po | 524 +++++++++++++-------------
po/si.po | 524 +++++++++++++-------------
po/sk.po | 524 +++++++++++++-------------
po/sl.po | 524 +++++++++++++-------------
po/sq.po | 524 +++++++++++++-------------
po/sr.po | 524 +++++++++++++-------------
po/sr@latin.po | 524 +++++++++++++-------------
po/sv.po | 524 +++++++++++++-------------
po/ta.po | 524 +++++++++++++-------------
po/te.po | 524 +++++++++++++-------------
po/th.po | 524 +++++++++++++-------------
po/tr.po | 524 +++++++++++++-------------
po/uk.po | 524 +++++++++++++-------------
po/ur.po | 524 +++++++++++++-------------
po/vi.po | 524 +++++++++++++-------------
po/zh_CN.po | 524 +++++++++++++-------------
po/zh_TW.po | 524 +++++++++++++-------------
po/zu.po | 524 +++++++++++++-------------
src/libvirt.c | 30 +-
src/virterror.c | 15 +-
90 files changed, 19769 insertions(+), 19536 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ef83ce782b..05b0712905 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Apr 24 15:55:56 CEST 2009 Daniel Veillard
+
+ * NEWS configure.in libvirt.spec.in docs/*: release of 0.6.3
+ * po/*: regenerated
+ * src/libvirt.c src/virterror.c: fixed some function comments
+
Fri Apr 24 14:07:22 BST 2009 Daniel P. Berrange
Add virNodeDeviceCreateXML / virNodeDeviceDestroy boilerplate
diff --git a/NEWS b/NEWS
index 35bad910c4..3276dae9a9 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,39 @@
http://libvirt.org/news.html
+0.6.3: Apr 24 2009:
+ - New features: VirtualBox driver support (Pritesh Kothari),
+ virt-xml-validate new command (Daniel Berrange)
+ - Portability: patch to build on Centos (Joseph Shraibman),
+ build breakage (Anton Protopopov),
+ - Documentation: Linux Containers documentation (Serge Hallyn),
+ improvement and updates of architecture pages, fix
+ virNodeGetFreeMemory documentation to reflect reality,
+ man page cleanups (Daniel Berrange), man page typo
+ (Robert P. J. Day), VirtualBox Documentation (Pritesh Kothari),
+
+ - Bug fixes: veth off-by-one error (Dan Smith), vcpupin to inactive
+ Xen crash (Takahashi Tomohiro), virsh ttyconsole return value,
+ use format= not fmt= on QEmu commandline (Mark McLoughlin),
+ use UUID for internal domain lookups (Daniel Berrange), remote
+ domain ID related bugs (Daniel Berrange), QEmu pidfile handling
+ bugs (Daniel Berrange), network config handling on old Xen (Daniel
+ Berrange)
+ - Improvements: add SCSI storage rescan (David Allan), rootless
+ LXC containers support improvements (Serge Hallyn), getHostname
+ support for LXC (Dan Smith), cleanup and logging output of some
+ domain functions (Guido Günther), drop pool lock when allocating
+ volumes (Cole Robinson), LXC handle kernel without CLONE_NEWUSER
+ support (Serge Hallyn), cpu pinning on defined Xen domains (Takahashi
+ Tomohiro), dynamic bridge names support (Soren Hansen), LXC use
+ of private /dev/pts when available (Daniel Berrange),
+ virNodeDeviceCreateXML and virNodeDeviceDestroy entry points
+ (Dave Allan)
+ - Cleanups: don't hardcode getgrnam_r buffer to 1024 bytes (Guido
+ Günther), qemudBuildCommandLine API cleanup (Daniel Berrange),
+
+
+
0.6.2: Apr 3 2009:
- New features: support SASL auth for VNC server (Daniel Berrange),
memory ballooning in QEMU (Daniel Berrange), SCSI HBA storage pool
diff --git a/configure.in b/configure.in
index dcacc7ff18..1cdb64c6cb 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT([libvirt], [0.6.2])
+AC_INIT([libvirt], [0.6.3])
AC_CONFIG_SRCDIR([src/libvirt.c])
AC_CONFIG_AUX_DIR([build-aux])
AM_CONFIG_HEADER([config.h])
diff --git a/docs/apibuild.py b/docs/apibuild.py
index bb309f3abb..6fec0497fa 100755
--- a/docs/apibuild.py
+++ b/docs/apibuild.py
@@ -39,6 +39,7 @@ ignored_functions = {
"virDomainMigratePrepare": "private function for migration",
"virDomainMigratePrepare2": "private function for migration",
"virDrvSupportsFeature": "private function for remote access",
+ "DllMain": "specific function fo Win32",
}
def escape(raw):
diff --git a/docs/devhelp/libvirt-libvirt.html b/docs/devhelp/libvirt-libvirt.html
index 6deba254da..b749b53af5 100644
--- a/docs/devhelp/libvirt-libvirt.html
+++ b/docs/devhelp/libvirt-libvirt.html
@@ -130,6 +130,7 @@ int virDomainGetSchedulerParameters
int virConnectNumOfDefinedNetworks (virConnectPtr conn);
int virConnectNumOfDomains (virConnectPtr conn);
int virNetworkGetUUID (virNetworkPtr network,
unsigned char * uuid);
+virNodeDevicePtr virNodeDeviceCreateXML (virConnectPtr conn,
const char * xmlDesc,
unsigned int flags);
virConnectPtr virStoragePoolGetConnect (virStoragePoolPtr pool);
int virConnectGetVersion (virConnectPtr conn,
unsigned long * hvVer);
int virDomainFree (virDomainPtr domain);
@@ -199,6 +200,7 @@ char * virConnectFindStoragePoolSour
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 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);
@@ -882,7 +884,7 @@ The content of this structure is not made public by the API.
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: | |
+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.
@@ -1026,7 +1028,7 @@ The content of this structure is not made public by the API.
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().
@@ -1146,7 +1148,7 @@ The content of this structure is not made public by the API.
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.
@@ -1155,10 +1157,18 @@ The content of this structure is not made public by the API.
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. |
+
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.
@@ -1190,15 +1200,15 @@ The content of this structure is not made public by the API.
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: | |
+
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: | |
+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 kilobytes for each cell requested, starting with startCell (in freeMems[0]), up to either (startCell + maxCells), or the number of additional cells in the node, whichever is smaller.
@@ -1306,7 +1316,7 @@ The content of this structure is not made public by the API.
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
@@ -1370,7 +1380,7 @@ The content of this structure is not made public by the API.
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-libvirt.html b/docs/html/libvirt-libvirt.html
index a79ced6bdd..48dc7c7871 100644
--- a/docs/html/libvirt-libvirt.html
+++ b/docs/html/libvirt-libvirt.html
@@ -202,6 +202,8 @@ char * virNetworkGetXMLDesc (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)
@@ -382,7 +384,7 @@ int virStorageVolRef (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 |
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
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 |
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.
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 |
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: | |
int virDomainAttachDevice (virDomainPtr domain,
const char * xml)
+
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 |
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. |
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 |
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. |
int virDomainCoreDump (virDomainPtr domain,
const char * to,
int flags)
@@ -418,7 +420,7 @@ int virStorageVolRef (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). |
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. |
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. |
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.
int virDomainRestore (virConnectPtr conn,
const char * from)
+
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. |
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. |
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. |
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. |
int virDomainSetAutostart (virDomainPtr domain,
int autostart)
@@ -457,10 +459,12 @@ int virStorageVolRef (
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. |
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. |
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. |
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.
int virNetworkSetAutostart (virNetworkPtr network,
int autostart)
+
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. |
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 |
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 |
int virNodeDeviceDettach (virNodeDevicePtr dev)
-
int virNodeDeviceFree (virNodeDevicePtr dev)
+
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 |
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 |
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. |
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. |
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. |
const char * virNodeDeviceGetName (virNodeDevicePtr dev)
Just return the device name
dev: | the device |
Returns: | the device name or NULL in case of error |
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. |
char * virNodeDeviceGetXMLDesc (virNodeDevicePtr dev,
unsigned int flags)
@@ -468,9 +472,9 @@ int virStorageVolRef (
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. |
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. |
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. |
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: | |
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.
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: | |
int virNodeGetCellsFreeMemory (virConnectPtr conn,
unsigned long long * freeMems,
int startCell,
int maxCells)
+
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. |
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. |
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. |
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 kilobytes for each cell requested, starting with startCell (in freeMems[0]), up to either (startCell + maxCells), or the number of additional cells in the node, whichever is smaller.
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. |
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 |
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. |
int virNodeGetSecurityModel (virConnectPtr conn,
virSecurityModelPtr secmodel)
@@ -497,7 +501,7 @@ int virStorageVolRef (
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 |
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 |
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 |
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.
int virStoragePoolRefresh (virStoragePoolPtr pool,
unsigned int flags)
+
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. |
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 |
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 |
int virStoragePoolUndefine (virStoragePoolPtr pool)
Undefine an inactive storage pool
pool: | pointer to storage pool |
Returns: | a virStoragePoolPtr object, or NULL if creation failed |
virStorageVolPtr virStorageVolCreateXML (virStoragePoolPtr pool,
const char * xmldesc,
unsigned int flags)
@@ -513,5 +517,5 @@ int virStorageVolRef (
conn: | pointer to hypervisor connection |
key: | globally unique key |
Returns: | a storage volume, or NULL if not found / error |
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 |
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 |
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.