The KVM host requires a network bridge (br0) so VMs can access the LAN directly. Pick the method matching the host’s network manager: nmcli if NetworkManager is active (most desktops), ifupdown for classic server configs. Check with systemctl is-active NetworkManager.
Method 1: nmcli (NetworkManager)
First find the current connection profile, its IP config, and the NIC to bridge:
nmcli -f NAME,DEVICE,TYPE,STATE connection show
nmcli -f ipv4.method,ipv4.addresses,ipv4.gateway,ipv4.dns connection show "<existing profile name>"
Create the bridge carrying the same static IP (or use ipv4.method auto for DHCP on br0), then attach the NIC as a bridge port, then disable the old profile so it doesn’t reclaim the NIC:
# 1. Create bridge br0 with the host's IP configsudo nmcli connection add type bridge ifname br0 con-name br0 \
ipv4.method manual ipv4.addresses 192.168.1.100/24 \
ipv4.gateway 192.168.1.1 ipv4.dns 192.168.1.1 \
bridge.stp no
# 2. Attach the physical NIC as a bridge portsudo nmcli connection add type bridge-slave ifname eth0 con-name br0-port-eth0 master br0
# 3. Stop the old profile from auto-activatingsudo nmcli connection modify "<existing profile name>" connection.autoconnect no
# 4. Switch over (brief link interruption; do this from the local console# or accept the drop if connected remotely)sudo nmcli connection up br0
sudo nmcli connection down "<existing profile name>"
Both connections persist across reboots. To roll back: nmcli connection up "<existing profile name>" and restore connection.autoconnect yes.
Method 2: ifupdown (/etc/network/interfaces)
/etc/network/interfaces example:
# Physical NIC — manual mode, no IP (managed by bridge)auto eth0
iface eth0 inet manual
pre-up ip link set$IFACE up
post-down ip link set$IFACE down
# Bridge br0 — static IP, bridges eth0auto br0
iface br0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
bridge_ports eth0
bridge_stp off
bridge_fd 0 bridge_maxwait 0
Replace eth0 with your actual NIC name (check with ip link). After editing: