Vagrant SSH失败,VirtualBox

卢克

当进入ssh部分时,vagrant up失败:

myterminal$ vagrant up
[default] VM already created. Booting if its not already running...
[default] Running any VM customizations...
[default] Clearing any previously set forwarded ports...
[default] Forwarding ports...
[default] -- ssh: 22 => 2222 (adapter 1)
[default] -- db2: 30003 => 30003 (adapter 1)
[default] Cleaning previously set shared folders...
[default] Creating shared folders metadata...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] Failed to connect to VM!
Failed to connect to VM via SSH. Please verify the VM successfully booted
by looking at the VirtualBox GUI.

然后,当我随后尝试使用vagrant ssh或vagrant reload或类似方法进行连接时,得到以下信息:

myterminal$ vagrant reload
[default] Attempting graceful shutdown of linux...
SSH connection was refused! This usually happens if the VM failed to
boot properly. Some steps to try to fix this: First, try reloading your
VM with `vagrant reload`, since a simple restart sometimes fixes things.
If that doesn't work, destroy your VM and recreate it with a `vagrant destroy`
followed by a `vagrant up`. If that doesn't work, contact a Vagrant
maintainer (support channels listed on the website) for more assistance.

请帮忙!我真的很为难。

亲切的问候,

路加

马克·切佛顿(Mark Cheverton)

我在安装程序中遇到了这个问题,最终将其范围缩小到了我在本地主机文件上添加了一个名称的事实。所以我有:

127.0.0.1 localhost myname myalias

删除了myalias我添加的内容,它可以正常启动。感谢@saphirlazuli提供了与网络相关的线索。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章