char * <ahref="#virStoragePoolGetXMLDesc">virStoragePoolGetXMLDesc</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags);
int <ahref="#virNodeGetCellsFreeMemory">virNodeGetCellsFreeMemory</a> (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> unsigned long long * freeMems, <br/> int startCell, <br/> int maxCells);
int <ahref="#virStoragePoolSetAutostart">virStoragePoolSetAutostart</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> int autostart);
<ahref="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a><ahref="#virStorageVolCreateXML">virStorageVolCreateXML</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * xmldesc, <br/> unsigned int flags);
int <ahref="#virDomainGetSchedulerParameters">virDomainGetSchedulerParameters</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/><ahref="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br/> int * nparams);
int <ahref="#virConnectGetVersion">virConnectGetVersion</a> (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> unsigned long * hvVer);
int <ahref="#virDomainFree">virDomainFree</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
int <ahref="#virDomainSetAutostart">virDomainSetAutostart</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> int autostart);
int <ahref="#virDomainSetMaxMemory">virDomainSetMaxMemory</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned long memory);
char * <ahref="#virDomainGetXMLDesc">virDomainGetXMLDesc</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> int flags);
int <ahref="#virStoragePoolGetUUID">virStoragePoolGetUUID</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned char * uuid);
int <ahref="#virStorageVolGetInfo">virStorageVolGetInfo</a> (<ahref="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/><ahref="libvirt-libvirt.html#virStorageVolInfoPtr">virStorageVolInfoPtr</a> info);
int <ahref="#virNetworkGetAutostart">virNetworkGetAutostart</a> (<ahref="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br/> int * autostart);
char * <ahref="#virStorageVolGetXMLDesc">virStorageVolGetXMLDesc</a> (<ahref="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/> unsigned int flags);
int <ahref="#virDomainSetSchedulerParameters">virDomainSetSchedulerParameters</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/><ahref="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br/> int nparams);
int <ahref="#virConnectListDomains">virConnectListDomains</a> (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> int * ids, <br/> int maxids);
int <ahref="#virDomainCoreDump">virDomainCoreDump</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> const char * to, <br/> int flags);
int <ahref="#virDomainSetMemory">virDomainSetMemory</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned long memory);
int <ahref="#virNetworkSetAutostart">virNetworkSetAutostart</a> (<ahref="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br/> int autostart);
int <ahref="#virStoragePoolDelete">virStoragePoolDelete</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags);
int <ahref="#virStoragePoolGetAutostart">virStoragePoolGetAutostart</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> int * autostart);
int <ahref="#virDomainGetAutostart">virDomainGetAutostart</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> int * autostart);
int <ahref="#virStoragePoolListVolumes">virStoragePoolListVolumes</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> char ** const names, <br/> int maxnames);
int <ahref="#virStoragePoolGetInfo">virStoragePoolGetInfo</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/><ahref="libvirt-libvirt.html#virStoragePoolInfoPtr">virStoragePoolInfoPtr</a> info);
int <ahref="#virStoragePoolRefresh">virStoragePoolRefresh</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags);
int <ahref="#virConnectNumOfDefinedDomains">virConnectNumOfDefinedDomains</a> (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
int <ahref="#virDomainGetMaxVcpus">virDomainGetMaxVcpus</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
char * <ahref="#virDomainGetSchedulerType">virDomainGetSchedulerType</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> int * nparams);
int <ahref="#virDomainDetachDevice">virDomainDetachDevice</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> const char * xml);
int <ahref="#virStoragePoolNumOfVolumes">virStoragePoolNumOfVolumes</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool);
int <ahref="#virStoragePoolGetUUIDString">virStoragePoolGetUUIDString</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> char * buf);
int <ahref="#virStoragePoolUndefine">virStoragePoolUndefine</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool);
int <ahref="#virStorageVolDelete">virStorageVolDelete</a> (<ahref="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/> unsigned int flags);
int <ahref="#virNetworkUndefine">virNetworkUndefine</a> (<ahref="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network);
int <ahref="#virConnectListDefinedStoragePools">virConnectListDefinedStoragePools</a> (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> char ** const names, <br/> int maxnames);
int <ahref="#virStoragePoolBuild">virStoragePoolBuild</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags);
int <ahref="#virConnectGetMaxVcpus">virConnectGetMaxVcpus</a> (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> const char * type);
int <ahref="#virDomainGetUUIDString">virDomainGetUUIDString</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> char * buf);
int <ahref="#virConnectNumOfDefinedStoragePools">virConnectNumOfDefinedStoragePools</a> (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn);
int <ahref="#virStoragePoolCreate">virStoragePoolCreate</a> (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags);
int <ahref="#virDomainSetVcpus">virDomainSetVcpus</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int nvcpus);
unsigned int <ahref="#virDomainGetID">virDomainGetID</a> (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain);
</pre><p>This macro is to be used in conjunction with virDomainGetVcpus() and virDomainPinVcpu() APIs. <ahref="libvirt-libvirt.html#VIR_COPY_CPUMAP">VIR_COPY_CPUMAP</a> macro extract the cpumap of the specified vcpu from cpumaps array and copy it into cpumap to be used later by virDomainPinVcpu() API.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an array of cpumap (in 8-bit bytes) (IN)</td></tr><tr><td><spanclass="term"><i><tt>maplen</tt></i>:</span></td><td>the length (in bytes) of one cpumap</td></tr><tr><td><spanclass="term"><i><tt>vcpu</tt></i>:</span></td><td>the virtual CPU number</td></tr><tr><td><spanclass="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a cpumap (in 8-bit bytes) (OUT) This cpumap must be previously allocated by the caller (ie: malloc(maplen))</td></tr></tbody></table></div>
</pre><p>This macro is to be used in conjunction with virDomainPinVcpu() API. It returns the length (in bytes) required to store the complete CPU map between a single virtual & all physical CPUs of a domain.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>cpu</tt></i>:</span></td><td>number of physical CPUs</td></tr></tbody></table></div>
</pre><p>This macro is to be used in conjunction with virDomainGetVcpus() API. <ahref="libvirt-libvirt.html#VIR_CPU_USABLE">VIR_CPU_USABLE</a> macro returns a non zero value (true) if the cpu is usable by the vcpu, and 0 otherwise.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an array of cpumap (in 8-bit bytes) (IN)</td></tr><tr><td><spanclass="term"><i><tt>maplen</tt></i>:</span></td><td>the length (in bytes) of one cpumap</td></tr><tr><td><spanclass="term"><i><tt>vcpu</tt></i>:</span></td><td>the virtual CPU number</td></tr><tr><td><spanclass="term"><i><tt>cpu</tt></i>:</span></td><td>the physical CPU number</td></tr></tbody></table></div>
</pre><p>This macro is to be used in conjunction with virDomainGetVcpus() and virDomainPinVcpu() APIs. <ahref="libvirt-libvirt.html#VIR_GET_CPUMAP">VIR_GET_CPUMAP</a> macro returns a pointer to the cpumap of the specified vcpu from cpumaps array.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an array of cpumap (in 8-bit bytes) (IN)</td></tr><tr><td><spanclass="term"><i><tt>maplen</tt></i>:</span></td><td>the length (in bytes) of one cpumap</td></tr><tr><td><spanclass="term"><i><tt>vcpu</tt></i>:</span></td><td>the virtual CPU number</td></tr></tbody></table></div>
</pre><p>This macro is to calculate the total number of CPUs supported but not necessary active in the host.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>nodeinfo</tt></i>:</span></td><td><ahref="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> instance</td></tr></tbody></table></div>
</pre><p>This macro is to be used in conjunction with virDomainPinVcpu() API. USE_CPU macro reset the bit (CPU not usable) of the related cpu in cpumap.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)</td></tr><tr><td><spanclass="term"><i><tt>cpu</tt></i>:</span></td><td>the physical CPU number</td></tr></tbody></table></div>
</pre><p>This macro is to be used in conjunction with virDomainPinVcpu() API. USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.</p><divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)</td></tr><tr><td><spanclass="term"><i><tt>cpu</tt></i>:</span></td><td>the physical CPU number</td></tr></tbody></table></div>
</pre><p>a <ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> is pointer to a <ahref="libvirt-libvirt.html#virConnect">virConnect</a> private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.</p>
</pre><p>a <ahref="libvirt-libvirt.html#virDomainInfoPtr">virDomainInfoPtr</a> is a pointer to a <ahref="libvirt-libvirt.html#virDomainInfo">virDomainInfo</a> structure.</p>
</pre><p>a <ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> is pointer to a <ahref="libvirt-libvirt.html#virDomain">virDomain</a> private structure, this is the type used to reference a Xen domain in the API.</p>
</pre><p>a <ahref="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> is pointer to a <ahref="libvirt-libvirt.html#virNetwork">virNetwork</a> private structure, this is the type used to reference a virtual network in the API.</p>
</pre><p>a <ahref="libvirt-libvirt.html#virNodeInfoPtr">virNodeInfoPtr</a> is a pointer to a <ahref="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> structure.</p>
</pre><p>a <ahref="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> is a pointer to a <ahref="libvirt-libvirt.html#virSchedParameter">virSchedParameter</a> structure.</p>
</pre><p>a <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> is pointer to a <ahref="libvirt-libvirt.html#virStoragePool">virStoragePool</a> private structure, this is the type used to reference a storage pool in the API.</p>
</pre><p>a <ahref="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> is pointer to a <ahref="libvirt-libvirt.html#virStorageVol">virStorageVol</a> private structure, this is the type used to reference a storage volume in the API.</p>
</pre><p>This function closes the connection to the Hypervisor. This should not be called if further interaction with the Hypervisor are needed especially if there is running domain which need further monitoring by the application.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of error.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, or an XML string defining the capabilities. The client must free the returned string after use.</td></tr></tbody></table></div></div>
</pre><p>This returns the system hostname on which the hypervisor is running (the result of the gethostname(2) system call). If we are connected to a remote system, then this returns the hostname of the remote system.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to a hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the hostname which must be freed by the caller, or NULL if there was an error.</td></tr></tbody></table></div></div>
</pre><p>Provides the maximum number of virtual CPUs supported for a guest VM of a specific type. The 'type' parameter here corresponds to the 'type' attribute in the <domain> element of the XML.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>type</tt></i>:</span></td><td>value of the 'type' attribute in the <domain> element</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the maximum of virtual CPU or -1 in case of error.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a static zero terminated string otherwise. See also: http://www.redhat.com/archives/libvir-list/2007-February/msg00096.html</td></tr></tbody></table></div></div>
</pre><p>This returns the URI (name) of the hypervisor connection. Normally this is the same as or similar to the string passed to the virConnectOpen/virConnectOpenReadOnly call, but the driver may make the URI canonical. If name == NULL was passed to virConnectOpen, then the driver will return a non-NULL URI which can be used to connect to the same hypervisor later.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to a hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the URI string which must be freed by the caller, or NULL if there was an error.</td></tr></tbody></table></div></div>
</pre><p>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with privileged access to the hypervisor, not with a Read-Only connection.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>hvVer</tt></i>:</span></td><td>return value for the version of the running hypervisor (OUT)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise. if the version can't be extracted by lack of capacities returns 0 and @hvVer is 0, otherwise @hvVer value is major * 1,000,000 + minor * 1,000 + release</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>names</tt></i>:</span></td><td>pointer to an array to store the names</td></tr><tr><td><spanclass="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of names provided in the array or -1 in case of error</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>names</tt></i>:</span></td><td>pointer to an array to store the names</td></tr><tr><td><spanclass="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of names provided in the array or -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Provides the list of names of inactive storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>names</tt></i>:</span></td><td>array of char * to fill with pool names (allocated by caller)</td></tr><tr><td><spanclass="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the names array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on error</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virConnectListDomains"/>virConnectListDomains ()</h3><preclass="programlisting">int virConnectListDomains (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> int * ids, <br/> int maxids)<br/>
</pre><p>Collect the list of active domains, and store their ID in @maxids</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>ids</tt></i>:</span></td><td>array to collect the list of IDs of active domains</td></tr><tr><td><spanclass="term"><i><tt>maxids</tt></i>:</span></td><td>size of @ids</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Collect the list of active networks, and store their names in @names</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>names</tt></i>:</span></td><td>array to collect the list of names of active networks</td></tr><tr><td><spanclass="term"><i><tt>maxnames</tt></i>:</span></td><td>size of @names</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of networks found or -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Provides the list of names of active storage pools upto maxnames. If there are more than maxnames, the remaining names will be silently ignored.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>names</tt></i>:</span></td><td>array of char * to fill with pool names (allocated by caller)</td></tr><tr><td><spanclass="term"><i><tt>maxnames</tt></i>:</span></td><td>size of the names array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on error</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Provides the number of inactive networks.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of networks found or -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Provides the number of inactive storage pools</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of pools found, or -1 on error</td></tr></tbody></table></div></div>
</pre><p>Provides the number of active domains.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of domain found or -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Provides the number of active networks.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of network found or -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Provides the number of active storage pools</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of pools found, or -1 on error</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>name</tt></i>:</span></td><td>URI of the hypervisor</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div></div>
</pre><p>This function should be called first to get a connection to the Hypervisor. If necessary, authentication will be performed fetching credentials via the callback</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>name</tt></i>:</span></td><td>URI of the hypervisor</td></tr><tr><td><spanclass="term"><i><tt>auth</tt></i>:</span></td><td>Authenticate callback parameters</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>Open flags</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div></div>
</pre><p>This function should be called first to get a restricted connection to the libbrary functionalities. The set of APIs usable are then restricted on the available methods to control the domains.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>name</tt></i>:</span></td><td>URI of the hypervisor</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the hypervisor connection or NULL in case of error URIs are documented at http://libvirt.org/uri.html</td></tr></tbody></table></div></div>
</pre><p>Create a virtual device attachment to backend.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><spanclass="term"><i><tt>xml</tt></i>:</span></td><td>pointer to XML description of one device</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>This function returns block device (disk) stats for block devices attached to the domain. The path parameter is the name of the block device. Get this by calling <ahref="libvirt-libvirt.html#virDomainGetXMLDesc">virDomainGetXMLDesc</a> and finding the <target dev='...'> attribute within //domain/devices/disk. (For example, "xvda"). Domains may have more than one block device. To get stats for each you should make multiple calls to this function. Individual fields within the stats structure may be returned as -1, which indicates that the hypervisor does not support that particular statistic.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>dom</tt></i>:</span></td><td>pointer to the domain object</td></tr><tr><td><spanclass="term"><i><tt>path</tt></i>:</span></td><td>path to the block device</td></tr><tr><td><spanclass="term"><i><tt>stats</tt></i>:</span></td><td>block device stats (returned)</td></tr><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>size of stats structure</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of failure.</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virDomainCoreDump"/>virDomainCoreDump ()</h3><preclass="programlisting">int virDomainCoreDump (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> const char * to, <br/> int flags)<br/>
</pre><p>This method will dump the core of a domain on a given file for analysis. Note that for remote Xen Daemon the file path will be interpreted in the remote host.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>to</tt></i>:</span></td><td>path for the core file</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>extra flags, currently unused</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>launch a defined domain. If the call succeed the domain moves from the defined to the running domains pools.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to a defined domain</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires privileged access to the hypervisor.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>xmlDesc</tt></i>:</span></td><td>an XML description of the domain</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>an optional set of virDomainFlags</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure</td></tr></tbody></table></div></div>
</pre><p>define a domain, but does not start it</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>xml</tt></i>:</span></td><td>the XML description for the domain, preferably in UTF-8</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the domain otherwise</td></tr></tbody></table></div></div>
</pre><p>Destroy the domain object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires privileged access</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>Destroy a virtual device attachment to backend.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><spanclass="term"><i><tt>xml</tt></i>:</span></td><td>pointer to XML description of one device</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>Free the domain object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>Provides a boolean value indicating whether the domain configured to be automatically started when the host machine boots.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>autostart</tt></i>:</span></td><td>the value returned</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div></div>
</pre><p>Provides the connection pointer associated with a domain. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the domain object together.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>dom</tt></i>:</span></td><td>pointer to a domain</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virDomainGetID"/>virDomainGetID ()</h3><preclass="programlisting">unsigned int virDomainGetID (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br/>
</pre><p>Get the hypervisor ID number for the domain</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the domain ID number or (unsigned int) -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <ahref="libvirt-libvirt.html#virDomainInfo">virDomainInfo</a> structure allocated by the user</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virDomainGetMaxMemory"/>virDomainGetMaxMemory ()</h3><preclass="programlisting">unsigned long virDomainGetMaxMemory (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain)<br/>
</pre><p>Retrieve the maximum amount of physical memory allocated to a domain. If domain is NULL, then this get the amount of memory reserved to Domain0 i.e. the domain where the application runs.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the memory size in kilobytes or 0 in case of error.</td></tr></tbody></table></div></div>
</pre><p>Provides the maximum number of virtual CPUs supported for the guest VM. If the guest is inactive, this is basically the same as virConnectGetMaxVcpus. If the guest is running this will reflect the maximum number of virtual CPUs the guest was booted with.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the maximum of virtual CPU or -1 in case of error.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.</td></tr></tbody></table></div></div>
</pre><p>Get the type of domain operation system.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the new string or NULL in case of error, the string must be freed by the caller.</td></tr></tbody></table></div></div>
</pre><p>Get the scheduler parameters, the @params array will be filled with the values.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><spanclass="term"><i><tt>params</tt></i>:</span></td><td>pointer to scheduler parameter object (return value)</td></tr><tr><td><spanclass="term"><i><tt>nparams</tt></i>:</span></td><td>pointer to number of scheduler parameter (this value should be same than the returned value nparams of virDomainGetSchedulerType)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success.</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virDomainGetSchedulerType"/>virDomainGetSchedulerType ()</h3><preclass="programlisting">char * virDomainGetSchedulerType (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> int * nparams)<br/>
</pre><p>Get the scheduler type.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><spanclass="term"><i><tt>nparams</tt></i>:</span></td><td>number of scheduler parameters(return value)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error. The caller must free the returned string.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>uuid</tt></i>:</span></td><td>pointer to a <ahref="libvirt-libvirt.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> bytes array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>buf</tt></i>:</span></td><td>pointer to a <ahref="libvirt-libvirt.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> bytes array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virDomainGetVcpus"/>virDomainGetVcpus ()</h3><preclass="programlisting">int virDomainGetVcpus (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/><ahref="libvirt-libvirt.html#virVcpuInfoPtr">virVcpuInfoPtr</a> info, <br/> int maxinfo, <br/> unsigned char * cpumaps, <br/> int maplen)<br/>
</pre><p>Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer is'nt NULL.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object, or NULL for Domain0</td></tr><tr><td><spanclass="term"><i><tt>info</tt></i>:</span></td><td>pointer to an array of <ahref="libvirt-libvirt.html#virVcpuInfo">virVcpuInfo</a> structures (OUT)</td></tr><tr><td><spanclass="term"><i><tt>maxinfo</tt></i>:</span></td><td>number of structures in info array</td></tr><tr><td><spanclass="term"><i><tt>cpumaps</tt></i>:</span></td><td>pointer to an bit map of real CPUs for all vcpus of this domain (in 8-bit bytes) (OUT) If cpumaps is NULL, then no cupmap information is returned by the API. It's assumed there is <maxinfo> cpumap in cpumaps array. The memory allocated to cpumaps must be (maxinfo * maplen) bytes (ie: calloc(maxinfo, maplen)). One cpumap inside cpumaps has the format described in virDomainPinVcpu() API.</td></tr><tr><td><spanclass="term"><i><tt>maplen</tt></i>:</span></td><td>number of bytes in one cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...).</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of info filled in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>an OR'ed set of <ahref="libvirt-libvirt.html#virDomainXMLFlags">virDomainXMLFlags</a></td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div></div>
</pre><p>This function returns network interface stats for interfaces attached to the domain. The path parameter is the name of the network interface. Domains may have more than network interface. To get stats for each you should make multiple calls to this function. Individual fields within the stats structure may be returned as -1, which indicates that the hypervisor does not support that particular statistic.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>dom</tt></i>:</span></td><td>pointer to the domain object</td></tr><tr><td><spanclass="term"><i><tt>path</tt></i>:</span></td><td>path to the interface</td></tr><tr><td><spanclass="term"><i><tt>stats</tt></i>:</span></td><td>network interface stats (returned)</td></tr><tr><td><spanclass="term"><i><tt>size</tt></i>:</span></td><td>size of stats structure</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success or -1 in case of failure.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>id</tt></i>:</span></td><td>the domain ID number</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure. If the domain cannot be found, then <ahref="libvirt-virterror.html#VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> error is raised.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>name</tt></i>:</span></td><td>name for the domain</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure. If the domain cannot be found, then <ahref="libvirt-virterror.html#VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> error is raised.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>uuid</tt></i>:</span></td><td>the raw UUID for the domain</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure. If the domain cannot be found, then <ahref="libvirt-virterror.html#VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> error is raised.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>uuidstr</tt></i>:</span></td><td>the string UUID for the domain</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a new domain object or NULL in case of failure. If the domain cannot be found, then <ahref="libvirt-virterror.html#VIR_ERR_NO_DOMAIN">VIR_ERR_NO_DOMAIN</a> error is raised.</td></tr></tbody></table></div></div>
</pre><p>Migrate the domain object from its current host to the destination host given by dconn (a connection to the destination host). Flags may be one of more of the following: <ahref="libvirt-libvirt.html#VIR_MIGRATE_LIVE">VIR_MIGRATE_LIVE</a> Attempt a live migration. If a hypervisor supports renaming domains during migration, then you may set the dname parameter to the new name (otherwise it keeps the same name). If this is not supported by the hypervisor, dname must be NULL or else you will get an error. Since typically the two hypervisors connect directly to each other in order to perform the migration, you may need to specify a path from the source to the destination. This is the purpose of the uri parameter. If uri is NULL, then libvirt will try to find the best method. Uri may specify the hostname or IP address of the destination host as seen from the source. Or uri may be a URI giving transport, hostname, user, port, etc. in the usual form. Refer to driver documentation for the particular URIs supported. The maximum bandwidth (in Mbps) that will be used to do migration can be specified with the bandwidth parameter. If set to 0, libvirt will choose a suitable default. Some hypervisors do not support this feature and will return an error if bandwidth is not 0. To see which features are supported by the current hypervisor, see virConnectGetCapabilities, /capabilities/host/migration_features. There are many limitations on migration imposed by the underlying technology - for example it may not be possible to migrate between different processors even with the same architecture, or between different types of hypervisor.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>dconn</tt></i>:</span></td><td>destination host (a connection object)</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>flags</td></tr><tr><td><spanclass="term"><i><tt>dname</tt></i>:</span></td><td>(optional) rename domain to this at destination</td></tr><tr><td><spanclass="term"><i><tt>uri</tt></i>:</span></td><td>(optional) dest hostname/URI as seen from the source host</td></tr><tr><td><spanclass="term"><i><tt>bandwidth</tt></i>:</span></td><td>(optional) specify migration bandwidth limit in Mbps</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the new domain object if the migration was successful, or NULL in case of error. Note that the new domain object exists in the scope of the destination connection (dconn).</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object, or NULL for Domain0</td></tr><tr><td><spanclass="term"><i><tt>vcpu</tt></i>:</span></td><td>virtual CPU number</td></tr><tr><td><spanclass="term"><i><tt>cpumap</tt></i>:</span></td><td>pointer to a bit map of real CPUs (in 8-bit bytes) (IN) Each bit set to 1 means that corresponding CPU is usable. Bytes are stored in little-endian order: CPU0-7, 8-15... In each byte, lowest CPU number is least significant bit.</td></tr><tr><td><spanclass="term"><i><tt>maplen</tt></i>:</span></td><td>number of bytes in cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...). If maplen < size, missing bytes are set to zero. If maplen > size, failure code is returned.</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virDomainReboot"/>virDomainReboot ()</h3><preclass="programlisting">int virDomainReboot (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned int flags)<br/>
</pre><p>Reboot a domain, the domain object is still usable there after but the domain OS is being stopped for a restart. Note that the guest OS may ignore the request.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>extra flags for the reboot operation, not used yet</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>This method will restore a domain saved to disk by virDomainSave().</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>from</tt></i>:</span></td><td>path to the</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires privileged access</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>This method will suspend a domain and save its memory contents to a file on disk. After the call, if successful, the domain is not listed as running anymore (this may be a problem). Use virDomainRestore() to restore a domain after saving.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>to</tt></i>:</span></td><td>path for the output file</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>autostart</tt></i>:</span></td><td>whether the domain should be automatically started 0 or 1</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div></div>
</pre><p>Dynamically change the maximum amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function requires privileged access to the hypervisor.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><spanclass="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virDomainSetMemory"/>virDomainSetMemory ()</h3><preclass="programlisting">int virDomainSetMemory (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/> unsigned long memory)<br/>
</pre><p>Dynamically change the target amount of physical memory allocated to a domain. If domain is NULL, then this change the amount of memory reserved to Domain0 i.e. the domain where the application runs. This function may requires privileged access to the hypervisor.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object or NULL</td></tr><tr><td><spanclass="term"><i><tt>memory</tt></i>:</span></td><td>the memory size in kilobytes</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virDomainSetSchedulerParameters"/>virDomainSetSchedulerParameters ()</h3><preclass="programlisting">int virDomainSetSchedulerParameters (<ahref="libvirt-libvirt.html#virDomainPtr">virDomainPtr</a> domain, <br/><ahref="libvirt-libvirt.html#virSchedParameterPtr">virSchedParameterPtr</a> params, <br/> int nparams)<br/>
</pre><p>Change the scheduler parameters</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object</td></tr><tr><td><spanclass="term"><i><tt>params</tt></i>:</span></td><td>pointer to scheduler parameter objects</td></tr><tr><td><spanclass="term"><i><tt>nparams</tt></i>:</span></td><td>number of scheduler parameter (this value should be same or less than the returned value nparams of virDomainGetSchedulerType)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success.</td></tr></tbody></table></div></div>
</pre><p>Dynamically change the number of virtual CPUs used by the domain. Note that this call may fail if the underlying virtualization hypervisor does not support it or if growing the number is arbitrary limited. This function requires privileged access to the hypervisor.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to domain object, or NULL for Domain0</td></tr><tr><td><spanclass="term"><i><tt>nvcpus</tt></i>:</span></td><td>the new number of virtual CPUs for this domain</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>Shutdown a domain, the domain object is still usable there after but the domain OS is being stopped. Note that the guest OS may ignore the request. TODO: should we add an option for reboot, knowing it may not be doable in the general case ?</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>Suspends an active domain, the process is frozen without further access to CPU resources and I/O but the memory used by the domain at the hypervisor level will stay allocated. Use virDomainResume() to reactivate the domain. This function may requires privileged access.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>a domain object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>undefine a domain but does not stop it if it is running</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>domain</tt></i>:</span></td><td>pointer to a defined domain</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virGetVersion"/>virGetVersion ()</h3><preclass="programlisting">int virGetVersion (unsigned long * libVer, <br/> const char * type, <br/> unsigned long * typeVer)<br/>
</pre><p>Provides two information back, @libVer is the version of the library while @typeVer will be the version of the hypervisor type @type against which the library was compiled. If @type is NULL, "Xen" is assumed, if @type is unknown or not availble, an error code will be returned and @typeVer will be 0.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>libVer</tt></i>:</span></td><td>return value for the library version (OUT)</td></tr><tr><td><spanclass="term"><i><tt>type</tt></i>:</span></td><td>the type of connection/driver looked at</td></tr><tr><td><spanclass="term"><i><tt>typeVer</tt></i>:</span></td><td>return value for the version of the hypervisor (OUT)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.</td></tr></tbody></table></div></div>
</pre><p>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Create and start a defined network. If the call succeed the network moves from the defined to the running networks pools.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>pointer to a defined network</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
</pre><p>Create and start a new virtual network, based on an XML description similar to the one returned by virNetworkGetXMLDesc()</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>xmlDesc</tt></i>:</span></td><td>an XML description of the network</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure</td></tr></tbody></table></div></div>
</pre><p>Define a network, but does not create it</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>xml</tt></i>:</span></td><td>the XML description for the network, preferably in UTF-8</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>NULL in case of error, a pointer to the network otherwise</td></tr></tbody></table></div></div>
</pre><p>Destroy the network object. The running instance is shutdown if not down already and all resources used by it are given back to the hypervisor. The data structure is freed and should not be used thereafter if the call does not return an error. This function may requires privileged access</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>Free the network object. The running instance is kept alive. The data structure is freed and should not be used thereafter.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
</pre><p>Provides a boolean value indicating whether the network configured to be automatically started when the host machine boots.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><spanclass="term"><i><tt>autostart</tt></i>:</span></td><td>the value returned</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div></div>
</pre><p>Provides a bridge interface name to which a domain may connect a network interface in order to join the network.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated interface name, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div></div>
</pre><p>Provides the connection pointer associated with a network. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the network object together.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>net</tt></i>:</span></td><td>pointer to a network</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the network object.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><spanclass="term"><i><tt>uuid</tt></i>:</span></td><td>pointer to a <ahref="libvirt-libvirt.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> bytes array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div></div>
</pre><p>Get the UUID for a network as string. For more information about UUID see RFC4122.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><spanclass="term"><i><tt>buf</tt></i>:</span></td><td>pointer to a <ahref="libvirt-libvirt.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> bytes array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virNetworkGetXMLDesc"/>virNetworkGetXMLDesc ()</h3><preclass="programlisting">char * virNetworkGetXMLDesc (<ahref="libvirt-libvirt.html#virNetworkPtr">virNetworkPtr</a> network, <br/> int flags)<br/>
</pre><p>Provide an XML description of the network. The description may be reused later to relaunch the network with virNetworkCreateXML().</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>and OR'ed set of extraction flags, not used yet</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a 0 terminated UTF-8 encoded XML instance, or NULL in case of error. the caller must free() the returned value.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>name</tt></i>:</span></td><td>name for the network</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure. If the network cannot be found, then <ahref="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>uuid</tt></i>:</span></td><td>the raw UUID for the network</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure. If the network cannot be found, then <ahref="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>uuidstr</tt></i>:</span></td><td>the string UUID for the network</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a new network object or NULL in case of failure. If the network cannot be found, then <ahref="libvirt-virterror.html#VIR_ERR_NO_NETWORK">VIR_ERR_NO_NETWORK</a> error is raised.</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>a network object</td></tr><tr><td><spanclass="term"><i><tt>autostart</tt></i>:</span></td><td>whether the network should be automatically started 0 or 1</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 in case of success</td></tr></tbody></table></div></div>
</pre><p>Undefine a network but does not stop it if it is running</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>network</tt></i>:</span></td><td>pointer to a defined network</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success, -1 in case of error</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virNodeGetCellsFreeMemory"/>virNodeGetCellsFreeMemory ()</h3><preclass="programlisting">int virNodeGetCellsFreeMemory (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn, <br/> unsigned long long * freeMems, <br/> int startCell, <br/> int maxCells)<br/>
</pre><p>This call returns the amount of free memory in one or more NUMA cells. The @freeMems array must be allocated by the caller and will be filled with the amount of free memory in kilobytes for each cell requested, starting with startCell (in freeMems[0]), up to either (startCell + maxCells), or the number of additional cells in the node, whichever is smaller.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>freeMems</tt></i>:</span></td><td>pointer to the array of unsigned long long</td></tr><tr><td><spanclass="term"><i><tt>startCell</tt></i>:</span></td><td>index of first cell to return freeMems info on.</td></tr><tr><td><spanclass="term"><i><tt>maxCells</tt></i>:</span></td><td>Maximum number of cells for which freeMems information can be returned.</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of entries filled in freeMems, or -1 in case of error.</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virNodeGetFreeMemory"/>virNodeGetFreeMemory ()</h3><preclass="programlisting">unsigned long long virNodeGetFreeMemory (<ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> conn)<br/>
</pre><p>provides the free memory availble on the Node</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the available free memory in kilobytes or 0 in case of error</td></tr></tbody></table></div></div>
</pre><p>Extract hardware information about the node.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to the hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>info</tt></i>:</span></td><td>pointer to a <ahref="libvirt-libvirt.html#virNodeInfo">virNodeInfo</a> structure allocated by the user</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of failure.</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolBuild"/>virStoragePoolBuild ()</h3><preclass="programlisting">int virStoragePoolBuild (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags)<br/>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>future flags, use 0 for now</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 upon failure</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolCreate"/>virStoragePoolCreate ()</h3><preclass="programlisting">int virStoragePoolCreate (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags)<br/>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>future flags, use 0 for now</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 if it could not be started</td></tr></tbody></table></div></div>
</pre><p>Create a new storage based on its XML description. The pool is not persitent, so its definition will disappear when it is destroyed, or if the host is restarted</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>xmlDesc</tt></i>:</span></td><td>XML description for new pool</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>future flags, use 0 for now</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if creation failed</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>xml</tt></i>:</span></td><td>XML description for new pool</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>future flags, use 0 for now</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if creation failed</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolDelete"/>virStoragePoolDelete ()</h3><preclass="programlisting">int virStoragePoolDelete (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags)<br/>
</pre><p>Delete the underlying pool resources. This is a non-recoverable operation. The <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object itself is not free'd.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>flags for obliteration process</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 if it could not be obliterate</td></tr></tbody></table></div></div>
</pre><p>Destroy an active storage pool. This will deactivate the pool on the host, but keep any persistent config associated with it. If it has a persistent config it can later be restarted with virStoragePoolCreate(). This does not free the associated <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 if it could not be destroyed</td></tr></tbody></table></div></div>
</pre><p>Free a storage pool object, releasing all memory associated with it. Does not change the state of the pool on the host.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 if it could not be free'd.</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolGetAutostart"/>virStoragePoolGetAutostart ()</h3><preclass="programlisting">int virStoragePoolGetAutostart (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> int * autostart)<br/>
</pre><p>Fetches the value of the autostart flag, which determines whether the pool is automatically started at boot time</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>autostart</tt></i>:</span></td><td>location in which to store autostart flag</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on failure</td></tr></tbody></table></div></div>
</pre><p>Provides the connection pointer associated with a storage pool. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the pool object together.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to a pool</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolGetInfo"/>virStoragePoolGetInfo ()</h3><preclass="programlisting">int virStoragePoolGetInfo (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/><ahref="libvirt-libvirt.html#virStoragePoolInfoPtr">virStoragePoolInfoPtr</a> info)<br/>
</pre><p>Get volatile information about the storage pool such as free space / usage summary</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>info</tt></i>:</span></td><td>pointer at which to store info</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on failure.</td></tr></tbody></table></div></div>
</pre><p>Fetch the locally unique name of the storage pool</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the name of the pool, or NULL on error</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolGetUUID"/>virStoragePoolGetUUID ()</h3><preclass="programlisting">int virStoragePoolGetUUID (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned char * uuid)<br/>
</pre><p>Fetch the globally unique ID of the storage pool</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>uuid</tt></i>:</span></td><td>buffer of <ahref="libvirt-libvirt.html#VIR_UUID_BUFLEN">VIR_UUID_BUFLEN</a> bytes in size</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error;</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolGetUUIDString"/>virStoragePoolGetUUIDString ()</h3><preclass="programlisting">int virStoragePoolGetUUIDString (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> char * buf)<br/>
</pre><p>Fetch the globally unique ID of the storage pool as a string</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>buf</tt></i>:</span></td><td>buffer of <ahref="libvirt-libvirt.html#VIR_UUID_STRING_BUFLEN">VIR_UUID_STRING_BUFLEN</a> bytes in size</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error;</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolGetXMLDesc"/>virStoragePoolGetXMLDesc ()</h3><preclass="programlisting">char * virStoragePoolGetXMLDesc (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags)<br/>
</pre><p>Fetch an XML document describing all aspects of the storage pool. This is suitable for later feeding back into the <ahref="libvirt-libvirt.html#virStoragePoolCreateXML">virStoragePoolCreateXML</a> method.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>flags for XML format options (set of virDomainXMLFlags)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a XML document, or NULL on error</td></tr></tbody></table></div></div>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolListVolumes"/>virStoragePoolListVolumes ()</h3><preclass="programlisting">int virStoragePoolListVolumes (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> char ** const names, <br/> int maxnames)<br/>
</pre><p>Fetch list of storage volume names, limiting to at most maxnames.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>names</tt></i>:</span></td><td>array in which to storage volume names</td></tr><tr><td><spanclass="term"><i><tt>maxnames</tt></i>:</span></td><td>size of names array</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of names fetched, or -1 on error</td></tr></tbody></table></div></div>
</pre><p>Fetch a storage pool based on its unique name</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>name</tt></i>:</span></td><td>name of pool to fetch</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div></div>
</pre><p>Fetch a storage pool based on its globally unique id</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>uuid</tt></i>:</span></td><td>globally unique id of pool to fetch</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div></div>
</pre><p>Fetch a storage pool based on its globally unique id</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>uuidstr</tt></i>:</span></td><td>globally unique id of pool to fetch</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div></div>
</pre><p>Fetch a storage pool which contains a particular volume</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if no matching pool is found</td></tr></tbody></table></div></div>
</pre><p>Fetch the number of storage volumes within a pool</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the number of storage pools, or -1 on failure</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolRefresh"/>virStoragePoolRefresh ()</h3><preclass="programlisting">int virStoragePoolRefresh (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> unsigned int flags)<br/>
</pre><p>Request that the pool refresh its list of volumes. This may involve communicating with a remote server, and/or initializing new devices at the OS layer</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>flags to control refresh behaviour (currently unused, use 0)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 if the volume list was refreshed, -1 on failure</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStoragePoolSetAutostart"/>virStoragePoolSetAutostart ()</h3><preclass="programlisting">int virStoragePoolSetAutostart (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> int autostart)<br/>
</pre><p>Sets the autostart flag</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>autostart</tt></i>:</span></td><td>new flag setting</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, -1 on failure</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a <ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> object, or NULL if creation failed</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStorageVolCreateXML"/>virStorageVolCreateXML ()</h3><preclass="programlisting"><ahref="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolCreateXML (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * xmldesc, <br/> unsigned int flags)<br/>
</pre><p>Create a storage volume within a pool based on an XML description. Not all pools support creation of volumes</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>xmldesc</tt></i>:</span></td><td>description of volume to create</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>flags for creation (unused, pass 0)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume, or NULL on error</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStorageVolDelete"/>virStorageVolDelete ()</h3><preclass="programlisting">int virStorageVolDelete (<ahref="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/> unsigned int flags)<br/>
</pre><p>Delete the storage volume from the pool</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>future flags, use 0 for now</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error</td></tr></tbody></table></div></div>
</pre><p>Release the storage volume handle. The underlying storage volume contains to exist</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on error</td></tr></tbody></table></div></div>
</pre><p>Provides the connection pointer associated with a storage volume. The reference counter on the connection is not increased by this call. WARNING: When writing libvirt bindings in other languages, do not use this function. Instead, store the connection and the volume object together.</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>vol</tt></i>:</span></td><td>pointer to a pool</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the <ahref="libvirt-libvirt.html#virConnectPtr">virConnectPtr</a> or NULL in case of failure.</td></tr></tbody></table></div></div>
</pre><p>Fetches volatile information about the storage volume such as its current allocation</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><spanclass="term"><i><tt>info</tt></i>:</span></td><td>pointer at which to store info</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>0 on success, or -1 on failure</td></tr></tbody></table></div></div>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the volume key, or NULL on error</td></tr></tbody></table></div></div>
</pre><p>Fetch the storage volume name. This is unique within the scope of a pool</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the volume name, or NULL on error</td></tr></tbody></table></div></div>
</pre><p>Fetch the storage volume path. Depending on the pool configuration this is either persistent across hosts, or dynamically assigned at pool startup. Consult pool documentation for information on getting the persistent naming</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the storage volume path, or NULL on error</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStorageVolGetXMLDesc"/>virStorageVolGetXMLDesc ()</h3><preclass="programlisting">char * virStorageVolGetXMLDesc (<ahref="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> vol, <br/> unsigned int flags)<br/>
</pre><p>Fetch an XML document describing all aspects of the storage volume</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>vol</tt></i>:</span></td><td>pointer to storage volume</td></tr><tr><td><spanclass="term"><i><tt>flags</tt></i>:</span></td><td>flags for XML generation (unused, pass 0)</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>the XML document, or NULL on error</td></tr></tbody></table></div></div>
</pre><p>Fetch a pointer to a storage volume based on its globally unique key</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>key</tt></i>:</span></td><td>globally unique key</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a storage volume, or NULL if not found / error</td></tr></tbody></table></div></div>
<hr/>
<divclass="refsect2"lang="en"><h3><aname="virStorageVolLookupByName"/>virStorageVolLookupByName ()</h3><preclass="programlisting"><ahref="libvirt-libvirt.html#virStorageVolPtr">virStorageVolPtr</a> virStorageVolLookupByName (<ahref="libvirt-libvirt.html#virStoragePoolPtr">virStoragePoolPtr</a> pool, <br/> const char * name)<br/>
</pre><p>Fetch a pointer to a storage volume based on its name within a pool</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>pool</tt></i>:</span></td><td>pointer to storage pool</td></tr><tr><td><spanclass="term"><i><tt>name</tt></i>:</span></td><td>name of storage volume</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a storage volume, or NULL if not found / error</td></tr></tbody></table></div></div>
</pre><p>Fetch a pointer to a storage volume based on its locally (host) unique path</p>
<divclass="variablelist"><tableborder="0"><colalign="left"/><tbody><tr><td><spanclass="term"><i><tt>conn</tt></i>:</span></td><td>pointer to hypervisor connection</td></tr><tr><td><spanclass="term"><i><tt>path</tt></i>:</span></td><td>locally unique path</td></tr><tr><td><spanclass="term"><i><tt>Returns</tt></i>:</span></td><td>a storage volume, or NULL if not found / error</td></tr></tbody></table></div></div>