last day (16 days later) » 

23:48
-1
Q: WSL 1 to 2 migration

SoleilI have WSL (Linux subsystem on Windows 10) installed with ubuntu 21.04 (not from the store, it's the first version that appeared on W10), how can I to a migration to version 2 (with an actual kernel) while keeping all my files (system and user), if possible without reinstalling everything ? EDIT ...

You run wsl --set-default-version 2. Full Documentation Here. What part of the process are you stuck on exactly?
@Ramhound As mentioned, I'm not using the regular ubuntu distribution from the store, but the previous one (from before they appeared on the store), so it's not clear how to achieve what I want. I also updated the post.
It shouldn't matter. Have you tried running wsl --set-default-version 2 and then starting the instance?
@Ramhound yes, but uname -r still gives "4.4.0-19041-Microsoft" (ie., WSL 1).
Provide the output of the command I gave you, then after that output, include the output of wsl -l -v. If wsl --set-default-version 2 does "nothing" then you have forgotten to install something. Just to confirm you are running 21H1+?
23:48
@Ramhound I still have "There is no distribution with the supplied name." and Legacy is still set to WSL1.
So you don't have an instance named Ubuntu 2 you have an instance called Ubuntu-20.04 which is already WLS2 by the way. It is currently NOT running.
I'm well aware. I want to run Legacy with WSL2, not "Ubuntu20.04"
So why are you running commands that contain the word Ubuntu in them?
That isn't the name of the instance
Because at this time, I did not know the instance name.

wsl --set-version Legacy 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The Legacy distribution does not support WSL 2.
Based on the output you have two instances. One is named Legacy and the other is called Ubuntu-20.04 so you need to run the command wsl --set-version Legacy 2. I personally would shutdown the instance before you did this.
stand by.....
23:53
I guess that's the end word.
Your going to have to export the instance then import the instance.
explains your exact issue with a resolution
That's neat. Please update your answer with this so I can accept it.
I did not submit an answer
Actually yes. Then if you do, I'll accept it.
Many thanks for your time !

  last day (16 days later) »