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

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

Open
1 of 2 tasks
borfus opened this issue Jul 4, 2023 · 2 comments
Open
1 of 2 tasks

Comments

@borfus
Copy link

borfus commented Jul 4, 2023

Windows Version

Microsoft Windows [Version 10.0.19045.3086]

WSL Version

1.2.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Ubuntu 20.04

Other Software

No response

Repro Steps

  1. Open PowerShell as Admin
  2. Run wsl --set-version Ubuntu 2 or wsl --export Ubuntu C:\Users\user\Desktop\export.tar

Expected Behavior

Upgrade from WSL 1 to WSL 2 for distribution Ubuntu

Actual Behavior

Received the following output:

PS C:\WINDOWS\system32> wsl --set-version Ubuntu 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion in progress, this may take a few minutes.
Exporting the distribution failed.
Error code: Wsl/Service/WSL_E_EXPORT_FAILED

Diagnostic Logs

Below are log files for running wsl --set-version Ubuntu 2 and wsl --export Ubuntu C:\Users\user\Desktop\export.tar (in that order)
WslLogs-2023-07-04_15-41-46_Set_Version_2.zip
WslLogs-2023-07-04_15-38-56_Export.zip

@borfus
Copy link
Author

borfus commented Jul 4, 2023

The closest information I could find on this error message was from a previous issue #9382. The final solution for this specific person looks like it was a modification to their .wslconfig to remove memory limits that were previously set. Unfortunately this doesn't seem to be my problem as I don't have a .wslconfig or wsl.conf (at least that I'm aware of).

I attempted to read the log files and solve the issue myself, but I'm a complete novice when it comes to the Windows Performance Analyzer and I wasn't able to make any progress on that end.

@RocLoong
Copy link

I had the same issue as above:

  1. I ran wsl --set-version Ubuntu-20.04 2 which produced this error Error code: Wsl/Service/WSL_E_EXPORT_FAILED.
  2. I then tried created C:/users/<user-name>/.wslconfig, and repeated step 1.
[wsl2]
memory=4GB # Limits VM memory in WSL 2 to 4 GB
processors=2 # Makes the WSL 2 VM use two virtual processors

Still no luck.

  1. I then tried wsl --export Ubuntu-20.04 ubuntu.tar with the intention of exporting it and then re-importing with the version set to 2, but it once again produced the same error Error code: Wsl/Service/WSL_E_EXPORT_FAILED.
  2. I then restarted my PC, and repeated step 1 once again. Then it worked.
wsl --set-version Ubuntu-20.04 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion in progress, this may take a few minutes.
The operation completed successfully.

I leave this here in the hope that time I lost, is time gained for another. https://xkcd.com/979/

I restarted my PC, but it doesn't solve problem

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

2 participants