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 Export Failure. Error code: Wsl/Service/WSL_E_EXPORT_FAILED #11330

Closed
1 of 2 tasks
bLanark opened this issue Mar 20, 2024 · 5 comments
Closed
1 of 2 tasks

WSL Export Failure. Error code: Wsl/Service/WSL_E_EXPORT_FAILED #11330

bLanark opened this issue Mar 20, 2024 · 5 comments

Comments

@bLanark
Copy link

bLanark commented Mar 20, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3155]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

Linux version 5.15.146.1-microsoft-standard-WSL2 (root@65c757a075e2) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37)

Distro Version

Debian 11

Other Software

No response

Repro Steps

Try to export the WSL instance and it fails with Error code: Wsl/Service/WSL_E_EXPORT_FAILED

Expected Behavior

The export succeeds, and it produces a tar file.

Actual Behavior

Export in progress, this may take a few minutes.
Exporting the distribution failed.
Error code: Wsl/Service/WSL_E_EXPORT_FAILED

Diagnostic Logs

WslLogs-2024-03-20_17-48-57.zip

Attached logs, I also removed the:
memory=8GB

From my .wslconfig and restarted and re-ran the command and it still fails.

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@OneBlue
Copy link
Collaborator

OneBlue commented Mar 20, 2024

Thank you @bLanark.

Looking at the logs, it looks like your disk is failing to mount:

2281	False	Microsoft.Windows.Lxss.Manager	GuestLog	0	03-20-2024 10:50:29.640	"	"	"text: 	""[   65.139492] EXT4-fs error (device sdc): htree_dirblock_to_tree:1082: inode #75958: comm bsdtar: Directory block failed checksum ""
vmId: 	{08dde998-ca5c-46ed-96af-d6418dc13bc0}"				6956	22256	5		00000000-0000-0000-0000-000000000000		

Can you try to follow these instructions and see if that solves the issue ?

@bLanark
Copy link
Author

bLanark commented Mar 27, 2024

Hi,

I am getting this error:
Failed to attach disk 'C:\Users<name>\AppData\Local\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_SHARING_VIOLATION

I have three WSL instances:

wsl.exe --list
Windows Subsystem for Linux Distributions:
Debian (Default)
podman-machine-default
kali-linux

So its not because I only have a single instance. Not sure what is going on there.

@OneBlue
Copy link
Collaborator

OneBlue commented Apr 17, 2024

@bLanark: Try to run wsl --shutdown before trying to mount the disk.

@bLanark
Copy link
Author

bLanark commented May 9, 2024

Just adding to say I resolved this by changing the default WSL instance to be a different one. This allowed me to run the command succesfully as it was booting the instance I was trying to repair to run the e2fsck command. It now works and the export works now, thanks a ton @OneBlue

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