VirtualBox中的Docker

Kam*_*l_H 8 virtualbox docker

简而言之:是否可以在VirtualBox(Windows 10 Enterprise)中运行docker容器(microsoft / windowsservercore)。主机操作系统是Windows 10专业版吗?

Long:我设法在VirtualBox(Win10Ent)中安装和启动docker,但是当我尝试创建容器时,出现以下错误:

docker.exe: Error response from daemon: container b9aef43f6b30853bc1f32fc663fdb5155a62f0dcb4be860c23a8b48fefae4d0a encountered an error during CreateContainer: failure in a Windows system call: No hypervisor is present on this system.
Run Code Online (Sandbox Code Playgroud)

是一个类似的问题,结论是VirtualBox不支持嵌套虚拟化,因此Docker无法在其中运行。

话虽如此,在“设置”->“系统”->“加速”->“硬件虚拟化”下,VirtualBox机器的选项是什么?如果VirtualBox不支持嵌套虚拟化,您能否解释一下“设置”选项卡的真正含义?

Sre*_*eni 7

Virtualbox硬件虚拟化选项是为了允许处理器提供的虚拟化功能(https://www.virtualbox.org/manual/ch10.html)。这对嵌套虚拟化没有帮助。只要内部没有运行管理程序,就可以在Virtualbox的Docker中运行。当我们在Virtualbox中的Linux系统上运行Docker时就是这种情况。使用Windows服务器时,它们还运行hyperv,并在运行Docker的Windows服务器上运行hyperv。这就是为什么这里需要嵌套虚拟化的原因。对于这种情况,请使用支持嵌套虚拟化的Vmware Player之类的工具。在需要嵌套虚拟化的情况下,我使用VMware Player。另一个选择是使用具有hyperv的本机Windows服务器。