I am experimenting with LXD, but I'm stuck with a seamingly simple problem: I can't make my bridge config persistent.
The host server has a birdge br0
. By default, lxd managed containers will use lxcbr0
and be on another network.
What I want is a container that will get its IP from my main DHCP server, and share the same network as the rest of my servers.
I managed to do so using this stanza:
lxc config set mycontainer raw.lxc 'lxc.network.link = br0'
This seems to work, but every now and then, the configuration gets lost, and the container falls back onto lxcbr0 !
- So, is this the right way to get my container to use br0 ?
- And what is the way to make this persistent for real ?
I solved this using a profile.
Then in the editor:
And when creating a guest/container, specify the profile
Not sure, but assume you can apply the profile to existing guests/containers as well. Have not tried it.
EDIT:
From lxd 0.18
profile
is part of main commands:lxc profile edit bridge