我有一个功能齐全的流浪者现在已经三个月了,但是在过去的三天里,每当我尝试流浪汉或流浪汉重新加载时我都会收到错误。
这是我在运行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。我也尝试了here给出的解决方案,但由于我的虚拟框无法登录,因此无法解决。
然而,GUI向我展示了这个:
keys: press S to skip mounting or M for manual recovery
我一个接一个地尝试了这两个键,但问题仍然存在。
有没有人能够提供解决方案,但流浪者还没有在网上广泛报道,我找不到这种情况发生的原因。
答案 0 :(得分:10)
在努力解决不同问题上的所有各种选项之后,我仍然面临同样的问题。 最后,我做了一个
vagrant destroy
接着是
vagrant up
我的系统再次运行。
注意:如果您也有直接关闭计算机的习惯,很快就会遇到这个问题!在你的流浪者终端(vagrant ssh
)中,总是去找:
sudo shutdown -h now
或者您只需输入
即可vagrant halt
从您的ssh注销后。
PS:对于那些可能害怕在vagrant destroy
期间丢失您的数据/代码/任何内容的人,您可能会放松!我对使用该命令犹豫不决,但根据文档,它所做的只是:
此命令停止正在运行的计算机Vagrant正在管理和销毁在计算机创建过程中创建的所有资源。运行此命令后,您的计算机应处于干净状态,就好像您从未创建过客户机一样。
这意味着您的代码将保持不变,下一个vagrant up
将导致您离开时的状态相同,但现在问题已解决。 :)
答案 1 :(得分:0)
而不是破坏图像。通过首先在Vagrantfile中添加以下行/取消注释以打开virtualbox gui,我能够解决此问题。
}
然后我确实无所事事地重新启动它。它同时启动了命令行和virtualbox gui。 Gui向我询问了SSH密码(该密码是我上次登录到ssh时设置的),并且能够登录。后来我关闭了图像。后来我从Vagrantfile中删除了上面的gui行,它仍然可以正常启动。