Unable to set the right FQDN
BMPCreated with Sketch.BMPZIPCreated with Sketch.ZIPXLSCreated with Sketch.XLSTXTCreated with Sketch.TXTPPTCreated with Sketch.PPTPNGCreated with Sketch.PNGPDFCreated with Sketch.PDFJPGCreated with Sketch.JPGGIFCreated with Sketch.GIFDOCCreated with Sketch.DOC Error Created with Sketch.
Question

Unable to set the right FQDN

by
FabioV
Created on 2021-03-23 10:13:03 (edited on 2024-09-04 14:26:09) in Virtual Private Servers

Hi,
I've fallowed this guide https://docs.ovh.com/gb/en/public-cloud/changing_the_hostname_of_an_instance/ but doesn't work.
The file /etc/hosts will be always modified. I can disable this behavior only if I remove the line
- update_etc_hosts
from the cloud_init_modules

Here is now my /etc/hosts file
127.0.0.1 localhost

::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

127.0.1.1 myhostname.mydomain.it myhostname

But this is what I get
$ hostname --fqdn
myhostname.mydomain.it

$ hostname --all-fqdns
vps-xxxxx.vps.ovh.net

A tool that I've installed in this VPS finds this as FQDN myhostname.openstacklocal
Why I can't get always myhostname.mydomain.it?


Replies are currently disabled for this question.