Cannot delete lxdbr0 and use a manually created bridge (/etc/network/interfaces) once sudo lxd init has set up lxdbr0 and a container uses it?

networking
lxd

(Gregsifr) #1

How to delete lxdbr0 from ifconfig and use a manually created bridge from /etc/network/interfaces?

I tried deleting the network however it didn't allow me to even after I stopped the containers which use it.

greg@machine:~$ lxc network delete lxdbr0 
error: The network is currently in use
greg@machine:~$ lxc network list
+---------+----------+---------+-------------+---------+
|  NAME   |   TYPE   | MANAGED | DESCRIPTION | USED BY |
+---------+----------+---------+-------------+---------+
| br0     | bridge   | NO      |             | 0       |
+---------+----------+---------+-------------+---------+
| enp38s0 | physical | NO      |             | 0       |
+---------+----------+---------+-------------+---------+
| lxdbr0  | bridge   | YES     |             | 2       |
+---------+----------+---------+-------------+---------+

greg@machine:~$ lxc network detach lxdbr0 container
error: No device found for this network


greg@machine:~$ lxc --version
2.18

How to replace lxdbr0 with a manually created bridge?


(St├ęphane Graber) #2

lxc network show lxdbr0 would tell you exactly what's using it.

My guess is that you have your default profile using the bridge, so you'd want to do lxc profile edit default, replace lxdbr0 by br0 in there, then you should be able to remove lxdbr0 as there won't be any remaining reference to it.


(Gregsifr) #3

Perfect, that worked thank you!