Vagrant up and reload - 默认值:警告:连接超时.重试...

ank*_*ita 5 linux virtualbox vagrant

我有一个功能齐全的流浪者现在已经三个月了,但是在过去的三天里,每当我尝试流浪汉或流浪汉重新加载时,我都会收到错误.

这是我跑步时遇到的错误 vagrant reload

default: Attempting graceful shutdown of VM...
default: Guest communication could not be established! This is usually because
default: SSH is not running, the authentication information was changed,
default: or some other networking issue. Vagrant will force halt, if
default: capable.
default: Forcing shutdown of VM...
default: Clearing any previously set forwarded ports...
default: Clearing any previously set network interfaces...
default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
default: Forwarding ports...
default: 80 => 8080 (adapter 1)
default: 22 => 2222 (adapter 1)
default: Running 'pre-boot' VM customizations...
default: Booting VM...
default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. Retrying...
default: Warning: Connection timeout. 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.
Run Code Online (Sandbox Code Playgroud)

我正在使用Elementary OS Luna并更新了最新版本的vagrant以及virtualbox作为一些答案.但问题仍然存在.

我尝试了大多数流行的解决方案,包括启用GUI和这个.我也试过这里给出的解决方案,但由于我的虚拟框没有登录,所以无法解决.

但是,GUI向我展示了这个:

 keys: press S to skip mounting or M for manual recovery
Run Code Online (Sandbox Code Playgroud)

我一个接一个地尝试了这两个键,但问题仍然存在.

有谁曾经提供过这样的解决方案,流浪者在网上还没有被广泛覆盖,我找不到这种情况发生的原因.

ank*_*ita 10

在努力解决不同问题上的所有各种选项之后,我仍然面临同样的问题.最后,我做了一个

vagrant destroy
Run Code Online (Sandbox Code Playgroud)

其次是

vagrant up
Run Code Online (Sandbox Code Playgroud)

我的系统再次运行.

注意:如果您也有直接关闭计算机的习惯,很快就会遇到这个问题!在你的流浪者终端(vagrant ssh)中,总是去找:

sudo shutdown -h now
Run Code Online (Sandbox Code Playgroud)

或者你可以输入

vagrant halt
Run Code Online (Sandbox Code Playgroud)

从您的ssh注销后.

PS:对于那些可能害怕丢失您的数据/代码/期间的人vagrant destroy,您可能会放松!我对使用该命令犹豫不决,但根据文档,它所做的只是:

此命令停止正在运行的计算机Vagrant正在管理和销毁在计算机创建过程中创建的所有资源.运行此命令后,您的计算机应处于干净状态,就好像您从未创建过客户机一样.

这意味着您的代码将保持不变,而下一个vagrant up将导致您离开时的状态,只是现在问题已解决.:)

  • `vagrant destroy`字面上破坏了虚拟机.因此,您丢失了**虚拟机内的任何数据,而不是主机上的数据! (9认同)
  • @ankita,我知道这已经很旧了,但希望它能对某人有所帮助。我不太确定你的代码仍然意味着什么,但你的观点是非常错误的。“vagrant destroy”删除了我的整个虚拟机及其上的所有内容。绝对不是我想要的!Ofc,我先备份了vdkm,但现在我又从头开始了。 (2认同)