Is there no way to change IP of whole cluster without reinstalling everything?

So my little test cluster has to move so I need to change IP for all the machines. What do I need to change to change the IP on LXD without reinstalling everything.

Thanks

tony

Well?

I don’t think there’s a very simple answer unfortunately as the IP addresses are an integral part of the clustered database. In an environment where you expect the IPs to change, you’d probably use host names from the start to avoid this issue.

@freeekanayaka may have some low level magic to rewrite the IPs but I don’t believe any of this is currently exposed through our existing low level DB mangling tooling.

1 Like

Yeah there would be low-level code, but not currently exposed.

I kind of knew answer… But I mention this because this is something that is necessary. There are many times in the real world that you need to change your Servers IPs. So it is something that you should incorporate into your future planning.

1 Like

I know this is an old thread however, I am currently in the same situation. I have to move the Cluster to a different network. I decided to create a new LXD Cluster in a new set of VMs, publish and export the existing container images and then import launch the Containers in the new Cluster.

I’d rather reconfigure the IPs but at least I can do it this way and work with fresh copies of VMs.

We have lxd cluster edit nowadays which can be used to change the addresses during a re-addressing. You need to stop LXD on all cluster members and apply the same changes manually on all of them though.

Sweet! I’ll look into this. Thanks for the heads-up!