Renaming a Proxmox node isn't as simple as one would imagine, especially if you have existing VMs. Simply follow this guide step by step and you'll be good to go 🙂
Start by stopping necessary services:
systemctl stop pve*nano /etc/hostnameReplace all instances of your old hostname with the new one
nano /etc/hostsReplace all instances of your old hostname with the new one
hostnamectl set-hostname new_hostnameReboot the server with:
rebootcp /var/lib/rrdcached/db/pve2-node/old_hostname /var/lib/rrdcached/db/pve2-node/new_hostnamecp /var/lib/rrdcached/db/pve2-storage/old_hostname /var/lib/rrdcached/db/pve2-storage/new_hostnamerm cp /var/lib/rrdcached/db/pve2-node/old_hostnamerm cp /var/lib/rrdcached/db/pve2-storage/old_hostnameCreate the necessary folders by restarting the pve-cluster service:
service pve-cluster restartmv /etc/pve/nodes/old_hostname/lxc/* /etc/pve/nodes/new_hostname/lxcmv /etc/pve/nodes/old_hostname/qemu-server/* /etc/pve/nodes/new_hostname/qemu-serverrm -r /etc/pve/nodes/old_hostnameRefresh the web interface and all should be working as expected
