GabrielBrascher commented on a change in pull request #2997: Allow KVM VM live 
migration with ROOT volume on file storage type
URL: https://github.com/apache/cloudstack/pull/2997#discussion_r232004085
 
 

 ##########
 File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java
 ##########
 @@ -138,20 +139,26 @@ public boolean 
connectPhysicalDisksViaVmSpec(VirtualMachineTO vmSpec) {
         List<DiskTO> disks = Arrays.asList(vmSpec.getDisks());
 
         for (DiskTO disk : disks) {
-            if (disk.getType() != Volume.Type.ISO) {
-                VolumeObjectTO vol = (VolumeObjectTO)disk.getData();
-                PrimaryDataStoreTO store = 
(PrimaryDataStoreTO)vol.getDataStore();
-                KVMStoragePool pool = getStoragePool(store.getPoolType(), 
store.getUuid());
+            if (disk.getType() == Volume.Type.ISO) {
+                result = true;
 
 Review comment:
   Yes @nvazquez, we can always assume result as true in case of an ISO; as the 
ISO connection does not have any error, because it is not executed. Then we 
continue the iteration over the VM volumes List.
   
   If an issue happens while connecting a Disk, the result will be false as you 
can check at lines 157 - 161.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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