WSL: WSL --import hangs when creating ext4.vhdx
Version
10.0.22621.521
WSL Version
- WSL 2
- WSL 1
Kernel Version
5.15.68.1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
- Extract image from Store appxbundle.
- Download from here https://aka.ms/wslubuntu2204
- Change extension from appxbundle to zip.
- Open zip and extract Ubuntu_2204.0.10.0_x64.appx
- Change Ubuntu_2204.0.10.0_x64.appx to Ubuntu_2204.0.10.0_x64.zip
- Extract install.tar.gz
- Run wsl --import Ubuntu-22.04 $env:TEMP C:\wsl\install.tar.gz --version 2 (I also tried with out --version 2)
Expected Behavior
WSL imports the distro and finishes create the vhdx.
Actual Behavior
Watching the vhdx being created it stops growing in size and never fully imports and hangs at “Import in progress, this may take a few minutes.”
This behavior is very inconsistent. It will sometimes complete the import but has a 80+% failure rate of a successful import.
Diagnostic Logs
I am working on getting the logs out of the environment but need to be requested. Here is what I am seeing on the Microsoft.Windows.Lxss.Manager Error Event: D:\a\1\s\src\windows\wslcore\lib\WslCoreInstance.cpp 0x8000FFFF Expected 4 bytes, but received 0
I do ctrl + c to end the import.
I am not using any wsl.config file.
ACL.txt:
Path : Microsoft.PowerShell.Core\FileSystem::C:\ProgramData\Microsoft\Windows\WindowsApps
Owner : BUILTIN\Administrators
Group : NT AUTHORITY\SYSTEM
Access : NT AUTHORITY\SYSTEM Allow FullControl
BUILTIN\Administrators Allow FullControl
Audit :
Sddl : O:BAG:SYD:P(A;;FA;;;SY)(A;;FA;;;BA)
appxPackage.txt:
Name : MicrosoftCorporationII.WindowsSubsystemForLinux
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US
Architecture : X64
ResourceId :
Version : 0.68.4.0
PackageFullName : MicrosoftCorporationII.WindowsSubsystemForLinux_0.68.4.0_x64__8wekyb3d8bbwe
InstallLocation : C:\Program
Files\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForLinux_0.68.4.0_x64__8wekyb3d8bbwe
IsFramework : False
PackageFamilyName : MicrosoftCorporationII.WindowsSubsystemForLinux_8wekyb3d8bbwe
PublisherId : 8wekyb3d8bbwe
IsResourcePackage : False
IsBundle : False
IsDevelopmentMode : False
NonRemovable : False
IsPartiallyStaged : False
SignatureKind : Developer
Status : Ok
HKLM.reg:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Lxss]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Lxss\DiskMounts]
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Lxss\DiskMounts\S-1-5-21-4086326541-2204785291-2390860269-3336]
P9NP.reg
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\P9NP]
"Description"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
5c,00,70,00,39,00,6e,00,70,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,30,\
00,31,00,00,00
"DisplayName"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
5c,00,70,00,39,00,6e,00,70,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,30,\
00,30,00,00,00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\P9NP\NetworkProvider]
"DeviceName"="\\Device\\P9Rdr"
"DisplayName"=hex(2):40,00,25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,\
00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,\
5c,00,70,00,39,00,6e,00,70,00,2e,00,64,00,6c,00,6c,00,2c,00,2d,00,31,00,30,\
00,30,00,00,00
"Name"="Plan 9 Network Provider"
"ProviderPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,\
00,74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
70,00,39,00,6e,00,70,00,2e,00,64,00,6c,00,6c,00,00,00
"TriggerStartCompleteNotification"=hex:75,10,bc,a3,54,1e,c6,41
"TriggerStartNotification"=hex:75,08,bc,a3,54,1e,c6,41
"TriggerStartPrefix"=hex(7):77,00,73,00,6c,00,2e,00,6c,00,6f,00,63,00,61,00,6c,\
00,68,00,6f,00,73,00,74,00,00,00,77,00,73,00,6c,00,24,00,00,00,00,00
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 22 (8 by maintainers)
Update on this: We have been able to reproduce this issue we have traced it to a bug in the Linux kernel we ship. This bug was introduced with the 5.10 update. We’re working on building a kernel with the fix.
Indeed the new kernel was published with 0.70.8, but that package has only been released to insider. I’ll leave this issue open until the fix is released publicly.
If you watch the vhdx that gets created at the install location, watch it grow as you start if it stops for more than 15-30 seconds and it doesnt say complete, kill the process and restart it. Took me 10 tries but my 12.5GB tarball finally imported just took a lot of retries. Not sure why, but it seems to have worked properly finally.
I checked and it is not disabled.
There is an override set for ExtExport.exe though. Do you see that?
I tried turning that off and it did not change the result.
Do you have control flow guard disabled in Windows Security? After seeing a hyper-v access error in event viewer I google it and thats what it shows. I turned CFG back on and now it works !