SOLVED Hostname resets on reboot

nistor.andrei

Member
Jun 5, 2014
17
0
1
Iasi
cPanel Access Level
Root Administrator
Hello everyone.

I have a dedicated server that has CentOS OpenVZ VPS which has cPanel.
The hostname that I set is: srv1.domain.com
After I restart the VPS the hostname changes to "srv1".

On the dedicated server vz configuration file the hostname is set correct.
After I change the hostname from WHM everything is ok.

This is affecting my e-mail server as it tries to send mails to [email protected] and it can't find it.

Best regards.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,229
463
On the dedicated server vz configuration file the hostname is set correct.
Hello,

Could you let us know what method you used to update the hostname on the VPS hardware node? With OpenVZ, you'd generally need to use a command such as:

Code:
vzctl set $VEID --hostname server.domain.tld --save
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,229
463
Hello,

This suggests an issue with the virtualization software installed on the hardware node, however feel free to open a support ticket using the link in my signature if you'd like us to take a closer look and rule out any issues with the cPanel & WHM software.

Thank you.
 

nistor.andrei

Member
Jun 5, 2014
17
0
1
Iasi
cPanel Access Level
Root Administrator
After a lot of searching and reading I think I found a solution for my problem.

I set the HOSTNAME attribute in /etc/sysconfig/network-scripts/venet0 on the hardware node to the FQDN that I needed ( there were no HOSTNAME set in the configuration file ).
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,229
463
I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.