Proxmox's documentation shows the following here.
Which mainly just says change /etc/hosts and /etc/hostname with your new hostname.
Here's what happens if you only do that:

If you just do the above, you will find you have an inaccessible original hostname that contains those VMs and you cannot move or stop them.
You need to go into /etc/pve/nodes
You'll see the following inside:
oldhostname
newhostname
1.) Move both of those somewhere else.
2.) Create a dir called "newhostname"
3.) Copy the contents of "oldhostname" to "newhostname"
