WSL icon indicating copy to clipboard operation
WSL copied to clipboard

wsl2 install errror0x80041002

Open micenote opened this issue 5 years ago • 20 comments

Windows Build Number

Microsoft Windows [版本 10.0.19043.1202]

WSL Version

  • [X] WSL 2
  • [ ] WSL 1

Kernel Version

5.10.16

Distro Version

Ubuntu18.04

Other Software

No response

Repro Steps

1.wsl --set-default-version 2 2.Install Ubuntu18.04 in MS store 3.Installing.....Error:0x80041002

1.wsl --set-default-version 1 2.Install Ubuntu18.04 in MS store 3.Install succeed! 4.wsl --set-version Ubuntu18.04 2 5.Error:0x80041002

Expected Behavior

Bug?

Actual Behavior

I'm crazy!!!!

Diagnostic Logs

wsl.zip

micenote avatar Sep 07 '21 00:09 micenote

Looks like a failure to create the virtual network, I'll forward this along to my networking counterparts.

benhillis avatar Sep 07 '21 16:09 benhillis

Is the "Virtual Machine Platform" installed?

What does "sc.exe qc vmsmp" show?

Keith-Mange avatar Sep 07 '21 17:09 Keith-Mange

Is the "Virtual Machine Platform" installed?

What does "sc.exe qc vmsmp" show?

installed vmware. but uninstall vmware error 0x80041002 still exist.

SERVICE_NAME: vmsmp TYPE : 1 KERNEL_DRIVER START_TYPE : 3 DEMAND_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : \SystemRoot\System32\drivers\vmswitch.sys LOAD_ORDER_GROUP : TAG : 0 DISPLAY_NAME : vmsmp DEPENDENCIES : VMSP SERVICE_START_NAME : \Driver\VMSP

micenote avatar Sep 07 '21 23:09 micenote

Is the "Virtual Machine Platform" installed?

What does "sc.exe qc vmsmp" show?

installed vmware. but uninstall vmware error 0x80041002 still exist.

micenote avatar Sep 07 '21 23:09 micenote

We need more tracing to understand the failure. Can you try the following:

  1. Reboot
  2. https://github.com/microsoft/SDN/blob/master/Kubernetes/windows/debug/starthnstrace.ps1
  3. Repro the problem
  4. Stop the tracing in step 2.
  5. https://github.com/microsoft/SDN/blob/master/Kubernetes/windows/debug/collectlogs.ps1

The tracing step 2 will tell us more about what went wrong. It includes some key providers missing from wsl.zip.

The logs in step 5 will tell us more about the state of the machine.

Thanks!

Keith-Mange avatar Sep 08 '21 00:09 Keith-Mange

We need more tracing to understand the failure. Can you try the following:

  1. Reboot
  2. https://github.com/microsoft/SDN/blob/master/Kubernetes/windows/debug/starthnstrace.ps1
  3. Repro the problem
  4. Stop the tracing in step 2.
  5. https://github.com/microsoft/SDN/blob/master/Kubernetes/windows/debug/collectlogs.ps1

The tracing step 2 will tell us more about what went wrong. It includes some key providers missing from wsl.zip.

The logs in step 5 will tell us more about the state of the machine.

Thanks!

collectlogs.ps1.zip server.zip

execute collectlogs.ps1 have many error.

micenote avatar Sep 08 '21 13:09 micenote

Something is interfering with virtual NIC creation. Can you upload the files in C:\Windows\Logs\NetSetup?

Keith-Mange avatar Sep 08 '21 14:09 Keith-Mange

Something is interfering with virtual NIC creation. Can you upload the files in C:\Windows\Logs\NetSetup?

NetSetup.zip

micenote avatar Sep 09 '21 00:09 micenote

??????

micenote avatar Sep 15 '21 00:09 micenote

Is the "Virtual Machine Platform" installed?

What does "sc.exe qc vmsmp" show?

I'm running into a similar issue, and do have the "Virtual Machine Platform" installed. However:

> sc qc vmsmp
[SC] OpenService FAILED 1060:

The specified service does not exist as an installed service.

Is the vmsmp service only available under Hyper-V?

maxboone avatar Sep 18 '21 07:09 maxboone

Regarding the NIC creation problem, I've re-asked a partner team here to take a look.

The virtual machine platform should install the hyper-v virtual switch even without Hyper-V. "vmsmp" might not be the best way to detect that, however, because it only starts when WSL launches. Try "sc query vmsp"

Keith-Mange avatar Sep 23 '21 13:09 Keith-Mange

Regarding the NIC creation problem, a VMWare component appears to be blocking the NIC creation. If it's still installed, you can try removing the VMWare product. However, we have seen that even uninstalling it won't always help because they leave behind some cruft. If you have already uninstalled, a network reset may purge it. However, that purge may not even be sufficient. We've reached out to VMWare in the past on the issue but haven't gotten any traction with them.

It's also possible a 3rd party anti virus is blocking access to reg keys that need to change.

Keith-Mange avatar Sep 23 '21 17:09 Keith-Mange

sc query vmsp is indeed showing an installed (and running) kernel driver.

When I try to start WSL version 2 and subsequently run sc query vmsmp or sc query vmsmp it doesn't show either. Even after a clean re-install of Windows, is there a way that I can check (aside from sfc or re-enabling the feature with a reboot inbetween) if VMP is still installed correctly (or does an installed and running vmsp driver mean that it's properly deployed)?

Or should I be able to figure out what's going wrong from the same logging, as in, if something is blocking the creation of the virtual NICs?

Not trying to hijack this thread, but I think the issue is really similar and another issue was closed with a "we're backporting some stuff" while I'm on the latest version of Windows Insider Builds 😅.

Not sure where to find the tooling needed to dissect the logs (etl) & collectlogs. Besides, collectlogs throws quite some errors, possibly missing programs as I'm not running Windows Server (even without Hyper-V 😢). PerfView is a mess to read as I don't know what I'm looking for...

maxboone avatar Sep 23 '21 18:09 maxboone

Is c:\Windows\system32\drivers\vmswitch.sys present?

Keith-Mange avatar Sep 23 '21 20:09 Keith-Mange

Is c:\Windows\system32\drivers\vmswitch.sys present?

Yes, present:

0dd13e65d51b89a25399528c0c7216581a8f99e834f179d5aa88170442835c07 vmswitch.sys -a---- 9/11/2021 2:14 PM 2275104 vmswitch.sys

P.S. I'm using WoA / ARM64 / Surface Pro X SQ2, if hashes are different - that might be why

maxboone avatar Sep 23 '21 21:09 maxboone

I see that the latest build contains fixes for specifically Hyper-V and WSL not running on ARM64. That fixed it, the Virtual Switch Extension Adapter is now created and I can start WSL2 containers again!

maxboone avatar Sep 24 '21 08:09 maxboone

Regarding the NIC creation problem, a VMWare component appears to be blocking the NIC creation. If it's still installed, you can try removing the VMWare product. However, we have seen that even uninstalling it won't always help because they leave behind some cruft. If you have already uninstalled, a network reset may purge it. However, that purge may not even be sufficient. We've reached out to VMWare in the past on the issue but haven't gotten any traction with them.

It's also possible a 3rd party anti virus is blocking access to reg keys that need to change.

reinstall windows can it be solved?

micenote avatar Sep 26 '21 02:09 micenote

That should work as long as the offending 3rd party software isn't re-installed.

Keith-Mange avatar Sep 27 '21 13:09 Keith-Mange

That should work as long as the offending 3rd party software isn't re-installed.

okay..let me try,thanks.

micenote avatar Sep 28 '21 00:09 micenote

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!