shwstppr commented on a change in pull request #4548:
URL: https://github.com/apache/cloudstack/pull/4548#discussion_r544223957



##########
File path: 
server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java
##########
@@ -942,7 +942,20 @@ private UserVm importVirtualMachineInternal(final 
UnmanagedInstanceTO unmanagedI
         if (CollectionUtils.isEmpty(unmanagedInstanceDisks)) {
             throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, 
String.format("No attached disks found for the unmanaged VM: %s", 
instanceName));
         }
-        final UnmanagedInstanceTO.Disk rootDisk = 
unmanagedInstance.getDisks().get(0);
+        UnmanagedInstanceTO.Disk rootDisk = 
unmanagedInstance.getDisks().get(0);

Review comment:
       @DK101010 Since disks list for UnmanagedInstance is created by 
CloudStack only, will it be better to always prepare that list in a way that 
first disk is always ROOT disk.
   Relevant code can be found in VmwareResource class.




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


Reply via email to