Unable to reach host gateway from lxd container


I am facing issues with juju initiated lxd containers in all deployed machines.

There are two bridges br-ens160(juju created) and lxdbr0(default lxd)

From br-ens0:

The containers are taking DHCP IPs of the VLAN where juju and maas reside.

I can ping the containers from the parent host and vice-versa but I can’t ping them from any other host on the VLAN nor the containers can ping other hosts and the gateway.

Due to this the juju machine state of the containers is still pending.

From lxdbr0:

I can ping the gateway as well as other hosts on the network. This one has a different subnet.


While trying with juju model-config container-networking-method=local i get

Kindly help.

Were you ever able to solve this, I am having the exact same problem with trying to deploy Openstack Wallaby on Ubuntu Focal.

You definitely want to keep using the default container-networking-method=provider.

We would need more information regarding the network set-up here.

I am able to launch LXD instances on MAAS-deployed machines.

Using Juju 2.9 and MAAS 2.8.6:

  • juju status
Machine  State    DNS          Inst id              Series  AZ     Message
0        started  m-03                 focal   zone1  Deployed
0/lxd/0  started  juju-6011c4-0-lxd-0  focal   zone1  Container started
  • Machine 0 interfaces.
5: br-ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:00:14:1c:22 brd ff:ff:ff:ff:ff:ff
    inet brd scope global br-ens4
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe14:1c22/64 scope link
       valid_lft forever preferred_lft forever
7: 0lxd0-0@if6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br-ens4 state UP group default qlen 1000
    link/ether c2:78:c7:ce:db:6c brd ff:ff:ff:ff:ff:ff link-netnsid 0
  • Machine 0 routes.
default via dev br-ens4 proto static dev lxdbr0 proto kernel scope link src linkdown dev br-ens4 proto kernel scope link src
  • The subnet deployed to has MAAS-managed DHCP. When I look at the subnet listing in MAAS, I can see the assigned address.