Hi everyone,
I’m setting up OpenNebula 7.0.1 and have run into a challenge with network configuration.
The Problem: Each of my hypervisors has a different physical network interface name (e.g., eth0, enp1s0, eno1). To manage this, I’ve created a ‘Custom Attribute’ for each host, named PHY_DEV_FOR_ONEBRIDGE, which stores the specific physical device name for that host.
My Goal: I want to create a Virtual Network that dynamically uses this PHY_DEV_FOR_ONEBRIDGE attribute as its bridge name (e.g., for ONEBRIDGE), so that VMs deployed to different hosts correctly attach to the host’s specific physical interface.
What I’ve tried (and failed): When defining the Virtual Network (specifically, in the BRIDGE attribute within the Virtual Network template), I’ve attempted to use several variable syntaxes to reference this custom host attribute:
-
$HOST.PHY_DEV_FOR_ONEBRIDGE -
$PHY_DEV_FOR_ONEBRIDGE -
$TEMPLATE.PHY_DEV_FOR_ONEBRIDGE
In all these attempts, virtual machines attached to this network fail to start correctly, suggesting the bridge name isn’t being resolved or applied as expected.
My Question: What is the correct way to reference a host’s custom attribute (like PHY_DEV_FOR_ONEBRIDGE) within a Virtual Network definition so that the BRIDGE attribute dynamically resolves based on the target host? Or am I approaching this problem incorrectly entirely?
Any help or pointers to the right documentation would be greatly appreciated!