Thank you very much for providing the additional information. I can now reproduce the issue in a stock ubuntu-24.04.1-live-server-amd64.iso installation. => After "apt install ubuntu-desktop-minimal" the primary ethernet interface is listed as "enp1s0 ethernet unmanaged --" by NetworkManager ("nmcli d"), which is expected, as "netplan apply" was not run, yet. BUT: It's also listed as unmanaged by systemd-networkd ("networkctl"), therefore dropped it's DNS configuration from "resolvectl".
I think I've found an even smaller reproducer: $ lxc launch ubuntu-daily:noble nn-lp2097769-desktop-dns $ lxc shell nn-lp2097769-desktop-dns root@nn-lp2097769-desktop-dns:~# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 307 eth0 ether routable configured 11 links listed. root@nn-lp2097769-desktop-dns:~# resolvectl Global Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported resolv.conf mode: stub Link 307 (eth0) Current Scopes: DNS Protocols: +DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: 10.238.94.1 DNS Servers: 10.238.94.1 fd42:7213:f20e:bd74::1 fe80::216:3eff:fe0f:ee29 DNS Domain: lxd root@nn-lp2097769-desktop-dns:~# apt install ubuntu-settings network-manager [...] # still OK root@nn-lp2097769-desktop-dns:~# nmcli d DEVICE TYPE STATE CONNECTION eth0 ethernet connected (externally) eth0 lo loopback connected (externally) lo root@nn-lp2097769-desktop-dns:~# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 307 eth0 ether routable configured root@nn-lp2097769-desktop-dns:~# resolvectl Global Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported resolv.conf mode: stub Link 307 (eth0) Current Scopes: DNS Protocols: +DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported Current DNS Server: 10.238.94.1 DNS Servers: 10.238.94.1 fd42:7213:f20e:bd74::1 fe80::216:3eff:fe0f:ee29 DNS Domain: lxd # but networkd config for eth0 already gone: root@nn-lp2097769-desktop-dns:~# ls /run/systemd/network/ => empty # now restarting systemd-networkd.service leads to eth0 becoming unmanaged (as the .network file is gone) # and DNS config is dropped root@nn-lp2097769-desktop-dns:~# systemctl restart systemd-networkd root@nn-lp2097769-desktop-dns:~# networkctl IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 307 eth0 ether routable unmanaged root@nn-lp2097769-desktop-dns:~# resolvectl Global Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported resolv.conf mode: stub Link 307 (eth0) Current Scopes: none Protocols: -DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported So the reporducer comes down to: $ apt install ubuntu-settings network-manager && systemctl restart systemd-networkd.service => ubuntu-settings installs /usr/lib/netplan/00-network-manager-all.yaml ("renderer: NetworkManager") => network-manager installation leads to "netplan generate" being executed by the NM-Netplan integration => SOMETHING?? (during "apt install ubuntu-destkop-minimal") restarts systemd-networkd.service, as can be seen from the logs of comment #18: ``` Feb 14 10:17:39 test24 systemd-networkd[839]: enp1s0: Configuring with /run/systemd/network/10-netplan-enp1s0.network. Feb 14 10:17:39 test24 systemd[1]: Started systemd-networkd.service - Network Configuration. Feb 14 10:17:39 test24 systemd-networkd[839]: enp1s0: DHCPv4 address 192.168.122.50/24, gateway 192.168.122.1 acquired from 192.168.122.1 Feb 14 10:20:57 test24 systemd[1]: Stopping systemd-networkd.service - Network Configuration... Feb 14 10:20:57 test24 systemd-networkd[839]: enp1s0: DHCPv6 lease lost Feb 14 10:20:57 test24 systemd[1]: systemd-networkd.service: Deactivated successfully. Feb 14 10:20:57 test24 systemd[1]: Stopped systemd-networkd.service - Network Configuration. Feb 14 10:20:57 test24 systemd[1]: Starting systemd-networkd.service - Network Configuration... Feb 14 10:20:57 test24 systemd-networkd[14398]: lo: Link UP Feb 14 10:20:57 test24 systemd-networkd[14398]: lo: Gained carrier Feb 14 10:20:57 test24 systemd-networkd[14398]: enp1s0: Link UP Feb 14 10:20:57 test24 systemd-networkd[14398]: enp1s0: Gained carrier Feb 14 10:20:57 test24 systemd-networkd[14398]: enp1s0: Gained IPv6LL Feb 14 10:20:57 test24 systemd-networkd[14398]: Enumeration completed ``` With those 3 circumstances coming together, we end up in a situation where "netplan generate" already produced configuration for the new setup, but "netplan apply" was not yet executed, enabling that new configuration. But systemd-networkd.service gets restarted picking up the new configuration already (outside of Netplan's control), therefore both networking daemons now don't feel responsible to manage the interface/DNS. IMO this could be fixed in 3 different ways: 1/ not having "renderer: NetworkManager" in the netplan configuration # but we actually want to have NM managing the network after a reboot. 2/ not calling "netplan generate" from NetworkManager (LP: #2090848) 3/ not restarting systemd-networkd.service during "apt install ubuntu-desktop-minimal" Whereas the simple workaround would be to execute: $ netplan apply => This will put control for the interface in NetworkManager's hands, as described in the Netplan configuration. DNS will be working again. @enr0n, do you have any idea why systemd-networkd.service would be restarted during "apt install ubuntu-desktop-minimal"? ** Changed in: systemd (Ubuntu) Status: Incomplete => Confirmed ** Changed in: netplan.io (Ubuntu) Status: New => Triaged ** Changed in: netplan.io (Ubuntu) Importance: Undecided => Medium ** Tags added: server-triage-discuss -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2097769 Title: Installation of ubuntu-desktop-minimal breaks DNS To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2097769/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs