ITADN

`install-docker-ce.ps1` should install the Windows feature `Microsoft-Hyper-V`, not the non-existent Windows feature `Hyper-V`

#630Openlinghengqian 创建于 2026-02-22
enhancementtriage
L
linghengqiancommented
**Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - See https://github.com/microsoft/Windows-Containers/issues/227 . **Describe the solution you'd like** A clear and concise description of what you want to happen. - `install-docker-ce.ps1` should install the Windows feature `Microsoft-Hyper-V`, not the non-existent Windows feature `Hyper-V`. See https://github.com/microsoft/Windows-Containers/blob/6ace4f158e85674df5a246f7173ecf1109234d74/helpful_tools/Install-DockerCE/install-docker-ce.ps1#L306 - Currently, if the following command is executed only in PowerShell 7, ```powershell Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -OutFile ./install-docker-ce.ps1 ./install-docker-ce.ps1 docker run hello-world:nanoserver ``` - This will result in the following error log: ```powershell PS C:\Users\lingh> docker run hello-world:nanoserver Unable to find image 'hello-world:nanoserver' locally nanoserver: Pulling from library/hello-world 77321bd03612: Pull complete b282ab27bbb7: Pull complete dce32bbed4f4: Pull complete Digest: sha256:17db24031879dda57a6541b9d3db5dc16ddf3e03145ccfd0e0c30855bac658ea Status: Downloaded newer image for hello-world:nanoserver docker: Error response from daemon: hcs::CreateComputeSystem 665b048b75a12cef971348db7820758490a4e076b3647c64bee0791e53ff5727: The request is not supported. Run 'docker run --help' for more information ``` - This means users always need to additionally execute `Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All`. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. - Null. **Additional context** Add any other context or screenshots about the feature request here. - Early investigations can be found at https://www.yuque.com/linghengqian/meve2v/tlc6v3wg2gks3ug3 .
1 条评论