rancher-desktop: DNS does not work after updating from 1.0.1 to 1.1.0

Actual Behavior

DNS seems to be broken after updating from 1.1.0 (and disabling Kubernetes).

Steps to Reproduce

  • Install a Windows 11 VM
  • Install Rancher Desktop 1.1.0
  • Try pulling eg. debian

Result

> docker pull debian
Using default tag: latest
Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

> nslookup www.google.com
;; connection timed out; no servers could be reached

Expected Behavior

DNS should work

Additional Information

I noticed rancher-desktop doesn’t have a /etc/resolv.conf file. Should it?

I can workaround this by manually copying resolv.conf to /etc/ from /mnt/wsl/resolv.conf, ie.

wsl -d rancher-desktop cp /mnt/wsl/resolv.conf /etc/

There were some resolv.conf issues lately, not sure if related: https://github.com/rancher-sandbox/rancher-desktop/issues/1660, https://github.com/rancher-sandbox/rancher-desktop/pull/1661

Rancher Desktop Version

1.1.0

Rancher Desktop K8s Version

Disabled

Which container runtime are you using?

moby (docker cli)

What operating system are you using?

Windows

Operating System / Build Version

Windows 11 Pro 21H2

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

No response

Windows User Only

Rancher Desktop on Windows 11, which is running in a virtual machine, ie. I’m using nested virtualization.

I’ve also enabled this: https://github.com/jgregmac/hyperv-fix-for-devs

DNS did work before applying the workaround in my Debian WSL2 distro as it already had /etc/resolv.conf.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 6
  • Comments: 20 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@ganta there is an existing issue filed for mac here.

Can you take a look to see if it’s similar to what you are experiencing? The issue seems to be specific to the M1 chip.

@ganta Yours is the first case coming from Mac which uses a different VM and DNS setup. Can you provide us with some more detail and any errors?

Alternative workaround is to modify /etc/wsl.conf and set the option generateResolvConf = true, then restart WSL/Rancher

From Powershell:

$ wsl -d rancher-desktop

$ vi /etc/wsl.conf (update the generateResolvConf option to true, and save)

$ exit

$ wsl --shutdown 

Upon restarting WSL and Rancher everything should work as it did before the upgrade.

@Nino-K Please take a look!