更新 win10 后 Homestead 报错问题解决

分享 LightJoe ⋅ 于 2年前 ⋅ 最后回复由 mouson 2年前 ⋅ 3700 阅读

我的个人博客地址:博客

报错

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

解决方案

  1. 安装Virtualbox 5 和 Vagrant 1.7.4
  2. 注释homestead.rb第17行: config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10"
  3. 注释path ~\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\providers\virtualbox\action.rb第64行:b.use ClearNetworkInterfaces
  4. 若是第一次安装homestead 用homestead init 若是因为更新win10而导致的问题,运行homestead up
  5. 然后运行homestead halt关闭box
  6. 打开virtualbox ,管理->全局设定->网络->仅主机(host-only)网络->随便修改一个虚拟网卡,Ip为:192.168.10.10
  7. 设置Homestead虚拟机,网络->网卡2->选中第6步设置的host-only的网卡保存
  8. 运行 homestead up0 你的homestead 又复活了

参考链接

  1. laracast.com
  2. Hoang Stark's Blog
本帖已被设为精华帖!
回复数量: 8
暂无评论~~
  请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!
Ctrl+Enter