Comment 20 for bug 1375252

Revision history for this message
Dan Watkins (oddbloke) wrote : Re: [Bug 1375252] Re: [SRU] Hostname change is not preserved across reboot on Azure Ubuntu VMs

Hi Joe,

On 10/06/15 10:52, Joe Clifford wrote:
> Apologies for the tardy feedback. Many thanks to all involved,
> gratefully and much appreciated. From my perspective, this issue is now
> resolved.

Thanks for the feedback. Great to hear that we've resolved this for you!

> I've just tried this on a freshly deployed Trusty VM in Azure - a
> change to the hostname with 'hostnamectl' is now preserved when the VM
> is rebooted.
>
> I would like to point out though that, if not editing the /etc/hostname
> file directly, the 'hostnamectl' command must be used to set the
> hostname; using the 'hostname' command doesn't work (presumably because
> the hostname command doesn't change /etc/hostname).

As per the 'hostname' manpage:

When called with one argument ..., the commands set the host name ...
Note, that this is effective only until the next reboot. Edit
/etc/hostname for permanent change.

So that sounds like expected behaviour. :)

Thanks,

Dan