Hostname Keeps Reverting

234 views
Skip to first unread message

William Sharlow

unread,
May 20, 2022, 5:41:38 PM5/20/22
to gce-discussion
This just started happening this week. I need to set my hostname to a fully qualified domain name. I used a bash script at start up to set the name and that worked for the last year. This week (for some reason), the hostname keeps reverting to the machine's instance name. Only change was going from Rock 8.5 to Rocky 8.6 and installing recent software pushes from Google.

William Sharlow

unread,
May 22, 2022, 7:06:49 AM5/22/22
to gce-discussion
Not sure why this happened, but during the upgrade to Rocky 8.6 looks like the hostname was reset to the VM name. I fixed this by running:
 # hostnamectl set-hostname my.new-hostname.server

Reply all
Reply to author
Forward
0 new messages