CLOUDSTACK-3946 [KVM] [Zone Wide Primary Storages] migrateVolume is deleting the volume if the source and destination pool are same

This commit is contained in:
Rajesh Battala 2013-08-10 16:54:25 +05:30 committed by Devdeep Singh
parent 14abe4cb2d
commit be9dbcc2c5
1 changed files with 4 additions and 0 deletions

View File

@ -2142,6 +2142,10 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
"Volume must be in ready state");
}
if (storagePoolId == vol.getPoolId()) {
throw new InvalidParameterValueException("Specified destination pool and the current volume storage pool are same");
}
boolean liveMigrateVolume = false;
Long instanceId = vol.getInstanceId();
VMInstanceVO vm = null;