sureshanaparti commented on code in PR #10381:
URL: https://github.com/apache/cloudstack/pull/10381#discussion_r2075343641


##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -6681,12 +6687,27 @@ public VirtualMachine vmStorageMigration(Long vmId, 
Map<String, String> volumeTo
                 poolClusterId = pool.getClusterId();
             }
             checkDestinationHypervisorType(pool, vm);
+            Pair<Boolean, String> checkResult = 
storageManager.checkIfReadyVolumeFitsInStoragePoolWithStorageAccessGroups(pool, 
volume);
+            if (!checkResult.first()) {
+                throw new CloudRuntimeException(String.format("Storage 
suitability check failed for volume %s with error %s", volume, 
checkResult.second()));
+            }
+
             volumeToPoolIds.put(volume.getId(), pool.getId());
         }
         _itMgr.storageMigration(vm.getUuid(), volumeToPoolIds);
         return findMigratedVm(vm.getId(), vm.getType());
     }
 
+    private void checkIfDestinationPoolHasSameStoragePool(StoragePool 
destPool, VMInstanceVO vm) {

Review Comment:
   ```suggestion
       private void checkIfDestinationPoolHasSameStorageAccessGroup(StoragePool 
destPool, VMInstanceVO vm) {
   ```



-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to