Skip to content

Commit be9dbcc

Browse files
rajesh-battaladevdeep
authored andcommitted
CLOUDSTACK-3946 [KVM] [Zone Wide Primary Storages] migrateVolume is deleting the volume if the source and destination pool are same
1 parent 14abe4c commit be9dbcc

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

server/src/com/cloud/storage/VolumeManagerImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2142,6 +2142,10 @@ public Volume migrateVolume(MigrateVolumeCmd cmd) {
21422142
"Volume must be in ready state");
21432143
}
21442144

2145+
if (storagePoolId == vol.getPoolId()) {
2146+
throw new InvalidParameterValueException("Specified destination pool and the current volume storage pool are same");
2147+
}
2148+
21452149
boolean liveMigrateVolume = false;
21462150
Long instanceId = vol.getInstanceId();
21472151
VMInstanceVO vm = null;

0 commit comments

Comments
 (0)