cloud-init: hostname on first boot

morph027

Renowned Member
Mar 22, 2013
451
63
93
Leipzig
morph027.gitlab.io
The wiki already mentions a problem with the cloud-init images default hostname, which should work with versions > 18.2. However, i tried latest bionic image with 18.2-27-g6ef92c98-0ubuntu1~18.04.1 and it still get's it's dhcp lease for ubuntu rather then the vm hostname (which is properly set inside the vm).
 
Ah, during startup and package update, it seems to renew it's lease:

Code:
Aug 02 09:11:31 dc3 dhcpd[25938]: DHCPACK on 10.0.0.137 to 1a:f5:05:56:50:c3 (ubuntu) via ens18
Aug 02 09:12:28 dc3 dhcpd[25938]: DHCPACK on 10.0.0.137 to 1a:f5:05:56:50:c3 (ubuntu-runner-2) via ens18
[code]