<info>This macro is to be used in conjonction with virDomainGetVcpus() and virDomainPinVcpu() APIs. VIR_COPY_CPUMAP macro extract the cpumap of the specified vcpu from cpumaps array and copy it into cpumap to be used later by virDomainPinVcpu() API.</info>
<argname='cpumaps'info='pointer to an array of cpumap (in 8-bit bytes) (IN)'/>
<argname='maplen'info='the length (in bytes) of one cpumap'/>
<argname='vcpu'info='the virtual CPU number'/>
<argname='cpumap'info='pointer to a cpumap (in 8-bit bytes) (OUT) This cpumap must be previously allocated by the caller (ie: malloc(maplen))'/>
<info>This macro is to be used in conjonction 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.</info>
<info>This macro is to be used in conjonction with virDomainGetVcpus() API. VIR_CPU_USABLE macro returns a non zero value (true) if the cpu is usable by the vcpu, and 0 otherwise.</info>
<argname='cpumaps'info='pointer to an array of cpumap (in 8-bit bytes) (IN)'/>
<argname='maplen'info='the length (in bytes) of one cpumap'/>
<info>This macro is to be used in conjonction with virDomainGetVcpus() and virDomainPinVcpu() APIs. VIR_GET_CPUMAP macro returns a pointer to the cpumap of the specified vcpu from cpumaps array.</info>
<argname='cpumaps'info='pointer to an array of cpumap (in 8-bit bytes) (IN)'/>
<argname='maplen'info='the length (in bytes) of one cpumap'/>
<argname='vcpu'info='the virtual CPU number'/>
</macro>
<macroname='VIR_NODEINFO_MAXCPUS'file='libvirt'>
<info>This macro is to calculate the total number of CPUs supported but not neccessarily active in the host.</info>
<argname='nodeinfo'info='virNodeInfo instance'/>
</macro>
<macroname='VIR_UNUSE_CPU'file='libvirt'>
<info>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro reset the bit (CPU not usable) of the related cpu in cpumap.</info>
<argname='cpumap'info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)'/>
<argname='cpu'info='the physical CPU number'/>
</macro>
<macroname='VIR_USE_CPU'file='libvirt'>
<info>This macro is to be used in conjonction with virDomainPinVcpu() API. USE_CPU macro set the bit (CPU usable) of the related cpu in cpumap.</info>
<argname='cpumap'info='pointer to a bit map of real CPUs (in 8-bit bytes) (IN/OUT)'/>
<info>a virConnectPtr is pointer to a virConnect private structure, this is the type used to reference a connection to the Xen Hypervisor in the API.</info>
<info>Provide a pointer to the last error caught on that connection Simpler but may not be suitable for multithreaded accesses, in which case use virConnCopyLastError()</info>
<returntype='virErrorPtr'info='a pointer to the last error or NULL if none occured.'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<info>Set a connection error handling function, if @handler is NULL it will reset to default which is to pass error back to the global library handler.</info>
<returntype='void'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<argname='userData'type='void *'info='pointer to the user data provided in the handler callback'/>
<argname='handler'type='virErrorFunc'info='the function to get called in case of error or NULL'/>
<info>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.</info>
<returntype='int'info='0 in case of success or -1 in case of error.'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<info>Provides capabilities of the hypervisor / driver.</info>
<returntype='char *'info='NULL in case of error, or a pointer to an opaque virCapabilities structure (virCapabilitiesPtr). The client must free the returned string after use.'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<info>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.</info>
<returntype='char *'info='the hostname which must be freed by the caller, or NULL if there was an error.'/>
<argname='conn'type='virConnectPtr'info='pointer to a hypervisor connection'/>
<info>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.</info>
<returntype='int'info='the maximum of virtual CPU or -1 in case of error.'/>
<returntype='const char *'info='NULL in case of error, a static zero terminated string otherwise. See also: http://www.redhat.com/archives/libvir-list/2007-February/msg00096.html'/>
<info>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.</info>
<returntype='char *'info='the URI string which must be freed by the caller, or NULL if there was an error.'/>
<argname='conn'type='virConnectPtr'info='pointer to a hypervisor connection'/>
<info>Get the version level of the Hypervisor running. This may work only with hypervisor call, i.e. with priviledged access to the hypervisor, not with a Read-Only connection.</info>
<returntype='int'info='-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'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<argname='hvVer'type='unsigned long *'info='return value for the version of the running hypervisor (OUT)'/>
<info>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.</info>
<info>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.</info>
<returntype='int'info='0 in case of success or -1 in case of failure.'/>
<argname='dom'type='virDomainPtr'info='pointer to the domain object'/>
<argname='path'type='const char *'info='path to the block device'/>
<info>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.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>Launch a new Linux guest domain, based on an XML description similar to the one returned by virDomainGetXMLDesc() This function may requires priviledged access to the hypervisor.</info>
<returntype='virDomainPtr'info='a new domain object or NULL in case of failure'/>
<argname='conn'type='virConnectPtr'info='pointer to the hypervisor connection'/>
<argname='xmlDesc'type='const char *'info='an XML description of the domain'/>
<argname='flags'type='unsigned int'info='an optional set of virDomainFlags'/>
<info>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 priviledged access</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>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.</info>
<info>Extract information about a domain. Note that if the connection used to get the domain is limited only a partial set of the information can be extracted.</info>
<info>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.</info>
<returntype='unsigned long'info='the memory size in kilobytes or 0 in case of error.'/>
<argname='domain'type='virDomainPtr'info='a domain object or NULL'/>
<info>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.</info>
<returntype='int'info='the maximum of virtual CPU or -1 in case of error.'/>
<returntype='const char *'info='a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the domain object.'/>
<info>Get the scheduler parameters, the @params array will be filled with the values.</info>
<returntype='int'info='-1 in case of error, 0 in case of success.'/>
<argname='domain'type='virDomainPtr'info='pointer to domain object'/>
<argname='params'type='virSchedParameterPtr'info='pointer to scheduler parameter object (return value)'/>
<argname='nparams'type='int *'info='pointer to number of scheduler parameter (this value should be same than the returned value nparams of virDomainGetSchedulerType)'/>
<info>Extract information about virtual CPUs of domain, store it in info array and also in cpumaps if this pointer is'nt NULL.</info>
<returntype='int'info='the number of info filled in case of success, -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='pointer to domain object, or NULL for Domain0'/>
<argname='info'type='virVcpuInfoPtr'info='pointer to an array of virVcpuInfo structures (OUT)'/>
<argname='maxinfo'type='int'info='number of structures in info array'/>
<argname='cpumaps'type='unsigned char *'info='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.'/>
<argname='maplen'type='int'info='number of bytes in one cpumap, from 1 up to size of CPU map in underlying virtualization system (Xen...).'/>
<info>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.</info>
<returntype='int'info='0 in case of success or -1 in case of failure.'/>
<argname='dom'type='virDomainPtr'info='pointer to the domain object'/>
<argname='path'type='const char *'info='path to the interface'/>
<returntype='virDomainPtr'info='a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.'/>
<returntype='virDomainPtr'info='a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.'/>
<returntype='virDomainPtr'info='a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.'/>
<returntype='virDomainPtr'info='a new domain object or NULL in case of failure. If the domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised.'/>
<info>Migrate the domain object from its current host to the destination host given by dconn (a connection to the destination host). Flags may be one of more of the following: VIR_MIGRATE_LIVE Attempt a live migration. If a hypervisor supports renaming domains during migration, then you may set the dname parameter to the new name (otherwise it keeps the same name). If this is not supported by the hypervisor, dname must be NULL or else you will get an error. Since typically the two hypervisors connect directly to each other in order to perform the migration, you may need to specify a path from the source to the destination. This is the purpose of the uri parameter. If uri is NULL, then libvirt will try to find the best method. Uri may specify the hostname or IP address of the destination host as seen from the source. Or uri may be a URI giving transport, hostname, user, port, etc. in the usual form. Refer to driver documentation for the particular URIs supported. The maximum bandwidth (in Mbps) that will be used to do migration can be specified with the bandwidth parameter. If set to 0, libvirt will choose a suitable default. Some hypervisors do not support this feature and will return an error if bandwidth is not 0. To see which features are supported by the current hypervisor, see virConnectGetCapabilities, /capabilities/host/migration_features. There are many limitations on migration imposed by the underlying technology - for example it may not be possible to migrate between different processors even with the same architecture, or between different types of hypervisor.</info>
<returntype='virDomainPtr'info='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).'/>
<info>Dynamically change the real CPUs which can be allocated to a virtual CPU. This function requires priviledged access to the hypervisor.</info>
<returntype='int'info='0 in case of success, -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='pointer to domain object, or NULL for Domain0'/>
<argname='vcpu'type='unsigned int'info='virtual CPU number'/>
<argname='cpumap'type='unsigned char *'info='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.'/>
<argname='maplen'type='int'info='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.'/>
<info>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.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>Resume an suspended domain, the process is restarted from the state where it was frozen by calling virSuspendDomain(). This function may requires priviledged access</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>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.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>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 priviledged access to the hypervisor.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='a domain object or NULL'/>
<argname='memory'type='unsigned long'info='the memory size in kilobytes'/>
<info>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 priviledged access to the hypervisor.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='a domain object or NULL'/>
<argname='memory'type='unsigned long'info='the memory size in kilobytes'/>
<returntype='int'info='-1 in case of error, 0 in case of success.'/>
<argname='domain'type='virDomainPtr'info='pointer to domain object'/>
<argname='params'type='virSchedParameterPtr'info='pointer to scheduler parameter objects'/>
<argname='nparams'type='int'info='number of scheduler parameter (this value should be same or less than the returned value nparams of virDomainGetSchedulerType)'/>
<info>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 priviledged access to the hypervisor.</info>
<returntype='int'info='0 in case of success, -1 in case of failure.'/>
<argname='domain'type='virDomainPtr'info='pointer to domain object, or NULL for Domain0'/>
<argname='nvcpus'type='unsigned int'info='the new number of virtual CPUs for this domain'/>
<info>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 ?</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>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 priviledged access.</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>Provide a pointer to the last error caught at the library level Simpler but may not be suitable for multithreaded accesses, in which case use virCopyLastError()</info>
<returntype='virErrorPtr'info='a pointer to the last error or NULL if none occured.'/>
<info>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.</info>
<returntype='int'info='-1 in case of failure, 0 otherwise, and values for @libVer and @typeVer have the format major * 1,000,000 + minor * 1,000 + release.'/>
<argname='libVer'type='unsigned long *'info='return value for the library version (OUT)'/>
<argname='type'type='const char *'info='the type of connection/driver looked at'/>
<argname='typeVer'type='unsigned long *'info='return value for the version of the hypervisor (OUT)'/>
<info>Initialize the library. It's better to call this routine at startup in multithreaded applications to avoid potential race when initializing the library.</info>
<returntype='int'info='0 in case of success, -1 in case of error'/>
<info>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 priviledged access</info>
<returntype='int'info='0 in case of success and -1 in case of failure.'/>
<info>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.</info>
<returntype='const char *'info='a pointer to the name or NULL, the string need not be deallocated its lifetime will be the same as the network object.'/>
<returntype='virNetworkPtr'info='a new network object or NULL in case of failure. If the network cannot be found, then VIR_ERR_NO_NETWORK error is raised.'/>
<returntype='virNetworkPtr'info='a new network object or NULL in case of failure. If the network cannot be found, then VIR_ERR_NO_NETWORK error is raised.'/>
<returntype='virNetworkPtr'info='a new network object or NULL in case of failure. If the network cannot be found, then VIR_ERR_NO_NETWORK error is raised.'/>
<info>Set a library global error handling function, if @handler is NULL, it will reset to default printing on stderr. The error raised there are those for which no handler at the connection level could caught.</info>
<returntype='void'/>
<argname='userData'type='void *'info='pointer to the user data provided in the handler callback'/>
<argname='handler'type='virErrorFunc'info='the function to get called in case of error or NULL'/>