Skip to content

kvm: Add a configuration setting to switch between multicast and evpn VXLAN modes#13107

Open
wido wants to merge 2 commits intoapache:mainfrom
wido:kvm-vxlan-agent-mode
Open

kvm: Add a configuration setting to switch between multicast and evpn VXLAN modes#13107
wido wants to merge 2 commits intoapache:mainfrom
wido:kvm-vxlan-agent-mode

Conversation

@wido
Copy link
Copy Markdown
Contributor

@wido wido commented May 5, 2026

Description

Using the 'network.vxlan.mode' setting you can switch between the multicast (default) and evpn VXLAN modes on a KVM Agent.

When nothing is configured CloudStack will default to multicast by using the modifyvxlan.sh script in the background. If this setting is set to 'evpn' the KVM Agent will execute the 'modifyvxlan-evpn.sh' script which will configure the VXLAN devices for EVPN (usually with FRRouting with BGP) mode.

This removes the need to manually replace a shell script on the hypervisor to switch modes.

Existing environments are not touched by this and it is safe to add this setting a an environment already using EVPN for the VXLAN deployment.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

… VXLAN modes

Using the 'network.vxlan.mode' setting you can switch between the multicast (default) and evpn VXLAN modes on a KVM Agent.

When nothing is configured CloudStack will default to multicast by using the modifyvxlan.sh script in the background.
If this setting is set to 'evpn' the KVM Agent will execute the 'modifyvxlan-evpn.sh' script which will configure the VXLAN
devices for EVPN (usually with FRRouting with BGP) mode.

This removes the need to manually replace a shell script on the hypervisor to switch modes.

Existing environments are not touched by this and it is safe to add this setting a an environment already using EVPN for the
VXLAN deployment.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2026

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.08%. Comparing base (1e512ab) to head (0ee09b3).

Files with missing lines Patch % Lines
...cloud/hypervisor/kvm/resource/BridgeVifDriver.java 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13107      +/-   ##
============================================
- Coverage     18.08%   18.08%   -0.01%     
+ Complexity    16706    16704       -2     
============================================
  Files          6037     6037              
  Lines        542437   542440       +3     
  Branches      66420    66421       +1     
============================================
- Hits          98088    98082       -6     
- Misses       433333   433342       +9     
  Partials      11016    11016              
Flag Coverage Δ
uitests 3.52% <ø> (ø)
unittests 19.24% <60.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@bernardodemarco bernardodemarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@bernardodemarco bernardodemarco added this to the 4.23.0 milestone May 5, 2026
@bernardodemarco
Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@bernardodemarco a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17722

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a KVM agent configuration property (network.vxlan.mode) to select which VXLAN setup script the KVM BridgeVifDriver uses, enabling switching between the default multicast-based VXLAN setup and an EVPN-based setup without manually replacing scripts on the hypervisor.

Changes:

  • Introduces a new agent property network.vxlan.mode (default: multicast) to control VXLAN mode selection.
  • Updates BridgeVifDriver to choose modifyvxlan.sh (multicast) vs modifyvxlan-evpn.sh (EVPN) based on the new property.
  • Improves the thrown configuration error message to reference the selected script name.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java Selects the VXLAN configuration script based on network.vxlan.mode.
agent/src/main/java/com/cloud/agent/properties/AgentProperties.java Adds the network.vxlan.mode agent property definition and documentation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
_modifyVxlanPath = Script.findScript(networkScriptsDir, "modifyvxlan.sh");
String vxlanMode = AgentPropertiesFileHandler.getPropertyValue(AgentProperties.NETWORK_VXLAN_MODE);
String vxlanScript = "evpn".equalsIgnoreCase(vxlanMode) ? "modifyvxlan-evpn.sh" : "modifyvxlan.sh";
Make sure there is an example in the agent.properties file so people
can easily discover this configuration setting exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants