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-22.04 WSL 1 failed to upgrade to WSL 2 #9644

Closed
2 tasks done
jippy89 opened this issue Feb 16, 2023 · 6 comments
Closed
2 tasks done

Ubuntu-22.04 WSL 1 failed to upgrade to WSL 2 #9644

jippy89 opened this issue Feb 16, 2023 · 6 comments

Comments

@jippy89
Copy link

jippy89 commented Feb 16, 2023

Version

Microsoft Windows [Version 10.0.19044.2604]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

No response

Distro Version

Ubuntu-22.04

Other Software

No response

Repro Steps

Run on Powershell Adiministrator
wsl --set-version Ubuntu-22.04 2

Expected Behavior

Current distro upgraded to WSL 2

Actual Behavior

Logs after I ran wsl --set-version Ubuntu-22.04 2

For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion in progress, this may take a few minutes.
Importing the distribution failed.
Error code: Wsl/Service/WSL_E_IMPORT_FAILED

Diagnostic Logs

No response

@jippy89
Copy link
Author

jippy89 commented Feb 16, 2023

I've actually tried exporting and importing, but it failed at the import part. The following is the command I ran,
wsl --import Ubuntu-22.04-wsl2 C:\Users\user\Ubuntu-22.04-wsl2\ My_Ubuntu-22.04.tar

I'm on C:\Users\user\ and the file name is My_Ubuntu-22.04.tar.

@jippy89
Copy link
Author

jippy89 commented Feb 16, 2023

Eh.. something worked..? I tried running the following at it resulted differently

wsl --import ubuntu-2 "C:\Users\user\wsl\ubuntu-2" .\My_Ubuntu-22.04.tar

@jippy89 jippy89 closed this as completed Feb 16, 2023
@tzachbon
Copy link

Having the same issue, how did you solve it?

@jippy89
Copy link
Author

jippy89 commented Mar 2, 2023

Eh.. something worked..? I tried running the following at it resulted differently

wsl --import ubuntu-2 "C:\Users\user\wsl\ubuntu-2" .\My_Ubuntu-22.04.tar

I ran different command @tzachbon. I think it has something to do with the path.

@jippy89
Copy link
Author

jippy89 commented Mar 2, 2023

If you checked carefully, I ran 2 different command of wsl --import, the first one didn't work, the second one did thought. I really don't know myself. It could be the name, it could be the path file we're referring to, idk. I'm really surprised and just happy that it worked.

There's whole other similar issues in other thread, I tried following them but none of them worked.

@antsmallant
Copy link

The most possible reason is your disk space is not enough。If you have another disk which has enough space,You may export to that disk,and then reimport。

I will show you an example(1. my disk c: is lack of space,but disk d: has enough;2. my dist version is ubuntu-20.04)
Steps:

  1. wsl --export Ubuntu-20.04 d:\wsl-ubuntu20.04.tar
  2. wsl --unregister Ubuntu-20.04
  3. wsl --import Ubuntu-20.04 d:\wsl-ubuntu20.04 d:\wsl-ubuntu20.04.tar --version 2
  4. ubuntu2004.exe config --default-user
  5. del d:\wsl-ubuntu20.04.tar

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