Skip to content

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

Open
vagokuln-msft wants to merge 1 commit into
microsoft: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 into
microsoft: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"
@vagokuln-msft

Copy link
Copy Markdown
Author

@copilot Find the right maintainer to tag to get a sign-off for this PR

@vagokuln-msft

Copy link
Copy Markdown
Author

@AvrumFeldman this is a small, contained fix (CI green) for the Hyper-V
feature name on Client SKUs. Could you review or point me to the current
maintainer? Several previous maintainers appear to have moved off the team.

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