mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
hyperv: implement domainGetMaxVcpus
Co-authored-by: Sri Ramanujam <sramanujam@datto.com> Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
b516400976
commit
30525b759b
@ -1627,6 +1627,16 @@ hypervDomainIsActive(virDomainPtr domain)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
hypervDomainGetMaxVcpus(virDomainPtr dom)
|
||||||
|
{
|
||||||
|
if (hypervDomainIsActive(dom))
|
||||||
|
return hypervDomainGetVcpusFlags(dom, (VIR_DOMAIN_VCPU_LIVE | VIR_DOMAIN_VCPU_MAXIMUM));
|
||||||
|
else
|
||||||
|
return hypervConnectGetMaxVcpus(dom->conn, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hypervDomainIsPersistent(virDomainPtr domain G_GNUC_UNUSED)
|
hypervDomainIsPersistent(virDomainPtr domain G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
@ -1983,6 +1993,7 @@ static virHypervisorDriver hypervHypervisorDriver = {
|
|||||||
.domainGetState = hypervDomainGetState, /* 0.9.5 */
|
.domainGetState = hypervDomainGetState, /* 0.9.5 */
|
||||||
.domainGetVcpusFlags = hypervDomainGetVcpusFlags, /* 6.10.0 */
|
.domainGetVcpusFlags = hypervDomainGetVcpusFlags, /* 6.10.0 */
|
||||||
.domainGetVcpus = hypervDomainGetVcpus, /* 6.10.0 */
|
.domainGetVcpus = hypervDomainGetVcpus, /* 6.10.0 */
|
||||||
|
.domainGetMaxVcpus = hypervDomainGetMaxVcpus, /* 6.10.0 */
|
||||||
.domainGetXMLDesc = hypervDomainGetXMLDesc, /* 0.9.5 */
|
.domainGetXMLDesc = hypervDomainGetXMLDesc, /* 0.9.5 */
|
||||||
.connectListDefinedDomains = hypervConnectListDefinedDomains, /* 0.9.5 */
|
.connectListDefinedDomains = hypervConnectListDefinedDomains, /* 0.9.5 */
|
||||||
.connectNumOfDefinedDomains = hypervConnectNumOfDefinedDomains, /* 0.9.5 */
|
.connectNumOfDefinedDomains = hypervConnectNumOfDefinedDomains, /* 0.9.5 */
|
||||||
|
Loading…
Reference in New Issue
Block a user