Setting up RHEL7 Hostnames

This is relevant if you are using templates and you need to set the hostname of the new VM

There is a file at

/etc/hostname

That is used to set the name.

There is also a command hostnamectl that is used to manage it

To change the hostname run following command

hostnamectl set-hostname hostname

and restart the server