Change domain name of PVE cluster

mlanner

Renowned Member
Apr 1, 2009
192
1
83
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.
 
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
 
Hello mlanner,



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
Hi there's no
Bash:
hostname.sh
under the
Bash:
/etc/init.d
directory, is there a change to 7.4?
 
I had to change /etc/postfix/main.cf too, to get e-mails origin from correct domain.