启动提示下面的异常:
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系统