I deleted lxdbr0 ... how so I get it back?

Greetings. At some point I deleted the lxdbr0 device that is created during the lxd init setup. How do I get it back? The reason I had deleted it was that I was using the macvlan device exclusively so that I could keep my containers on the same subnet as the rest of the LAN. Now I think I can accomplish what I want to do more efficiently via the lxdbro0 device.

Thank you


$ lxc network list

and you will see what network devices are there.

To create lxdbr0, just run

lxc network create lxdbr0

That’s it.

how about restarting lxd init and skipping the storage part ?

Error: Failed to run: dnsmasq --strict-order --bind-interfaces --pid-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.pid --except-interface=lo --interface=lxdbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address= --dhcp-no-override --dhcp-authoritative --dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases --dhcp-hostsfile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.hosts --dhcp-range,,1h --listen-address=fd42:bd98:a5b4:4255::1 --enable-ra --dhcp-range ::,constructor:lxdbr0,ra-stateless,ra-names -s lxd -S /lxd/ --conf-file=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.raw -u lxd: dnsmasq: failed to create listening socket for Address already in use

I did some research on this error and I believe my instance of pi-hole is causing this issue. It is not an option to remove or shut it down.

Something is really wrong here. The IP range 169.254.* is for private IP addresses, and it is used when a device did not manage to get a DHCP lease. It is weird that LXD (dnsmasq) is complaining about such an IP address while lxdbr0 has the IP range 10.179.195.*.

Words you never want to hear haha

Hmmm. I don’t think I have a particularly unusual setup so I’ll list anything I think may be relevant.

I run a docker container in an lxc container.

The host computer has a static IP (reserved via Netplan) on the 192.168.86.xxx subnet.

I run openvpn on the host with a 10.8.0.xxx subnet.

Five lxd containers with LAN access via macvlan.

As mentioned earlier, Pi-Hole runs on the host. How it monopolizes web-serving functionality is the reason I got into lxd (and I am grateful for it).

Any other info that may help?

I shutdown pihole-ftl (dns) and was able to create the lxdbr0 but then could not reatart the DNS service. Is there a reason the bridge needs port 53?

how did you delete/remove the lxdbr0 bridge?

If you manually removed the interface and the LXD config for it still exists then restarting LXD service will re-create the bridge interface.

You cannot run another DNS/DHCP service on the same host as LXD (such as pi-hole) if it is listening on the wildcard port 53 (DNS) or 67 (DHCP).

You should either move pi-hole into a container, or look at tweaking the pi-hole config so it only listens on the network interfaces that LXD doesn’t managed (i.e not lxdbr0).