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

Conversion in progress... stuck? #5344

Closed
stevenh opened this issue Jun 5, 2020 · 31 comments
Closed

Conversion in progress... stuck? #5344

stevenh opened this issue Jun 5, 2020 · 31 comments

Comments

@stevenh
Copy link

stevenh commented Jun 5, 2020

Environment

Microsoft Windows [Version 10.0.19041.264]
Converting from WSL 1 to WSL 2

Steps to reproduce

wsl --set-version Ubuntu 2, --set-default-version 2

Expected behavior

Conversion says its should take a few minutes

Actual behavior

Conversion has now been running for nearly an hour and no sign of activity.

I have checked in a seperate window and it does report that it's still converting.

C:\WINDOWS\system32>wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu                 Converting      1
  docker-desktop-data    Running         2
  docker-desktop         Running         2

Is there any way to check on the actual progress, could I have something in my environment which is either taking a long time or has hung?

I obviously don't want to kill the upgrade as that could cause me to loose all of the work I have in WSL.

@therealkenc
Copy link
Collaborator

Use task manager and see if vmmem is doing any disk activity (the 'Disk' column of the 'Processes' tab). Unless it has totally flatlined, give it as much time as you can stand. Have a look at memory as well, you might be hitting #4669.

@stevenh
Copy link
Author

stevenh commented Jun 5, 2020

Wasn't doing too much disk access but was using 32GB of RAM (all of it).

Its just finished so did it did work, but it took 2 1/2 hours.

@stevenh
Copy link
Author

stevenh commented Jun 5, 2020

Closing as duplicate

@th0ger
Copy link

th0ger commented Oct 1, 2020

The title of this issue says it all: Conversion in progress... stuck?
Please consider reopening this issue with the intent of impementing some kind of progress bar.

Slow progress may be caused by insufficient ram #4669 or Antivirus/Window Defender or anything else. But that does not imho make this issue a dup.

@hritik5102
Copy link

Depending on how large your root file system was, it can take a decent amount of time. it took me about 30 minutes to convert from WSL 1 => WSL 2.

image

@ak2783934
Copy link

are you sure that it takes 30 minutes or so? Cuz in my case, it never got completed

@hritik5102
Copy link

Yes, it's got completed within 30-40 mins I guess.

Actually, this problem was face by many folks/developers out there, so I think you're not the only one.

Read this thread, you'll understand : Reddit - WSL 2 conversion taking too long

I hope it helps :)

@Biswa96
Copy link

Biswa96 commented Mar 13, 2021

It is faster to install a GNU/Linux distribution in WSL2 than converting from WSL1 (ext4 >>>> NTFS).

@therealkenc
Copy link
Collaborator

There was some discussion of a progress indicator in #5403 (message) ⬅️ #5344. Closest thing on the books is #5161.

@otakutyrant
Copy link

It had sucked almost one hour and when I was taking a screenshot to post here, it suddenly finished! So I posted the result here to stimulate more patience.

However. The official prompt for the conversion should be warning users that it will takes dozens of minutes rather than some minutes!

@jasonminsookim
Copy link

jasonminsookim commented Apr 27, 2021

Hey all, I left it overnight and am still having STATE: Installing. This is on a work computer which heavily utilizes One Drive. Could this cause the install to be even slower?

I have also disabled Windows Defender

@blacksheepaul
Copy link

It takes me over 3 hour, and it still has not finished yet

@kasradzenika
Copy link

I had wsl console (from windows/system32) open in the background (didn't notice) when I started the update in PowerShell. It was running good 30 minutes when I noticed that the wsl console was displaying a message that it's terminated. But wsl didn't close. It kept consuming 20% of the CPU. Disk usage was on 0. I couldn't kill the wsl process any way I tried so I just restarted my laptop and updated in 5 minutes (or less idk).

@alan-gu
Copy link

alan-gu commented Aug 26, 2021

I just finished converting ubuntu 20.04 to wsl2.
In my case, I waited about 2 hour for my rather new 20.04 distro to be converted until I decided there must be something wrong.
I canceled converting and found all the wsl comand stopped working in powershell.
I then restarted my PC and tried again.
This time it took less than 10 min.

@mrjrieke
Copy link

I was connected to VPN trying to convert to WSL2... vmmem flatlined. Disconnected from VPN and saw CPU go back up to .1%... so looked like it was trying to do something... Disk still at 0MB/s however.

@mindplay-dk
Copy link

mindplay-dk commented Jan 1, 2022

After about half an hour of Vmmem maxing out the CPU and 8 GB of RAM, memory usage eventually dropped back down to 1 GB.

I almost gave up, seeing as there was apparently no CPU activity and no output on the console - but after 10-15 minutes of inactivity, the command finally returned with "conversion complete".

Yeah, there ought to be a progress indicator of some sort for an operation this long.

@novativmedias
Copy link

So I don't know what it's worth but I was stuck for a little while and I simply dragged the Powershell Window into another of my screens and suddenly the conversion was complete ... weird coïncidence may be? But may be it could help other ppl so I have to tell you guys.

@amzon-ex
Copy link

While trying to import a 5GB tar file, wsl consistently fails saying "Importing distribution failed" after like 10 minutes trying to convert. Interestingly, when I try to import via LxRunOffline and then try to convert to wsl2, it fails again, with the same error message "Importing distribution failed."

@Biswa96
Copy link

Biswa96 commented Apr 7, 2022

Can you use a smaller tar file to import then install the software?

@syffs
Copy link

syffs commented Sep 26, 2022

it consistently gets stuck, I let it run for 36 hours multiple times:

  • at the start, there's some CPU/Disk activity for about 30 mins
    • VmemmWSL stacks up to 800MB of RAM
    • I can see bsdtar working
  • Past that point, it just gets stuck with absolutely no CPU/disk activity, and can remain in this state forever
  • I've tried disabling Windows Defender real time protection, but it doesn't help.

I've also tried exporting / reimporting the distribution, while the export works well, the import gets stuck:

wsl --export <distro> wsl.tar
wsl --import <distro> C:\Users\me\wsl\<distro> .\wsl.tar

@arnavmehta7
Copy link

@syffs hey did it got solved

@syffs
Copy link

syffs commented Oct 22, 2022

@arnavmehta7 no, I gave up for now... wsl is a tool for me, can't spend hours/days setting up my tools, delaying the actual work.

@Allancgx
Copy link

Allancgx commented Nov 3, 2022

Ctrl + c to terminate the process, restart the system, and then try conversion again fixed the issue. It finished in less than a minute after the restart. I was trying to convert from version 1 to version 2 using wsl --set-version Ubuntu 2 in powershell

@afxgroup
Copy link

afxgroup commented Nov 7, 2022

Same problem here on a 32GB machine and windows 11. I've stopped it after 3 DAYS of conversion. with dots that was coming.. I've restarted it now disabling firewall to see if helps. However a percentage of completition would be useful..

image

@hybby
Copy link

hybby commented Nov 9, 2022

Adding another piece of anecdata - I hit this issue as well. Was waiting for about 30 minutes with no apparent activity in Task Manager.

I pressed CTRL+C to quit the process, restarted laptop, ran wsl.exe --set-version Ubuntu 2 in an Admin Powershell and it completed in two minutes.

I made sure not to start the WSL1 version before doing this, so not sure if it made a difference.

But yes, a progress bar would be nice. :)

@otakutyrant
Copy link

WE NEED A PROGRESS BAR!

@thelem
Copy link

thelem commented Jul 5, 2023

Mine was running for a while with very little disk activity. In another window I ran wsl --list -v which showed 1 instance running and one instance converting. I then ran wsl --shutdown which caused my first window to output:

Exporting the distribution failed.
Error code: Wsl/Service/WSL_E_EXPORT_FAILED

I've started the conversion again and it's showing heavy disk usage so looks like it is working now.

Edit: Yes, completed in a little more than the time it took me to write the above comment.

@mkrjn99
Copy link

mkrjn99 commented Nov 23, 2023

I figured a way to heuristically measure the progress of this: you can run a du -sh in your Linux root to get its size, and note the size of your C: drive before running the set-version. Then when you start the conversion which basically creates a new FS copying the entire Linux structure. By the amount of extra storage being consumed in C: drive compared to initial you can guess the progress.

For example, if my Linux system had an original size of 8G, and my C: drive had 32G left in the beginning, and during the process 27G is left, the progress so far is (32-27)/8 = 62.5%

@Aldo-f
Copy link

Aldo-f commented Nov 27, 2023

I'm sorry, but the mention of Conversion in progress, this may take a few minutes... is no longer applicable at all. Better check in advance how much space there is and available RAM to give a better indication of the duration,
So that you can still cancel it or start at a later time (after the working day...).

@bsplosion
Copy link

bsplosion commented Dec 14, 2023

I figured a way to heuristically measure the progress of this: you can run a du -sh in your Linux root to get its size, and note the size of your C: drive before running the set-version. Then when you start the conversion which basically creates a new FS copying the entire Linux structure. By the amount of extra storage being consumed in C: drive compared to initial you can guess the progress.

For example, if my Linux system had an original size of 8G, and my C: drive had 32G left in the beginning, and during the process 27G is left, the progress so far is (32-27)/8 = 62.5%

Even better, you can watch the VHDX file being built in this location (though I'm not sure if it's exactly the same hash for everyone):
C:\Users\{YOUR USER}\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState

Separately, I came across this issue initially because of the hang but found there were 2 things happening which were going to cause issues with it ever finishing:

  1. I'd downgraded from WSL2 to WSL1 at one point, but there was a lingering VHDX file in that location from the downgrade which had to be removed, and
  2. I ran out of disk partway through the operations, and despite quickly freeing up space, the VHDX completely stopped growing despite there being no indicator on the command line that there was an error.

Much more messaging for this operation would be helpful, both in progress tracking and in communicating errors. It's so opaque as it stands today.

@vicianm
Copy link

vicianm commented Feb 16, 2024

tl;dr

In my case, no conversion was needed. I've just updated (wsl --update) to the newest version (wls --version = 2.0.9.0) and downloaded the distro from scratch (wsl --install -d Ubuntu-22.04). The downloaded distro was already of v2 (check it with wsl -l -v).

Long story

  • My first problem was, that I launched upgrade (wsl --set-version <distro> 2) without ensuring, that WSL is stopped.
  • Then I've found out, that the wsl itself should be also updated.
wsl --update
wsl --shutdown
wsl --set-version <distro> 2
  • Then the conversion finally started, but there was really no CPU load on vmmem.
  • I killed the process.
  • Checked my disk space - only few MBs left.
  • I deleted some apps to have few GBs available.
  • I've deleted the old <distro> by first uninstalling it with "Add Remove Programs" and then by subsequent call to wsl --unregister <distro>.

Then I've read somewhere, that it's possible to download <distro> ready for WSL 2.
I've checked version of my wsl installation (wsl --version). It was already 2.0.9.0 (probably upgraded by previous call to wsl --update).

After all this, I've decided to install Ubuntu-22.04 (wsl --install -d Ubuntu-22.04), which was already of v2.

> wsl -l -v
  NAME            STATE           VERSION
* Ubuntu-22.04    Running         2 

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