在Windows10上无法打开/创建Vagrant内部网络。

213

昨天我升级了我的Windows 10到最新更新,现在当我运行vagrant up 命令时,出现了以下错误:

==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

The primary issue for this error is that the provider you're using
is not properly configured. This is very rarely a Vagrant issue.

当我尝试使用图形界面时,出现了这个错误:

Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND).
Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND).

我已重新安装VirtualBox 5.0.10和扩展包,重新配置了Host-Only Ethernet Adapter,但始终出现相同的错误...

有任何想法吗?


这个对我很有帮助:https://www.virtualbox.org/ticket/14832#comment:20 - pravingaikwad07
24个回答

4

我在Windows 8上使用VirtualBox 5.1时遇到了问题。原来问题出在我安装的Kaspersky病毒保护软件上。它在Windows侧的Host-only适配器上添加了“Kaspersky Anti-Virus NDIS 6 Filter”。当我禁用该过滤器后,虚拟机就可以正常启动:

host-only network adapter properties


1
在我的情况下,是Avast导致的..我从属性窗口卸载了它..现在一切正常并且工作正常。 - Ehsan Waris
谢谢你指出防病毒软件!在我的情况下,安装了卡巴斯基安全连接工具(但已禁用)。卸载后,问题得以解决。 - Serge S.

3

我已经工作了一段时间,你只需要打开VirtualBox。

文件 > 首选项 / 网络 > 仅主机网络

你将看到VirtualBox Host-Only Ethernet Adapter。

单击它,然后进行编辑。

我的vagrant VM的IP设置为192.168.10.10,您应该根据您的VM IP进行编辑。

这是我的网络设置;

网络详细信息:适配器设置

网络详细信息:DHCP服务器设置


2

我有Windows 8.1,使用VirtualBox 5.0.16.105871时遇到了问题。我尝试了这里、VirtualBox官网和其他论坛上的所有建议,但都没有解决我的问题。当我尝试使用host-only接口启动虚拟机时,出现了这个错误:

Failed to open a session for the virtual machine LinuxVMDev0.

Failed to open/create the internal network 'HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter' (VERR_INTNET_FLT_IF_NOT_FOUND).

Failed to attach the network LUN (VERR_INTNET_FLT_IF_NOT_FOUND).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

最终对我有用的唯一解决办法是:

  1. 卸载 5.0.16 版本
  2. 安装没有这个问题的 4.3.36 版本(至少在我的电脑上如此)
  3. 在不卸载 4.3.36 的情况下,以默认方式安装 5.0.16 版本

(始终以管理员身份安装,即以管理员身份运行安装程序。)

尝试了几天不同的解决方案后,这种方法对我有效。


2

我找到了解决我的问题的方法, 我的网络适配器之间存在冲突,我只需禁用出现在错误消息中的那个适配器,然后重新启动正在运行的命令,Windows会在多个批准消息之后创建一个新的适配器。

希望这个解决方案能在某些情况下有所帮助。


谢谢!这对我有用,但不明白为什么。 - Jie Zhang

2
如果接受的https://dev59.com/TFsX5IYBdhLWcg3wf_v3#33733454对你无效,那么禁用其他已启用的以太网卡。之后再次尝试运行你的 vagrant 脚本,它将为你创建一个新的网络卡。对我来说是第三个。

enter image description here


1

对我来说,将VirtualBox更新到5.1.23版本解决了这个问题。您可以从官方网站下载Windows版本。


1
我的解决方案是更新VirtualBox。
我首先在Windows 8.1上进行了Docker工具箱(v1.12.5)的新安装,遇到了这个问题。对我有用的是更新VirtualBox。然后,在进行了一些Windows更新后,我又遇到了同样的问题,更新VirtualBox再次解决了这个问题。

我只是将VirtualBox更新到(当前)版本Version 5.2.4 r119785,问题就解决了... - Calcutta

1
在我的情况下,我只需要执行以下操作:
1- 更新Hyper-V配置,如此图片所示。 enter image description here 2- 重新启动计算机。
3- 运行VirtualBox。
4- 运行vagrant up。

0

我尝试了这个页面上的每一件事情(感谢大家!)。 但是没有任何作用。 经过几个小时的努力,我终于让它工作了。

我的问题是在“检查默认状态步骤中出现错误”的前面没有错误提示。

start.sh脚本中的这行代码失败了。

VM_STATUS="$( set +e ; "${DOCKER_MACHINE}" status "${VM}" )"

在命令提示符下运行以下代码行,可以返回“Running”。
D:\Dev\DockerToolbox\docker-machine.exe status default

所以我开始按照Github链接中的所有修复步骤,并找到了解决方法。

在start.sh脚本中,我修改了这一行:

VM_STATUS="$( set +e ; "${DOCKER_MACHINE}" status "${VM}" )"

VM_STATUS="$(${DOCKER_MACHINE} status ${VM})"

0
打开控制面板 >> 网络和共享中心。现在点击“更改适配器设置”。右键单击名称或设备名称与VirtualBox Host-Only Ethernet Adapter #3相匹配的适配器,然后单击“属性”。点击“配置”按钮。
现在点击“驱动程序”选项卡。点击“更新驱动程序”。选择“从计算机上的可用驱动程序列表中让我选择”。选择你获得的选项,然后点击“下一步”。点击“关闭”以完成更新。现在回到你的终端/ Powershell /命令窗口并重复vagrant up命令。这次应该可以顺利工作。

https://www.howtoforge.com/setup-a-local-wordpress-development-environment-with-vagrant/


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接