Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
preflight: Add support for systemd-resolved
Recent distributions (Fedora 33, Ubuntu desktop editions, ...) use systemd-resolved for DNS resolution. NetworkManager is still used for network interface configuration, but the dnsmasq setup that crc is doing won't work as systemd-resolved is already listening on port 53, so we can't start a dnsmasq instance which would listen there as well. This commit adds support for systemd-resolved on recent fedoras. This configures split DNS ( https://fedoramagazine.org/systemd-resolved-introduction-to-split-dns/ ) so that resolution of domains under *.testing are sent to the crc VM. Resolution for all the other DNS names won't be impacted by the configuration we are doing, and they will be resolved exactly as before running `crc setup`. The configuration of split DNS is done through a NM dispatcher file which will run `resolvectl` commands when the libvirt crc interface is up. The libvirt crc interface does not have a constant NM UUID across reboots, so this is the best way I found to persist the split DNS configuration across reboots.
- Loading branch information
1 parent
a410165
commit 8fa1e02
Showing
2 changed files
with
91 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters