无法创建仅用于主机的适配器-windows 10、docker、virtualbox
在使用docker工具箱一段时间后,我最近遇到了这个问题 是否在windows update之后开始发生 Windows 10 Home-64 已卸载并重新安装Docker工具箱 已卸载并重新安装各种版本的VirtualBox 仍然会得到相同的错误无法创建仅用于主机的适配器-windows 10、docker、virtualbox,docker,virtual-machine,virtualbox,docker-machine,docker-toolbox,Docker,Virtual Machine,Virtualbox,Docker Machine,Docker Toolbox,在使用docker工具箱一段时间后,我最近遇到了这个问题 是否在windows update之后开始发生 Windows 10 Home-64 已卸载并重新安装Docker工具箱 已卸载并重新安装各种版本的VirtualBox 仍然会得到相同的错误 Running pre-create checks... Creating machine... (default) Copying C:\Users\me\.docker\machine\cache\boot2docker.iso to C:\Us
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\me\.docker\machine\cache\boot2docker.iso to C:\Users\me\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to create a network adapter. Sometimes, such confirmation window is minimized in the taskbar.
(default) Creating a new host-only adapter produced an error: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe hostonlyif create failed:
(default) 0%...
(default) Progress state: E_FAIL
(default) VBoxManage.exe: error: Failed to create the host-only adapter
(default) VBoxManage.exe: error: Querying NetCfgInstanceId failed (0x00000002)
(default) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(default) VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 71 of file VBoxManageHostonly.cpp
(default)
(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
Looks like something went wrong in step ´Checking if machine default exists´... Press any key to continue...
这个答案与Docker没有特别的关系,但这是Google上最近的一个顶部堆栈溢出搜索结果(连同问题),搜索VirtualBox中的“无法创建仅主机适配器”错误消息,我把这个留在这里,希望它能帮助其他人 另外,如果可以,我建议您使用Docker工具箱代替Docker工具箱在Windows上运行Docker(需要Windows 10 Professional或Enterprise 64位)
我的设想:
- Windows10Pro版本1709
- 我尽可能使用Hyper-V来运行虚拟机,但需要运行旧的VirtualBox虚拟机,并将Windows XP作为来宾操作系统
- VirtualBox 5.2.4-119785(Windows仅支持单个虚拟机监控程序-如果您需要在Hyper-V和VirtualBox之间切换,我建议您这样做)
- VirtualBox未(或未能)在安装时创建仅限主机的适配器
这对于VirtualBox来说当然不是一个新问题,因为在他们的公共bugtracker和其他地方有大量的相关票证,有些已经超过2年了。我有一种感觉,对很多人来说,这个问题可能与我上面所描述的有关,所以希望这能帮助他们
编辑01/15
嗯,回想起来,我不确定Windows使用Hyper-V“外部虚拟交换机”进行网络连接有多正常。如果我没记错的话,Hyper-V创建的“默认”交换机通过NAT向来宾提供连接是一个相对较新的东西,在需要添加和使用“外部”交换机之前。。。在我的家用电脑上,如果没有“外部”交换机,物理网络适配器上的正常(TCP/IPv4等)协议驱动程序将保持启用状态,而物理适配器和虚拟适配器上的“Hyper-V可扩展虚拟交换机”将被禁用。我还没有机会测试在这种情况下添加新的“外部虚拟交换机”会发生什么;dr如果您使用的是Trend Micro或Symantec防病毒解决方案,请尝试卸载Virtualbox,然后在禁用防病毒的情况下重新安装。 它也可以与其他人一起工作 我把这个答案记录在案 我和我的同事在从Windows10Pro版本1703升级到1709版本后,开始出现类似的问题 我试着回滚到1703版本,它成功了,但这当然不是一个可接受的解决方案 出于某种原因,这与防病毒有关,在我们的案例中,防病毒是Trend Micro Office扫描。在禁用防病毒功能的情况下进行干净的重新安装后,仅限主机的适配器再次可用 该问题已在Virtualbox论坛和问题跟踪器中报告:
不幸的是
C:\Program Files\Oracle\VirtualBox\VBoxManage.exe hostonlyif create
docker-machine create -d "virtualbox" default
docker-machine status
Running