How do I set the hostname of an instance in GCE permanently? I can set it via hostname,but after reboot it is gone again.
I tried to feed in metadata (hostname:f.q.d
I was lucky to set hostname at GCE running CentOS. Source: desantolo.com
hostname + your.hostname.tld (change "your.hostname.tld" to your actual hostnamecurl --silent "http://metadata.google.internal/computeMetadata/v1/instance/attributes/hostname" -H "Metadata-Flavor: Google"sudo env EDITOR=nano crontab -e to edit crontab@reboot hostname $(curl --silent "http://metadata.google.internal/computeMetadata/v1/instance/attributes/hostname" -H "Metadata-Flavor: Google")Ctrl + XYEnterreboothostname and see if your changes appliedGood luck!