wsl --import Unspecified Error / The specified network name is no longer available.
-
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.tarTrying to import the file yieldsUnspecified ErrororThe 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!
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.
Same for me. Unspecified Error each time I try the wsl --import command on a previously exported (in.tar) image
Same for me.
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.
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).
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...)
@KnuX that is expected. https://github.com/microsoft/WSL/issues/3974 see here for fixes :)
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
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.
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?
I got same sutiation, after that I set "swap=120GB" in .wslconfig file, it worked! @Kristof-Mattei this may be memory lack caused
@nimamahmoudi solution of importing as v1 then converting was the only one that worked for me.
Only thing that worked for me was importing as v1 and turning it into v2.
@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.
@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
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.
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.
Maybe a duplicate of issue #4735.
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!