Github user anshul1886 commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/868#discussion_r105116946 --- Diff: server/src/com/cloud/vm/UserVmManagerImpl.java --- @@ -1535,6 +1535,19 @@ private boolean upgradeRunningVirtualMachine(Long vmId, Long newServiceOfferingI + ",memory=," + currentMemory + ")"); } + _offeringDao.loadDetails(currentServiceOffering); + _offeringDao.loadDetails(newServiceOffering); + + Map<String, String> currentDetails = currentServiceOffering.getDetails(); + Map<String, String> newDetails = newServiceOffering.getDetails(); + String currentVgpuType = currentDetails.get("vgpuType"); + String newVgpuType = newDetails.get("vgpuType"); + if(currentVgpuType != null) { + if(newVgpuType == null || !newVgpuType.equalsIgnoreCase(currentVgpuType)) { + throw new InvalidParameterValueException("Dynamic scaling of vGPU type is not supported. VM has vGPU Type: " + currentVgpuType); + } + } + // Check resource limits --- End diff -- @pedro-martins I would prefer it this way for readability.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---