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?
I've tried to follow also this guide https://docs.ovh.com/gb/en/public-cloud/change-instance-dns-servers/ but it doesn't work. The /etc/resolv.conf was not modified by this guide.
I've edited this file /etc/network/interfaces.d/50-cloud-init
auto lo
iface lo inet loopback
dns-nameservers 8.8.8.8 8.8.4.4
dns-search my-domain.it
# dns-nameservers 213.186.33.99
Now my /etc/resolv.conf look like this
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 213.186.33.99
search my-domain.it openstacklocal
Now Sentinel Admin License Manager say that my FQDN is my-hostname.my-domain.it
hostname --all-fqdns is unchaged.