LXD init didn't create the bridge network

Hi Team,

I installed snap lxd and try to confiure using lxd init, but by default it is not creating the bridge network. Can someone pls help me how to fix this ?

devices:
eth0:
name: eth0
network: lxdbr1
type: nic
root:
path: /
pool: default
type: disk
ephemeral: false

Can you show the output you had from lxd init, the output of lxc version and of lxc network list?

Hi @stgraber,

I used the default setings for lxd init and the output of lxc version and lxc network list as follows.

root@:~# lxc version
Client version: 4.20
Server version: 4.20
root@
:~# lxc network list
±-------±---------±--------±----------------±-----±------------±--------+
| NAME | TYPE | MANAGED | IPV4 | IPV6 | DESCRIPTION | USED BY |
±-------±---------±--------±----------------±-----±------------±--------+
| eth0 | physical | NO | | | | 0 |
±-------±---------±--------±----------------±-----±------------±--------+
| lxdbr0 | bridge | YES | 10.
.
.
/24 | none | | 2 |
±-------±---------±--------±----------------±-----±------------±--------+
root@***********:~#

Not sure what the problem is then, you clearly have a lxdbr0 bridge here…
Any reason why you’re expecting it to be called lxdbr1 instead?

Hi Stephane,

This is not creating the nictype as bridged, instead showing network as lxdbr0. Which is causing the proxy connectivity issue.
Except for prod environments, when we tried it in other environments, it works. In prod we are manually editing the default profile.

Name: bridged
Parent: lxdbr0
Type: nic

My question is why by default it is not creating bridge network, thats why it is failing for me to reach the outside valide using the proxy

devices:
eth0:
name: eth0
network: lxdbr3
type: nic
root:
path: /
pool: default
type: disk
ephemeral: false
profiles:

  • default
  • juju-controller
    stateful: false
    description: “”

What I want exactly is

eth0:
nictype: bridged
parent: lxdbr2
type: nic
root:
path: /
pool: default
type: disk
ephemeral: false
profiles:

  • default
  • juju-controller
    stateful: false
    description: “”
nictype: bridged
parent: lxdbr0

Is an older syntax which prevents LXD from accurately tracking network usage, the equivalent today is:

network: lxdbr0

Internally it’s still the same, you still have a bridge named lxdbr0 and the containers are still connected to them through veth devices. The only different is at the DB tracking level.

If that is the case, then why my containers are not able to reach the proxy ? After we modify the setting it worked. Any idea why it behaves like this ?

“nictype: bridged
parent: lxdbr2”

Regards,
Shameem

Please show the full output of lxc config show <instance> --expanded before and after your change that prevents/allows access to the proxy.

Also please advise the IP address of the proxy, and show the output of ip a and ip r on the LXD host.