Change hostname in a productive Proxmox Ceph HCI cluster

In certain situations, you may want to change the hostname of a system. This guide explains how to do so, but it ONLY applies to changing a hostname in a cluster system. Additionally, it covers necessary changes within Ceph, Corosync, and the HA mode of Proxmox VE when the hostname of a node changes.
Disclaimer: Proxmox itself does not recommend renaming a host—it is better to reinstall and re-integrate the host into the cluster. The reasons are likely due to the complexity, which we aim to simplify with this article. Nevertheless: You act at your own risk.
Important Notes
Warning: Ensure that the host you want to rename contains no VMs, containers, templates, or other resources. Please perform a bulk migration of all resources to another host beforehand.
Warning: This guide has been tested multiple times on a test system with the goal of avoiding downtime or service interruptions (neither in Corosync nor in Ceph). This was successful! However, this tutorial is aimed at advanced users, as configuration files are adjusted, which could negatively impact your system if configured incorrectly. Specifically, this refers to the Corosync configuration file—please follow the guide step-by-step and read it completely.
What Changes are Included?
- The server's regular hostname is changed
- Adjustments to the Corosync config of the Proxmox cluster
- Renaming the Ceph service names to the new hostname
- Adjusting the Datacenter.cfg if necessary
- Reissuing Proxmox certificates (Web UI/SSH)
- Adjusting the display of HA-LRM status (under Datacenter -> HA)
What Changes are Excluded?
- Log entries with the old hostname are not adjusted—this is better for analysis purposes.
- Old host metrics (statistics) may become unusable due to the name change; new metrics will use the new hostname.
Temporarily Disable HA
Changing the hostname and subsequently rebooting the server could potentially impact the HA functionality of Proxmox VE clusters, as it might trigger fencing (e.g., rebooting other nodes). While this is unlikely with properly configured HA, the small risk can be reduced by temporarily disabling Proxmox VE-HA before the hostname change.
Stop the PVE-HA-LRM service on all nodes, one at a time:
systemctl stop pve-ha-lrm
Once completed, stop the PVE-HA-CRM service on each node individually:
systemctl stop pve-ha-crm
The following is a list of all files and commands necessary to change the hostname under Proxmox VE 8.0.
Change Hostname
- Edit
/etc/hostson each cluster node to reflect the new name (e.g., PMX1 -> PMX4). - Update
/etc/postfix/main.cfon the specific node (e.g., PMX1 -> PMX4). - Set the new hostname:
hostnamectl hostname <newhostname>
- Create the new node directory in the Proxmox Cluster File System:
mkdir /etc/pve/nodes/<newhostname>
- Backup the old node directory:
cp -r /etc/pve/nodes/<oldhostname> /root/
- Adjust the Corosync file
/etc/pve/corosync.conf(change names and incrementconfig_versionby 1). - Restart the Corosync service on each node, either via the Web UI (System) or using:
systemctl restart corosync
- Refresh the browser (clear the cache if necessary). The new hostname may still display a question mark temporarily.
- Update storage definitions in
/etc/pve/storage.cfgif the old hostname is used.
Reboot the Server
- Reboot the server (this generates
/etc/pve/nodes/newhostname). - Reissue certificates on each node:
pvecm updatecerts -f
- Remove the old node folder from the cluster file system:
rm -rf /etc/pve/nodes/<oldhostname>
- Fix "Unable to read lrm_status" errors in Datacenter --> HA view:
systemctl stop pve-ha-crm.service (on all nodes) rm -f /etc/pve/ha/manager_status (on one node only)
- Resolve "tls_process_server_certificate: certificate verify failed (596)" errors:
systemctl restart pveproxy && systemctl restart pvestatd
Run this on each node.
Ceph Services (Hostname Correction)
Warning: Ensure Ceph is HEALTHY and that there is a quorum for Ceph services. Perform the following steps only when the cluster status is healthy—deleting the old Ceph monitor must not cause quorum loss.
- Delete and recreate the old Ceph Monitor (to assign the new name).
- Delete and recreate the old Ceph Manager.
- Delete and recreate the old Ceph Meta-Data Service.
- Remove the old Ceph host Crush Map entry (verify health status beforehand):
ceph osd crush remove <oldhostname>
Final Steps
At this point, all technical and visual changes should be complete, and the new host should display the new name in all areas.
Start the PVE-HA-LRM service on all hosts sequentially:
systemctl start pve-ha-lrm
Then, start the PVE-HA-CRM service on all nodes:
systemctl start pve-ha-crm
|
Author: Jonas Sterr Jonas Sterr has been working for Thomas-Krenn for several years. Originally employed as a trainee in technical support and then in hosting (formerly Filoo), Mr. Sterr now mainly deals with the topics of storage (SDS / Huawei / Netapp), virtualization (VMware, Proxmox, HyperV) and network (switches, firewalls) in product management at Thomas-Krenn.AG in Freyung.
|

