Skip to content
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

Error code: Wsl/Service/CreateInstance/CreateVm/HCS_E_SERVICE_NOT_AVAILABLE #8693

Open
1 of 2 tasks
reidsneo opened this issue Aug 6, 2022 · 37 comments
Open
1 of 2 tasks

Comments

@reidsneo
Copy link

reidsneo commented Aug 6, 2022

Version

Microsoft Windows Version 22H2 (OS Build 226.10.1)

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.15.57.1

Distro Version

Debian 10

Other Software

WSL version: 0.65.3.0
Kernel version: 5.15.57.1
WSLg version: 1.0.41
MSRDC version: 1.2.3213
Direct3D version: 1.601.0
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22610.1

Repro Steps

Just running wsl command in command line, yesterday just fine but today I cannot start wsl anymore

Expected Behavior

wsl service started normally

Actual Behavior

image

Diagnostic Logs

No response

@reidsneo
Copy link
Author

reidsneo commented Aug 6, 2022

After running
wsl --update

then it promp to update again, (even though yesterday already do update from microsoft store though)
later I go to setting > turn windows feature on / off
uncheck then check again for Windows Hypervisor Platform
reboot

it working again now
it seem issue occurred after update WSL

@syx-413
Copy link

syx-413 commented Oct 5, 2022

me too

Error code: Wsl/Service/CreateInstance/CreateVm/HCS_E_SERVICE_NOT_AVAILABLE

@ll931217
Copy link

ll931217 commented Oct 8, 2022

I had "Virtual Machine Platform" and "Windows Hypervisor Platform" turned off, after checking the boxes and restarting. Its working again

@ukhwaja
Copy link

ukhwaja commented Oct 12, 2022

I have the same issue. I cannot resolve. Any help on this?

@MilkFlavor
Copy link

https://www.youtube.com/watch?v=aLVYuUnIxtI

@OhMyGodNoah
Copy link

make sure hyper v, virtual machine platform and virtualization are on. Worked for me.

@OhMyGodNoah
Copy link

for Windows 11 Pro v 22H2

@shrinidhi6547
Copy link

Worked for me:-
System info - Windows 11, WSL2, (Ubuntu 18.04).

Step 1: Go to settings > (search) turn windows feature on / off
Screenshot (7)

Step 2: If Windows Hypervisor Platform and Windows Machine Platform is unchecked, please check them, else uncheck and recheck them.
Screenshot (8)

Step 3: Reboot

Step 4: Open the terminal check, run command - wsl -l -v
should result in saying ubuntu is running in version 1/2.
Screenshot (9)

Cheers 🥂

@rama4zis
Copy link

rama4zis commented Jan 2, 2023

You can try this with CMD or powerShell run as Admin

First Enable the Windows Subsystem for Linux

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Then Enable Virtual Machine feature

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Then restart your PC

Referance

@mybabysexy
Copy link

You can try this with CMD or powerShell run as Admin

First Enable the Windows Subsystem for Linux

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Then Enable Virtual Machine feature

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Then restart your PC

Referance

This fixed my problem after installing 2023-01 Cumulative Update for Windows 11 Version 22H2 for x64-based Systems (KB5022303)

@kostakis
Copy link

Worked for me:- System info - Windows 11, WSL2, (Ubuntu 18.04).

Step 1: Go to settings > (search) turn windows feature on / off Screenshot (7)

Step 2: If Windows Hypervisor Platform and Windows Machine Platform is unchecked, please check them, else uncheck and recheck them. Screenshot (8)

Step 3: Reboot

Step 4: Open the terminal check, run command - wsl -l -v should result in saying ubuntu is running in version 1/2. Screenshot (9)

Cheers 🥂

I had the error code Error code: Wsl/Service/CreateInstance/CreateVm/0x800705aa

The above solution immediately fixed the problem.

@gtgthozz
Copy link

after solving one problem, another appeared - WslRegisterDistribution failed with error: 0x80370102
enabling/disabling Hyper V didn't help
Fix - #4626 (comment)

@WilamisAviz15
Copy link

I had "Virtual Machine Platform" and "Windows Hypervisor Platform" turned off, after checking the boxes and restarting. Its working again

it worked for me

@gopihc
Copy link

gopihc commented Mar 27, 2023

Complete removal of docker desktop and reinstall helped me..

@oussamamth1
Copy link

wsl.exe --shutdown
it will off all service
then
wsl.exe
this will solve that issue

@catwhocode
Copy link

Running "Hyper-V Host Compute Service" solved my problem

  • Windows 10 Pro 21H2

@amldimsed
Copy link

What a strange problem, I do not understand why it is disabled, in other forums it is to update the wsl with another type of error

@szofar
Copy link

szofar commented Apr 27, 2023

Kostakis's solution worked for me.

But I wish the original error were a little more specific regarding which Windows Features need to be enabled :)

"Error: 0x80370114 The operation could not be started because a required feature is not installed."

Should instead say something like: "Error: 0x80370114 The operation could not be started because a required feature is not installed: [Windows Hypervisor Platform, Windows Subsystem for Linux, Hyper-V]"

@juparog
Copy link

juparog commented May 4, 2023

Enable Hiper V:

To enable Hyper-V on Windows 11, check and enable virtualization on the UEFI (BIOS).
Then open Settings > Apps > Optional features > More Windows features.
Check the “Hyper-V” item, and click “OK” and “Restart now” to enable the feature.

@notAperson535
Copy link

wsl.exe --shutdown it will off all service then wsl.exe this will solve that issue

lol this worked thank you!

@hum4n0A
Copy link

hum4n0A commented Aug 17, 2023

wsl.exe --shutdown it will off all service then wsl.exe this will solve that issue
After installed the features VM and Hyper-V the problem continue, but this solution works! thanks!

@nandha-emis
Copy link

Hello, I have also encountered similar problems after upgrading win11 to the latest version. Have you solved your problem? If so, how can we solve this problem? Can you tell me how?

My problem is: wsl 服务尚未启动。 Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/0x80070426

I'm also facing the exact same error.

@hum4n0A
Copy link

hum4n0A commented Aug 17, 2023

Hello, I have also encountered similar problems after upgrading win11 to the latest version. Have you solved your problem? If so, how can we solve this problem? Can you tell me how?
My problem is: wsl 服务尚未启动。 Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/0x80070426

I'm also facing the exact same error.

Have you tried this?
https://answers.microsoft.com/en-us/windows/forum/all/wsl-fail-to-start-after-upgrade-to-22h2/c3dad74e-ddb3-4fe7-9e85-7e1acb95f9c8

@zyf0330
Copy link

zyf0330 commented Sep 30, 2023

But why WSL just alert that Virtual Machine Platform needs to be enabled, excluding Windows Hypervisor Platform?

@namdevel
Copy link


Start the Registry Editor (regedit.exe)
Go to the following branch:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache
Double-click “Start” and set its data to 2.
Exit the Registry Editor.
Restart Windows.
After the restart, the DNS Client service should start correctly. This, in turn, should fix the WSL error.```

@malongshuai
Copy link

Hello, I have also encountered similar problems after upgrading win11 to the latest version. Have you solved your problem? If so, how can we solve this problem? Can you tell me how?
My problem is: wsl 服务尚未启动。 Error code: Wsl/Service/CreateInstance/CreateVm/ConfigureNetworking/0x80070426

I'm also facing the exact same error.

Have you tried this? https://answers.microsoft.com/en-us/windows/forum/all/wsl-fail-to-start-after-upgrade-to-22h2/c3dad74e-ddb3-4fe7-9e85-7e1acb95f9c8

I have the same error, start the service "Windows Defender Firewall" and works for me. So, the error may re-occur if you disabled the windows defender

@danniod
Copy link

danniod commented Nov 10, 2023

Sometime CANNOT launch wsl bash report Wsl/Service/CreateInstance/CreateVm/HCS_E_SERVICE_NOT_AVAILABLE after boot.
Then REBOOT and open terminal often launch wsl success in my case.

@ArthurEzenwanne
Copy link

wsl.exe --shutdown it will off all service then wsl.exe this will solve that issue

This helped. Initially docker-desktop and docker-desktop-data were both running. This solution helped. Win 11. 23H2.

@touchmii
Copy link

touchmii commented Dec 9, 2023

  1. uninstall wsl in control center
  2. wsl.exe --update in cmd without adminnistrator
  3. podman machine init
podman machine init                                           pwsh  15:08:33 
Launching WSL Kernel Install...
Elevated process failed with error: Process failed with exit code: 125

Could not install the WSL Kernel. See previous output for any potential failure details.
If you can not resolve the issue, and rerunning fails, try the "wsl --install" process
outlined in the following article:

http://docs.microsoft.com/en-us/windows/wsl/install

Error: Process failed with exit code: 125
 touchmii    ~   22.644s⠀   wsl
Windows Subsystem for Linux is now available in the Microsoft Store!
You can upgrade by running 'wsl.exe --update' or by visiting https://aka.ms/wslstorepage
Installing WSL from the Microsoft Store will give you the latest WSL updates, faster.
For more information please visit https://aka.ms/wslstoreinfo

DESKTOP-V2QN3KU:/mnt/c/Users/touchmii$ exit
 touchmii    ~   11.783s⠀   wsl.exe --update                                                 pwsh  15:11:20 
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.
 touchmii    ~   19.208s⠀   podman machine init                                              pwsh  15:11:46 
Error: head request failed: https://github.com/containers/podman-wsl-fedora/releases/latest/download/rootfs.tar.xz: Head "https://github.com/containers/podman-wsl-fedora/releases/latest/download/rootfs.tar.xz": proxyconnect tcp: dial tcp 127.0.0.1:7890: connectex: No connection could be made because the target machine actively refused it.
 touchmii    ~   2.637s⠀   podman machine init                                               pwsh  15:11:52 
Extracting compressed file: podman-machine-default_fedora-podman-amd64-v39.0.1.tar: done
Importing operating system into WSL (this may take a few minutes on a new WSL install)...
Import in progress, this may take a few minutes.
The operation completed successfully.
Configuring system...
Generating public/private ed25519 key pair.
Your identification has been saved in podman-machine-default
Your public key has been saved in podman-machine-default.pub
The key fingerprint is:
SHA256:/nEHhsASKgQq47NQEGP1MOPKtFTd/OtSkdZxCz+tGKU root@DESKTOP-V2QN3KU
The key's randomart image is:
+--[ED25519 256]--+
|=+o*. +          |
|o+o =o =   o o   |
|+oo.... + o B o  |
|*oo.   . * E + . |
|.*      S + = o  |
|. o    . o o o   |
| .      + . . .  |
|       . o o .   |
|        . .      |
+----[SHA256]-----+
Machine init complete
To start your machine run:

        podman machine start

 touchmii    ~   39.133s⠀            ```

@drawing-re
Copy link

Resolved for me (after nothing else worked):
bcdedit /set hypervisorlaunchtype Auto
And then restart

@xkxrxm
Copy link

xkxrxm commented Dec 27, 2023

Worked for me:- System info - Windows 11, WSL2, (Ubuntu 22.04).
step 1: check whether "C:\Windows\System32\vmcompute.exe" is add in the list as follow (windows 安全中心 -> 应用和浏览器控制 -> 攻击防护设置 -> 程序保护) if no, add it;
image
step 2: open the CFG.
image
step 3:exec net start vmcompute in cmd or powershell

@XcloudFance
Copy link

Worked for me:- System info - Windows 11, WSL2, (Ubuntu 22.04). step 1: check whether "C:\Windows\System32\vmcompute.exe" is add in the list as follow (windows 安全中心 -> 应用和浏览器控制 -> 攻击防护设置 -> 程序保护) if no, add it; image step 2: open the CFG. image step 3:exec net start vmcompute in cmd or powershell

This works to me bruh. Kinda turned off some strange settings then it appears to shut my WSL down

@FADELELLAHerrami
Copy link

Worked for me:- System info - Windows 11, WSL2, (Ubuntu 18.04).

Step 1: Go to settings > (search) turn windows feature on / off Screenshot (7)

Step 2: If Windows Hypervisor Platform and Windows Machine Platform is unchecked, please check them, else uncheck and recheck them. Screenshot (8)

Step 3: Reboot

Step 4: Open the terminal check, run command - wsl -l -v should result in saying ubuntu is running in version 1/2. Screenshot (9)

Cheers 🥂

This work for me , thank you very much

@yoyoxoy
Copy link

yoyoxoy commented Jun 26, 2024

The solution for me was:
Windows Security -> App & Browser Control -> Exploit Protection Settings
change Control Flow Guard (CFG) to "On"
for both:

C:\Windows\System32\vmwp.exe
C:\Windows\System32\vmcompute.exe

@wangzihchao
Copy link

Windows 10,wsl -- update work for me

@salmanmp
Copy link

Resolved for me (after nothing else worked): bcdedit /set hypervisorlaunchtype Auto And then restart

Resolved the problem.

@scruel
Copy link

scruel commented Oct 16, 2024

@xkxrxm This works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests