Proxmox Change Hostname or IP on Cluster Node
Recently I wanted to adjust the VLAN's and Subnet's in my home lab, and came across the fact that Proxmox doesn't support changing anything about the host networking. In fact, most placed I looked suggested you just re-install the whole OS! That just didn't sit well with me, so I figured out how to actually change it. In case someone else out there wants to do this too, I figured I'd make a concise guide to do so, here you are!
Update Guide
Open a shell on the nodes you are updating, and elevate to root.
In each node, preform the following process at the same time. If you're using tmux
like me you can execute setw synchronize-panes on
to run your commands in all panes.
Printout the existing cluster network config to view your starting point.
cat /etc/pve/corosync.conf | grep ring0_addr -A 1 -B 4
Shutdown corosync
and pve-cluster
services
systemctl stop pve-cluster
systemctl stop corosync
Switch the cluster file system to local mode so we can edit corosync.conf
:
pmxcfs -l
Now in each node, edit corosync.conf in two places to make your changes:
/etc/pve/corosync.conf
/etc/corosync/corosync.conf
For example, I started with:
node {
name: pveworker0
nodeid: 2
quorum_votes: 1
ring0_addr: 10.0.4.6
}
node {
name: salmonsec
nodeid: 1
quorum_votes: 1
ring0_addr: 10.0.4.7
}
And ended with: Now restore:
systemctl start corosync
systemctl start pve-cluster
pmxcfs
You should now be able to confirm the changes via pvecm status
:
...
Membership information
----------------------
Nodeid Votes Name
0x00000001 1 10.100.0.11 (local)
0x00000002 1 10.100.0.12
There you are, have fun!