vagrant up启动虚拟机出现Time out问题时可尝试的解决

3 篇文章 0 订阅
1 篇文章 0 订阅
博主在尝试使用Vagrant启动Linux时遇到SSH连接超时的问题,尝试了开启VT、修改Vagrantfile等方法无效。最终通过升级VirtualBox和Vagrant到最新版本,并使用中科大镜像源加速下载CentOS7,成功解决了问题。这个解决方案可能适用于遇到类似问题的用户。
摘要由CSDN通过智能技术生成

问题:使用vagrant up指令启动linux,流程走到SSH auth method :private key时走不动,出现以下报错。

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.

解决:

网上看了很多方法,比如开启电脑vt,修改vagrantfile文件等。

因为自己电脑用的matebook14,本身就默认开启vt,所以以上方法都不管用。

在google时看到有外国网友说可以使用最新版本的virtualbox和vagrant来解决,于是我就把自己的旧版本卸载了,重新安装最新版本的virtualbox和vagrant。

在初始化centos7时,使用中科大的镜像版,可以达到10M/s,很快下载完。

  • vagrant init centos7 https://mirrors.ustc.edu.cn/centos-cloud/centos/7/vagrant/x86_64/images/CentOS-7.box

这套流程下来,vagrant up终于可以正常启动,也可以vagrant ssh登录了。

具体的出错环节不确定,可能是版本问题,如果有相同情况的朋友可以考虑这样尝试一下。

评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值