penag62
penag62

Reputation: 177

wsl --set-default-version 2 The service cannot be started, either because it is disabled or because it has no enabled devices associated with it

I'm trying to install again Ubuntu on my Windows 10 Home Version 20H2 OS Build 19042.685 using WSL2.

The problem is the WSL2 installation is not finished. I received the following message doing Step 5 - Set WSL 2 as your default version

PS C:\WINDOWS\system32> wsl
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

Previous steps done:

PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Deployment Image Servicing and Management tool
Version: 10.0.19041.572

Image Version: 10.0.19042.685

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Deployment Image Servicing and Management tool
Version: 10.0.19041.572

Image Version: 10.0.19042.685

Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
PS C:\WINDOWS\system32>

Then I restarted Windows and

execute wsl_update_x64.msi

Upvotes: 16

Views: 39621

Answers (2)

Docans
Docans

Reputation: 831

I had the same issue:

C:\WINDOWS\system32> wsl --set-default-version 2
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

The problem was Kaspersky. The solution is simple: open cmd.exe as administrator and run the following code

sc config LxssManager start=auto

Kaspersky will give you a pop-up about a potential thread. Tell Kaspersky to ignore the alert. Please don't click on "Fix it" button for Kaspersky or you will undo the solution.

That should fix it.

Upvotes: 73

Antonio Banderéz
Antonio Banderéz

Reputation: 91

Docans is right; running:

sc config LxssManager start=auto

in Command Prompt seems to fix the issue. However, you must run Command Prompt as an Administrator. I don't have enough reputation to comment or edit the post to clarify this so I have to make it a separate answer.

Upvotes: 9

Related Questions