-
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 did not work in wsl.conf #8030
Comments
No matter what you restart or what distro you use, the setting is still not working in WSL 2. ch mod+own are same as other files in the /etc (a+r, root ) File is written with vim in linux so encoding nor LF is not messed up. It is 100% identical text to what the auto generated resolv.conf comment says. Half a dozen ppl in our dev team report same problem. |
@mikezerosix I've been investigating this issue, and I wanted to double-check and see something first. Do you and the others having this issue have the |
@mikezerosix for a quick fix, try deleting |
@mikezerosix has this resolved your issue? |
It is completely random and inconsistent. I made changed I restarted WSL service per documentation. Then I do nothing and few days later when I restart the whole machine and it takes effect. I copy working resolve.conf copy over the auto generated. I have wsl.conf per instructions and it does not seem to work. chattr -i /etc/resolv.conf after whole machine reboot seemd to work preventing the overwriting of manually edited file. |
@mikezerosix this issue has been fixed in Store WSL, please update if you haven't done so. Thanks! |
hello @owenschupp, I don't believe this should be closed, I am facing this issue, when you say Store WSL what does this mean? Unfortunately, I can't use the Windows store since it's blocked by my IT, to install WSL I needed to follow the manual instructions provided by Microsoft here I am using Ubuntu 20.04.4 LTS which was downloaded from the link available in the instructions mentioned. I don't want to open a new issue without confirming there is something I can still do but if not I will open a new issue. |
@nmofonseca Are you in Windows 11? Since you are blocked I think it's worth trying to install the store version manually. Download the latest
|
Hello @onomatopellan , I believe this has sorted my issue, In have installed the latest release as you described, and this is the output I get now from --version:
Then I removed the immutable flag from my /etc/resolv.conf and restarted wsl using wsl --shutdown and when my Ubuntu started again the /etc/resolv.conf is still there intact. I have also started a new fresh Debian distro and can also confirm that everything worked as expected. Thank you so much for your help. Cheers |
@onomatopellan It's weird that double clicking the msixbundle file doesn't work, but running this specific command from an elevated PS which is not documented anywhere except for your GH comment does work 🤔 |
Version
Windows 10 Enterprise H20
WSL Version
Kernel Version
No response
Distro Version
OpenSuse15.3 and Ubuntu 20.4
Other Software
nada
Repro Steps
Create file in linux :
/etc/wsl.conf
containing text
[network] generateResolvConf = false
Expected Behavior
when you start the WSL with current distro the /etc/resolv.conf in no autogenerated and file is overwritten.
Per the Micker Mouse WSL documentation.
Actual Behavior
/etc/resolv.conf is always overwritten. It does matter that you restart wsl or the wsl service or the whole computer. This setting has no effect no matter what you do. /etc/resolv.conf is ALWAYS auto generated and overwritten.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: