I want to give my containers fixed IPv4 addresses. I found the following suggestion in a post in this forum:
lxc stop c1
lxc network attach lxdbr0 c1 eth0 eth0
lxc config device set c1 eth0 ipv4.address 10.99.10.42
lxc start c1
This works well.
The help page for lxc network
reads:
attach Attach network interfaces to containers
attach-profile Attach network interfaces to profiles
Does attach
need to be called because otherwise there’s no container-specfic entry under which to store the ipv4.address
property? I ask because it would seem the bridge is already attached to any given container by default (due to the default
profile).