Unable to Enable Virtual Machine Platform Feature. Error Code: 0x8007371B

Anonymous
2024-10-19T12:32:49+00:00

Hi I have wsl distro installed on my Windows Machine, which i have been using to deploy code to cloud, and i use wsl for development environment as Linux in Windows.
I also play games in Emulatot so it required to turn off that features so i allowed the emulator to do so, And after that I am unable to use wsl at all.
Cannot Install WSL or use my installed Distro as Virtual Machine Platform is not installed.

I tried many sollutions online all fail to enable Virtual Machine Platform.
I get Windows Error Code when Enabling it from GUI(Turn Windows Feature on or off)
The Output Look Like this:

Windows couldn't complete the requested changes.

One or more required members of the transaction are not present.

Error code: 0x8007371B

When I use DISM to Enable I get Same Error as well.

The DISM Ouput Looks Like This:

> wsl -- install -no-distribution

Installing Windows optional component: VirtualMachinePlatform

Deployment Image Servicing and Management tool

Version: 10.0.26100.1150

Image Version: 10.0.26120.1930

Enabling feature(s)

100.0%

Error: 14107

One or more required members of the transaction are not present.

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism. log

Failed to enable Windows component 'VirtualMachinePlatform' (exit code 14107)

Error code: Wsl/WSL E INSTALL COMPONENT FAILED

Now Below DISM Log :

2024-10-19 17:51:30, Info DISM PID=13460 TID=6344 Scratch directory set to 'C:\Users\nabee\AppData\Local\Temp'. - CDISMManager::put_ScratchDir

2024-10-19 17:51:30, Info DISM PID=13460 TID=6344 DismCore.dll version: 10.0.26100.1150 - CDISMManager::FinalConstruct

2024-10-19 17:51:30, Info DISM Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log

2024-10-19 17:51:30, Info DISM PID=13460 TID=6344 Successfully loaded the ImageSession at "C:\WINDOWS\system32\Dism" - CDISMManager::LoadLocalImageSession

2024-10-19 17:51:30, Info DISM Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log

2024-10-19 17:51:30, Info DISM DISM Provider Store: PID=13460 TID=6344 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger

2024-10-19 17:51:30, Info DISM Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log

2024-10-19 17:51:30, Info DISM DISM Manager: PID=13460 TID=6344 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession

2024-10-19 17:51:30, Info DISM DISM.EXE:

2024-10-19 17:51:30, Info DISM DISM.EXE: <----- Starting Dism.exe session ----->

2024-10-19 17:51:30, Info DISM DISM.EXE:

2024-10-19 17:51:30, Info DISM DISM.EXE: Host machine information: OS Version=10.0.26120, Running architecture=amd64, Number of processors=8

2024-10-19 17:51:30, Info DISM DISM.EXE: Instance information: Parent process=C:\Program Files\WSL\wsl.exe, Parent process PID=14036

2024-10-19 17:51:30, Info DISM DISM.EXE: Dism.exe version: 10.0.26100.1150

2024-10-19 17:51:30, Info DISM DISM.EXE: Executing command line: C:\WINDOWS\system32\dism.exe /Online /NoRestart /enable-feature /featurename:VirtualMachinePlatform

2024-10-19 17:51:30, Info DISM DISM Manager: PID=13460 TID=6344 physical location path: C:\ - CDISMManager::CreateImageSession

2024-10-19 17:51:30, Info DISM DISM Manager: PID=13460 TID=6344 Event name for current DISM session is Global{5AF292B0-99BC-4911-B3EC-A0AE5E5A353A} - CDISMManager::CheckSessionAndLock

2024-10-19 17:51:30, Info DISM DISM Manager: PID=13460 TID=6344 Create session event 0x260 for current DISM session and event name is Global{5AF292B0-99BC-4911-B3EC-A0AE5E5A353A} - CDISMManager::CheckSessionAndLock

2024-10-19 17:51:30, Info DISM DISM Manager: PID=13460 TID=6344 Copying DISM from "C:\WINDOWS\System32\Dism" - CDISMManager::CreateImageSessionFromLocation

2024-10-19 17:51:30, Info DISM DISM Manager: PID=13460 TID=6344 No Sandbox was created, DISM running in-place. - CDISMManager::CreateImageSessionFromLocation

2024-10-19 17:51:30, Info DISM DISM Manager: PID=13460 TID=6344 Successfully loaded the ImageSession at "C:\WINDOWS\System32\Dism" - CDISMManager::LoadRemoteImageSession

2024-10-19 17:51:30, Info DISM DISM Image Session: PID=3768 TID=13144 Instantiating the Provider Store. - CDISMImageSession::get_ProviderStore

2024-10-19 17:51:30, Info DISM DISM OS Provider: PID=3768 TID=13144 Defaulting SystemPath to C:\ - CDISMOSServiceManager::Final_OnConnect

2024-10-19 17:51:30, Info DISM DISM OS Provider: PID=3768 TID=13144 Defaulting Windows folder to C:\Windows - CDISMOSServiceManager::Final_OnConnect

2024-10-19 17:51:30, Info DISM DISM Provider Store: PID=3768 TID=13144 Attempting to initialize the logger from the Image Session. - CDISMProviderStore::Final_OnConnect

2024-10-19 17:51:30, Info DISM Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log

2024-10-19 17:51:30, Info DISM DISM Provider Store: PID=3768 TID=13144 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger

2024-10-19 17:51:30, Info DISM Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log

2024-10-19 17:51:30, Info DISM Initialized Panther logging at C:\WINDOWS\Logs\DISM\dism.log

2024-10-19 17:51:30, Info DISM DISM Manager: PID=13460 TID=6344 Image session successfully loaded from location: C:\WINDOWS\System32\Dism - CDISMManager::CreateImageSession

2024-10-19 17:51:30, Info DISM DISM.EXE: Target image information: OS Version=10.0.26120.1930, Image architecture=amd64

2024-10-19 17:51:30, Info DISM DISM.EXE: Image session version: 10.0.26100.1150

2024-10-19 17:51:30, Info DISM DISM Transmog Provider: PID=3768 TID=388 Current image session is [ONLINE] - CTransmogManager::GetMode

2024-10-19 17:51:30, Info DISM DISM Transmog Provider: PID=3768 TID=388 Audit Mode: [No] - CTransmogManager::Initialize

2024-10-19 17:51:30, Info DISM DISM Transmog Provider: PID=3768 TID=388 GetProductType: ProductType = [WinNT] - CTransmogManager::GetProductType

2024-10-19 17:51:30, Info DISM DISM Transmog Provider: PID=3768 TID=388 Product Type: [WinNT] - CTransmogManager::Initialize

2024-10-19 17:51:30, Info DISM DISM Transmog Provider: PID=3768 TID=388 Product Type ServerNT : [No] - CTransmogManager::Initialize

2024-10-19 17:51:30, Info DISM DISM OS Provider: PID=3768 TID=388 Determined System directory to be C:\Windows\System32 - CDISMOSServiceManager::get_SystemDirectory

2024-10-19 17:51:30, Info CSI 00000001 Shim considered [l:123]'??\C:\WINDOWS\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.26100.2130_none_a544b31177362d60\wcp.dll' : got STATUS_SUCCESS

2024-10-19 17:51:30, Info DISM DISM Driver Manager: PID=3768 TID=388 Further logs for driver related operations can be found in the target operating system at %WINDIR%\inf\setupapi.offline.log - CDriverManager::Initialize

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=388 Finished initializing the CbsConUI Handler. - CCbsConUIHandler::Initialize

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=388 CBS is being initialized for online use. More information about CBS actions can be located at: %windir%\logs\CBS\CBS.log - CDISMPackageManager::Initialize

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=388 Loaded servicing stack for online use. - CDISMPackageManager::CreateCbsSession

2024-10-19 17:51:30, Info CSI 00000001 Shim considered [l:123]'??\C:\WINDOWS\WinSxS\amd64_microsoft-windows-servicingstack_31bf3856ad364e35_10.0.26100.2130_none_a544b31177362d60\wcp.dll' : got STATUS_SUCCESS

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=12744 Processing the top level command token(enable-feature). - CPackageManagerCLIHandler::Private_ValidateCmdLine

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=12744 Attempting to route to appropriate command handler. - CPackageManagerCLIHandler::ExecuteCmdLine

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=12744 Routing the command... - CPackageManagerCLIHandler::ExecuteCmdLine

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=12744 Encountered the option "featurename" with value "VirtualMachinePlatform" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=12744 Encountered an unknown option "featurename" with value "VirtualMachinePlatform" - CPackageManagerCLIHandler::Private_GetPackagesFromCommandLine

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=12744 Initiating Changes on Package with values: 5, 7 - CDISMPackage::Internal_ChangePackageState

2024-10-19 17:51:30, Info DISM DISM Package Manager: PID=3768 TID=12744 CBS session options=0x40100! - CDISMPackageManager::Internal_Finalize

2024-10-19 17:58:42, Info DISM DISM Package Manager: PID=3768 TID=15984 Error in operation: (null) (CBS HRESULT=0x8007371b) - CCbsConUIHandler::Error

2024-10-19 17:58:45, Error DISM DISM Package Manager: PID=3768 TID=12744 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x8007371b)

2024-10-19 17:58:45, Error DISM DISM Package Manager: PID=3768 TID=12744 Failed processing package changes with session options - CDISMPackageManager::Internal_ProcessChangesWithOptions(hr:0x8007371b)

2024-10-19 17:58:45, Error DISM DISM Package Manager: PID=3768 TID=12744 Failed ProcessChanges. - CPackageManagerCLIHandler::Private_ProcessFeatureChange(hr:0x8007371b)

2024-10-19 17:59:07, Error DISM DISM Package Manager: PID=3768 TID=12744 Failed while processing command enable-feature. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x8007371b)

2024-10-19 17:59:07, Info DISM DISM Package Manager: PID=3768 TID=12744 Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log - CPackageManagerCLIHandler::ExecuteCmdLine

2024-10-19 17:59:07, Error DISM DISM.EXE: DISM Package Manager processed the command line but failed. HRESULT=8007371B

2024-10-19 17:59:07, Info DISM DISM Package Manager: PID=3768 TID=15984 Finalizing CBS core. - CDISMPackageManager::Finalize

2024-10-19 17:59:07, Info DISM DISM Manager: PID=13460 TID=6344 Closing session event handle 0x260 - CDISMManager::CleanupImageSessionEntry

2024-10-19 17:59:07, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.

2024-10-19 17:59:07, Info DISM DISM.EXE:

2024-10-19 17:59:07, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->

2024-10-19 17:59:07, Info DISM DISM.EXE:

Windows for home | Windows 11 | Performance and system failures

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2024-11-15T21:13:42+00:00

    This Fixed the Problem.

    In logs I found out at 76% it actually tries to download and install the corrupted components but the download never completes as it seems to be an async task after some timeout hardcoded in code, the download isn't completed and then windows fall backs to the corrupted components, also i noticed that version numbers for components do not match up maybe somehere DISM is getting wrong info about components version installed, this clearly seems to be some logical error in code it can be fixed also the Download issue where on 76% its stuck that download if it gets completed could the issue have been solved.

    I do see that uninstalling recent Updates help, i think my above guess is somewhat correct about the error why it occurs, Now i only hope that they fix the issues in their code.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2024-10-27T08:19:36+00:00

    Thank you,
    To me this issue seems to come from Windows, cause DISM is a windows buitlin tool to enable System Components and if it fails to enable VIRTUAL MACHINE PLATFORM that means it relies on Windows to do Certain things and to me it looks like the error code which originated did came from OS not the WSL platform.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2024-11-15T17:51:01+00:00

    Some good news - I just don't know which of these may have resolved the issue.

    I updated to 26100.2448 (KB5046740)

    I updated WSL to 2.3.26, uninstalled WSL, and then ran:

    wsl --install -no-distribution

    Installation appears successful. Tested installation of Ubuntu, and it's working.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2024-10-23T06:29:05+00:00

    Hi Welcome to Microsoft community.Thank you for providing detailed information about the issue you're facing. It sounds quite frustrating, especially given how essential WSL is for your development work.Unfortunately, the problem you’re encountering seems to go beyond the support that can be provided here. I recommend visiting the WSL section on GitHub to report your issue. The community there may have more specific insights or solutions that can help you resolve the error code 0x8007371B. I appreciate your understanding, and I hope you find a resolution soon. If you have any other questions or need further assistance, feel free to reach out. Best regardsDerrick Qian | Microsoft Community Support Specialist

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2024-10-20T16:50:41+00:00

    Same occurring for me in 10.0.26100.2033, and also in 26100.2152.

    Was this answer helpful?

    0 comments No comments