You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/02/04 18:42:04 UTC

git commit: updated refs/heads/master to 0839fbc

Updated Branches:
  refs/heads/master b3829e54d -> 0839fbce6


CLOUDSTACK-6023 vcpus should not be higher then xen specifies

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

Branch: refs/heads/master
Commit: 0839fbce67963578a18478f90e5fbcfd7be11912
Parents: b3829e5
Author: Daan Hoogland <da...@onecht.net>
Authored: Tue Feb 4 18:41:53 2014 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Tue Feb 4 18:41:53 2014 +0100

----------------------------------------------------------------------
 .../com/cloud/hypervisor/xen/resource/CitrixResourceBase.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0839fbce/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index 200a72f..cf5c6d6 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -1312,7 +1312,12 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
         if (guestOsTypeName.toLowerCase().contains("windows")) {
             vmr.VCPUsMax = (long)vmSpec.getCpus();
         } else {
-            vmr.VCPUsMax = 32L;
+            // XenServer has a documented limit of 16 vcpus per vm
+            vmr.VCPUsMax = 2L * vmSpec.getCpus();
+            if (vmr.VCPUsMax > 16)
+            {
+                vmr.VCPUsMax = 16L;
+            }
         }
 
         vmr.VCPUsAtStartup = (long)vmSpec.getCpus();