Skip to content

Commit 50b4073

Browse files
committed
Fix migration of VM with volume on Ubuntu
1 parent 6ff378f commit 50b4073

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,13 @@ 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 (super.internalCanHandle(volumeMap, srcHost, destHost) == StrategyPriority.CANT_HANDLE &&
89+
canHandleKVMNonManagedLiveNFSStorageMigration(volumeMap, srcHost, destHost) != StrategyPriority.CANT_HANDLE) {
90+
return StrategyPriority.HYPERVISOR;
91+
}
8992

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

0 commit comments

Comments
 (0)