diff --git a/agent/src/main/java/com/cloud/agent/properties/AgentProperties.java b/agent/src/main/java/com/cloud/agent/properties/AgentProperties.java index e69a7efdc9c..875c8d6042d 100644 --- a/agent/src/main/java/com/cloud/agent/properties/AgentProperties.java +++ b/agent/src/main/java/com/cloud/agent/properties/AgentProperties.java @@ -304,6 +304,15 @@ public class AgentProperties{ */ public static final Property NETWORK_BRIDGE_TYPE = new Property<>("network.bridge.type", "native"); + /** + * Sets the VXLAN networking mode used by the BridgeVifDriver.
+ * Possible values: multicast | evpn
+ * When set to evpn, the driver will use modifyvxlan-evpn.sh instead of modifyvxlan.sh.
+ * Data type: String.
+ * Default value: multicast + */ + public static final Property NETWORK_VXLAN_MODE = new Property<>("network.vxlan.mode", "multicast"); + /** * Sets the driver used to plug and unplug NICs from the bridges.
* A sensible default value will be selected based on the network.bridge.type but can be overridden here.
diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java index e19c3437ba5..d6fc0479faf 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java @@ -76,9 +76,11 @@ public class BridgeVifDriver extends VifDriverBase { if (_modifyVlanPath == null) { throw new ConfigurationException("Unable to find modifyvlan.sh"); } - _modifyVxlanPath = Script.findScript(networkScriptsDir, "modifyvxlan.sh"); + String vxlanMode = AgentPropertiesFileHandler.getPropertyValue(AgentProperties.NETWORK_VXLAN_MODE); + String vxlanScript = "evpn".equalsIgnoreCase(vxlanMode) ? "modifyvxlan-evpn.sh" : "modifyvxlan.sh"; + _modifyVxlanPath = Script.findScript(networkScriptsDir, vxlanScript); if (_modifyVxlanPath == null) { - throw new ConfigurationException("Unable to find modifyvxlan.sh"); + throw new ConfigurationException("Unable to find " + vxlanScript); } libvirtVersion = (Long) params.get("libvirtVersion");