WSL: WSL2 does not changes state from Stopped to Running

Environment

Windows build number: [run [Environment]::OSVersion for powershell, or ver for cmd]:

Microsoft Windows [Versión 10.0.19041.329]

Your Distribution version: [On Debian or Ubuntu run lsb_release -r in WSL]:

Ubuntu

Whether the issue is on WSL 2 and/or WSL 1: [run cat /proc/version in WSL]:

WSL1 and WSL2

Steps to reproduce

Yesterday I updated Windows 10 from 1909 to 2004 to install WSL2. I did these steps:

  1. Typed this on PowerShell as Administrator: Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

  2. Reboot Windows

  3. Installed this as Administrator: wsl_update_x64.msi

  4. Reboot Windows

  5. Typed this on PowerShell as Administrator: wsl --set-default-version 2

  6. Typed this on PowerShell as Administrator: wsl --set-version Ubuntu 2

  7. Typed this on PowerShell as Administrator: wsl --list --verbose

After I did all the steps above, I got this:

check-wsl2-windows-10-powershell 1

Expected behavior

WSL starts normally, but it does not.

Actual behavior

I typed wsl on PowerShell, and nothing happens.

I clicked on the WSL-Ubuntu icon on Dekstop, and a command line windows appear, and closes immediately.

Never I can see State: Running when I typed: wsl --list --verbose. Always is Stopped.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 22 (1 by maintainers)

Most upvoted comments

Hello. Try with this. It works for me. wsl --unregister Ubuntu

Interestingly enough, i had the same problem after playing a bit with enabling and disabling hyper-v and virtual machines support (while trying to configure virtualbox to work with wsl2).

No success on the virtualbox side (probably will look into vmware workstation or play with direct hyper-v machines), but for the wsl2 none of the solutions above worked (also because i didn’t want to loose my fully configured ubuntu instance).

What worked for me was:

  • in Turn windows features o/off, disable Hyper-V, Virtual Machines Platform, Windows Hypervisor Platform and Windows subsystem for Linux.
  • Reboot
  • Install again wsl2 (in administrative powershell)
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Probably just running wsl in and administrative powershell would have made it work to start with, but the above steps is what I made to make mine work again. Hope it helps someone in the same situation

WAG, doing your steps 5-7 as administrator could be problematic. Try this:

  • As user ‘you’ from either PS or CMD, do wsl --set-default-version 2.
  • Then install Ubuntu-18.04 from the store.
  • Go through the set username/password steps on first launch of Ubuntu-18.04 from the start menu
  • Open PS as user ‘you’. Do a wsl -l -v. You should see your current nonworking ‘Ubuntu’, but also ‘Ubuntu-18.04’.
  • From the same commandline, launch it with wsl -d Ubuntu-18.04

See if that takes at least.

Any interesting prints in dmesg while you try to run the Ubuntu distro? You can check this by running the below commands:

start wsl -d ubuntu-18.04 dmesg -w
wsl -d ubuntu

@therealkenc Thanks for the answer. I have tried all your steps, and I have this:

Sin título

The Ubuntu-18.04 is working, but the Ubuntu it’s still not working.

What I can do now?

Hi. You can use MSI installation and next command (silent installation into custom folder):

MsiExec.exe /i DockerDesktop.msi INSTALLDIR=E:\Docker /qn

You must download MSI installation of Docker desktop:

https://hub.docker.com/editions/community/docker-desktop-ent

lxcore_log.zip This is my lxcore_log. I wonder what cause the failure:(

wsl -d ubuntu

This saved my life to start WSL Ubuntu

@GilHyeon 한국분 반갑습니다.

@benhillis Yes it says:

[ 121.781263] EXT4-fs (sdc): VFS: Can't find ext4 filesystem [ 121.781333] ERROR: MountExt4:1659: mount(/dev/sdc) failed 22

What I can do now?

Short answer: push forward with Ubuntu-18.04. You can post detailed logs of the wsl.exe -d Ubuntu silent exit. That may shed some light on the fail, but not the answer to your question. Maybe subscribe #5416 to the extent there are takers over there, although that one has the same short answer, as of this writing anyway.