Skip to content

Commit 4be99fe

Browse files
authored
api: Allow updating VM settings when custom contrained offering is used (#6136)
1 parent 75b5417 commit 4be99fe

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

server/src/main/java/com/cloud/vm/UserVmManagerImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2647,7 +2647,9 @@ private void verifyVmLimits(UserVmVO vmInstance, Map<String, String> details) {
26472647
Map<String, String> customParameters = new HashMap<>();
26482648
customParameters.put(VmDetailConstants.CPU_NUMBER, String.valueOf(newCpu));
26492649
customParameters.put(VmDetailConstants.MEMORY, String.valueOf(newMemory));
2650-
customParameters.put(VmDetailConstants.CPU_SPEED, details.get(VmDetailConstants.CPU_SPEED));
2650+
if (svcOffering.isCustomCpuSpeedSupported()) {
2651+
customParameters.put(VmDetailConstants.CPU_SPEED, details.get(VmDetailConstants.CPU_SPEED));
2652+
}
26512653
validateCustomParameters(svcOffering, customParameters);
26522654
}
26532655
if (VirtualMachineManager.ResourceCountRunningVMsonly.value()) {

0 commit comments

Comments
 (0)