Cannot use manually specified ipv4.address when using unmanaged parent bridge

Hi,

My containers were working well till today, after a reboot:
Error: Failed preparing container for start: Failed to start device “eth0”: Cannot use manually specified ipv4.address when using unmanaged parent bridge

I’m on Debian buster. Lxd is in it’s last version, installed with snap.

I had to do
lxc config device set mycontainer eth0 ipv4.address=

to have it start. Is there a reason for this change ?

You’ve most likely been updated to the latest version which has this additional correctness check in it.

You can no longer use ipv{n}.address NIC settings when connecting to an unmanaged bridge, because LXD won’t be running a DHCP server and won’t be able to add a static DHCP allocation for the IPs you specified, so these settings never took effect.

Allowing the setting to be configured, but not doing anything, was causing confusion.

There are two specific cases where ipv{n}.address is allowed on a NIC when connected to an unmanaged bridge, which are accounted for in the validation:

  1. When using MAAS subnet settings.
  2. When using IP filtering settings.