mirror of https://github.com/apache/cloudstack.git
Merge a6ec38ac5e into b7d4df0a11
This commit is contained in:
commit
c7b31ec555
|
|
@ -574,7 +574,7 @@ public class AncientDataMotionStrategy implements DataMotionStrategy {
|
|||
VolumeInfo volume = (VolumeInfo)srcData;
|
||||
StoragePool srcPool = (StoragePool)dataStoreMgr.getDataStore(srcData.getDataStore().getId(), DataStoreRole.Primary);
|
||||
StoragePool destPool = (StoragePool)dataStoreMgr.getDataStore(destData.getDataStore().getId(), DataStoreRole.Primary);
|
||||
MigrateVolumeCommand command = new MigrateVolumeCommand(volume.getId(), volume.getPath(), destPool, volume.getAttachedVmName(), volume.getVolumeType(), waitInterval, volume.getChainInfo());
|
||||
MigrateVolumeCommand command = new MigrateVolumeCommand(srcData.getTO(), destData.getTO(), null, null, waitInterval);
|
||||
if (srcPool.getParent() != 0) {
|
||||
command.setContextParam(DiskTO.PROTOCOL_TYPE, Storage.StoragePoolType.DatastoreCluster.toString());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,11 @@ public class LibvirtMigrateVolumeCommandWrapper extends CommandWrapper<MigrateVo
|
|||
@Override
|
||||
public Answer execute(final MigrateVolumeCommand command, final LibvirtComputingResource libvirtComputingResource) {
|
||||
VolumeObjectTO srcVolumeObjectTO = (VolumeObjectTO)command.getSrcData();
|
||||
|
||||
if (srcVolumeObjectTO == null) {
|
||||
return migrateRegularVolume(command, libvirtComputingResource);
|
||||
}
|
||||
|
||||
PrimaryDataStoreTO srcPrimaryDataStore = (PrimaryDataStoreTO)srcVolumeObjectTO.getDataStore();
|
||||
|
||||
MigrateVolumeAnswer answer;
|
||||
|
|
|
|||
|
|
@ -3771,9 +3771,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
|||
StoragePoolVO destinationStoragePoolVo = _storagePoolDao.findById(storagePoolId);
|
||||
|
||||
if (isSourceOrDestNotOnStorPool(srcStoragePoolVO, destinationStoragePoolVo)) {
|
||||
throw new InvalidParameterValueException("KVM does not support volume live migration due to the limited possibility to refresh VM XML domain. " +
|
||||
"Therefore, to live migrate a volume between storage pools, one must migrate the VM to a different host as well to force the VM XML domain update. " +
|
||||
"Use 'migrateVirtualMachineWithVolumes' instead.");
|
||||
logger.debug("Allowing KVM live volume migration between different storage pools. VM [{}], volume [{}], source pool [{}], destination pool [{}].",
|
||||
vm, vol, srcStoragePoolVO, destinationStoragePoolVo);
|
||||
}
|
||||
srcAndDestOnStorPool = isSourceAndDestOnStorPool(srcStoragePoolVO, destinationStoragePoolVo);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue