mirror of https://github.com/apache/cloudstack.git
put the default network as cloudbr0, if not specified
This commit is contained in:
parent
5493880b37
commit
da5fb5097c
|
|
@ -724,6 +724,10 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
|||
}
|
||||
|
||||
private boolean checkNetwork(String networkName) {
|
||||
if (networkName == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
String name = Script.runSimpleBashScript("brctl show | grep " + networkName + " | awk '{print $4}'");
|
||||
if (name == null) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -190,8 +190,18 @@ public class KvmServerDiscoverer extends DiscovererBase implements Discoverer,
|
|||
} else {
|
||||
PhysicalNetworkSetupInfo network = networks.get(0);
|
||||
_kvmPublicNic = network.getPublicNetworkName();
|
||||
if (_kvmPublicNic == null) {
|
||||
_kvmPublicNic = "cloudbr0";
|
||||
}
|
||||
_kvmPrivateNic = network.getPrivateNetworkName();
|
||||
if (_kvmPrivateNic == null) {
|
||||
_kvmPrivateNic = _kvmPublicNic;
|
||||
}
|
||||
_kvmGuestNic = network.getGuestNetworkName();
|
||||
if (_kvmGuestNic == null) {
|
||||
_kvmGuestNic = _kvmPrivateNic;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String parameters = " -m " + _hostIp + " -z " + dcId + " -p " + podId + " -c " + clusterId + " -g " + guid + " -a";
|
||||
|
|
|
|||
Loading…
Reference in New Issue