User Tools

Site Tools


Sidebar

kvm:bridge_interface

This is an old revision of the document!


KVM bridged networking

By default dhcpd based network bridge configured by libvirtd. You can verify that with the following commands:

# brctl show
# virsh net-list

KVM default networking All VMs (guest machine) only have network access to other VMs on the same server. A private network 192.168.122.0/24 created for you. Verify it:

# virsh net-dumpxml default

If you want your VMs avilable to other servers on your LAN, setup a a network bridge on the server that connected to the your LAN. Update your nic config file such as ifcfg-enp3s0 or em1: # vi /etc/sysconfig/network-scripts/enp3s0

Add line:

BRIDGE=br0

Save and close the file in vi. Edit /etc/sysconfig/network-scripts/ifcfg-br0 and add:

# vi /etc/sysconfig/network-scripts/ifcfg-br0

Append the following:

DEVICE="br0"
# I am getting ip from DHCP server #
BOOTPROTO="dhcp"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
ONBOOT="yes"
TYPE="Bridge"
DELAY="0"

Restart the networking service (warning ssh command will disconnect, it is better to reboot the box):

# systemctl restart NetworkManager

Verify it with brctl command:

# brctl show
kvm/bridge_interface.1617955381.txt.gz · Last modified: 2021/04/09 10:03 by admin