Closed gyutaepark closed 1 year ago
I have the same error. WSL2 Kernel Version: 5.15.79.1-microsoft-standard-WSL2+ Distro Version: Ubuntu 20.04 Maybe we have image size limit to export?
/logs
Hello! Could you please provide more logs to help us better diagnose your issue?
To collect WSL logs, download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1
The scipt will output the path of the log file once done.
Once completed please upload the output files to this Github issue.
Click here for more info on logging
Thank you!
Same issue. Logs: WslLogs-2022-12-28_11-00-57.zip
Hello! Could you please provide more logs to help us better diagnose your issue? Thank you!
Hello, I have collected logs. Logs: WslLogs-2022-12-28_11-10-41.zip
@ssratkevich: Based on the logs it looks like you're trying to export a WSL1 distro, this is probably a different issue. Can you create a new issue to track this ?
@kele6ra: Based on your logs it looks like the directory where the .vhdx is doesn't exist, can you confirm that the directory exists ?
Apologies for the delay. Here are my logs. WslLogs-2022-12-28_20-51-43.zip
Thanks @gyutaepark. Looking at the logs, It looks like something is wrong with that distro registration.
Can you share the output of: wsl.exe -l -v
?
Does installing store WSL (via wsl.exe --install) help ?
Actually, having a deeper look it looks like store WSL is installed on your machine, but somehow inbox WSL gets invoked. Can you share the output of: wsl.exe --version
?
Interesting. I'm not sure whats causing that.
Can you share the output of:
wsl.exe -l -v
?NAME STATE VERSION * Ubuntu Stopped 2
Similarly,
Can you share the output of:
wsl.exe --version
?
WSL version: 1.0.3.0
Kernel version: 5.15.79.1
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.963
Is there any additional information that might help?
In case this might also help.
Ubuntu 22.04.1 LTS (GNU/Linux 5.15.79.1-microsoft-standard-WSL2 x86_64)
systemd = true
on /etc/wsl.conf
Hi.
@ssratkevich: Based on the logs it looks like you're trying to export a WSL1 distro, this is probably a different issue. Can you create a new issue to track this ?
I'm created new one yesterday.
https://github.com/microsoft/WSL/issues/9408
@gyutaepark: I wonder if you captured logs while the app was updating, can you try to capture logs again while wsl --export is running so I can compare the two executions ?
Of course. Please find the Logs below: WslLogs-2022-12-29_15-53-59.zip
I've ran the script once I've started the export process after shutting down wsl.
Ah I think that's the issue. @gyutaepark. Can you run the script first, then run wsl --export, and then stop the script ? This should capture the logs I need to root cause this
I hope this offers a better picture.
WslLogs-2022-12-29_16-04-33.zip
This time, I ran the log script -> Started the export process -> stopped the log script while the export was running.
@gyutaepark: I do see the export running in that logs, but I don't see the export error.
Sorry if my previous instructions were not clear. Can you please:
No worries. I should have just let it finish in the first place.
Thank you @gyutaepark.
Now I can see the actual issue:
bsdtar invoked oom-killer: gfp_mask=0x1100cca(GFP_HIGHUSER_MOVABLE
Looking at your .wslconfig, I see that the memory limit is 2GB and that swap is disabled, which is probably why bsdtar runs out of memory.
Can you try removing swap and memory from .wslconfig, then run: wsl.exe --shutdown and try exporting again ?
@OneBlue. Interesting. While I do have swap disabled for my wsl, the memory limit was set to 28 GB.
Still, removing the swap line did resolve the issue! The export process finished successfully for me.
Thanks @OneBlue. Should I close the issue?
Glad this worked ! Closing since the issue is resolved.
For anyone finding this via a search machine...
In my case, I experienced this error, when the temporary directory was on a drive with insufficient space for the exported tarball.
Hi, everybody
I get the same error, no success on creating .wslconfig
file with the following contents in my %USERPROFILE% directory
[wsl2]
memory=4GB # Limits VM memory in WSL 2 to 4 GB
processors=2 # Makes the WSL 2 VM use two virtual processors
But some strange fact is that I can export if I specify --vhd
option:
wsl --export Ubuntu "C:\WSL Images\Ubuntu_$(get-date -f yyyy-MM-dd).vhdx" --vhd
Any idea why is that? It worked so many times, and noting was changed...
Cheers
Hi, everybody I get the same error, no success on creating
.wslconfig
file with the following contents in my %USERPROFILE% directory[wsl2]
memory=4GB # Limits VM memory in WSL 2 to 4 GB
processors=2 # Makes the WSL 2 VM use two virtual processors
But some strange fact is that I can export if I specify
--vhd
option:wsl --export Ubuntu "C:\WSL Images\Ubuntu_$(get-date -f yyyy-MM-dd).vhdx" --vhd
Any idea why is that? It worked so many times, and noting was changed...
Cheers remove <.vhdx" --vhd> and add <">
Version
Microsoft Windows [Version 10.0.22621.963]
WSL Version
Kernel Version
5.15.79.1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
wsl --shutdown
wsl --export Ubuntu D:\Extra\wsl\20221220
Expected Behavior
WSL Exports a backup of itself into 20221220 file.
Actual Behavior
Export fails within 10s of seconds. Output file is created but the size does not change during this time. Different output file names were tested including
20221220.tar
and20221220.tar.gz
.Export in progress, this may take a few minutes. Exporting the distribution failed. Error code: Wsl/Service/WSL_E_EXPORT_FAILED
Diagnostic Logs
No response