Close

Ubuntu – How to configure network bridges for LXD container to have their own local network IP

Open the netplan file on the host and update with below code :

user@serv1: sudo nano /etc/netplan/01-network-manager-all.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      dhcp4: no
  bridges:
    br0:
      dhcp4: yes
      interfaces:
        - enp3s0
      parameters:
        stp: false

Apply changes to netplan

sudo netplan generate

Update the Profiles: “LXD UI > Profiles > default” “yaml” file as below.

devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: br0
    type: nic