mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Fix VR inheriting boot settings from user's VM (#8894)
Co-authored-by: Henrique Sato <henrique.sato@scclouds.com.br>
This commit is contained in:
parent
a55ba96a08
commit
075b413041
@ -219,7 +219,7 @@ NetworkMigrationResponder, AggregatedCommandExecutor, RedundantResource, DnsServ
|
||||
return false;
|
||||
}
|
||||
|
||||
final Map<VirtualMachineProfile.Param, Object> params = new HashMap<VirtualMachineProfile.Param, Object>(1);
|
||||
final Map<VirtualMachineProfile.Param, Object> params = new HashMap<>(1);
|
||||
params.put(VirtualMachineProfile.Param.ReProgramGuestNetworks, true);
|
||||
|
||||
if (network.isRollingRestart()) {
|
||||
@ -264,27 +264,13 @@ NetworkMigrationResponder, AggregatedCommandExecutor, RedundantResource, DnsServ
|
||||
return false;
|
||||
}
|
||||
|
||||
final NetworkOfferingVO offering = _networkOfferingDao.findById(network.getNetworkOfferingId());
|
||||
if (offering.isSystemOnly()) {
|
||||
return false;
|
||||
}
|
||||
if (!_networkMdl.isProviderEnabledInPhysicalNetwork(_networkMdl.getPhysicalNetworkId(network), getProvider().getName())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final RouterDeploymentDefinition routerDeploymentDefinition =
|
||||
routerDeploymentDefinitionBuilder.create()
|
||||
.setGuestNetwork(network)
|
||||
.setDeployDestination(dest)
|
||||
.setAccountOwner(_accountMgr.getAccount(network.getAccountId()))
|
||||
.setParams(vm.getParameters())
|
||||
.build();
|
||||
final NetworkOfferingVO offering = _networkOfferingDao.findById(network.getNetworkOfferingId());
|
||||
implement(network, offering, dest, context);
|
||||
|
||||
final List<DomainRouterVO> routers = routerDeploymentDefinition.deployVirtualRouter();
|
||||
|
||||
if (routers == null || routers.size() == 0) {
|
||||
throw new ResourceUnavailableException("Can't find at least one running router!", DataCenter.class, network.getDataCenterId());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user