Skip to content

Net Creation Fails on Second KVM Host Due to Invalid Bridge Name Format #10884

@rbaweja

Description

@rbaweja

problem

Summary:
When adding a second KVM host with identical bridge and VLAN configuration to an existing zone, CloudStack fails to create a VNet interface, throwing an error due to an invalid bridge name.

versions

Environment:

CloudStack Version: [e.g., 4.20.0.0]

Hypervisor: KVM

Host OS: Ubuntu 24.04 (or your exact OS)

Network Setup:

cloudbr0: Management (Access)

cloudbr1: Guest (VLAN-aware, native + trunked VLANs)

cloudbr3: Public (VLAN-aware, trunked, tagged at ACS level)

The steps to reproduce the bug

  1. Create a working zone with one KVM host using ens1f0np0 for guest VLAN bridge (cloudbr1).
  2. Add another KVM host with the same physical interface name.
  3. Deploy a guest VM with a VLAN-enabled network (e.g., VLAN ID 1996).
  4. Observe that the bridge creation fails on the second host.

What to do about it?

Observed Behavior
Agent log from new host shows:

Execution of process for command [.../modifyvlan.sh -v 1996 -p ens1f0np0 -b brens1f0np0-1996 -o add ] failed.

Error: argument "brens1f0np0-1996" is wrong: "name" not a valid ifname
... line 59: /proc/sys/net/ipv6/conf/brens1f0np0-1996/disable_ipv6: No such file or directory
Cannot find device "brens1f0np0-1996"
Failed to create br: brens1f0np0-1996

Root Cause
The bridge name brens1f0np0-1996 exceeds the 15-character IFNAMSIZ limit imposed by the Linux kernel.
Resulting bridge creation fails due to invalid interface name.

Expected Behavior
CloudStack should:
Generate compliant bridge names (≤15 characters).
OR pre-validate final bridge names before attempting creation.
OR use a shortened/hashed format (e.g., brv1996, brg123, etc.)

Temporary Workaround
Renaming physical interfaces to shorter names (e.g., eth0) avoids name length issues — but this is not sustainable or ideal in managed deployments.

Suggested Fix
Update the BridgeVifDriver or modifyvlan.sh logic to:

Enforce safe-length bridge names

Apply a safe naming convention that avoids appending full interface names + VLAN IDs blindly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions