nvazquez commented on a change in pull request #5990:
URL: https://github.com/apache/cloudstack/pull/5990#discussion_r805742796
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -4336,6 +4336,18 @@ public UserVmVO doInTransaction(TransactionStatus
status) throws InsufficientCap
vm.setUserVmType(type);
_vmDao.persist(vm);
for (String key : customParameters.keySet()) {
+ // BIOS was explicitly passed as the boot type, so honour
it
+ if
(key.equalsIgnoreCase(ApiConstants.BootType.BIOS.toString())) {
Review comment:
What about the case when BIOS is set and the template is deploy as is?
##########
File path: server/src/main/java/com/cloud/template/TemplateManagerImpl.java
##########
@@ -2211,6 +2214,31 @@ else if (details != null && !details.isEmpty()) {
return _tmpltDao.findById(id);
}
+ void validateDetails(VMTemplateVO template, Map<String, String> details) {
+ if (details == null || details.isEmpty()) {
+ return;
+ }
+ String bootMode = details.get(ApiConstants.BootType.UEFI.toString());
+ if (bootMode == null) {
+ return;
+ }
+ if (template.isDeployAsIs()) {
+ String msg = "Deploy-as-is templates can not have UEFI parameter
set. Settings are read directly from the template";
+ throw new InvalidParameterValueException(msg);
Review comment:
I think we shouldn't fail at this point, but ignore the settings (return
at this point in the method)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]