-
Notifications
You must be signed in to change notification settings - Fork 815
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
WSL2 Conversion failed #4102
Comments
@mscraigloewen @benhillis - transferring from Twitter. :) |
Thanks for posting, could you please collect logs during the failed conversion? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-detailed-logs |
Here you go. |
Interesting... when converting the filesystem to the ext4 vhd, there are a bunch of errors about the hard link target not existing, for example:
I'll dig into this a bit more, thanks for reporting! |
#metoo
Conversion in progress... takes longer than it did when i was testing with non-insiders internal build with feature flag enabled.... Then fails with "Unspecified error" |
@johnturek I got this, but fixed by freeing up disk space from ~10gb free to 22gb free. Not sure what the minimum is. Maybe it needs a temp space to work in? |
I had almost the exact same experience. I had about 10gb free and it failed with 'Unspecified error". I freed up 23gb, ran command again and it succeeded. |
This is very useful, I think there are a couple issues here, the "Conversion Failed" issue and the "Unspecified error" failure, both with different root causes. In both cases I should plumb more information back to the user. That would at least make it more clear that disk space is the issue for some of these failures. |
I've found a way to help me diagnose this issue, if you are unable to convert to WSL2, could you run this command from WSL1 and share any stderr output?
|
: tar format cannot archive socket: tar format cannot archive socket |
@dsolodow - Was the exitcode 0? |
Yes. |
I've had Unspecified error and Conversion failed. I'm converting my Ubuntu 18.04 distro I've tried from regular and run-as-admin prompts and it makes no difference Is there any way to really debug/fix this? |
@benhillis I just ran
and it completed with no output or error message |
@benc-uk - Interesting, would you be able to take a trace? |
@benhillis using the instructions here? https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-detailed-logs and logman.exe ?? |
@benc-uk - Correct. |
Try this test:
|
@Biswa96 - You can import directly to WSL2, it will be much faster. |
It looks like extracting the tar file is failing due to this check in libarchive: libarchive/libarchive#596 @gperciva - I create and extract a tar stream and I'm hitting warnings about hard link targets not existing, and bsdtar is returning a non-zero exit code. Is there any way to work around this issue by creating or extracting the tar with different set of arguments? Here's what I do today
|
I'm also getting "Conversion Failed", what info can I contribute to be useful? |
libarchive/libarchive#596 just gives a reason why the extract fails. Before that, libarchive would fail silently on that example. The next step in this issue is to figure out why you're trying to make a hard link to a file which doesn't exist. |
@gperciva - Thanks, digging into that now. |
I get the following error when trying to convert:
Not sure if this is the same error or something different. I've collected logs if it the problem is not simply that you can't have a encrypted C:\ OS drive. If I try running powershell as admin, I get a different error:
Windows version 1903 build 18922.1000 |
@cleemesser your issue looks to be a duplicate of #4103 I'd recommend following the discussion there. |
I have the same issue, but clearing out /tmp didn't help. |
worked for me. I was getting below error. I freed up almost 5gb(from ~11gb to 16gb ) but during the conversion the memory consumption by |
Same issue with message:
deleting tmp folder worked for me 🍻 |
Here is another instance of the conversion failing:
Hardware: Surface Book 2.
This was output after about ten minutes of waiting. |
Another instance here. The error occurred after 10-20 minutes.
|
I ran into this error as well. Deleting /tmp did not work. Temporarily disabling Windows security did work. |
I fixed the links and the conversion worked as well.
|
For me this was triggered by a slightly different error. I had metasploit installed in my WSL, and had the directory whitelisted. The process of converting over triggered windows defender and caused this error. FWIW Running an |
Took about an hour for me, before finishing without problem. Didn't need to do any of the workarounds/suggestions here. Windows 10 pro, version 2004. CPU: 12-core 3900x, RAM: 32GB, SSD: 1TB free. Perhaps this log message should be amended to better reflect the typical wait time? |
Had the same issue:
I removed Ruby, which allowed me to upgrade the WSL version. Then I reinstalled Ruby again. |
+1 for errors on In my case, Then the conversion succeeded. |
Before I got a lot of
strace -ff bsdtar....
There seems to be a very strange file in /etc.
|
Hi, this is the error I'm finding:
|
Also conversion failed. "Write to restore size failed " error. Importing the distribution failed.
./usr/bin/qemu-system-unicore32: Write failed
./usr/bin/qemu-system-x86_64: Write to restore size failed
./usr/bin/qemu-system-x86_64-microvm: Write to restore size failed
./usr/bin/qemu-system-xtensa: Write to restore size failed
./usr/bin/qemu-system-xtensaeb: Write to restore size failed
./usr/bin/qt-faststart: Write to restore size failed
./usr/bin/qterm: Write to restore size failed
./usr/bin/querybts: Write to restore size failed
./usr/bin/racc2.7: Write to restore size failed
./usr/bin/racc2y2.7: Write to restore size failed
./usr/bin/rake: Write to restore size failed
./usr/bin/randpkt: Write to restore size failed
./usr/bin/ranlib: Write to restore size failed
./usr/bin/rar: Write to restore size failed
./usr/bin/rawshark: Write to restore size failed
./usr/bin/rcp: Write to restore size failed
./usr/bin/rdf2bin: Write to restore size failed
./usr/bin/rdf2com: Write to restore size failed
./usr/bin/rdf2ihx: Write to restore size failed
./usr/bin/rdf2ith: Write to restore size failed
./usr/bin/rdf2srec: Write to restore size failed
./usr/bin/rdfdump: Write to restore size failed
./usr/bin/rdflib: Write to restore size failed
./usr/bin/rdma: Write to restore size failed
./usr/bin/rdoc: Write to restore size failed
./usr/bin/rdoc2.7: Write to restore size failed
./usr/bin/rdx: Write to restore size failed
./usr/bin/readelf: Write to restore size failed
./usr/bin/readmsg: Write to restore size failed
./usr/bin/readmsg.mailutils: Write to restore size failed
./usr/bin/realpath: Write to restore size failed
./usr/bin/regexp-assemble: Write to restore size failed
./usr/bin/rename.ul: Write to restore size failed
./usr/bin/renice: Write to restore size failed
./usr/bin/reordercap: Write to restore size failed
./usr/bin/reportbug: Write to restore size failed
./usr/bin/reset: Write to restore size failed
./usr/bin/resize: Write to restore size failed
./usr/bin/resizepart: Write to restore size failed
./usr/bin/resolvectl: Write to restore size failed
./usr/bin/rev: Write to restore size failed
./usr/bin/rgrep: Write to restore size failed
./usr/bin/ri: Write to restore size failed
./usr/bin/ri2.7: Write to restore size failed
./usr/bin/rlogin: Write to restore size failed
./usr/bin/routef: Write to restore size failed
./usr/bin/routel: Write to restore size failed
./usr/bin/rpcgen: Write to restore size failed
./usr/bin/rrsync: Write to restore size failed
./usr/bin/rsh: Write to restore size failed
./usr/bin/rsync: Write to restore size failed
./usr/bin/rsync-ssl: Write to restore size failed
./usr/bin/rtmpdump: Write to restore size failed
./usr/bin/rtstat: Write to restore size failed
./usr/bin/ruby: Write to restore size failed
./usr/bin/ruby2.7: Write to restore size failed
./usr/bin/run-mailcap: Write to restore size failed
./usr/bin/run-with-aspell: Write to restore size failed
./usr/bin/runcon: Write to restore size failed
./usr/bin/rview: Write to restore size failed
./usr/bin/rvim: Write to restore size failed
./usr/bin/rxvt: Write to restore size failed
./usr/bin/rxvt-unicode: Write to restore size failed
./usr/bin/sanstats: Write to restore size failed
./usr/bin/sanstats-10: Write to restore size failed
./usr/bin/sanstats-9: Write to restore size failed
./usr/bin/savelog: Write to restore size failed
./usr/bin/schroot: Write to restore size failed
./usr/bin/scp: Write to restore size failed
./usr/bin/scrapy: Write to restore size failed
./usr/bin/screen: Write to restore size failed
./usr/bin/script: Write to restore size failed
./usr/bin/scriptlive: Write to restore size failed
./usr/bin/scriptreplay: Write to restore size failed
./usr/bin/sdiff: Write to restore size failed
./usr/bin/see: Write to restore size failed
./usr/bin/select-default-iwrap: Write to restore size failed
./usr/bin/select-editor: Write to restore size failed
./usr/bin/sensible-browser: Write to restore size failed
./usr/bin/sensible-editor: Write to restore size failed
./usr/bin/sensible-pager: Write to restore size failed
./usr/bin/seq: Write to restore size failed
./usr/bin/sessreg: Write to restore size failed
./usr/bin/setarch: Write to restore size failed |
For me, the problem was insufficient disk space caused by large media files in my WSL home directory. Freeing up some disk space and removing the larger files resolved the problem completely. |
Same issue:
|
I ran into quite a few issues when converting from WSL 1 to WSL 2. I'll try to detail my environment and the journey I took to work around them. Environment:
I had just updated my system to the v2004 to upgrade to WSL 2. I had to enable the
The first issue I ran into when running PS C:\Users\XXX> wsl --set-version WLinux 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Exporting the distribution failed.
: tar format cannot archive socket: tar format cannot archive socket: tar format cannot archive socket: tar format cannot
archive socket: tar format cannot archive socket: tar format cannot archive socket: tar format cannot archive socket: tar
format cannot archive socket: tar format cannot archive socket: tar format cannot archive socket: tar format cannot
archive socket: tar format cannot archive socket: tar format cannot archive socket: tar format cannot archive socket: tar
format cannot archive socket: tar format cannot archive socket: tar format cannot archive socket: tar format cannot
archive socket: tar format cannot archive socket: tar format cannot archive socket: tar format cannot archive socket: tar
format cannot archive socket: tar format cannot archive socket: tar format cannot archive socket: tar format cannot
archive socket: tar format cannot archive socket: tar format cannot archive socketbsdtar:
PS C:\Users\XXX> I found this page and did some of the suggestions. I did a PS C:\Users\XXX> sudo /mnt/c/Windows/System32/lxss/tools/bsdtar -C / -c --one-file-system --xattrs -f /dev/null . &> ./bsdtar-output.log
I then grepped for grep bsdtar: ./bsdtar-output.log I re-ran the bsdtar command to see if there were any other errors. This time it completed successfully! 👍 PS C:\Users\XXX> wsl --set-version WLinux 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Exporting the distribution failed.
PS C:\Users\XXX> I also noticed from another thread in #4394 a comment about RAM being filled up. I have 16GB of RAM and even after a reboot and starting at around 6GB of usage, it would always fill up.
I also tried re-running the set version command multiple times as people have had it succeed the second time. Mine did not. 😢
So I decided to try a manual PS C:\Users\XXX> wsl --export WLinux C:\Users\XXX\WLinux.tar.gz
Exporting the distribution failed.
PS C:\Users\XXX>
Now I was wondering since importing takes a PS C:\Users\XXX> wsl sudo /mnt/c/Windows/System32/lxss/tools/bsdtar --exclude="/dev/*" --exclude="/proc/\*" --exclude="/sys/\*" --exclude="/tmp/\*" --exclude="/run/\*" --exclude="/mnt/\*" --exclude="/media/\*" --exclude="/lost+found/\*" --exclude="\*\*/node_modules/\*" -C / --xattrs --one-file-system -czpvf '/mnt/c/Users/XXX/WLinux-full.tar.gz' .
Once I created the export archive, I then created a new folder path to install this to as required by the I ran the import command, while specifying version 2 and a new distro name as PS C:\Users\XXX> wsl --import WLinux2 C:\WSL\2\WLinux\ C:\Users\XXX\WLinux-full.tar.gz --version 2 I then set the default distro to PS C:\Users\XXX> wsl --set-default WLinux2 It worked! Except it would always log in as root, so I finally found how to set a default user to the distro since I couldn't run the distro command to set it (e.g.
This also worked and my user was auto-logged in. Another issue I found was my DNS was broken and I couldn't resolve links. I found this page and solved it by changing the
I then set the default version to 2, so if I install any other distros in the future. PS C:\Users\XXX> wsl --set-default-version 2 That was my journey and took about a day to finally get working, but I did it and it now runs nicely! Hopefully this can help someone else that fell into problems like these upgrading from WSL 1 to WSL 2. |
I am facing an issue upgrading and I can watch my free disk space going down as the conversion happens, why does the conversion require so much spare disk space? I have 30GB free when I started and this goes down to nothing and then the conversion fails at that point. |
I only had to do the latter to fix this. |
Thanks. It worked in my case. |
Before --> All drives swap space off. Activate (auto) swap space on drive c: has worked for me. |
I had the same issue with |
Hey everyone, it was my antivirus which was troubling bsdtar, knocked it out for few minutes to let bsdtar do its thing. Before
After
Bad boy kaspersky. |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Windows version: Insider Fast 19817 Pro x63
What I expected:
Convert installed WSL distro (Ubuntu) to wsl2
What happened:
message stating that conversion failed
The text was updated successfully, but these errors were encountered: