Source:
protected void verifyLiveMigrationForKVM(Map<VolumeInfo, DataStore> volumeDataStoreMap, Host destHost) { Boolean storageTypeConsistency = null; Map<String, Storage.StoragePoolType> sourcePools = new HashMap<>(); for (Map.Entry<VolumeInfo, DataStore> entry : volumeDataStoreMap.entrySet()) { VolumeInfo volumeInfo = entry.getKey(); Long storagePoolId = volumeInfo.getPoolId(); StoragePoolVO srcStoragePoolVO = _storagePoolDao.findById(storagePoolId); if (srcStoragePoolVO == null) { throw new CloudRuntimeException("Volume with ID " + volumeInfo.getId() + " is not associated with a storage pool."); } if (srcStoragePoolVO.isManaged()) { throw new CloudRuntimeException("Migrating a volume online with KVM from managed storage is not currently supported."); } DataStore dataStore = entry.getValue(); StoragePoolVO destStoragePoolVO = _storagePoolDao.findById(dataStore.getId()); if (destStoragePoolVO == null) { throw new CloudRuntimeException("Destination storage pool with ID " + dataStore.getId() + " was not located."); } if (storageTypeConsistency == null) { storageTypeConsistency = destStoragePoolVO.isManaged(); } else if (storageTypeConsistency != destStoragePoolVO.isManaged()) { throw new CloudRuntimeException("Destination storage pools must be either all managed or all not managed"); } if (!destStoragePoolVO.isManaged()) { if (destStoragePoolVO.getScope() != ScopeType.CLUSTER) { throw new CloudRuntimeException("KVM live storage migrations currently support cluster-wide " + "not managed destination storage"); } if (!sourcePools.containsKey(srcStoragePoolVO.getUuid())) { sourcePools.put(srcStoragePoolVO.getUuid(), srcStoragePoolVO.getPoolType()); } } } verifyDestinationStorage(sourcePools, destHost); }

Target:
protected void verifyLiveMigrationForKVM(Map<VolumeInfo, DataStore> volumeDataStoreMap, Host destHost) { Boolean storageTypeConsistency = null; Map<String, Storage.StoragePoolType> sourcePools = new HashMap<>(); for (Map.Entry<VolumeInfo, DataStore> entry : volumeDataStoreMap.entrySet()) { VolumeInfo volumeInfo = entry.getKey(); Long storagePoolId = volumeInfo.getPoolId(); StoragePoolVO srcStoragePoolVO = _storagePoolDao.findById(storagePoolId); if (srcStoragePoolVO == null) { throw new CloudRuntimeException("Volume with ID " + volumeInfo.getId() + " is not associated with a storage pool."); } if (srcStoragePoolVO.isManaged()) { throw new CloudRuntimeException("Migrating a volume online with KVM from managed storage is not currently supported."); } DataStore dataStore = entry.getValue(); StoragePoolVO destStoragePoolVO = _storagePoolDao.findById(dataStore.getId()); if (destStoragePoolVO == null) { throw new CloudRuntimeException("Destination storage pool with ID " + dataStore.getId() + " was not located."); } if (storageTypeConsistency == null) { storageTypeConsistency = destStoragePoolVO.isManaged(); } else if (storageTypeConsistency != destStoragePoolVO.isManaged()) { throw new CloudRuntimeException("Destination storage pools must be either all managed or all not managed"); } if (!destStoragePoolVO.isManaged()) { if (destStoragePoolVO.getPoolType() == StoragePoolType.NetworkFilesystem && destStoragePoolVO.getScope() != ScopeType.CLUSTER) { throw new CloudRuntimeException("KVM live storage migrations currently support cluster-wide " + "not managed NFS destination storage"); } if (!sourcePools.containsKey(srcStoragePoolVO.getUuid())) { sourcePools.put(srcStoragePoolVO.getUuid(), srcStoragePoolVO.getPoolType()); } } } verifyDestinationStorage(sourcePools, destHost); }