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

wsl --import Unspecified Error / The specified network name is no longer available. #4835

Closed
kristof-mattei opened this issue Jan 21, 2020 · 19 comments
Labels
distro-mgmt problems related to import, export, conversion

Comments

@kristof-mattei
Copy link

kristof-mattei commented Jan 21, 2020

  • Your Windows build number: Microsoft Windows [Version 10.0.19041.21]

  • What you're doing and what's happening:
    Exported Ubuntu from C Drive due to size issues. I now have a .tar sitting on D:\Ubuntu.tar
    Trying to import the file yields Unspecified Error or The specified network name is no longer available.
    Command executed: wsl --import Ubuntu-18.04 d:\WSL\Ubuntu-18.04\ d:\Ubuntu.tar

  • What's wrong / what should be happening instead:
    This shouldn't happen, the Distro should import.

  • For WSL launch issues, please [collect detailed logs] logs.zip
    Logs attached!

@kristof-mattei
Copy link
Author

Update:

When deleting /usr and /var from the tar the import works (WSL obviously doesn't work then...).

I'm suspecting either conflicts with the overlay2 fs (docker), and/or the fact that in many folders there are files which only differ by case, not by name.

@antonymarion
Copy link

Same for me. Unspecified Error each time I try the wsl --import command on a previously exported (in.tar) image

@davidwudv
Copy link

Same for me.

@nimamahmoudi
Copy link

nimamahmoudi commented Apr 19, 2020

What worked for me was importing the WSL 2 distribution as WSL 1 using --import ... --version 1, and then convert it to version 2 using --set-version.

@nimamahmoudi
Copy link

But obviously this is a temporary workaround. In my case, the import would cause the RAM utilization to go to about 95%, and then I would see the aforementioned error. It seems like there is something wrong with importing large image sizes (mine was about 18GB).

@KnuX
Copy link

KnuX commented May 2, 2020

Same here. @nimamahmoudi's method works but now running "wsl -d MyImportedDistrib" give me a root prompt instead of the correct user... ^^' (the import process can be speedup by excluding the install directory in defender...)

@kristof-mattei
Copy link
Author

@KnuX that is expected. #3974 see here for fixes :)

@CharlieTheProgrammer
Copy link

Ran into the same issue, which appears to be related to RAM. I'm on 8GB trying to import an image that is also about 8GB. I was able to get around this issue by temporarily increasing the virtual RAM to 16GB.

https://answers.microsoft.com/en-us/windows/forum/windows_10-performance/how-to-increase-virtual-memory-in-windows-10-a/46dacaf5-15cf-4f5d-9d5a-cba1401ae4c9

@jerrodrs
Copy link

jerrodrs commented Jun 5, 2020

I was getting this error on my WSL2 image which was 45GB. I ended up installing a new Ubuntu WSL2 instance then just copying over my vhdx file. Just had to setup my user again as it was logging in with
as root.

@alexvorobiev
Copy link

The import fails for me with the Unspecified error regardless of whether I try version 1 or version 2. I have 16G of memory, the image size is about 2G. Is there any way to diagnose further?

@stormysky
Copy link

I got same sutiation, after that I set "swap=120GB" in .wslconfig file, it worked! @kristof-mattei this may be memory lack caused

@ss44
Copy link

ss44 commented Jul 18, 2020

@nimamahmoudi solution of importing as v1 then converting was the only one that worked for me.

@charlysotelo
Copy link

Only thing that worked for me was importing as v1 and turning it into v2.

@adolgoff
Copy link

adolgoff commented Aug 2, 2020

@stormysky Where is the .wslconfig file stored for WSL2? Or if it's not existing you need to create it by your own?

For me importing as V1 and converting then has worked out, but I've been able to login as root by default after re-import (not sure if it's connected to converting). So had to patch the register to fix it to my primary OS user.

@stormysky
Copy link

stormysky commented Aug 6, 2020

@adolgoff .wslconfig need to created by own strored at current user path (c:\users\xxxx, xxx is current user), here is my configuration
[wsl2] memory=6GB swap=2GB

@bobbbay
Copy link

bobbbay commented Oct 27, 2020

None of these work for me, I've tried importing as v1 as well as modifying .wslconfig. No luck. Also tried wsl --shutdown and then issuing that command.

@billy-tsai
Copy link

billy-tsai commented Apr 16, 2021

I solved this problem after compact my wsl vdisk:
wsl --terminate ubuntu-18.04
diskpart
DISKPART> select vdisk file=%USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx
DISKPART> compact vdisk
After that, please try wsl export and wsl import again.

@adrastogi adrastogi added the distro-mgmt problems related to import, export, conversion label May 6, 2021
@Yogurt4
Copy link

Yogurt4 commented May 9, 2021

Maybe a duplicate of issue #4735.

Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distro-mgmt problems related to import, export, conversion
Projects
None yet
Development

No branches or pull requests