LXD doesn't set the hostname (well, it sets the kernel utsname but that's overridden by the hostname).
Instead LXD just feeds metadata to cloud-init which is then responsible for setting the hostname. The problem is that cloud-init runs after network was brought up, so the hostname is incorrect at the time of the initial dhcp request. A container reboot solves it, so would cloud-init setting the hostname before network is brought up or so would systemd re-starting the dhcp client after changing the hostname. It could be that some of this problem is somehow resolved with recent cloud-init and the network config code but I'm sure Scott can tell us for sure :) ** Package changed: lxd (Ubuntu) => cloud-init (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1600766 Title: initial dhcp has default hostname of ubuntu To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1600766/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs