UTM: Automatic DNS doesn't work in the guest

In all of my UTM VMs, the DNS server that is automatically used by the guest doesn’t work. There is no DNS response, meaning many things break. Most notably this includes the Windows 10 OOBE (first time setup). I have to manually specify the DNS settings to point to either my local DNS server or an external one like 1.1.1.1 to get my VMs “online”.

For example, using a macOS Leopard VM, the automatic DNS server determined by DHCP is 10.0.2.3. However, a request of dig github.com @10.0.2.3 (to make sure it doesn’t use another server) times out. Requesting the DNS lookup from 1.1.1.1 instead works just fine. Screenshot of OS X Leopard Terminal. The program DIG is run twice, one time with the local DNS server 10.0.2.3 and one time with the global DNS server 1.1.1.1. The first request times out and the second one works fine.

Configuration

  • UTM Version: latest
  • OS Version: latest Mac/iOS
  • Device Model: Intel Mac / iPad Pro
  • Is it jailbroken (name jailbreak used)? No
  • How did you install UTM? Xcode

No example VM is provided with this issue because literally any of the VMs I have used have had this problem. Tested configurations include:

  • Different UTM versions and host OSs (iOS, macOS)
  • Multiple different architectures (i386, x86_64, aarch64)
  • Multiple guest network adapters (rtl8139, Intel 82574L, virtio-net-pci)
  • Multiple guest OSs (Windows XP-10, Debian, Ubuntu)

The common variable? My home network setup.

My IPv4 settings

subnet 192.168.0.0/24 router 192.168.0.1 dns 192.168.0.54 broadcast 192.168.0.255

Notably, the router and DNS server are not the same. I have set up my router to automatically inform all network clients of my DNS server’s IP and it works just fine with every device I own. However it doesn’t work for UTM, apparently.

Is there a manual option I need to use to make automatic DNS settings work with my network setup?

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 3
  • Comments: 24 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks @conath, that helped. I used that guide but I had to create my own 01-network-manager.yaml file as it wasn’t there and then I had go into the GUI and fiddle around by disabling the automatic DNS switch in the IPv4 tab and entering the DNS servers there, then do sudo netplan apply then it started working for me.

It is worth noting that with the upcoming 2.2.0 update, one can switch to Shared or Bridged networking to bypass this issue entirely and get working DNS. Emulated network might still show this issue.

You should use a dns like 1.1.1.1 or 8.8.4.4. If you need additional help please post in https://github.com/utmapp/UTM/discussions as this is not the right place.