Skip to content

fix: use Microsoft-Hyper-V feature name on Windows Client SKUs#638

Open
vagokuln-msft wants to merge 1 commit intomicrosoft:Mainfrom
vagokuln-msft:user/vagokuln/fixhypervfeaturename
Open

fix: use Microsoft-Hyper-V feature name on Windows Client SKUs#638
vagokuln-msft wants to merge 1 commit intomicrosoft:Mainfrom
vagokuln-msft:user/vagokuln/fixhypervfeaturename

Conversation

@vagokuln-msft
Copy link
Copy Markdown

Add-WindowsFeature (ServerManager) uses the feature name "Hyper-V", while Enable-WindowsOptionalFeature (DISM) requires "Microsoft-Hyper-V". On Windows Client SKUs, Get-WindowsFeature is unavailable so Install-Feature falls through to the DISM path, where "Hyper-V" is an unrecognized name and the feature is silently not enabled.

This caused docker run to fail with:
hcs::CreateComputeSystem: The request is not supported.

Fix: check which API is available at the call site in Install-ContainerHost and pass the correct feature name to Install-Feature accordingly:

  • Server SKUs (Get-WindowsFeature available): pass "Hyper-V"
  • Client SKUs (DISM path): pass "Microsoft-Hyper-V"

Add-WindowsFeature (ServerManager) uses the feature name "Hyper-V",
while Enable-WindowsOptionalFeature (DISM) requires "Microsoft-Hyper-V".
On Windows Client SKUs, Get-WindowsFeature is unavailable so Install-Feature
falls through to the DISM path, where "Hyper-V" is an unrecognized name and
the feature is silently not enabled.

This caused `docker run` to fail with:
  hcs::CreateComputeSystem: The request is not supported.

Fix: check which API is available at the call site in Install-ContainerHost
and pass the correct feature name to Install-Feature accordingly:
- Server SKUs (Get-WindowsFeature available): pass "Hyper-V"
- Client SKUs (DISM path):                   pass "Microsoft-Hyper-V"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant