File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -2632,6 +2632,15 @@ private void mapSpecDisksToClonedDisksAndTearDownDatadisks(VirtualMachineMO vmMo
26322632 s_logger .debug ("Mapping spec disks information to cloned VM disks for VM " + vmInternalCSName );
26332633 if (vmMo != null && ArrayUtils .isNotEmpty (specDisks )) {
26342634 List <VirtualDisk > vmDisks = vmMo .getVirtualDisks ();
2635+ Collections .sort (vmDisks , new Comparator <VirtualDisk >() {
2636+ @ Override
2637+ public int compare (VirtualDisk disk1 , VirtualDisk disk2 ) {
2638+ Integer controllerKey1 = disk1 .getControllerKey ();
2639+ Integer controllerKey2 = disk2 .getControllerKey ();
2640+ return controllerKey1 .compareTo (controllerKey2 );
2641+ }
2642+ });
2643+
26352644 List <VirtualDisk > rootDisks = new ArrayList <>();
26362645 List <DiskTO > sortedRootDisksFromSpec = Arrays .asList (sortVolumesByDeviceId (specDisks ))
26372646 .stream ()
You can’t perform that action at this time.
0 commit comments