Ok, I have this figured out and the result is largely why I started this thread – every procedure I have found is incomplete or has major assumptions that may not be obvious. So, future Googlers, here is the deal. Do this is in this order on the respective nodes.
NODE = the node that is getting the new IP.
CLUSTER = all other Proxmox nodes that will maintain quorum and can talk to one another throughout this procedure.
ONE CLUSTER = any one single node within CLUSTER
On NODE
1. Edit /etc/pve/corosync.conf.
2. Update the IP for NODE.
3. Increment
Code:
config_version:
This change should push out a new corosync.conf to all nodes in CLUSTER. Confirm all nodes in CLUSTER have the new /etc/pve/corosync.conf. At this point the cluster will be broken. If you run
Code:
pvecm status
on the NODE, you will see it can’t find the rest of the nodes in the cluster. If you run
Code:
pvecm status
on CLUSTER you will see they can all see each other but NODE is missing.
Still on NODE
1. Edit /etc/network/interfaces and update the IP to the desired IP.
2. Edit /etc/hosts and update the IP to the new IP.
3.
Code:
ifdown vmbr0; ifup vmbr0
to get your interface to have the new static IP. Change “vmbr0” to the name of your interface.
4. Restart corosync and pve-cluster.
Code:
systemctl restart corosync
Code:
systemctl restart pve-cluster
On CLUSTER
1. Restart corosync on EVERY member of CLUSTER.
Code:
systemctl restart corosync
At this point
Code:
pvecm status
should show all nodes as being in the cluster, good quorum, and NODE has its proper IP. Be patient as this can take a minute. To be extra sure, run
Code:
cat /etc/pve/.members
on NODE and this should show all the correct IPs.
Additional cleanup.
On NODE:
1. Optional: Edit /etc/issue. Update to the new IP on NODE. This ensures the console login screen shows the right IP.
2. Edit /etc/pve/storage.cfg and update any references to the old NODE IP – likely only an issue if you run PVE and PBS next to each other.
3. Optional: Edit /etc/pve/priv/known_hosts and update the IP of NODE.
Other weirdness: In this process I have found sometimes VMs and containers lose their network connection and need to be rebooted. I haven’t found a good way to avoid this or fix it beyond a VM/CT reboot. If anyone has an idea to make this 100% zero downtime (or near zero downtime), let me know and I’ll add that step.
second one
different writer
Stop the cluster services
systemctl stop pve-cluster
systemctl stop corosync
Mount the filesystem locally
pmxcfs -l
Edit the network interfaces file to have the new IP information
vi /etc/network/interfaces
Replace any host entries with the new IP addresses
vi /etc/hosts
Edit the corosync file and replace the old IPs with the new IPs for any changed hosts
BE SURE TO INCREMENT THE config_version: x LINE BY ONE TO ENSURE THE CONFIG IS NOT OVERWRITTEN
vi /etc/pve/corosync.conf
Edit the known hosts file to have the new IP(s)
/etc/pve/priv/known_hosts
If using ceph, edit the ceph configuration file to reflect the new network
(thanks u/FortunatelyLethal)
:%s/192.168.1./192.168.2./g <- vi command to replace all instances
vi /etc/ceph/ceph.conf
If you want to be granular… fix the IP in /etc/issue
vi /etc/issue
Verify there aren’t any stragglers with the old IP hanging around
cd /etc
grep -R ‘192.168.1.’ *
cd /var
grep -R ‘192.168.1.’ *
Reboot the system to cleanly restart all the networking and services
reboot
Referenced pages:
– https://forum.proxmox.com/threads/change-cluster-nodes-ip-addresses.33406/
– https://pve.proxmox.com/wiki/Cluster_Manager#_remove_a_cluster_node
third one:
Change node’s IP address #
- Update the node’s IP address in the following files:
/etc/network/interfaces
/etc/hosts
- Stop the cluster and force local mode so you can update the cluster configuration:
systemctl stop pve-cluster systemctl stop corosync pmxcfs -l
- In
/etc/pve/corosync.conf
update:
- The node’s IP address
- The IP addresses of other nodes in the cluster (if they’re changing)
- The
config_version
, incrementing it by 1
- Restart the cluster:
killall pmxcfs systemctl start pve-cluster
Change IP address on subsequent nodes #
If you’re changing the IP address of multiple nodes in a cluster, repeat the instructions in this section for every additional node in the cluster. The process to follow depends on if the cluster’s quorum is still intact.
Intact quorum #
Update the node’s IP address in the following files:
/etc/network/interfaces
/etc/hosts