DaanHoogland commented on a change in pull request #3638: UEFI Support on 
CloudStack
URL: https://github.com/apache/cloudstack/pull/3638#discussion_r391693172
 
 

 ##########
 File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
 ##########
 @@ -4282,13 +4287,21 @@ public UserVm startVirtualMachine(DeployVMCmd cmd) 
throws ResourceUnavailableExc
         Long podId = null;
         Long clusterId = null;
         Long hostId = cmd.getHostId();
+        Map<VirtualMachineProfile.Param, Object> additonalParams = null;
         Map<Long, DiskOffering> diskOfferingMap = 
cmd.getDataDiskTemplateToDiskOfferingMap();
         if (cmd instanceof DeployVMCmdByAdmin) {
             DeployVMCmdByAdmin adminCmd = (DeployVMCmdByAdmin)cmd;
             podId = adminCmd.getPodId();
             clusterId = adminCmd.getClusterId();
         }
-        return startVirtualMachine(vmId, podId, clusterId, hostId, 
diskOfferingMap, null, cmd.getDeploymentPlanner());
+        if (MapUtils.isNotEmpty(cmd.getDetails()) && 
cmd.getDetails().containsKey(ApiConstants.BootType.UEFI.toString())) {
+            additonalParams = new HashMap<VirtualMachineProfile.Param, 
Object>();
+            Map<String, String> map = cmd.getDetails();
+            additonalParams.put(VirtualMachineProfile.Param.UefiFlag, "Yes");
+            additonalParams.put(VirtualMachineProfile.Param.BootType, 
ApiConstants.BootType.UEFI.toString());
+            additonalParams.put(VirtualMachineProfile.Param.BootMode, 
map.get(ApiConstants.BootType.UEFI.toString()));
+        }
 
 Review comment:
   please extract, see above

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to