If I were to change my server's hostname, will it be reflected in Subscription Manager?
I wonder if changing the hostname from the server would reflect in subscription manager?
If not, can you help me in what specific steps I need to do?
I imagine doing an unregister and re-register the server after changing to my desired hostname.
Hope someone could help shed light on this.
Thanks in advance!
Responses
Hi Lemuel (... or is your first name Nicolas ? ...) ! :)
I have done it successfully this way : I unregistered the system, changed the host name with the hostnamectl tool, then I rebooted the system, re-registered the system and re-attached the subscription. It worked perfectly and the system with the new host name is shown in subscription manager right as expected. For your convenience, here are the necessary commands you will have to execute.
sudo subscription-manager remove --allsudo subscription-manager unregistersudo subscription-manager clean
sudo hostnamectl set-hostname <new-name>
sudo reboot
sudo subscription-manager registersudo subscription-manager refreshsudo subscription-manager attach --auto
Not sure if it would also work without the un-/re-registration steps, but to avoid possible complications or conflicts, I did it this way.
Regards,
Christian
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
