mirror of https://github.com/apache/cloudstack.git
Maintenance mode: Add host to deployment planner avoid list to fix local storage vm migration (#9892)
This commit is contained in:
parent
9f594c9699
commit
a163831b7e
|
|
@ -1473,8 +1473,10 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager,
|
|||
final VirtualMachineProfile profile = new VirtualMachineProfileImpl(vm, null, offeringVO, null, null);
|
||||
plan.setMigrationPlan(true);
|
||||
DeployDestination dest = null;
|
||||
DeploymentPlanner.ExcludeList avoids = new DeploymentPlanner.ExcludeList();
|
||||
avoids.addHost(host.getId());
|
||||
try {
|
||||
dest = deploymentManager.planDeployment(profile, plan, new DeploymentPlanner.ExcludeList(), null);
|
||||
dest = deploymentManager.planDeployment(profile, plan, avoids, null);
|
||||
} catch (InsufficientServerCapacityException e) {
|
||||
throw new CloudRuntimeException(String.format("Maintenance failed, could not find deployment destination for VM: %s.", vm), e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue