Vagrant ::无法运行流浪汉; 连接超时。重试


3

我开始从wamp迁移到laravel宅基流浪盒,但是当我开始打开盒子时我已经被难倒了。我已经下载并配置了所有资产,然后运行流浪汉启动盒子,但是,这是流浪者的结果:

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> 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 => 8000 (adapter 1)
    default: 3306 => 33060 (adapter 1)
    default: 5432 => 54320 (adapter 1)
    default: 22 => 2200 (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:2200
    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.

这是流浪汉停止的结果:

$ vagrant halt
==> 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...

似乎问题可能是打开SSH。这里的答案https://stackoverflow.com/questions/22575261/vagrant-stuck-connection-timeout-retrying没有帮助,即使它似乎是一个类似的问题。

我正在运行Windows 8.1。


VM 64位?在我的计算机上启用BIOS中的虚拟化功能之前,我遇到了类似的问题。我可以使用32位VM而不是64. ssh超时是VM无法正确启动的症状。
弗雷德魔法奇迹狗

我该怎么说?
davidxd33 2014年

我在BIOS中启用了该功能,它现在似乎正常工作。我有两次远程连接超时,但之后启动了。
davidxd33 2014年

Answers:


0

启动阶段的SSH连接超时可能由以下原因引起:

  • 系统等待用户交互(例如共享分区未准备好),
  • sshd 配置错误,
  • 防火墙配置错误(如果它不是本地的),
  • 您的私钥不匹配,
  • 启动过程需要花费太多时间(尝试增加config.vm.boot_timeout),
  • 检查BIOS中是否启用了虚拟化(根据注释)。

要调试此问题,请将其运行为:

VAGRANT_LOG=debug vagrant up

如果没有什么明显的,那么尝试通过以下方式从另一个终端连接到它vagrant ssh

vagrant ssh-config > vagrant-ssh; ssh -F vagrant-ssh default

如果SSH仍然失败,请使用GUI重新运行它(例如config.gui = true)。

如果不是,请检查正在运行的进程(例如:)vagrant ssh -c 'pstree -a'或验证您的sshd_config


如果它是一次性VM,你可以随时使用destroyup。还可以考虑升级您的Vagrant和Virtualbox。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.