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

Cannot get WSL2 to install #5964

Closed
mwpowellhtx opened this issue Sep 22, 2020 · 7 comments
Closed

Cannot get WSL2 to install #5964

mwpowellhtx opened this issue Sep 22, 2020 · 7 comments

Comments

@mwpowellhtx
Copy link

Running Windows 10 Pro x64, v2004 OS build 19041.508. Prior I was in the correct v1909, I think, and correct major OS build, but the minor was down from the 14xx or whatever that has been indicated in other blogs.

So, what am I missing, how can I get WSL2 to install?

@HiteshDhola
Copy link

HiteshDhola commented Sep 22, 2020

You may need to provide more detail of error or issue. Let me tell you how I got it working.

I was following this procedure, but got many issues.
https://docs.microsoft.com/en-us/windows/wsl/install-win10#troubleshooting

Finally got it working.

Steps,

  1. Enabled Virtualization from BIOS

  2. Enabled following features of window,

  • Hyper-V (If not installed, gets error light required feature is not available or something)
  • HyperVisor (This may not be required)
  • Windows Virtual Platform (Important)
    Restart
  1. Enable following Feature
  • Windows subsystem for Linux (Important)
    Restart
  1. Download the latest WSL2 package:
    https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
    Install with admin rights. (try PowerShell with admin rights)
    Restart

  2. Install Kali Linux App from windows store. If already installed "Reset" from windows app manager.

  3. Got Following issue, (Kali Linux)

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370114
Error: 0x80370114 The operation could not be started because a required feature is not installed.

Press any key to continue...

  1. Resolution

1, Open "Windows Security"
2, Open "App & Browser control"
3, Click "Exploit protection settings" at the bottom
4, Switch to "Program settings" tab
5, Locate "C:\WINDOWS\System32\vmcompute.exe" in the list and expand it
6, Click "Edit"
7, Scroll down to "Code flow guard (CFG)" and uncheck "Override system settings"
8, Start vmcompute from powershell "net start vmcompute"

Then go back to powershell

wsl --set-default-version 2

  1. Started Kali linux app. Installation, success!

PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
kali-linux Running 2

  1. Tried Ubuntu app from Microsoft store. Also worked.

PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
kali-linux Stopped 2
Ubuntu Running 2

  1. Tried CentOS7 from "https://github.com/yuk7/CentWSL". Also worked.

PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
kali-linux Stopped 2
Ubuntu Running 2
CentOS7 Running 2

Note : I got lot of other errors before and tried lot of different methods. But this one was from scratch, so it should be working for you.

Note 2 : I have just install all these distro, not worked on them yet. So yet to find out about the bugs or issues inside them.

@mwpowellhtx
Copy link
Author

mwpowellhtx commented Sep 22, 2020

Appreciate the feedback. I was finally able to get it working by updating W10 to the 2004 (Sep 2020) version, then installing the WSL2 standalone MSI. Oh, and a restart is required. Then using the distro that I have installed, Ubuntu LTS, I was able to set the WSL version and verify in the listing.

Edit: The trick with the MSI, does not prompt you with any clues that a restart might actually be required. Until you do, you cannot set the WSL version.

@philippemartiny
Copy link

@HiteshDhola Thank you so much! I was facing similar issues an your Step 7 "Resolution" did the job for me.

@lzw9560
Copy link

lzw9560 commented Mar 3, 2021

@HiteshDhola Thank you so much!

@CommodoreOS
Copy link

Why dose this not work from installing from the Windows 11 store, all optional features should be added, it seems running VMware Workstation is alot easier or Virtual Box, why have to jump though a load of hoops to get it to work is silly and should not be necessary, it should be a one click and go.

@mwpowellhtx
Copy link
Author

Why dose this not work from installing from the Windows 11 store, all optional features should be added, it seems running VMware Workstation is alot easier or Virtual Box, why have to jump though a load of hoops to get it to work is silly and should not be necessary, it should be a one click and go.

Because, IMO, in my estimation, AFAIK, it is based on an actual Windows kernel mode operation. If I understand how it works, they are actually updating the Windows kernel(s) itself with a native Linux-inside kernel. Which, if I understand it correctly, does not deploy out of the box. From my lay technical background. Could be wrong. Perhaps someone closer to the metal could clarify and/or elaborate.

@nacayu
Copy link

nacayu commented May 21, 2022

@HiteshDhola Hello, I encountered the same question as you and followed your tips until "net start vmcompute", but the shell returns an error "server name is not valid", how should it be solved? thank you.

@github-actions github-actions bot mentioned this issue Mar 20, 2024
2 tasks
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

6 participants