当前位置:博客首页>>分享经验 >> 阅读正文

win10中vagrant报错Failed to create the host-only adapter

作者: 郑晓 分类: 分享经验 发布于: 2018-04-28 19:00 浏览:6,717 评论(1)


我的环境:Windows10  + vagrant 2.0.4 + virtualbox4.3.12

当在win10中执行vagrant up启动虚拟机环境时报错:Failed to create the host-only adapter


==> default: Clearing any previously set network interfaces...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: E_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "int __cdecl handleCreate(struct HandlerArg *,int,int *)" at line 66 of file VBoxManageHostonly.cpp

之前在win7和macos中使用,并没有发生此类错误,Google后发现这就是virtualbox在win10中的一个bug,官方已给出解决办法:
下载补丁:https://www.virtualbox.org/attachment/ticket/14040/VBox-Win10-fix-14040.exe
下载后,右键,以管理员权限运行,运行后只会有一个白色小框,上面描述了这个补丁的基本信息。
命令中再次执行vagrant up,已经没有上面的错误了。

以后再启动虚拟机就不需要这个补丁了。

       

本文采用知识共享署名-非商业性使用 3.0 中国大陆许可协议进行许可,转载时请注明出处及相应链接。

本文永久链接: https://www.zh30.com/win10-vagrant-up-failed-to-create-the-host-only-adapter.html

win10中vagrant报错Failed to create the host-only adapter:目前有1 条留言

用户评论头像 钟水洲发表于 2018年05月01日 20:38[回复]

五一快乐,混个脸熟!

发表评论

change vcode