加入收藏 | 设为首页 | 会员中心 | 我要投稿 聊城站长网 (https://www.0635zz.com/)- 智能语音交互、行业智能、AI应用、云计算、5G!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Vagrant报错情况如何判断原因及处理

发布时间:2023-05-18 14:14:25 所属栏目:Linux 来源:
导读:这篇文章给大家介绍了“Vagrant报错情况怎样判断原因及处理”的相关知识,讲解详细,步骤过程清晰,有一定的借鉴学习价值,因此分享给大家做个参考,感兴趣的朋友接下来一起跟随小编看看吧。

vagrant报
这篇文章给大家介绍了“Vagrant报错情况怎样判断原因及处理”的相关知识,讲解详细,步骤过程清晰,有一定的借鉴学习价值,因此分享给大家做个参考,感兴趣的朋友接下来一起跟随小编看看吧。
 
vagrant报错,提示Warning: Authentication failure. Retrying...,重试多次后失败, 并且运行完毕后没有共享文件夹
 
提示信息如下:
 
default: Waiting for machine to boot. This may take a few minutes...
 
default: SSH address: 127.0.0.1:2200
 
default: SSH username: vagrant
 
default: SSH auth method: private key
 
default: Warning: Authentication failure. Retrying...
 
default: Warning: Authentication failure. Retrying...
 
default: Warning: Authentication failure. Retrying...
 
default: Warning: Authentication failure. Retrying...
 
default: Warning: Authentication failure. Retrying...
 
default: Warning: Authentication failure. Retrying...
 
default: Warning: Authentication failure. Retrying...
 
default: Warning: Authentication failure. Retrying...
 
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.
 
通过上面的错误信息,我们发现并不是config.vm.boot_timeout的问题, 因为我们已经可以连接虚拟机了。 Authentication failure说明认证失败, 猜测可能是ssh默认登陆问题, 简单的处理方法:
 
在Vagrantfile配置文件中添加了两行代码,使用明文用户名密码
 
注意: 如果你改过vagrant的密码,那么请填写改后的正确密码。
 
config.ssh.username = "vagrant"
 
config.ssh.password = "vagrant"
 
保存
 
vagrant reload
 
发现问题解决啦!证明我的猜测是对的
 
 

(编辑:聊城站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!