mirror of
https://github.com/apache/cloudstack
synced 2026-08-27 08:15:09 +00:00
CLOUDSTACK-5763: if vm is stopped, then don't check hypervisor support live storage migration capabilities.
This commit is contained in:
parent
b3d4b72508
commit
d1c0aa157a
@ -1543,12 +1543,11 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
|
||||
liveMigrateVolume = capabilities.isStorageMotionSupported();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If the disk is not attached to any VM then it can be moved. Otherwise, it needs to be attached to a vm
|
||||
// running on a hypervisor that supports storage motion so that it be be migrated.
|
||||
if (instanceId != null && !liveMigrateVolume) {
|
||||
throw new InvalidParameterValueException("Volume needs to be detached from VM");
|
||||
// If vm is running, and hypervisor doesn't support live migration, then return error
|
||||
if (!liveMigrateVolume) {
|
||||
throw new InvalidParameterValueException("Volume needs to be detached from VM");
|
||||
}
|
||||
}
|
||||
|
||||
if (liveMigrateVolume && !cmd.isLiveMigrate()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user