Live storage migration of volume in scaleIO within same storage scaleio cluster

This commit is contained in:
Harikrishna Patnala 2023-04-06 13:25:17 +05:30
parent 8d6241fb1b
commit 79bdc62665
2 changed files with 4 additions and 7 deletions

View File

@ -212,6 +212,7 @@ import com.cloud.service.dao.ServiceOfferingDao;
import com.cloud.storage.DiskOfferingVO;
import com.cloud.storage.ScopeType;
import com.cloud.storage.Storage.ImageFormat;
import com.cloud.storage.Storage;
import com.cloud.storage.StorageManager;
import com.cloud.storage.StoragePool;
import com.cloud.storage.VMTemplateVO;
@ -2904,7 +2905,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac
* </ul>
*/
protected void executeManagedStorageChecksWhenTargetStoragePoolProvided(StoragePoolVO currentPool, VolumeVO volume, StoragePoolVO targetPool) {
if (!currentPool.isManaged()) {
if (!currentPool.isManaged() || currentPool.getPoolType().equals(Storage.StoragePoolType.PowerFlex)) {
return;
}
if (currentPool.getId() == targetPool.getId()) {

View File

@ -2983,11 +2983,6 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
throw new InvalidParameterValueException("Live Migration of GPU enabled VM is not supported");
}
StoragePoolVO storagePoolVO = _storagePoolDao.findById(vol.getPoolId());
if (storagePoolVO.getPoolType() == Storage.StoragePoolType.PowerFlex) {
throw new InvalidParameterValueException("Migrate volume of a running VM is unsupported on storage pool type " + storagePoolVO.getPoolType());
}
// Check if the underlying hypervisor supports storage motion.
Long hostId = vm.getHostId();
if (hostId != null) {
@ -3002,7 +2997,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
liveMigrateVolume = capabilities.isStorageMotionSupported();
}
if (liveMigrateVolume && HypervisorType.KVM.equals(host.getHypervisorType())) {
StoragePoolVO storagePoolVO = _storagePoolDao.findById(vol.getPoolId());
if (liveMigrateVolume && HypervisorType.KVM.equals(host.getHypervisorType()) && !storagePoolVO.getPoolType().equals(Storage.StoragePoolType.PowerFlex)) {
StoragePoolVO destinationStoragePoolVo = _storagePoolDao.findById(storagePoolId);
if (isSourceOrDestNotOnStorPool(storagePoolVO, destinationStoragePoolVo)) {