vagrant up启动报错Timed out while waiting for the machine to boot. This means thatVagrant was unable to

今天早上vagrant up报错:

Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value

一开始我启动的时候报错了网上找了一下错误原因,之后看到了这个文章:

vagrant up启动虚拟机出现Time out问题时可尝试的解决_TCCTTCCT的博客-CSDN博客_config.vm.boot_timeout vagrant

发现这个文章的修改太大了,直接重装vagrant+virtualbox,太麻烦。

之后我就在virtualbox中手动启动,之后打开界面看错误,发现启动界面报错了:如下
systemd[1] : failed to load SELinux policy

        我就想起了前一天因为SELinux修改了配置SELINUXTYPE=targed 改成了disabled
因为这个会影响我golang项目访问文件的权限,所以我关闭了,导致启动问题。

        最后按照进入linux启动界面按一直按E,进入启动界面修改配置:
找到 linux16 最后 加上 selinux=0

之后启动了虚拟机,最后修改虚拟机中 /etc/selinux/config配置为:

最后正常关闭虚拟机:

最后进行vagrant up; 就成功啦~!

 喜欢的话点个赞,评个论,如果遇到问题,大家一起探讨,我发现如果启动不了,直接进行手动启动虚拟机,之后查看虚拟机自身的抛出异常,也能很好的解决vagrant启动报错不准确问题,希望大家共勉~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值