Cannot Enable Hyper-V on the machine

dockerhyper-v

I'm trying to enable Hyper-V on my machine in order to use Docker. I've tried letting Docker enable it, using Windows Features to enable it, and using Powershell (as administrator). My system is running Windows 10 Pro 64-bit and has all of the Hyper-V options enabled (VM Monitor Mode Extensions, SLAT, Virtualization Enabled in Firmware, Data Execution Protection).

Windows Version: 10.0.14393 Build 14393
Processor Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 3401 Mhz, 4 Core(s), 8 Logical Processor(s)
Installed Physical Memory (RAM) 16.0 GB

Running this command in PowerShell (as admin) has following output:

PS C:\WINDOWS\logs\dism> DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

Deployment Image Servicing and Management tool
Version: 10.0.14393.0

Image Version: 10.0.14393.0

Enabling feature(s)
[==========================100.0%==========================]

Error: 0x800f0831

DISM failed. No operation was performed.
For more information, review the log file.

In the log file:

Warning               DISM   DISM OS Provider: PID=10620 TID=9016 Unable to set the DLL search path to the servicing stack folder. C:\Windows may not point to a valid Windows folder. - CDISMOSServiceManager::Final_OnConnect
Warning               DISM   DISM Provider Store: PID=10620 TID=9016 Failed to Load the provider: C:\Users\STEVE_~1\AppData\Local\Temp\4550B806-11FA-419B-AB93-57667B96F632\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
Warning               DISM   DISM Provider Store: PID=10620 TID=9016 Failed to Load the provider: C:\Users\STEVE_~1\AppData\Local\Temp\4550B806-11FA-419B-AB93-57667B96F632\EmbeddedProvider.dll. - CDISMProviderStore::Internal_GetProvider(
Info                  DISM   DISM Package Manager: PID=10620 TID=29724  Error in operation: (null) (CBS HRESULT=0x800f0831) - CCbsConUIHandler::Error
Error                 DISM   DISM Package Manager: PID=10620 TID=9016 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x800f0831)
Error                 DISM   DISM Package Manager: PID=10620 TID=9016 Failed processing package changes with session options - CDISMPackageManager::ProcessChangesWithOptions(hr:0x800f0831)
Error                 DISM   DISM Package Manager: PID=10620 TID=9016 Failed ProcessChanges. - CPackageManagerCLIHandler::Private_ProcessFeatureChange(hr:0x800f0831)
Error                 DISM   DISM Package Manager: PID=10620 TID=9016 Failed while processing command enable-feature. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x800f0831)

Any idea what I need to do to enable Hyper-V on this machine?

Best Answer

  • Try restore image health (and/or cleaning the image)

    run these commands

    Dism /Online /Cleanup-Image /RestoreHealth

    to perform image repair

    Dism. exe /online /Cleanup-Image /StartComponentCleanup

    this will cleanup (remove) superseded windows files over 45 days old in the component store.

    Then perfoming a file integrity check by running

    sfc /scannow

    This finds and fixes corrupted sustem files (note SFC has been known to flag perfectly good files as corrupt but doesn't harm harm anything)

    Try disabling and enabling Hyper -V using the following command:

    Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

    in PowerShell (running as admin).

  • Related Question