Home Setting up Bridge Interfaces for KVM
Post
Cancel

Setting up Bridge Interfaces for KVM

  1. Update your /etc/netplan/00-installer-config.yaml file based on the below template
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    
    network:
     ethernets:
         ens18:
             dhcp4: false
     bridges:
       br0:
         interfaces: [ens18]
         addresses: [Interface IP/Subnet]
         gateway4: gateway IP
         mtu: 1500
         nameservers:
           addresses: [8.8.8.8,8.8.4.4]
         parameters:
           stp: true
           forward-delay: 4
         dhcp4: no
         dhcp6: no
     version: 2
    
  2. Run sudo netplan apply to apply the network changes you just made
  3. create host-bridge.xml
    1
    2
    3
    4
    5
    
     <network>
       <name>host-bridge</name>
       <forward mode="bridge"/>
       <bridge name="br0"/>
     </network>
    
  4. Run sudo virsh net-define host-bridge.xml to create the KVM Bridge Interface
  5. Run virsh net-start host-bridge to start the interface
  6. Run virsh net-autostart host-bridge to enable the interface to run at start
This post is licensed under CC BY 4.0 by the author.