
2018-08-10 5:56 GMT+02:00 Marcos Paulo de Souza <marcos.souza.org@gmail.com>:
Before this patch, esxDomainGetVcpusFlags was returning -1 since "maxSupportedVcpus" can be NULL in ESXi[1]. In order to make it work, replicate the same behavior than esxDomainGetInfo that used config.hardware.numCPU to return the correct number of vcpus of a VM.
This patch, together with the next one, makes the calls virDomainSetVcpus, virDomainGetMaxVcpus and virDomainGetVcpusFlags to return successfull again.
[1]:https://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vim.host.Capability.h...
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> --- src/esx/esx_driver.c | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-)
Before and after this commit the function did not properly handle the VIR_DOMAIN_VCPU_MAXIMUM flag. If the flag is present then the function should return the maximum vCPU Count. If the flag is absent then it should return the current vCPU count. -- Matthias Bolte http://photron.blogspot.com