Hi @tomp
I am able to solve the bridge interface problem. now i wanted to have lxd container with static ip. and the container would be using the bridge interface br0.
Can I modify container-> ./etc/network/interfaces or netplan to set static ip which uses bridged interface br0 of host? can you share detail which i need to fill in these files?
Note - Now I am using old network configuration ./etc/network/interfaces in host machine .
@girish.meena LXD will not modify any config files inside your container for you (as they can vary from distro to distro).
Although LXD has a static IP option for bridged network types, this only works when using the local DHCP server managed by LXD on the host, as it sets up static DHCP allocations for the container’s MAC address (so the container is still using DHCP but gets given the same IP every time).
But as you are aiming to bridge your container onto the host’s physical network, it will not be using LXD’s managed DHCP server.
However you could use a similar technique and setup a static DHCP allocation in your network’s main DHCP server for the container’s MAC address.
Alternatively you can modify the config files directly inside the container to assign a static IP address. Another option I believe you can use is cloud-init, for which LXD can support injecting initial first-boot config options.
Another option you could use if you do not need the container to talk to the host is to use the ipvlan type nic device, as that allows statically configured IPs from LXD and will appear directly onto the network by sharing the host’s MAC address: