There isn't yet a way to allow DNS overrides and DHCP on the same interface. That is, the DHCP response from the server may include DNS entries so the custom nameserver values are not automatically appended to an existing DHCP configuration.
Generally adding/overriding DHCP response values isn't something that works by default. In 16.04 for example, one needs to customize /etc/dhcp/dhclient.conf or write a dhclient-enter/exit hook. ** Changed in: cloud-init (Ubuntu) Importance: Undecided => Low ** Changed in: cloud-init (Ubuntu) Status: New => Triaged -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1776452 Title: Fail to set DNS server and search domain when customize Ubuntu18.04 to DHCP IP by cloud-init To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1776452/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs