Applicable to:
- SolusVM
Symptoms
Configured a hostname for the containers on SolusVM, every time the container is rebooted, the hostname is changed to a non-FQDN.
Cause
CentOS 7 Template issue.
Resolution
- Connect to OpenVZ node via SSH
- Edit the file: /etc/vz/dists/scripts/redhat-set_hostname.sh
Change this section:
CONFIG_TEXT: if [ -f /etc/hostname ]; then
# New style: RHEL7/Fedora15+
# Note hostname(5) says it should NOT be FQDN
# val=${val%%.*} <--- Commented this out
echo "$val" > /etc/hostname <--- Added this
Comments
0 commentsPlease sign in to leave a comment.