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

Ubuntu installation stuck on WSL (Windows 10 Pro Insider Preview) #6405

Open
djrranga opened this issue Jan 6, 2021 · 48 comments
Open

Ubuntu installation stuck on WSL (Windows 10 Pro Insider Preview) #6405

djrranga opened this issue Jan 6, 2021 · 48 comments

Comments

@djrranga
Copy link

djrranga commented Jan 6, 2021

Environment

Windows build number: 21277
Your Distribution version: Ubuntu 20.04
Whether the issue is on WSL 2 and/or WSL 1: 2

Steps to reproduce

  1. Install the latest build of Windows Insider Preview (Dev Channel)
  2. Set up Windows
  3. Enable Hyper-V, Hypervisor Platform, Containers
  4. In cmd.exe (Admin): wsl --install
  5. Reboot
  6. Ubuntu window opens, says "Installing, this may take a few minutes" for several hours.

WSL logs:

Expected behavior

Ubuntu should install and ask me to configure my user account.

Actual behavior

Hangs on "installing" with no errors.

Edit 2024: Workarounds

Workaround 1 @sparcbr
Workaround 2 @shtormish

@therealkenc
Copy link
Collaborator

In cmd.exe (Admin): wsl --install

That command needs a parameter, it would look like wsl.exe --install -d Ubuntu. Before you do that, do:

C:\> wsl --set-default-version 2

If either of those fail or hang, please collect WSL logs and post the backlink to the feedback item here. You don't need to let it run for hours while collecting the logs, just 30 seconds or so will do, then close the window.

@benyaminl
Copy link

In cmd.exe (Admin): wsl --install

That command needs a parameter, it would look like wsl.exe --install -d Ubuntu. Before you do that, do:

C:\> wsl --set-default-version 2

If either of those fail or hang, please collect WSL logs and post the backlink to the feedback item here. You don't need to let it run for hours while collecting the logs, just 30 seconds or so will do, then close the window.

Hello, I tried to wsl.exe --install -d ubuntu, nothing happen only show --help list
image
image

Already version 2

@therealkenc
Copy link
Collaborator

The --install feature is only available on Insiders, as of 20211.

@sparcbr
Copy link

sparcbr commented Feb 28, 2022

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

@keohanoi
Copy link

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

weird but its actually worked 😂

@tehmasterer
Copy link

tehmasterer commented Apr 5, 2022

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

Had the same issue and this solved it.

I am running Windows 10 Pro version 21H1.

@kharisecario
Copy link

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

Confirmed this. I guess it because restart needed after installing WSL before installing distro

@kaijuh
Copy link

kaijuh commented Sep 23, 2022

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

9/23/2022, this is still the best solution

@Wasiu-Akindoyin
Copy link

Screenshot 2022-10-06 114959
I have been trying to install ubuntu and wsl but its been like this for hours. Please whats wrong?

@megoRU
Copy link

megoRU commented Oct 6, 2022

Wasiu

enable VM in BIOS

@Wasiu-Akindoyin
Copy link

Wasiu-Akindoyin commented Oct 6, 2022 via email

@megoRU
Copy link

megoRU commented Oct 6, 2022

Thank you very for your support. Please can you help with the procedures to follow because I am just seeing different things on Google.

you don't know how to log in to bios?

@Wasiu-Akindoyin
Copy link

Wasiu-Akindoyin commented Oct 6, 2022 via email

@shtormish
Copy link

shtormish commented Oct 31, 2022

Have same trouble. Tried install Ubunty and debian, each time cmd window opens, says "Installing, this may take a few minutes" for several hours.
Nothing helped(

  • Check bios settings -- all VT functions checked
  • Reinstall virtual machine platform and WSL -- success
  • Check system via sfc and dism -- success
  • Enable nested virtualization -- done
  • Update system -- success
  • Tried ctrl+c as supposet earlier - it just closes window with cmd((
  • None VM installed
System:
WSL version: 0.70.5.0
Kernel version: 5.15.68.1
WSLg version: 1.0.45
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22623.875

Here is logs taken with recommended tool from MS
WslLogs-2022-10-31_02-44-26.zip
WslLogs-2022-10-31_02-36-29.zip
WslLogs-2022-10-31_02-46-07.zip

@Wasiu-Akindoyin
Copy link

Wasiu-Akindoyin commented Oct 31, 2022 via email

@shtormish
Copy link

UPD
Have found fix that worked for me here #7505

It seems that vmcompute.exe must be strictly Code flow guard (CFG) enabled, otherwise it will not work.

Here is reproduce of workaround
===>

  1. Open "Window Security"
  2. Open "App & Browser control"
  3. Click "Exploit protection settings" at the bottom
  4. Switch to "Program settings" tab
  5. Add/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/check "Override system settings" (CFG must be ON for this app!)
  8. Reboot

@Wasiu-Akindoyin
Copy link

Wasiu-Akindoyin commented Oct 31, 2022 via email

@roymegan
Copy link

roymegan commented Dec 6, 2022

UPD Have found fix that worked for me here #7505

It seems that vmcompute.exe must be strictly Code flow guard (CFG) enabled, otherwise it will not work.

Here is reproduce of workaround ===>

1. Open "Window Security"

2. Open "App & Browser control"

3. Click "Exploit protection settings" at the bottom

4. Switch to "Program settings" tab

5. Add/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/check "Override system settings" **(CFG must be ON for this app!)**

8. Reboot

It works! saved my day!!!!

@Wasiu-Akindoyin
Copy link

Wasiu-Akindoyin commented Dec 7, 2022 via email

@oidrissi
Copy link

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

This just makes me quit the install

@kaiwizz
Copy link

kaiwizz commented Jan 15, 2023

@oidrissi

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

This just makes me quit the install

yup, same for me.

what worked for me is running,
wsl --install Ubuntu --web-download

source: #9390 (comment)

@jwyker
Copy link

jwyker commented Jan 26, 2023

Had a similar issue.
Ended up stopping the initial command wsl --install and restarted my computer.
It then proceeded to complete some windows updates, and then afterwards I was able to run the command successfully again.

@Wasiu-Akindoyin
Copy link

Wasiu-Akindoyin commented Jan 26, 2023 via email

@Kornetoff
Copy link

Finally! The only solution that worked for me. But it took several hours to find him.

@craftzneko
Copy link

Unfortunately doesn't work for me, always hangs on installing, checked same as @shtormish

Check bios settings -- all VT functions checked
Reinstall virtual machine platform and WSL -- success
Check system via sfc and dism -- success
Enable nested virtualization -- done
Update system -- success
Tried ctrl+c but terminal is frozen

@craftzneko
Copy link

If i set WSL to version 1 it actually works

@Braingoo66
Copy link

Or run PowerShell as an admin and use:

Set-ProcessMitigation -Name vmcompute.exe -Enable CFG

no reboot required

@rohan2734
Copy link

image

  1. ctrl+C exited the installation of ubuntu
  2. this solution is not working

@nfeddema
Copy link

@kaiwizz
what worked for me is running, wsl --install Ubuntu --web-download

source: #9390 (comment)

This is the only thing that worked for me. (Windows 10, WSL2)

@cc46808
Copy link

cc46808 commented May 11, 2023

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

This just makes me quit the install

Open PowerShell as an Admin then run

wsl --install Ubuntu --web-download

I had the same issue by trying to run Ubuntu by clicking on the icon...

@gabriel8fm
Copy link

UPD Have found fix that worked for me here #7505

It seems that vmcompute.exe must be strictly Code flow guard (CFG) enabled, otherwise it will not work.

Here is reproduce of workaround ===>

  1. Open "Window Security"
  2. Open "App & Browser control"
  3. Click "Exploit protection settings" at the bottom
  4. Switch to "Program settings" tab
  5. Add/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/check "Override system settings" (CFG must be ON for this app!)
  8. Reboot

@shtormish you saved my day! It worked for me. Now I am able to install Ubuntu and Debian distros.

@oauo
Copy link

oauo commented Jul 10, 2023

This isn't working for me, I have virtualisation enabled in BIOS, I did as @shtormish suggested but progress doesn't go past 3.0%. Before doing as prescribed it didn't go past 2.0%, so it is still a +50% improvement

Edit: the installation is just painfully slow. I left it installing overnight and after 9.5 hours it's at 62%, so it is working just that it's going to take 15 hours total. I can't think of anything that would causing it to be that slow, internet is fast, the drive it's downloading to is fast, and CPU is fast.

@tmdgusya
Copy link

@kaiwizz Thank you! It works

@anmole17
Copy link

anmole17 commented Aug 27, 2023

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

This just makes me quit the install

Open PowerShell as an Admin then run

wsl --install Ubuntu --web-download

I had the same issue by trying to run Ubuntu by clicking on the icon...

Thank you. this worked for me. The --web-download was also useful in updating wsl. For Windows 11

@hobsyllwin5
Copy link

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

2023/12/12 - still works like a charm

@PatTheSilent
Copy link

UPD Have found fix that worked for me here #7505

It seems that vmcompute.exe must be strictly Code flow guard (CFG) enabled, otherwise it will not work.

Here is reproduce of workaround ===>

  1. Open "Window Security"
  2. Open "App & Browser control"
  3. Click "Exploit protection settings" at the bottom
  4. Switch to "Program settings" tab
  5. Add/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/check "Override system settings" (CFG must be ON for this app!)
  8. Reboot

You wonderful human being. I hope only the best things in life happen to you.
I've spend 3 days trying to get this thing to work. Thank you.

@lanmi42
Copy link

lanmi42 commented Dec 17, 2023

UPD Have found fix that worked for me here #7505

It seems that vmcompute.exe must be strictly Code flow guard (CFG) enabled, otherwise it will not work.

Here is reproduce of workaround ===>

1. Open "Window Security"

2. Open "App & Browser control"

3. Click "Exploit protection settings" at the bottom

4. Switch to "Program settings" tab

5. Add/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/check "Override system settings" **(CFG must be ON for this app!)**

8. Reboot

Confirming this works form me as well (Win10, 22H2), thanks a lot!

Just to note, "Override system settings" was already checked (as well as "On" and "User strict CFG"), but after unchecking and checking again, clicking Apply, and restarting I was finally able to install via wsl.

@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

@jelacicedin
Copy link

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

Incredible that this worked.

@suzdalenko
Copy link

UPD Have found fix that worked for me here #7505
It seems that vmcompute.exe must be strictly Code flow guard (CFG) enabled, otherwise it will not work.
Here is reproduce of workaround ===>

1. Open "Window Security"

2. Open "App & Browser control"

3. Click "Exploit protection settings" at the bottom

4. Switch to "Program settings" tab

5. Add/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/check "Override system settings" **(CFG must be ON for this app!)**

8. Reboot

It works! saved my day!!!!

Thanks a lot, 3 hours I am searching the solution !!! Thanks bro :p

@oq2o
Copy link

oq2o commented Aug 29, 2024

I had this issue and resolved it by specifying the distro explicitly. I had previously used WSL on this machine.

See: Windows Documentation | Install WSL command

The above command ( wsl --install ) only works if WSL is not installed at all. If you run wsl --install and see the WSL help text, please try running wsl --list --online to see a list of available distros and run wsl --install -d to install a distro. To uninstall WSL, see Uninstall legacy version of WSL or unregister or uninstall a Linux distribution.

@voltflake
Copy link

UPD Have found fix that worked for me here #7505

It seems that vmcompute.exe must be strictly Code flow guard (CFG) enabled, otherwise it will not work.

Here is reproduce of workaround ===>

1. Open "Window Security"

2. Open "App & Browser control"

3. Click "Exploit protection settings" at the bottom

4. Switch to "Program settings" tab

5. Add/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/check "Override system settings" **(CFG must be ON for this app!)**

8. Reboot

This actually worked for me. It's wild, how enabling exploit protection can solve an issue insted of creating one. :O

@viettungvu
Copy link

UPD Have found fix that worked for me here #7505

It seems that vmcompute.exe must be strictly Code flow guard (CFG) enabled, otherwise it will not work.

Here is reproduce of workaround ===>

  1. Open "Window Security"
  2. Open "App & Browser control"
  3. Click "Exploit protection settings" at the bottom
  4. Switch to "Program settings" tab
  5. Add/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/check "Override system settings" (CFG must be ON for this app!)
  8. Reboot

##This worked. You saved my life

@krismarc
Copy link

krismarc commented Oct 3, 2024

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

weird but its actually worked 😂

Could anyone somehow pin this? or actually author @djrranga of this post could edit his issue description with the workaround? :)

@MiKing233
Copy link

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

I encountered this problem on Win11 24H2 LTSC, using your method it work! thanks!

@djrranga
Copy link
Author

I got the same issue, but found a workaround: you just have to use ctrl+c and then it will continue and ask you for a username and password

weird but its actually worked 😂

Could anyone somehow pin this? or actually author @djrranga of this post could edit his issue description with the workaround? :)

Done! Surprised this is still open 3 years later ;)

@jl2048
Copy link

jl2048 commented Nov 1, 2024

I was just trying to install WSL today and have the same issue with Ubuntu-22.04 or Ubuntu-24.04 distro. But when I switch to wsl 2
wsl --set-default-version 2
Then run the install again
wsl --install -d Ubuntu-22.04
It start to work.

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

No branches or pull requests