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


##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -7245,8 +7289,12 @@ private Map<Long, Long> 
getVolumePoolMappingForMigrateVmWithStorage(VMInstanceVO
                     }
                     volToPoolObjectMap.put(volume.getId(), pool.getId());
                 }
-                HypervisorType hypervisorType = 
_volsDao.getHypervisorType(volume.getId());
+                HostVO host = _hostDao.findById(vm.getHostId());
+                if 
(!storageManager.checkIfHostAndStoragePoolHasCommonStorageAccessGroups(host, 
pool)) {
+                    throw new 
InvalidParameterValueException(String.format("Destination pool %s for the 
volume %s does not have matching storage tags as host %s", pool.getName(), 
volume.getName(), host.getName()));

Review Comment:
   ```suggestion
                       throw new 
InvalidParameterValueException(String.format("Destination pool %s for the 
volume %s does not have matching storage access groups as host %s", 
pool.getName(), volume.getName(), host.getName()));
   ```



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