shwstppr commented on code in PR #10975:
URL: https://github.com/apache/cloudstack/pull/10975#discussion_r2219100001


##########
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java:
##########
@@ -1259,6 +1262,12 @@ private UserVm importVirtualMachineInternal(final 
UnmanagedInstanceTO unmanagedI
         return userVm;
     }
 
+    private void addImportingVMBootTypeAndModeDetails(String bootType, String 
bootMode, Map<String, String> allDetails) {
+        if (StringUtils.isNotBlank(bootType) && 
bootType.equalsIgnoreCase("uefi") && StringUtils.isNotBlank(bootMode)) {

Review Comment:
   Do we need to check if bootMode is blank or not?
   In a similar code block in #11218, I added a deployasis check as I saw it in 
UserVmManagerImpl.commitUserVm, not sure if it is worth adding?
   



##########
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java:
##########
@@ -1564,7 +1573,8 @@ private UserVm 
importUnmanagedInstanceFromHypervisor(DataCenter zone, Cluster cl
                         template, displayName, hostName, 
CallContext.current().getCallingAccount(), owner, userId,
                         serviceOffering, dataDiskOfferingMap,
                         nicNetworkMap, nicIpAddressMap,
-                        details, migrateAllowed, forced, true);
+                        details, migrateAllowed, forced, true,
+                        unmanagedInstance.getBootType(), 
unmanagedInstance.getBootMode());

Review Comment:
   @nvazquez do we need to pass them here as they are already returned by 
`unmanagedInstance` and it is already passed?



-- 
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]

Reply via email to