How to create a bridge interface on the KVM host
A bridge on the host allows your virtual machines to connect directly to the physical network as if they were another machine on the LAN. It’s the basis for “bridged networks” covered in the network types section.
Important: if you perform these changes over remote SSH you may lose connectivity. Whenever possible use local/console access or have a recovery plan (KVM/IPMI, a second interface, maintenance window, etc.).
0. Preparation: identify your physical interface and back up configs Identify the physical interface connected to your LAN/Internet (for example: enp1s0, enp3s0, eth0): ip -br link ip -br addr Back up your network configuration files before changing anything — use the command appropriate to your setup: sudo cp -a /etc/netplan /etc/netplan.bak.$(date +%F) 2>/dev/null sudo cp -a /etc/network/interfaces /etc/network/interfaces.bak.$(date +%F) 2>/dev/null Important note: the IP must live on the bridge (br0), not on the physical interface. The physical interface will be left without an IP and become a slave of the bridge. Option A: Netplan (modern Ubuntu/Debian) Applies to systems using Netplan (Ubuntu Server ≥ 18.04, Debian when migrated). The most common renderer is networkd, but NetworkManager can also be used. Here we configure br0 and enslave the physical interface to the bridge.