From cb93591d829b8cd15e38fe5debff90f63f3ec30c Mon Sep 17 00:00:00 2001 From: Varun Gokulnath Date: Thu, 30 Apr 2026 11:36:45 -0700 Subject: [PATCH] fix: use Microsoft-Hyper-V feature name on Windows Client SKUs 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" --- helpful_tools/Install-DockerCE/install-docker-ce.ps1 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/helpful_tools/Install-DockerCE/install-docker-ce.ps1 b/helpful_tools/Install-DockerCE/install-docker-ce.ps1 index df0ff7a..4c29230 100644 --- a/helpful_tools/Install-DockerCE/install-docker-ce.ps1 +++ b/helpful_tools/Install-DockerCE/install-docker-ce.ps1 @@ -303,7 +303,16 @@ Install-ContainerHost if ($HyperV) { - Install-Feature -FeatureName Hyper-V + # Add-WindowsFeature (ServerManager) uses "Hyper-V"; Enable-WindowsOptionalFeature (DISM) + # requires "Microsoft-Hyper-V". Pass the correct name depending on which API is available. + if (Get-Command Get-WindowsFeature -ErrorAction SilentlyContinue) + { + Install-Feature -FeatureName Hyper-V + } + else + { + Install-Feature -FeatureName Microsoft-Hyper-V + } } if ($global:RebootRequired)