使用virtualbox和vagrant搭建centos环境报错问题解决

启动提示下面的异常:

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.

使用的virtualbox的版本是VirtualBox-6.0.10-132072-Win.exe

vagrant版本是VirtualBox-6.0.10-132072-Win.msi。执行vagrant up时报上面的异常,尝试网上很多方法不奏效,后面将VirtualBox-6.0.10卸载,安装VirtualBox-6.1.50-161033-Win.exe(vagrant对应换成vagrant_2.4.1_windows_amd64版本),可正常启动,输入账号vagrant,密码输入vagrant登录成功:

拓展:

1.使用VirtualBox+Vagrant安装的centos默认账号为vagrant,密码vagrant,root账号的密码也是vagrant。 ;

2.VirtualBox+Vagrant安装的系统,如果想用xshell等第三方工具连接,需要修改配置

执行vi /etc/ssh/sshd_config命令,将PasswordAuthentication 的值设置为yes

然后重启sshd服务  service sshd restart,重启成功后即可使用第三方工具通过ssh使用vagrant或root账户连接上VirtualBox+Vagrant安装的linux系统

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值