Changing the host name of a Proxmox node is unfortunately a bit harder than changing the hostname of your typical Linux machine. This article will guide you through the process. Keep in mind that this only covers changing the host name for a standalone node, I don’t know if the process is different when the node is part of a cluster.
First change the host name like you would do on any Debian based machine.
hostnamectl set-hostname NEW-HOSTNAME
Update your hosts file with your favorite text editor.
vim /etc/hosts
Proxmox should momentarily create a new node with the new host name. You can see this here.
ls -la /etc/pve/nodes
There you will find a folder with the same name as your old host name and one with your new host name. If you can’t see the folder with your new host name you might have to wait a bit or you can restart the machine.
Now I like to take a backup of the current config files just in case:
cp -r /etc/pve/nodes/OLD-HOSTNAME /root/
Next you need to copy the configuration files for the old host name to the new one. I had some problems doing this, not sure why, so I copied mine from the backup which worked.
cp /root/OLD-HOSTNAME/qemu-server/* /etc/pve/nodes/NEW-HOSTNAME/qemu-server
Now reboot the machine.
reboot
This should be everything you have to do. I had one problem though, none of my VMs would boot. Yes that is a pretty big problem but it was because they couldn’t find my LVM-volume. The problem was in /etc/pve/storage.cfg
:
lvmthin: data thinpool data vgname pve2 content rootdir,images nodes OLD-HOSTNAME
I just had to nodes
to the new host name and it worked.
I copied every process I could find through Google with regards to cert issues. Everyone that I found had to do with hostnames being correct and if you change the host name then you need to follow the process of renewing the certs
https://pve.proxmox.com/wiki/Proxmox_SSL_Error_Fixing
My problems still persist.
Thanks
Hey there,
What did you do to resolve the certificate issue? I’m getting
/etc/pve/local/pve-ssl.key: failed to load local private key (key_file or key) at /usr/share/perl5/PVE/APIServer/AnyEvent.pm line 1687.
This is after updating the hostname.
Thanks
I did not encounter that issue, did you try to Google the error message? I found this among other threads: https://forum.proxmox.com/threads/missing-etc-pve-local-pve-ssl-key.59628/