LpCodes/Moving-WSL-Distribution-to-Another-Drive

After importing the distribution, the wsl version became 1 instead of 2

sashakboo opened this issue · 0 comments

After importing the distribution, the wsl version became 1 instead of 2

wsl -l -v
  NAME                   STATE           VERSION
* Debian                 Stopped         1
  docker-desktop         Stopped         2
  docker-desktop-data    Stopped         2

To fix it, run the command:
wsl --set-version Debian 2

It may be possible to explicitly specify which version of WSL to use when importing:

wsl --import Debian "D:\wsl\Debian" "D:\wsl_export\debian-ex.tar" --version 2