Change domain name of PVE cluster

mlanner

Active Member
Apr 1, 2009
186
1
38
Berkeley, CA
Hi,

I have a small cluster that I've had running for a while. Because I now have a wildcard cert for one of my domains, I'd like to use that cert for my PVE cluster. Of course, the cert is not for the domain name configured for my cluster. So, I want to change the domain name, but not the host names of the cluster nodes. At some point in the past, I did go through and change hostnames on a cluster and that was a bit of a pain to get everything working properly again. If I recall the issues correctly, changing the domain name might not be quite as bad, but any pointers anyone has would be greatly appreciated.

Essentially, what I want to do is something like:

  • node1.example.com > node1.otherdomain.com
  • node2.example.com > node2.otherdomain.com
Is all I'd need to do to change the domain parts in /etc/hosts and reboot, and then of course in my DNS?

Thanks in advance for any suggestions.
 

Mr.Holmes

Member
Apr 5, 2014
281
3
16
Hello mlanner,

Essentially, what I want to do is something like:

  • node1.example.com > node1.otherdomain.com
  • node2.example.com > node2.otherdomain.com
Is all I'd need to do to change the domain parts in /etc/hosts and reboot, and then of course in my DNS?

I think that´s it - change also /etc/resolv.conf

Here a small script which is self-explaining:
Code:
#change the files:
sed -i 's/olddomainname.com/newdomainname.com/g' /etc/hosts
sed -i 's/olddomainname.com/newdomainname.com/g' /etc/resolv.conf

#activate the changes:
/etc/init.d/hostname.sh

#verify the changes:

#show hostname only:
hostname

#shows domainname only:
hostname -d

#shows hostname inclusive domainname:
hostname -f

Kind regards

Mr.Holmes
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!