On ubuntu 24.04 neither LXD VMs or Containers get an IPv4 address

Just tried to import an LXD Windows VM from an Ubuntu 22.04 system to Ubuntu 24.04.
Import went just fine and the VM was created but it never receives an IPv4 address just IPv6.

So I created a New Ubuntu 22.04 VM and it too did not get an IPv4 only an IPv6.

Last, I created a New Ubuntu 22.04 Container and same thing… no IPv4?

Any ideas what could be causing this.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble

$ lxd --version
5.21.1 LTS

$ lxc ls
±------±--------±-----±----------------------------------------------±----------------±----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
±------±--------±-----±----------------------------------------------±----------------±----------+
| cn1 | RUNNING | | fd42:ff3d:9b9b:6b1e:216:3eff:feb9:1eda (eth0) | CONTAINER | 0 |
±------±--------±-----±----------------------------------------------±----------------±----------+
| vm1 | RUNNING | | fd42:ff3d:9b9b:6b1e:216:3eff:fec2:fd (enp5s0) | VIRTUAL-MACHINE | 0 |
±------±--------±-----±----------------------------------------------±----------------±----------+
| win11 | RUNNING | | fd42:ff3d:9b9b:6b1e:216:3eff:fe8d:94ac (eth0) | VIRTUAL-MACHINE | 0 |
±------±--------±-----±----------------------------------------------±----------------±----------+

Most likely cause: host (read: not inside the container) firewall issues. Check the docs.

@wxl
Thanks… if was UFW that caused it.

From the docs

these fixed it…

sudo ufw allow in on lxdbr0
sudo ufw route allow in on lxdbr0
sudo ufw route allow out on lxdbr0

Never had that happen with previous Ubuntu 20.04 or 22.04?

Wonder what changed?

thanks

1 Like