Changing the hostname of a Proxmox 8 VE

kartr

New Member
Aug 9, 2024
4
0
1
I tried changing the hostname using hostnamectl and editing the hostname in /etc/hosts but that broke the node completely and the panel showed up empty upon login. I changed back to the old hostname and rebooted and everything's fine now.

I already read the doc and it says that hostname may only be changed if a node has no VMs but I already do have a few VMs and want to change the hostname of the node, what is the correct/official way to achieve this without breaking anything?
 
Like it says in the doc, there (probably) is no official way for it ;)

That said though, most likely you'll have to change/copy over some of the folders in the /etc/pve folder with the name of the host in the folder-name in it. (for example /etc/pve/nodes, if you look there now you probably have your old and new name in there)
 
Don't do this. And if you do it, take a look at the name of your certs. Even after you change all the rest of the stuff, its still gonna be root@originalmachinename. But don't do this. It's easier to wipe the machine and start over.
Really. This is such a bad idea. When you're done, you think its all ok. It's not.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!