mirror of https://github.com/apache/cloudstack.git
Throw an error when fail to configure one of the nics for multiNic user Vm
This commit is contained in:
parent
0f53f2a2c7
commit
d764bf245b
|
|
@ -975,6 +975,11 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
Integer networkRate = _configMgr.getNetworkRate(no.getId());
|
||||
vm.addNic(new NicProfile(vo, network.first(), vo.getBroadcastUri(), vo.getIsolationUri(), networkRate));
|
||||
}
|
||||
|
||||
if (nics.size() != networks.size()) {
|
||||
s_logger.warn("Number of nics " + nics.size() + " doesn't match number of requested networks " + networks.size());
|
||||
throw new CloudRuntimeException("Number of nics " + nics.size() + " doesn't match number of requested networks " + networks.size());
|
||||
}
|
||||
|
||||
if (nics.size() == 1) {
|
||||
nics.get(0).setDefaultNic(true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue