Use Open vSwitch bridges on SEAPATH
SEAPATH provides wrappers to define the network of a machine inside an Ansible inventory.
For systemd-networkd, this wrapper mostly uses the
custom_networkandcustom_netdevvariables (see network_systemdnetworkd role documentation).For Open vSwitch (OVS) bridges, the
ovs_bridgesvariable is used, along with the role network_configovs.
Create an additional OVS bridge
An OVS bridge can be useful to connect virtual VM interfaces to physical interfaces of the hypervisor.
All bridges must be described under the ovs_bridges variable. Additional ports can be added to the bridge at its creation.
ovs_bridges:
- name: ovsbr
ports:
- name: VM1.0 # Tap interface to connect a future VM to the bridge
type: tap
- name: ovsbr_ext # External physical interface to connect to the bridge
type: system
interface: eno1The bridge is then created by the network_configovs role, which is included by default on the seapath_setup_main playbook.
See the full documentation of the ovs_bridges variable on the network_configovs role documentation.
It is not mandatory to create a tap interface for a VM to connect on, as Libvirt is capable of creating them itself with the VM. Read Connect a virtual machine to the network
Creating the tap interface manually is useful for interface customization.
Create an extended bridge over the cluster
Virtual machines can migrate on different hypervisors on the cluster. In order for them to communicate with each other, no matter their position on the cluster, one OVS extended bridge has to be created.
Full documentation of this feature on the dedicated page : Create an extended bridge over the cluster
Connect a virtual machine to an OVS bridge
The connection of a VM to the OVS bridge is configured inside the Libvirt XML file.
Full documentation on the dedicated section Connect a virtual machine to the network
Infrastructure management
Internally, the ovs_bridges variable is transformed into a JSON configuration file by the network_configovs role.
This configuration file is then located at /etc/ovs_configuration.json. The bridge itself is created by the seapath-config_ovs systemd service.
All the logs are available in the service output.