How to Rename a Proxmox node

Download Markdown

Rename the node

  • Run 'hostnamectl' to see what you have set at the moment.
  • Rename it in the following files:
/etc/hostname
/etc/hosts
/etc/postfix/main.cf
  • Then apply the change to the running system by executing 'hostnamectl set-hostname your-node-name'.
  • Verify that it is set correctly by running 'hostnamectl'.
  • Restart the Proxmox-related services:
systemctl restart pvedaemon
systemctl restart pvestatd
systemctl restart pveproxy

Move VM and container files to the new node

In case you open your node's web interface at this point, you will notice that the old node is still there with its VMs in an unknown state. You will need to move files from one PVE node to another. Let's say we renamed it from 'node1' to 'proxmox1'. You would need to run the following:

mv /etc/pve/nodes/node1/lxc /etc/pve/nodes/proxmox1/lxc
mv /etc/pve/nodes/node1/qemu-server /etc/pve/nodes/proxmox1/qemu-server

That will move all the containers and VMs onto the new node. It is recommended to reboot the node afterwards.