private void updateMaxMemoryIfUnspecified(InstanceType instanceType, VM vm) { if (!(instanceType.isSetMemoryPolicy() && instanceType.getMemoryPolicy().isSetMax()) && instanceType.isSetMemory()) { vm.setMaxMemorySizeMb(VmCommonUtils.getMaxMemorySizeDefault(vm.getMemSizeMb())); } }
public void updateMaxMemory() { final Integer memoryMb = getModel().getMemSize().getEntity(); if (memoryMb != null) { getModel().getMaxMemorySize().setEntity( VmCommonUtils.getMaxMemorySizeDefault(memoryMb)); } }
private void updateMaxMemoryIfUnspecified(Vm vm, VmStatic vmStatic) { if (!(vm.isSetMemoryPolicy() && vm.getMemoryPolicy().isSetMax()) && vm.isSetMemory()) { vmStatic.setMaxMemorySizeMb(VmCommonUtils.getMaxMemorySizeDefault(vmStatic.getMemSizeMb())); } }
public void initialize() { super.initialize(); getMemSize().setEntity(256); getMinAllocatedMemory().setEntity(256); getMaxMemorySize().setEntity(VmCommonUtils.getMaxMemorySizeDefault(getMemSize().getEntity())); getIsStateless().setEntity(false); getIsRunAndPause().setEntity(false); getIsHeadlessModeEnabled().setEntity(false); getIsSmartcardEnabled().setEntity(false); isConsoleDeviceEnabled.setEntity(false); getIsHighlyAvailable().setEntity(false); getIsAutoAssign().setEntity(true); getIsTemplatePublic().setEntity(true); getBehavior().enableSinglePCI(false); isRngEnabled.setEntity(false); rngSourceUrandom.setEntity(true); getHostCpu().setEntity(false); getMigrationMode().setIsChangeable(true); getCdImage().setIsChangeable(false); initGraphicsAndDisplayListeners(); initFirstBootDevice(); initNumOfMonitors(); initAllowConsoleReconnect(); initMigrationMode(); initVncKeyboardLayout(); initConsoleDisconnectAction(); updateResumeBehavior(); updateLabelList(); behavior.initialize(); }