[libvirt] [PATCH 1/2] esx: Make esxDomainGetVcpusFlags return vcpus again

Matthias Bolte matthias.bolte at googlemail.com
Mon Aug 13 21:19:11 UTC 2018


2018-08-10 5:56 GMT+02:00 Marcos Paulo de Souza <marcos.souza.org at 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.html
>
> Signed-off-by: Marcos Paulo de Souza <marcos.souza.org at 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




More information about the libvir-list mailing list