cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject git commit: updated refs/heads/4.2 to 1076c26
Date Thu, 08 Aug 2013 08:56:49 GMT
Updated Branches:
  refs/heads/4.2 72d3bc3c1 -> 1076c267f


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>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1076c267
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1076c267
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1076c267

Branch: refs/heads/4.2
Commit: 1076c267fa004fac7871f89512a3a012e9b33fbb
Parents: 72d3bc3
Author: Sateesh Chodapuneedi <sateesh@apache.org>
Authored: Thu Aug 8 08:54:00 2013 +0530
Committer: Sateesh Chodapuneedi <sateesh@apache.org>
Committed: Thu Aug 8 08:56:29 2013 +0530

----------------------------------------------------------------------
 .../src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java    | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1076c267/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
index 350da93..570d740 100644
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java
@@ -2198,6 +2198,11 @@ public class VirtualMachineMO extends BaseMO {
     }
 
     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");
     }
 


Mime
View raw message