summaryrefslogtreecommitdiff
path: root/src/libvirt-host.c
diff options
context:
space:
mode:
authorShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>2016-06-24 20:34:34 +0530
committerAndrea Bolognani <abologna@redhat.com>2016-06-24 19:20:14 +0200
commite6806d793817fee19432173b1a69905b23dad31b (patch)
tree9c02419f3d1424940a630213b428abe1519a44a0 /src/libvirt-host.c
parent8dbb34781646d29aa72e92cd9e8a3c0f2fe462da (diff)
downloadlibvirt-e6806d793817fee19432173b1a69905b23dad31b.tar.gz
Document to not rely on virConnectGetMaxVcpus API
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@linux.vnet.ibm.com>
Diffstat (limited to 'src/libvirt-host.c')
-rw-r--r--src/libvirt-host.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libvirt-host.c b/src/libvirt-host.c
index 24277b71b7..2a3de03115 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.
*/