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

Unexpected WSL error for both Docker Desktop and Linux distribution installing, with wierd error code 0x8007001f #11402

Open
1 of 2 tasks
CSHCY opened this issue Apr 1, 2024 · 7 comments

Comments

@CSHCY
Copy link

CSHCY commented Apr 1, 2024

Windows Version

Microsoft Windows [Version: 10.0.22621.3374]

WSL Version

2.1.5.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.146.1-2

Distro Version

None(Cannot install)

Other Software

Docker Desktop Windows, Docker version 25.0.3, build 4debf41

Repro Steps

  1. Download Docker Desktop Windows at first, run the Docker Desktop Installer.exe to install Docker Desktop 4.28.0(139021)
  2. After installed, I should complete the installation of Docker Desktop by ticking the choice using recommended settings(requires administrator password). Surely I did and there was a prompt reading : "C:\Program Files\Docker\Docker\resources\com.docker.admin.exe" wsl -update(I did not install WSL before).
  3. It seems that the command did not work because after the setting up of Docker including agreeing with the wsl -update, I ran wsl --version in the Powershell, succeeded to see the installation of WSL but without any distribution installed as expected. See:
    image
  4. Then ran Docker Desktop and there would be an Unexpected WSL error as follows
    bf8123a17891e1c80c2eaf7b7e08327
  5. Diagnostics files obtained by running & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" gather -upload in PowerShell is as follows
    DockerDiagnosis.zip
  6. Next I performed self-diagnose tool by running & "C:\Program Files\Docker\Docker\resources\com.docker.diagnose.exe" check in PowerShell.The screenshot is as follows
    image
    image
    image
    image
  7. From now on I would infer that something wrong with the installing of my WSL distros.
  8. Since WSL Distribution docker-desktop is missing , I tried whether other distros could be installed successfully. Unfortunately, one can observe that WSL was installed and updated successfully while no distros installed.
    image
  9. Then I ran wsl --install, the Ubuntu was installed by default but after only a while I encountered a fatal error with error code: 0x8007001f. See:
    image
  10. From some tutorials, I check the support for Hardware Virtulization in BIOS, whether ticking the checkboxs for Virtual Machine Platform and Windows Subsystem for Linux in Windows features, however, failed again.
    The tutorial link is as follows which would be helpful for most of the problems encountering WSL error:
    Tutorial
  11. Unable to install the distributions of Linux through Microsoft stores or PowerShell command line, I decided to download the Ubuntu WSL distribution rootfs and directly imort it into my WSL .
  12. Follow the post at the website AskUbuntu, I downloaded ubuntu-20.04-server-cloudimg-amd64-wsl.rootfs.tar.gz and tried to import it. We see:
    image
    The same error code with directly installing distros in the PowerShell through command line, error code: 0x8007001f

Expected Behavior

Installing the distros successfully.

Actual Behavior

Error code: 0x8007001f

Diagnostic Logs

WslNetworkingLogs-2024-04-01_17-49-33.zip
WslLogs-2024-04-02_19-59-24.zip
DockerDiagnosis.zip

Copy link

github-actions bot commented Apr 1, 2024

View similar issues

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!

Open similar issues:

Closed similar issues:

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

Diagnostic information
Found '/question', adding tag 'question'
appxpackage.txt not found
Error while parsing the logs. See action page for details

@OneBlue
Copy link
Collaborator

OneBlue commented Apr 1, 2024

/logs

@CSHCY
Copy link
Author

CSHCY commented Apr 1, 2024 via email

@OneBlue
Copy link
Collaborator

OneBlue commented Apr 1, 2024

You probably just pressed an extra key. It will usually wait for a keypress to complete. I'd recommend trying again.

/logs

@CSHCY
Copy link
Author

CSHCY commented Apr 2, 2024

WSL logs have been uploaded.
I ran the recommended script, receiving the prompt Log collection is running. Please reproduce the problem and once done press any key to save the logs. while I opened another PowerShell in administrator mode running the code as follows:
wsl --import Ubuntu-20.04 "D:\WSL\" "D:\WSL\Ubuntu\ubuntu-20.04-server-cloudimg-amd64-wsl.rootfs.tar.gz"
and then
wsl --install
resepectively obtainning the error message:

importing,this may take several minutes.
cannot configure networkingMode Nat)(Network. To disable the network,Please set “wsl2.networkingMode=None” in 
: C:\Users\拯救者青音\.wslconfig
Error code: Wsl/Service/RegisterDistro/CreateVm/ConfigureNetworking/HNS/0x8007001f

and


Ubuntu has been installed。
Booting Ubuntu...
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x8007001f
Error: 0x8007001f ???????????????

After the two error messages, I came back to the original PowerShell interface, pressing Enter to save the Logs.

@CSHCY
Copy link
Author

CSHCY commented Apr 2, 2024

You probably just pressed an extra key. It will usually wait for a keypress to complete. I'd recommend trying again.

/logs

So many thanks for your concern!
I feel sorry again for my green-hand-action and I am looking forward for your reply!

@OneBlue
Copy link
Collaborator

OneBlue commented Aug 15, 2024

@keith-horton: The root cause of this looks like an HNS error:

Microsoft-Windows-Host-Network-Service	ActivityError	04-02-2024 05:02:19.332	"	"	"wilActivity: 
{
	callContext: 	\HnsRpcV2_Create
	currentContextId: 	89
	currentContextMessage: 	
	currentContextName: 	HnsRpcV2_Create
	failureCount: 	89
	failureId: 	688
	failureType: 	0
	fileName: 	onecore\vm\dv\net\hns\service\common\helperlib\src\servicehelpers.cpp
	function: 	
	hresult: 	0x8007001F
	lineNumber: 	198
	message: 	
	module: 	hostnetsvc.dll
	originatingContextId: 	89
	originatingContextMessage: 	
	originatingContextName: 	HnsRpcV2_Create
	threadId: 	20792
}"	onecore\vm\dv\net\hns\service\common\helperlib\src\servicehelpers.cpp	198	 	3424	20792	2		2b047edd-8497-000e-dbbc-162b9784da01		

Do you know what could cause this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants