Skip to content

Commit 1076c26

Browse files
author
Sateesh Chodapuneedi
committed
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>
1 parent 72d3bc3 commit 1076c26

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,6 +2198,11 @@ public long getHotAddMemoryLimitInMb() throws Exception {
21982198
}
21992199

22002200
public int getCoresPerSocket() throws Exception {
2201+
// 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.
2202+
String apiVersion = HypervisorHostHelper.getVcenterApiVersion(_context);
2203+
if (apiVersion.compareTo("5.0") < 0) {
2204+
return 1;
2205+
}
22012206
return (Integer)_context.getVimClient().getDynamicProperty(_mor, "config.hardware.numCoresPerSocket");
22022207
}
22032208

0 commit comments

Comments
 (0)