docker - 在 Windows 2019 服务器上运行 linux 容器时出错

我只是在 Windows 2019 服务器上安装 docker 来运行 linux 容器。

我关注这个 guide ,“在 Windows Server 2019 上运行 Linux 容器”一章。
当我尝试运行 bash shell 时,出现以下错误:

docker.exe: failed to register layer: failed to start service utility VM (applydiffe53547ea1d150a4e4afba05378a3a45be5ea769d52fddf03ff25dbd09e43d20d): container e53547ea1d150a4e4afba05378a3a45be5ea769d52fddf03ff25dbd09e43d20d_svm encountered an error during CreateContainer: failure in a Windows system call: The virtual machine could not be started because a required feature is not installed.



任何人都知道缺少什么功能?

更新:
看来问题与程序上的第一个错误有关。
运行时:
Get-VM WinContainerHost | Set-VMProcessor -ExposeVirtualizationExtensions $true

它抛出错误:
Get-VM : Hyper-V was unable to find a virtual machine with name "ContainerHost". 

女巫我放弃相信这是脚本中的指南,因为没有任何命令可以创建这个 WinContainerHost 虚拟机。

解决比较麻烦,有两种类型的容器,hyper-v 和服务器容器,发布在这个 guide .我不确定要走哪条路。我很迷茫。

最佳答案

抱歉,我没有足够的声誉来评论/询问更多信息。

Hyper-V containers or Moby VM运行 Linux 容器时是必需的——运行这些容器需要虚拟化。所以在这种情况下,你不能使用“服务器容器”。

启用 VT-x 例如来自 BIOS 的虚拟化 - 嵌套虚拟化的强制要求。使用 AWS,您需要 Bare Metal instance .

如果这些都可以,您可以尝试已经提到的命令

Get-VM *WinContainerHost* | Set-VMProcessor -ExposeVirtualizationExtensions $true

相反,如果它们的名称有所不同。如果仍然没有成功,Get-VM命令应该列出所有虚拟机,输出是什么?

您可以安装运行 LCOW 所需的模块
Install-WindowsFeature -Name Hyper-V,Containers -IncludeAllSubFeature -IncludeManagementTools

然后再试一次。如果还是不存在here is the script用于创建“ContainerHost”。

https://stackoverflow.com/questions/58289749/

相关文章:

image - 从输入图像获取RGB像素并在opencv中重建输出图像

image - 将 GDIPlus::Bitmap 转换为 cv::Mat(OpenCV C++ 接

opencv - 在opencv中读写图像

opencv - cvSetErrMode 不工作

opencv - createVideoWriter()openCV中fps的最佳值

opencv - 检测视频帧中的现实世界对象

visual-studio-2010 - 我无法使用 VS2010 运行 openCV2.3.1

opencv - 什么最适合您的视频跟踪?为什么?

memory - cvShowImage和Kinect SDK的内存问题:骨架查看器

docker - 为什么 Neo4J docker 身份验证不起作用