mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
CLOUDSTACK-4181 [upgrade][2.2.14 to 4.2][vmware]After upgrade the system vms fail to start
number of cores per socket for ESXi4.1 is 1. Signed-off-by: Sateesh Chodapuneedi <sateesh@apache.org>
This commit is contained in:
parent
8712491a6c
commit
e1e4642d67
@ -2200,6 +2200,11 @@ public class VirtualMachineMO extends BaseMO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getCoresPerSocket() throws Exception {
|
public int getCoresPerSocket() throws Exception {
|
||||||
|
// number of cores per socket is 1 in case of ESXi. It's not defined explicitly and the property is support since vSphere API 5.0.
|
||||||
|
String apiVersion = HypervisorHostHelper.getVcenterApiVersion(_context);
|
||||||
|
if (apiVersion.compareTo("5.0") < 0) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return (Integer)_context.getVimClient().getDynamicProperty(_mor, "config.hardware.numCoresPerSocket");
|
return (Integer)_context.getVimClient().getDynamicProperty(_mor, "config.hardware.numCoresPerSocket");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user