mirror of https://github.com/apache/cloudstack.git
Allow multiple Volumes to be migrated with migrateVirtualMachineWithVolume API
This commit is contained in:
parent
0b30884e37
commit
2443a17b00
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue