Skip to content

Commit 2982a85

Browse files
Pearl1594rohityadavcloud
authored andcommitted
Fix migration of VM with volume on Ubuntu (apache#6116)
* Fix migration of VM with volume on Ubuntu * address comment (cherry picked from commit f8b648b) Signed-off-by: Rohit Yadav <[email protected]>
1 parent 343ebe0 commit 2982a85

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)