How to change IP addresses of cluster nodes?

devawpz

Member
Sep 21, 2020
30
0
6
Hello, would appreciate any pointers in how to do this.

I created a Proxmox cluster with three nodes, with public IP addresses. Let's say:

74.6.143.25 74.6.143.26 74.6.143.27

I would like to change them to an internal network, behind a switch. Maybe to something like:

192.168.1.25 192.168.1.26 192.168.1.27

What do I need to do to achieve this. Is there a way to change the IP addresses in a number of files and know that the cluster will continue working from then on?

Would I need to rebuild the cluster? In this case, how do I do it, delete node by node and then create a new cluster, add node by node?

I don't know if it's even something that can be done. Ideally, I'd have this cluster running behind a switch, with the private IP addresses, and have the VMs visible to the public, with the production websites. If this is something that can be done in a series of discreet steps, I'd appreciate any input on how to go about it.
Thanks for any help you can share.
 
I think that you may need to edit the /etc/pve/corosync.conf file which is mirrored to all nodes, however, I would try this out on a test cluster first, mirroring your node infrastructure and seeing what happens when you change the IP addresses in this file. If you nest proxmox (ie. create VMs within Proxmox that are running proxmox), you can play relatively safely and also create backups or snapshots of the nested virtual cluster should you need to recover.

However you'll need more than a switch to make the VMs public ie. web facing as a switch doesnt typically handle routing.
 
Great advice on the test cluster, I'll be sure to have that to make some experiences, for sure.

So /etc/pve/corosync.conf should be the only file?

I saw a file named /etc/pve/.members, I tried changing it by hand, but couldn't get permissions on it, for the life of me.
Is this not made to be modified?

Or changing /etc/pve/corosync.conf percolates to that file, and I shouldn't be able to modify it?

I think the routing part should be handled, I think I can do it through a pfSense box, or through the switch's interface (it's working on managed (routing) mode, so that may be enough?).
 
Run the following command, it will tell you every config file you have to edit:
egrep -R "74.6.143" /etc
 
  • Like
Reactions: krikey
Run the following command, it will tell you every config file you have to edit:
egrep -R "74.6.143" /etc

Awesome, that's slightly different from the grep I was using, but but I managed to have a good look, and saw many of the files.

But sorry if I insist on this, how do I change the contents of /etc/pve/.members? I keep getting an error:

Error writing /etc/pve/.members: Input/output error

Permissions on this file are "-r--r-----"

Using chmod has no effect on it.

Thanks for any help.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!