Using static IPs with LXD

If running a modern LXD with a LXD managed bridge, then you can just set the ipv4.address property on the network interface of the container.

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
17 Likes