DaanHoogland commented on a change in pull request #5311:
URL: https://github.com/apache/cloudstack/pull/5311#discussion_r688305857
##########
File path:
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -2632,6 +2632,15 @@ private void
mapSpecDisksToClonedDisksAndTearDownDatadisks(VirtualMachineMO vmMo
s_logger.debug("Mapping spec disks information to cloned VM disks
for VM " + vmInternalCSName);
if (vmMo != null && ArrayUtils.isNotEmpty(specDisks)) {
List<VirtualDisk> vmDisks = vmMo.getVirtualDisks();
+ Collections.sort(vmDisks, new Comparator<VirtualDisk>() {
+ @Override
+ public int compare(VirtualDisk disk1, VirtualDisk disk2) {
+ Integer controllerKey1 = disk1.getControllerKey();
+ Integer controllerKey2 = disk2.getControllerKey();
+ return controllerKey1.compareTo(controllerKey2);
+ }
+ });
+
Review comment:
can you extract this utility?
--
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]