The container/VM failed to acquire an IPv4 address

I’m sure there haven’t been any issues with this before. I use LXD to manage LXC containers and virt-manager to manage QEMU/KVM virtual machines. Recently, I discovered that none of them have ipv4 addresses anymore, causing the containers and virtual machines cannot connect to the external Internet.

After some research, I suspected it was related to the firewall. But apart from upgrades, there are basically no changes to my system environment that will cause firewall changes.

Have you tried adding your LXD bridge(s) to networking.firewall.trustedInterfaces ? If this doesn’t fix it, it would be helpful to see your nixos firewall and network configuration, and the LXD network definition.

I’m not sure anything has changed lately that would have broken this.

1 Like

Also, our LXD now has full support for virtual machines so you could run one tool for everything.

1 Like

Put lxdbr0 into networking.firewall.trustedInterfaces, it took effect, perfect solution. grateful. :smiling_face_with_three_hearts:

1 Like