locked
Failed when trying to convert Ubuntu VM from WSL to WSL2 RRS feed

  • Question

  • ### Problem Description ###
    After upgrading to Windows 10 pro 2004 (build 19041.264), I tried to convert existing Ubuntu VM from WSL to WSL2 using this procedure.
    https://docs.microsoft.com/en-us/windows/wsl/install-win10

    The Hyper-V VM conversion from WSL to WSL2 has return me an error.

    The reproducible procedure is as follows

    1) I ran the following comamnd

    wsl --set-version Ubuntu-20.04 2

    2) I've got this error in the first attempt "WSL2: Virtual hard disk files must be uncompressed and unencrypted and must not be sparse"

    3) after I tried to re-run the same command, the error will change to this error "The operation timed out because a response was not received from the virtual machine or container."

    Please see output of "wsl -l -v" below.
    > wsl -l -v
      NAME                   STATE           VERSION
    * docker-desktop-data    Running         2
      docker-desktop         Running         2
      Ubuntu-20.04           Stopped         1


    ### What I've tried ###
    1) I tried to following suggestion procedure in this link "https://github.com/microsoft/WSL/issues/4103#issuecomment-501885534", but it's not working the same error in reproducible step number 3 still persist.
    2) I can use WSL2 with docker-desktop properly without any error as you can see from "wsl -l -v" output above.
    3) I've also test with other linux image from Microsoft Store e.g. Kali Linux, Debian and got the same error.


    ### What I want ###
    Please help me resolve this issue. I need to use Ubuntu in WSL2 for working with docker-desktop seemlessly.
    Monday, June 8, 2020 2:51 AM