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

Unable to enable WSL2 #5282

Closed
warpdesign opened this issue May 28, 2020 · 12 comments
Closed

Unable to enable WSL2 #5282

warpdesign opened this issue May 28, 2020 · 12 comments

Comments

@warpdesign
Copy link

warpdesign commented May 28, 2020

I just updated from Windows 10 November 2019 update to the May 2019 update. I followed the instructions here to enable WSL2:

PS C:\WINDOWS\system32> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Outil Gestion et maintenance des images de déploiement
Version : 10.0.19041.1

Version de l’image : 10.0.19041.264

Activation de la ou des fonctionnalités
[==========================100.0%==========================]
L’opération a réussi.
PS C:\WINDOWS\system32>

After a reboot, here is what I get when attempting to set version 2 as the default version:

PS C:\WINDOWS\system32> wsl --set-default-version 2
WSL 2 nécessite une mise à jour de son composant noyau. Pour plus d’informations, visitez https://aka.ms/wsl2kernel
PS C:\WINDOWS\system32>

I get the same error when trying to convert an existing WSL1 distribution to WSL2.

I am running Windows 10 Pro version 2004 (19041.264) on a Surface Book.

@kathibeepboop
Copy link

If you would have read what the error message said, you would have downloaded the required update :)

Go to https://aka.ms/wsl2kernel (As seen in your error message) and click on the link.

(Otherwise use this directlink: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi)

After that: reboot and you should be able to activate wsl 2 via the --set-version parameter

@warpdesign
Copy link
Author

I read that, but it looked like it was related to insiders using an older version of WSL2, especially since it was not mentioned at all in the official how to page.

@kathibeepboop
Copy link

I hope it works now!
If it does, feel free to close this issue

@warpdesign
Copy link
Author

warpdesign commented May 28, 2020

I will as soon as it's working thanks.

I launched a conversion of my existing distribution and it seems the process is very hungy on memory:

image

My Surface Book is unusable right now because of it.

@warpdesign
Copy link
Author

And to end up with an error :(

C:\Users\warpd>wsl --set-version Ubuntu 2
La conversion est en cours. Cette opération peut prendre quelques minutes...
Pour plus d’informations sur les différences de clés avec WSL 2, visitez https://aka.ms/wsl2
Échec de l’importation de la distribution.
./var/lib/gems/2.5.0/doc/bundler-2.1.4/rdoc/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/js/jquery.js' does not exist.
./var/lib/gems/2.5.0/doc/bundler-2.1.4/rdoc/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/fonts/Lato-Light.ttf' does not exist.
./var/lib/gems/2.5.0/doc/bundler-2.1.4/rdoc/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./var/lib/gems/2.5.0/doc/bundler-2.1.4/rdoc/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/fonts/Lato-Regular.ttf' does not exist.
./var/lib/gems/2.5.0/doc/bundler-2.1.4/rdoc/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/js/jquery.js: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/js/jquery.js' does not exist.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/fonts/Lato-Light.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/fonts/Lato-Light.ttf' does not exist.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/fonts/Lato-LightItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/fonts/Lato-LightItalic.ttf' does not exist.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/fonts/Lato-Regular.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/fonts/Lato-Regular.ttf' does not exist.
./usr/lib/ruby/2.5.0/rdoc/generator/template/darkfish/fonts/Lato-RegularItalic.ttf: Hard-link target './var/lib/gems/2.5.0/doc/rubygems-update-3.1.3/rdoc/fonts/Lato-RegularItalic.ttf' does not exist.
bsdtar: Error exit delayed from previous errors.

@kathibeepboop
Copy link

Regarding the memory issue: #4166
I limited it to 6gb on my machine, that works.

Regarding your other problem: Maybe you could try to remove all ruby gems and reinstall afterwards? not sure how big you wsl system is, maybe a fresh start would help you.

Also see https://github.com/DDoSolitary/LxRunOffline for better control over the wsl distributions

@onomatopellan
Copy link

For the Hard link target error see #4976 (comment)

@warpdesign
Copy link
Author

I guess I'll reinstall it from scratch.

Should I unregister my distribution with wsl --unregister Ubuntu then reinstall it from the store?

@onomatopellan
Copy link

onomatopellan commented May 28, 2020

Yes, that's the way. But before that make sure you did wsl.exe --set-default-version 2 and installed the kernel https://aka.ms/wsl2kernel.

@warpdesign
Copy link
Author

Ok, thank you.

Just so you know, I made 2 more attempts to convert the distribution, disabling real time protection first, and always got the same error as above.

@onomatopellan
Copy link

Yep, conversion uses bsdtar which have problems with some hard links. I always preferred to install a brand new WSL2 distro anyway.

@warpdesign
Copy link
Author

warpdesign commented May 28, 2020

It's running now, after unregistering it, and installing it again from the store.

I wasn't able to convert my existing distribution though.

Thanks for the quick support.

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

3 participants