vagrant 无法启动出现Which interface should the network bridge to的问题

运行 vargant up命令启动homestead 出无法启动的问题,卡在了Which interface should the network bridge to无法进入下一步

Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Clearing any previously set forwarded ports...
==> homestead-7: Clearing any previously set network interfaces...
==> homestead-7: Available bridged network interfaces:
==> homestead-7: When choosing an interface, it is usually the one that is
==> homestead-7: being used to connect to the internet.
    homestead-7: Which interface should the network bridge to?

 最后测试发现是网络配置问题,进入文件:scripts\homestead.rb 注释配置 config.vm.network ,能正常启动,但是外网无法访问

    

config.vm.network :public_network, ip: settings["ip"] ||= "192.168.0.60"

  

启动后IP可能出现10.0.2.15 ,无法ping通的问题。经查找相关资料,需要做以下配置,设置VirtualBox 为桥接

 

           

 

如果界面名称显示未指定,需要安装虚拟网卡驱动VirtualBox 网络驱动

 

  

安装方法:

 

驱动位置:Oracle\VirtualBox\drivers\network\netlwf.inf

安装驱动成功后即可在桥接网卡显示界面名称。

posted @ 2020-12-05 17:05  fogwu  阅读(2110)  评论(0编辑  收藏  举报