Reading this documentation page, section cluster.evacuate, I understand that by default LXD chooses auto .
If any device is not suitable for migration, the instance will not be migrated (only stopped).
In my case, if I leave cluster.evacuate to the default value, instances are not migrated. If, however I set cluster.evacuate=migrate instances are indeed migrated, that is what I’m looking for.
I’m running 5.21.5-f2a1a0e in a 4-nodes cluster. Instances are containers with a nic type=bridged attached:
eth1:
name: eth1
nictype: bridged
parent: br1
type: nic
br1 is present in all the hosts.
I’ve set cluster.healing_threshold = 60.
Questions:
if default cluster.evacuate just stops the instances, shouldn ‘t we expect that cluster.evacuate=migrate throws an error?
If I have to set cluster.evacuate=migrate can I put in a profile?
So the reason that cluster.evacuate=auto didn’t migrate the instance is because of this statement in the docs:
If any device is not suitable for migration, the instance will not be migrated (only stopped).
The “problem” device in this case is eth1, because it uses parent to connect to an external bridge br1.
Its not that LXD cannot migrate this instance, but rather that it cannot be certain that on the target cluster member the br1 network represents the same logical network.
So out of an abundance of caution LXD does not assume they are the same, to avoid accidentally connecting an instance to a network it shouldn’t be connected to.
You can override this concern by setting cluster.evacuate=migrate as you have found.
When using a bridged or macvlan NIC with the network= setting referring to a Managed Network instead of parent= then LXD knows you are referring to a logical network defined in its realm and so cluster.evacuate=auto will migrate it.
But currently LXD does not support modelling external bridges as managed networks, and only supports this for macvlan type networks.
There is this outstanding feature request for it here: