cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject git commit: updated refs/heads/4.3-forward to e624632
Date Tue, 28 Jan 2014 22:33:55 GMT
Updated Branches:
  refs/heads/4.3-forward 77aeb2871 -> e624632df


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/e624632d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e624632d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e624632d

Branch: refs/heads/4.3-forward
Commit: e624632dfd532ba2885a8e7dffcb40d1436d02c1
Parents: 77aeb28
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Tue Jan 28 15:32:37 2014 -0700
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Tue Jan 28 15:32:37 2014 -0700

----------------------------------------------------------------------
 .../hypervisor/kvm/resource/LibvirtComputingResource.java    | 8 +++++++-
 .../src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java  | 2 ++
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e624632d/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 d3c87d1..6e0c6fa 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
@@ -374,6 +374,7 @@ ServerResource {
     private boolean _can_bridge_firewall;
     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>();
@@ -749,6 +750,11 @@ ServerResource {
         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;
 
@@ -3489,7 +3495,7 @@ ServerResource {
 
         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);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e624632d/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
index 0ceea24..6a5db84 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java
@@ -166,6 +166,8 @@ public class LibvirtVMDef {
             }
             if (_memBalloning){
                 resBuidler.append("<devices>\n" + "<memballoon model='virtio'/>\n"
+ "</devices>\n");
+            } else {
+                resBuidler.append("<devices>\n" + "<memballoon model='none'/>\n"
+ "</devices>\n");
             }
             if (_vcpu != -1) {
                 resBuidler.append("<vcpu>" + _vcpu + "</vcpu>\n");


Mime
View raw message