This is an automated email from the ASF dual-hosted git repository. harikrishna pushed a commit to branch LiveStoragMigrationScaleIOMain in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 2443a17b00a5d125f598d1731b909cd0b87ead6e Author: Harikrishna Patnala <harikrishna.patn...@gmail.com> AuthorDate: Wed May 31 17:09:21 2023 +0530 Allow multiple Volumes to be migrated with migrateVirtualMachineWithVolume API --- server/src/main/java/com/cloud/vm/UserVmManagerImpl.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java index 3f73b620c38..f0aed627f15 100644 --- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java @@ -6270,16 +6270,6 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir + " hypervisors: [%s].", hypervisorType, HYPERVISORS_THAT_CAN_DO_STORAGE_MIGRATION_ON_NON_USER_VMS)); } - List<VolumeVO> vols = _volsDao.findByInstance(vm.getId()); - if (vols.size() > 1) { - // OffLineVmwareMigration: data disks are not permitted, here! - if (vols.size() > 1 && - // OffLineVmwareMigration: allow multiple disks for vmware - !HypervisorType.VMware.equals(hypervisorType)) { - throw new InvalidParameterValueException("Data disks attached to the vm, can not migrate. Need to detach data disks first"); - } - } - // Check that Vm does not have VM Snapshots if (_vmSnapshotDao.findByVm(vmId).size() > 0) { throw new InvalidParameterValueException("VM's disk cannot be migrated, please remove all the VM Snapshots for this VM");