mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-5968 create vm.memballoon.disable agent parameter
This commit is contained in:
parent
29e22384b7
commit
1530c162e5
@ -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.
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user