Skip to content

Commit f8b648b

Browse files
authored
Fix migration of VM with volume on Ubuntu (#6116)
* Fix migration of VM with volume on Ubuntu * address comment
1 parent 4be99fe commit f8b648b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ public class KvmNonManagedStorageDataMotionStrategy extends StorageSystemDataMot
8282
*/
8383
@Override
8484
protected StrategyPriority internalCanHandle(Map<VolumeInfo, DataStore> volumeMap, Host srcHost, Host destHost) {
85-
if (super.internalCanHandle(volumeMap, srcHost, destHost) != StrategyPriority.CANT_HANDLE
86-
|| canHandleKVMNonManagedLiveNFSStorageMigration(volumeMap, srcHost, destHost) != StrategyPriority.CANT_HANDLE) {
85+
if (super.internalCanHandle(volumeMap, srcHost, destHost) != StrategyPriority.CANT_HANDLE) {
8786
return StrategyPriority.CANT_HANDLE;
8887
}
88+
if (canHandleKVMNonManagedLiveNFSStorageMigration(volumeMap, srcHost, destHost) != StrategyPriority.CANT_HANDLE) {
89+
return StrategyPriority.HYPERVISOR;
90+
}
8991

9092
Set<VolumeInfo> volumeInfoSet = volumeMap.keySet();
9193
for (VolumeInfo volumeInfo : volumeInfoSet) {

0 commit comments

Comments
 (0)