KVM Bridged Networking

Submitted by Jeff on Mon, 18/06/2018 - 14:14


(Note: To setup NAT networking, see: https://wiki.debian.org/KVM)

Bridge the network on Debian:

apt install bridge-utils

Create the bridge:

# brctl addbr br0

We are only going to create a bridge on eno1 for VMs to use:

Caution: this must be done through the iKVM remote console, as the network breaks!

brctl addif br0 eno1

Make changes permanent:

root@vespa ~ $ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static

auto br0
iface br0 inet static
   hwaddress 0C:C4:7A:7C:CE:26
   address 1x7.1x9.2x7.10
   gateway 1x7.1x9.2x7.9

    bridge_ports eno1
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 0

iface br0 inet6 static
    address 2c0x:xxxx:xx00:801::10
    netmask 64
    gateway 2c0x:xxxx:xx00:801::1

# Hetzner 1GB VLAN internal network 
auto eno2
        iface eno2 inet static


To move the client VMs from NAT 'network' to Bridged:

virsh edit 'vm-name'

Change <interface type='network'>, and source line:

<interface type='bridge'>
<mac address='52:54:00:ca:d6:a8'/>
<source bridge='br0'/>
<model type='virtio'/>

When everything is working, disable the virsh network called 'default':

virsh net-autostart --disable default

Install resolvconf to handle DNS entries
(As dnsmasq will no longer be servicing the VM 'network')

apt install resolvconf
nano /etc/resolvconf/resolv.conf.d/base

... and add, e.g.:


Update /etc/resolv.conf:
resolvconf -u