Share via

Expected Time for WSL1 to WSL2 Conversion

Anonymous
2024-09-26T00:09:25+00:00

I hope this message finds you well.

I am currently in the process of converting a WSL1 instance to WSL2, but it seems to be taking much longer than expected. The system displayed a message saying that "this may take a few minutes," but it has now been running for a few days without completion. I would like to inquire about the expected duration for such a conversion and whether the process is proceeding normally.

Here are the details of my setup:

  • The WSL1 instance is located on a separate disk from the C drive (the disk is an SSD with around 500GB of capacity).
  • The size of the root directory is approximately 300GB.
  • My operating system is Windows 10.
  • The Vmmem process is consuming around 24GB of memory, with overall system memory usage at approximately 80%.
  • The disk being converted currently has only 2MB of free space, although there was more free space available before starting the conversion.
  • I am running the conversion command with administrative privileges using PowerShell, specifically with the command:
    wsl --set-version Ubuntu-22.04 2.

I understand that file system conversions can be time-consuming, but I would like to know how much time this process is typically expected to take.

Could you please advise on whether this duration is within normal expectations for a conversion of this size, and if there are any recommended steps I could take to expedite the process?

Thank you very much for your time and assistance.

Best regards,

Windows for home | Windows 10 | Settings

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
  1. Anonymous
    2024-09-26T07:36:19+00:00

    Hello, STOK

    Welcome to the Microsoft Community.

    Hello, thank you for your feedback on your issue here, the time to convert a WSL1 instance to WSL2 can vary depending on a number of factors, including the size of the filesystem and how much disk space is available.

    Depending on your situation, here are some insights and recommendations:

    1. Expected Duration

    Typical Time: For smaller WSL instances (a few gigabytes), the conversion usually takes only a few minutes. However, for larger instances (e.g. your 300GB root directory), it may take longer, up to several hours.

    Current situation: since your conversion has been running for a few days, this is not typical and indicates a possible problem.

    2.Factors affecting conversion time

    Disk space: Having only 2MB of free space on disk may affect the conversion process. wsl2 needs additional space for conversion and operation.

    Memory usage: High memory usage may slow down the process, especially if the system uses swap space.

    1. Recommendations

    Free up disk space: Try to free up as much space as possible on the disk where the WSL1 instance is stored, aiming for at least a few GB of free space.

    Check for errors: Perform a diagnostic on the disk to ensure that there are no problems causing delays. You can use the chkdsk utility from a command prompt.

    Monitor resource usage: Use Task Manager to monitor CPU and memory usage during the conversion. If other processes are consuming a lot of resources, shutting them down may help free up system resources.

    Terminate and retry: If the conversion does not complete after freeing up space, consider terminating the process and retrying the conversion command.

    Check logs and feedback: See if there are any logs or messages that indicate the cause of the delay. Sometimes additional output can provide clues as to what is happening.

    Conclusion

    If the issue is not resolved after freeing up space and following the above recommendations, you may consider creating a new instance of WSL2 and manually migrating the data in WSL1, as this may save time in the long run.

    Also, since the use of wsl is an advanced user usage feature, for more specialized help with wsl, you can also ask the GITHUB support mentioned at the bottom of the most page in the thread below for advice.

    Comparing WSL Versions | Microsoft Learn

    Image https://github.com/Microsoft/WSL/issues Sincerely hope that your question will be dealt with appropriately after contact the correct department. Thank you for your understanding! 

    Best regards

    Bobhe | Microsoft Community Support Specialist

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2024-09-27T04:03:21+00:00

    WSL2 Conversion Issue Resolved - Thank You for Your Help!

    Dear Bob.H,

    I wanted to thank you for your time and effort in helping me with my WSL2 conversion issue. Thanks to your suggestions, I was finally able to resolve the problem! Here's a quick recap of the steps I took, which ultimately led to the successful conversion:

    1. Freeing Up Disk Space: As you suggested, I moved unnecessary files off the disk where the conversion was taking place, increasing the available space from 2MB to about 50GB. Despite this, after waiting over 12 hours, the conversion process still didn’t complete and appeared to have stalled.
    2. Running chkdsk: I ran chkdsk to check for any errors, but none were found.
    3. Force Termination and Re-run: I tried forcefully terminating the conversion process and re-running it. Unfortunately, this led to an error: "The specified installation location is already in use. Error code: Wsl/Service/0x80070050".
    4. Handling the ext4.vhdx File: I noticed that a 100GB ext4.vhdx virtual image file had been generated. I moved this file to another disk, and then further cleaned up about 100GB from the root directory, resulting in a total of 200GB of free space. After re-running the conversion, it successfully completed in about 1-2 hours!

    Thanks to your suggestions, I was able to navigate through these steps and finally resolve the issue. I truly appreciate your help and advice, it made a big difference in getting everything sorted out.

    Best regards,

    1 person found this answer helpful.
    0 comments No comments