-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
generateResolvConf = false doesn't work #7816
Comments
I think resolve issue steps >>
(Windows 11, Ubuntu distro) |
Didn't work. The custom |
The commands to execute are as follows:
Then restart WSL2. I took the google DNS 8.8.8.8, but you can take another IP address. |
This behavior has been tweaked in 0.56.3 |
Tweaked in what way? |
Hi @benhillis , Can you please provide more details? I just upgraded windows 10 to windows 11 and now I am facing this exact issue. /etc/wsl.conf is correctly setup, no symbolic link, everytime I reboot the laptop or shutdown my wsl , boom, resolv.conf gone. This was working just fine in windows 10 btw. I would like to see this open again, it doesn't seem to be fixed |
same problem here |
Hello @Killerbear , There is another closed issue where I also commented and I got a solution there, you will need to update to one of the latest releases manually. #8030 You can check onomatopellan reply to my comment, it explains where you can get it and how to install it. but here it goes the quote " Add-AppxPackage .\Microsoft.WSL_0.58.3.0_x64_ARM64.msixbundle " Hope that helps |
Version
Microsoft Windows [Version 10.0.22000.348]
WSL Version
Kernel Version
5.10.74.3-microsoft-standard-WSL2
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
I have noticed the following behaviour on my Windows 11 Build:
I remove /mnt/wsl/resolv.conf and the symlink to this file, i.e., /etc/wsl.conf
I create a new /etc/resolv.conf file with the contents
nameserver 1.1.1.1
I shutdown wsl using
wsl --shutdown
commandI restart wsl
The file /etc/resolv.conf has been removed and the /mnt/wsl/resolv.conf has been regenerated.
My other settings in wsl.conf (like default user) works, but everytime the subsystem is restarted, I have to manually create resolv.conf file.
Reproducible on Ubuntu and Alpine Linux
Expected Behavior
I expect WSL2 to not remove (or overwrite) my
/etc/resolv.conf
file after every WSL2 restart.If possible, I would love to have a global option to completely disable this feature from using
.wslconfig
option.Actual Behavior
After setting
generateResolvConf = false
in wsl.conf. WSL2 removes my custom/etc/resolv.conf
after every restart.Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: