Hostname Keeps Reverting

20 views
Skip to first unread message

William Sharlow

unread,
May 20, 2022, 5:41:38 PMMay 20
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 AMMay 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