cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [24/50] [abbrv] git commit: updated refs/heads/ui-restyle to 849d601
Date Thu, 30 Jan 2014 22:41:15 GMT
CLOUDSTACK-5968 create vm.memballoon.disable agent parameter


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

Branch: refs/heads/ui-restyle
Commit: 1530c162e58abd8e572a89d2a2706de00bd49e26
Parents: 29e2238
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Jan 28 10:44:44 2014 -0700
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Jan 28 10:44:44 2014 -0700

----------------------------------------------------------------------
 agent/conf/agent.properties                                  | 4 ++++
 .../hypervisor/kvm/resource/LibvirtComputingResource.java    | 8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1530c162/agent/conf/agent.properties
----------------------------------------------------------------------
diff --git a/agent/conf/agent.properties b/agent/conf/agent.properties
index 5f5f368..a7376b6 100644
--- a/agent/conf/agent.properties
+++ b/agent/conf/agent.properties
@@ -114,3 +114,7 @@ domr.scripts.dir=scripts/network/domr/kvm
 # for examples:"Conroe" "Penryn", "Nehalem", "Westmere", "pentiumpro" and so
 # on,run virsh capabilities for more details.
 # guest.cpu.model=
+#
+# vm.memballoon.disable=true
+# Disable memory ballooning on vm guests for overcommit, by default overcommit
+# feature enables balloon and sets currentMemory to a minimum value.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1530c162/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index 1ea0989..fd0078c 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -424,6 +424,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
     private boolean _canBridgeFirewall;
     protected String _localStoragePath;
     protected String _localStorageUUID;
+    protected boolean _noMemBalloon = false;
     protected String _guestCpuMode;
     protected String _guestCpuModel;
     private final Map<String, String> _pifs = new HashMap<String, String>();
@@ -771,6 +772,11 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
         value = (String)params.get("cmds.timeout");
         _cmdsTimeout = NumbersUtil.parseInt(value, 7200) * 1000;
 
+        value = (String) params.get("vm.memballoon.disable");
+        if (Boolean.parseBoolean(value)) {
+            _noMemBalloon = true;
+        }
+
         value = (String)params.get("host.reserved.mem.mb");
         _dom0MinMem = NumbersUtil.parseInt(value, 0) * 1024 * 1024;
 
@@ -3426,7 +3432,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
 
         GuestResourceDef grd = new GuestResourceDef();
 
-        if (vmTO.getMinRam() != vmTO.getMaxRam()) {
+        if (vmTO.getMinRam() != vmTO.getMaxRam() && !_noMemBalloon) {
             grd.setMemBalloning(true);
             grd.setCurrentMem(vmTO.getMinRam() / 1024);
             grd.setMemorySize(vmTO.getMaxRam() / 1024);


Mime
View raw message