0

Goal:

  • Run Docker

Requirements:

  • Hyper-V for windows turned on

Systeminfo - Powershell

PS >systeminfo
OS Name:                   Microsoft Windows 10 Education
Hotfix(s):                 5 Hotfix(s) Installed.
                           [01]: KB4462930
                           [02]: KB4470788
                           [03]: KB4480056
                           [04]: KB4480979
                           [05]: KB4480116
Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                           Virtualization Enabled In Firmware: Yes
                           Second Level Address Translation: Yes
                           Data Execution Prevention Available: Yes

System information:

OS Name Microsoft Windows 10 Education
Version 10.0.17763 Build 17763
Other OS Description    Not Available
OS Manufacturer Microsoft Corporation
System Name DESKTOP-4AO32OM
System Manufacturer System manufacturer
System Model    System Product Name
System Type x64-based PC
System SKU  SKU
Processor   AMD Ryzen 7 1700X Eight-Core Processor, 3400 Mhz, 8 Core(s), 16 Logical Processor(s)
BIOS Version/Date   American Megatrends Inc. 0902, 9/8/2017
SMBIOS Version  3.0
Embedded Controller Version 255.255
BIOS Mode   UEFI
BaseBoard Manufacturer  ASUSTeK COMPUTER INC.
BaseBoard Product   ROG STRIX B350-F GAMING
BaseBoard Version   Rev X.0x
Platform Role   Desktop
Secure Boot State   Off
PCR7 Configuration  Binding Not Possible
Windows Directory   C:\Windows
System Directory    C:\Windows\system32
Boot Device \Device\HarddiskVolume2
Locale  USA
Hardware Abstraction Layer  Version = "10.0.17763.194"
User Name   DESKTOP-4AO32OM\starlord
Time Zone   W. Europe Standard Time
Installed Physical Memory (RAM) 32.0 GB
Total Physical Memory   31.9 GB
Available Physical Memory   27.4 GB
Total Virtual Memory    36.7 GB
Available Virtual Memory    29.6 GB
Page File Space 4.75 GB
Page File   C:\pagefile.sys
Kernel DMA Protection   Off
Virtualization-based security   Not enabled
Device Encryption Support   Reasons for failed automatic device encryption: TPM is not usable, PCR7 binding is not supported, Hardware Security Test Interface failed and device is not InstantGo, Un-allowed DMA capable bus/device(s) detected, TPM is not usable
Hyper-V - VM Monitor Mode Extensions    Yes
Hyper-V - Second Level Address Translation Extensions   Yes
Hyper-V - Virtualization Enabled in Firmware    Yes
Hyper-V - Data Execution Protection Yes

Problem:

When attempting to enable Hyper-V from settings turn windows features on or off I get this error:

Hyper-V

When trying the Powershell way I also get error:

PS C:\Windows\system32> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Enable-WindowsOptionalFeature : The referenced assembly could not be found.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

I seem to have all the requirements to use Hyper-V so what is stopping me from enabling Hyper-V? Also I have a recent clean install of Windows so there shouldn't be any mess here.

i thought I need some packages, some update maybe. But Windows says there is no update available...

Attempted solutions from here: - Cannot Enable Hyper-V on my machine

Edit: Failure doesn't seem to be specific to Hyper-V. Trying to turn on another feature (.NET framework 3.5) from the GUI Turn Windows features on or off results in the same error code as displayed in the picture above.

Question is then: How can I further troubleshoot to find out what is stopping turn windows features on/off from completing turning features on?

Edit - Trying answer from Daniel B.

I tried deleting the registry subkeys under PackageDetect but that gives an error: regedit error

Manually deleting one and one doesn't work either.

I tried the Powershell way, but I lack skills there.

Remove-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackageDetect\*' -Recurse
Remove-Item : Cannot find path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackageDetect' because it does not exist.
At line:1 char:1
+ Remove-Item -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Co ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (HKLM:\SOFTWARE\...g\PackageDetect:String) [Remove-Item], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

And yeah, I'm doing this as administrator.

There was also a suggestion to remove any extra language packs. I have only English now and I still can't enable Hyper-V

Language pack

Edit - providing error from fuslogvw

Installed .NET Framework 4.7.2 Developer Pack and used the fuslogvw.exe tool located at C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\. Must be ran as administrator, from settings turned on Log bind failures to disk and triggered the error using the powershell command to enable Hyper-V(error NOT triggered with gui/turn windows features on/off). Refreshing the list gave the errors, click View Log to get a the errors as a textfile.

Pastebin: https://pastebin.com/Zn30Kqt7

Investigating the paths referenced in the error log:

LOG: Attempting download of new URL file:///C:/Windows/System32/WindowsPowerShell/v1.0/Microsoft.Dism.PowerShell.dll.DLL.
LOG: Attempting download of new URL file:///C:/Windows/System32/WindowsPowerShell/v1.0/Microsoft.Dism.PowerShell.dll/Microsoft.Dism.PowerShell.dll.DLL.
LOG: Attempting download of new URL file:///C:/Windows/System32/WindowsPowerShell/v1.0/Microsoft.Dism.PowerShell.dll.EXE.
LOG: Attempting download of new URL file:///C:/Windows/System32/WindowsPowerShell/v1.0/Microsoft.Dism.PowerShell.dll/Microsoft.Dism.PowerShell.dll.EXE.
LOG: Attempting download of new URL file:///C:/Windows/system32/WindowsPowerShell/v1.0/Modules/Dism/Microsoft.Dism.PowerShell.dll.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/WindowsPowerShell/v1.0/Modules/Dism/Microsoft.Dism.PowerShell.dll/Microsoft.Dism.PowerShell.dll.DLL.
LOG: Attempting download of new URL file:///C:/Windows/system32/WindowsPowerShell/v1.0/Modules/Dism/Microsoft.Dism.PowerShell.dll.EXE.
LOG: Attempting download of new URL file:///C:/Windows/system32/WindowsPowerShell/v1.0/Modules/Dism/Microsoft.Dism.PowerShell.dll/Microsoft.Dism.PowerShell.dll.EXE.
PS C:\Windows\system32> Get-ChildItem -Path "C:\Windows\System32\WindowsPowerShell\v1.0\" -Directory


    Directory: C:\Windows\System32\WindowsPowerShell\v1.0


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       09/15/2018  11:08 AM                en
d-----       09/15/2018  11:08 AM                en-US
d-----       09/15/2018   9:34 AM                Examples
d-----       09/15/2018  11:11 AM                Modules
d-----       09/15/2018   9:33 AM                Schemas
d-----       09/15/2018   9:33 AM                SessionConfig

I don't have a directory called Microsoft.Dism.PowerShell.dll. I guess that's a problem.

PS C:\Windows\system32> Get-ChildItem -Path "C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Dism" -Directory


    Directory: C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Dism


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       09/15/2018  11:08 AM                en

I also don't have the directory at WindowsPowerShell/v1.0/Modules/Dism/Microsoft.Dism.PowerShell.dll.

Why is this? What are the options for fixing this? Repare windows? Though it's not even a month ago I reinstalled windows 10.

  • 1
    Please explain reason for downvote – Starlord Jan 22 '19 at 12:33
  • Run sfc /scannow as administrator and try again – gronostaj Jan 22 '19 at 13:47
  • Are you doing all this as administrator?This says: If the command couldn't be found, make sure you're running PowerShell as Administrator – Ian W Jan 22 '19 at 13:57
  • @gronostaj I tried that as suggestion from the linked solution. Yes, I'm running this as administrator. – Starlord Jan 22 '19 at 14:07
1

When searching the Internet for the error you experience, one solution keeps popping up: Deleting all subkeys under the following key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackageDetect

(See here for example.)

This is obviously the nuclear option and you should create a full backup of your system before making the changes. It could permanently break Windows CBS, ie. Windows Update, Windows Features, everything.

Apparently the root cause is your PC thinking that some language pack is installed when it really is not, leading to “missing” files.

| improve this answer | |
  • language pack...God dammit Microsoft. I attempted to delete registry, but for some reason it was not possible. See my updated question. Is there some way to know what language pack is causing issues? – Starlord Jan 24 '19 at 20:12
  • Maybe. You could try using fuslogvw (part of .NET SDK, which you will have to install) to enable logging for this type of error (click “Settings”, then “Log bind failures to disk”), then provoke the error. Refresh the list and see what’s coming up. Don’t forget to disable logging afterwards! – Daniel B Jan 24 '19 at 21:55
  • I created a pastebin with the errorlog. I'm not sure if this was helpful though, it's not from my perspective. pastebin.com/Zn30Kqt7 Care to take a look? – Starlord Jan 26 '19 at 10:58
0

Well, this is awkward.

I decided to reinstall windows 10 Edu again. The process went as followed:

Using Windows MediaCreationTool I put the ISO on a usb stick. Still on windows I just double clicked the setup.

enter image description here Then I went through the menus and reinstalled windows, keeping all my files and such. No major thing.

The install went fine, windows reboots.

I go to Turn Windows Features on or off. I notice that .NET Framework 3.5 was NOT ticked. I remembered reading something about Hyper-V and .NET, I ticked the box. .NET installs. Then i tick Hyper-V, and Hyper-V install just fine. Docker installs fine too now.

I can't remember if .NET 3.5 was ticked before, but atleast something got solved now. Maybe it was a reinstall of windows or .NET 3.5. I don't know.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.