我现在有一个功能齐全的流浪者已经三个月了,但是在过去的三天里,每当我尝试运行 vagrant up 或 vagrant reload 时,我都会遇到错误。
这是我在运行时遇到的错误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.
我正在使用 Elementary OS Luna 并根据建议的一些答案更新了最新版本的 vagrant 和 virtualbox。但问题依然存在。
我已经尝试了大多数流行的解决方案,包括启用 GUI 和this。我也尝试了此处给出的解决方案,但由于我的虚拟框无法登录,所以无法成功。
然而,GUI 向我展示了这个:
keys: press S to skip mounting or M for manual recovery
我一个一个地尝试了两个键,但问题仍然存在。
之前有没有人可以提供解决方案,vagrant 尚未在网络上广泛覆盖,我找不到发生这种情况的原因。
在对不同问题的所有可用选项进行了挣扎之后,我仍然面临着同样的问题。最后,我做了一个
其次是
我的系统再次运行。
注意:如果你也有直接关机的习惯,你可能很快就会遇到这个问题!在您的 vagrant 终端 (
vagrant ssh
) 中,始终执行以下操作:或者你可以直接输入
从 ssh 注销后。
PS:对于那些可能害怕在 期间丢失数据/代码/任何东西的人
vagrant destroy
,您可以放松一下!我对使用该命令犹豫不决,但根据文档,它所做的只是:这意味着您的代码将保持不变,下一个
vagrant up
将引导您进入与离开时相同的状态,只是现在问题已解决。:)