Git Product home page Git Product logo

Comments (10)

github-actions avatar github-actions commented on July 20, 2024

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

from wsl.

kohlerdominik avatar kohlerdominik commented on July 20, 2024

I have the exact same issue, started today as well.

WslLogs-2024-06-14_17-43-54.zip

from wsl.

cyberjj999 avatar cyberjj999 commented on July 20, 2024

@kohlerdominik It's a really annoying problem.

I found a quick fix incase it really bothers you - doesn't seem to affect my project code but things feel slower in general.

I just downgrade to WSL1 and it works

# Open Powershell
C:\WINDOWS\system32>wsl --list

Windows Subsystem for Linux Distributions:
Ubuntu (Default)

# Set WSL to Version 1
C:\Users\priv>wsl --set-version Ubuntu 1

It says it takes a few minutes but in reality it took almost an hour for me.

I'm hoping a proper fix will be here so I can switch back to WSL2.

Cheers and hope it helps!

P.S. I tried to switch back to WSL2 afterwards and the network issue still persisted, so I guess switching back and forth doesnt' work 👎

from wsl.

kohlerdominik avatar kohlerdominik commented on July 20, 2024

@cyberjj999 after investigating I found, that etc/resolv.conf is a symbolic link to a non-existing file. After creating that file with the following content, the name resolution works again

nameserver [our company dns server ip - don't add this if you only require internet dns]
nameserver 1.1.1.1

This is quite an ugly workaround, though, because it works staticly only for our work environment and the internet.

I guess the resolv.conf should be taken from the windows network adapter usually (so DHCP-conf is properly forwared), but this did break.

from wsl.

dcasota avatar dcasota commented on July 20, 2024

Hi,
There are quite a few differences between WSL1 and WSL2.
See #4150 (comment). The thread is mentioned in the weblink above.

I'm using NAT mode, and this works perfectly for Photon OS on WSL2.

from wsl.

Wrong-Code avatar Wrong-Code commented on July 20, 2024

Yes, there is a difference between version 1 and 2, but currently version 2 doesn't work anymore, and version 1 still performs as expected. Thanks to @cyberjj999 for hinting on temporarily switch to version 1.

Running 10.0.22631.3737 FWIW

from wsl.

dcasota avatar dcasota commented on July 20, 2024

On x86_64,
WSL 2.1.5 works flawlessly with version 2. Regular installations are not affected, because wsl —update does not update to 2.2.4.
WSL with version 1 is not an option for distributions with systemd requirements.

from wsl.

cyberjj999 avatar cyberjj999 commented on July 20, 2024

@dcasota

On x86_64, WSL 2.1.5 works flawlessly with version 2. Regular installations are not affected, because wsl —update does not update to 2.2.4. WSL with version 1 is not an option for distributions with systemd requirements.

I'm still deeply lost with what's happening. I happen to need to use ollama which requires wsl2 so my current approach of reverting to wsl1 will not work.

I have uploaded the logs above.

Incidentally, I saw in another issue (#11675) mentioning similar things, and your suggestion for WSL reinstallation.

# see https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-1---enable-the-windows-subsystem-for-linux

# Open a Powershell Terminal (Administrator) 
dism /online /disable-feature /FeatureName:Microsoft-Windows-Subsystem-Linux
dism /online /disable-feature /featurename:VirtualMachinePlatform
dism /online /disable-feature /FeatureName:Microsoft-Hyper-V
rm "$env:userprofile\.wslconfig"

# reboot

# Open a Powershell Terminal (Administrator) 
dism /online /enable-Feature /All /FeatureName:Microsoft-Windows-Subsystem-Linux /norestart
dism /online /enable-feature /All /Featurename:VirtualMachinePlatform /norestart
dism /online /enable-Feature /All /FeatureName:Microsoft-Hyper-V /norestart
bcdedit /set hypervisorlaunchtype auto

# reboot

# Open a Powershell Terminal (Administrator) 
wsl --install

I'll give it a shot tomorrow if there's no alternative solution.

Can I ask regarding the backup for WSL which you suggested: wsl --export <distribution-name> <path\filename.tar>, if WSL2 still doesn't have connection after I do your WSL reinstallation step, how can I re-import these backup contents into my new WSL2?

(I have custom bash scripts/commands + other installations like ollama and it'd be nice if i can easily re-import them to my new WSL2...)

from wsl.

github-actions avatar github-actions commented on July 20, 2024
Diagnostic information
Issue was edited and new log file was found: https://github.com/user-attachments/files/15858698/WslLogs-2024-06-16_22-35-16.zip
Detected appx version: 2.2.4.0

from wsl.

dcasota avatar dcasota commented on July 20, 2024

@cyberjj999

  • fyi Ollama does not require WSL, it's an option. But yes, I'm using this option, too.
  • Before considering a reinstallation of WSL, backup your work locally e.g. to the hard disk, usb drive, etc. Shutdown the vm(s) with vm -d <distribution-name> --shutdown and use the export functionality.
  • Run wsl --uninstall. Run the recipe mentioned above.
  • Reinstalling WSL x86_64 actually is a reset to version 2.1.5. Hence there shouldn't be a networkMode related issue as in 2.2.4.
  • After the reinstallation, use the import function. Configure .wslconfig as needed.

From my perspective, Ollama, security-hardened by VMware Photon OS (one of the origins of Cbl mariner), runs best in VMware Workstation. But built-in WSL in Windows 11 as homelab use-case has become good enough. Not all functions are fail-safe yet.

Clarification:
wsl --unregister -d <distribution-name> deletes a custom distribution, but
wsl --uninstall+WSL reinstallation not.

from wsl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.