[libvirt] [PATCH v2 3/3] Document to not rely on virConnectGetMaxVcpus API
Andrea Bolognani
abologna at redhat.com
Fri Jun 24 17:21:32 UTC 2016
On Fri, 2016-06-24 at 20:34 +0530, Shivaprasad G Bhat wrote:
> The API virConnectGetMaxVcpus doesn't really reflect the actual usable number
> of cpus as the maximum limits can be different for kvm and/or qemu. So update
> the documentation to use virConnectGetDomainCapabilities() instead.
>
> Signed-off-by: Shivaprasad G Bhat <sbhat at linux.vnet.ibm.com>
> ---
> src/libvirt-host.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/libvirt-host.c b/src/libvirt-host.c
> index 24277b7..2a3de03 100644
> --- a/src/libvirt-host.c
> +++ b/src/libvirt-host.c
> @@ -313,7 +313,10 @@ virConnectGetSysinfo(virConnectPtr conn, unsigned int flags)
> *
> * 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.
> + * attribute in the <domain> element of the XML. This API doesn't take emulator
> + * limits into consideration, hence the returned value is not guaranteed to be
> + * usable. It is recommended to use virConnectGetDomainCapabilities() and look
> + * for "<vcpu max='...'>" in its output instead.
> *
> * Returns the maximum of virtual CPU or -1 in case of error.
> */
ACK and pushed.
--
Andrea Bolognani / Red Hat / Virtualization
More information about the libvir-list
mailing list