KVM bridge interface
Page content
How to bridge KVM VMs onto physical network
The default bridge on KVM is 192.168.122.1/24.
We’re going to create a bridge to allow VMs to have an IP on your physical network.
Create a bridge
br0nmcli con add ifname br0 type bridge con-name br0Now we’re going to enslave
br0to the interface with an appearance on the network you want to glom onto. In my case it’senp7s0f0:nmcli con add type bridge-slave ifname enp7s0f0 master br0Trust but verify
nmcli connection showFlop any IP you had on the old MAC to the new generated
br0MAC.Make a file called
br0.xmlsomewhere (anywhere) that has this in it:<network> <name>br0</name> <forward mode="bridge"/> <bridge name="br0" /> </network>Run these virsh commands to define the network:
virsh net-define /tmp/br0.xml virsh net-start br0 virsh net-autostart br0 virsh net-list --all