Score:0

Creating a bridge device using nmcli

cn flag

I am trying to create a bridge device in Ubuntu 22.04, so I can set it a a default network for KVM guests. I need bi-directional external (non-NAT communication from and to the guests.
I followed this guide and created a BASH script to automate the creation of the bridge device.
I have two problems:

  1. The bridge device I've created disappears after a reboot.
  2. I need the bridge device (br0) to be set up as a slave to the main Ethernet device (enp6s0).

I was able to do all I need from the GUI (nm-connection-editor), but, as I've mentioned, I need to auromate this via a BASH script, since I will be using this script to install 8 workstations.

Can someone point me to the correct way to do it via a BASH script / CLI?
Thank you !

user535733 avatar
cn flag
Both nm and netplan can do it persistently. Does your solution **require** nmcli? Or are you open to alternatives?
cn flag
I don't **require** `nmcli,` I just want to create the bridge device and make it persistent between reboots - from within a BASH script. I'd appreciate a pointer to a suitable guide. Thanks!
cn flag
BTW, I really hate working with `netplan`, or any YAML for that matter. Also, it's imperative I use `NetworkManager`, so the users can monitor their connection status in the GUI.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.