LXD on Fedora 36: Containers don't get IPv4

In a default configuration of LXD in a Fedora 36 VM:

$ lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	Fedora
Description:	Fedora release 36 (Thirty Six)
Release:	36
Codename:	ThirtySix

LXD installed via snapd:

$ lxc --version

Network and profile look as follows:

$ lxc network show lxdbr0
  ipv4.nat: "true"
  ipv6.address: fd42:f886:eed8:2e2f::1/64
  ipv6.nat: "true"
description: ""
name: lxdbr0
type: bridge
- /1.0/instances/c01
- /1.0/profiles/default
managed: true
status: Created
- none
$ lxc profile show default
config: {}
description: Default LXD profile
    name: eth0
    network: lxdbr0
    type: nic
    path: /
    pool: pool01
    type: disk
name: default
- /1.0/instances/c01

Launching container c01:

$ lxc launch ubuntu:22.04 c01

The container doesn’t get an IPV4, but gets an IPV6:

$ lxc ls
| NAME |  STATE  | IPV4 |                     IPV6                      |   TYPE    | SNAPSHOTS |
| c01  | RUNNING |      | fd42:f886:eed8:2e2f:216:3eff:fe8a:6dcc (eth0) | CONTAINER | 0         |

Any hint?

Most likely a firewall issue on the host blocking dhcp requests to lxdbr0 interface.

Thanks @tomp for the hint.
If I put the network interface into zone trusted instead of zone FedoraWorkstation, that is default, it works fine.

1 Like

hi @pmarini_nc
Please can you tell me which file do I need to change the zone in?
Thank you

I managed to change it using a GUI tool. Selected the lxdbr0 and changed it to trusted. Thank you.
Still if I wanted to change it from the CLI I see there are two places mentioning zones

  • /etc/firewalld/zones/
  • /usr/lib/firewalld/zones/
    which file should I change and in which path?
    thank you