Proxmox: Rename a standalone node (hostname)

Update 2021-01-09
DO NOT USE THIS PROCEDURE FOR NOW AS ITS OUTDATED AND BREAKING THE CONFIG
Doing some cleanup and had to rename a nodename of an existing standalone Proxmox Server.
Found that it wasn’t too straight forward because it detected the old nodename and placed the vz underneath it.
So here is a simple way to rename the Proxmox Node.
Firstly the normal steps:
vi /etc/hosts vi /etc/hostname
Replace the entries with your intended hostname.
You will now need to restart pve in order to create the new hostname in the system.
service pve-cluster restart
This should now create a new host entry in Proxmox and a new folder under
/etc/pve/nodes/[newhostname]
You now need to copy your old openvz data from the old folder to the new.
mv /etc/pve/nodes/[oldhostname]/openvz/* /etc/pve/nodes/[oldhostname]/openvz/
Example:
mv /etc/pve/nodes/proxmox-portable/openvz/* /etc/pve/nodes/proxmox-Xen/openvz/
I would advise to restart the Proxmox host in order to finish the renaming.
Thanks, This got me out of a hole! 🙂
You’re very welcome, glad it helped.
Ahh. Thnx