Laravel Homestead流浪汉超时

卡米洛

我正在遵循在Homestead上运行Laravel 5.1的官方指南。

但是当我尝试时,vagrant up它挂断了homestead-7: SSH auth method: private key消息并最终超时:

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 the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

我的SSH密钥是使用生成的ssh-keygen -t rsa -C "you@homestead"

无法通过访问机器vagrant ssh,它输出ssh_exchange_identification: read: Connection reset by peer

尝试vagrant destroy并删除该~/.homestead文件夹以从头开始重新启动,但结果相同。

使用Ubuntu 16.04 64位,Vagrant 1.8.4和VirtualBox 5.0.18。我的计算机中启用了虚拟化,其他设备可以正常启动。

北汉普顿

运行Win 10 Pro v 1607,VirtualBox 5.0.30,Vagrant 1.9.1和Homestead 1.0.1。

我遇到了与上述相同的问题。Vagrant up命令可以正常运行,但是挂在SSH username: private key消息上。重新安装,检查.yaml文件,重新创建ssh密钥-尝试了所有常见的操作,但均未成功。

当我在虚拟盒子中更改网络设置时,终于可以工作了。

  1. 使用Windows UI调出VirtualBox程序
  2. 单击网络-在“适配器1”选项卡中,然后打开“高级”
  3. 单击“电缆连接”复选框
  4. 在控制台$提示符下, vagrant halt
  5. 然后 vagrant up

然后所有工作都按预期进行。未打勾的“电缆已连接”,又无所事事被绞死。重置“电缆已连接”,并重新开始正常运行。

导入基础Laravel / Homestead框的默认设置未选中/关闭“电缆连接”设置

有关某些背景,请参见无业游民问题7648

如果您不想一直打勾电缆连接框,则永久性解决方法是:

Vagrantfile文件Homestead夹中找到文件(可能其文件路径为~/Homestead/Vagrantfile),并在Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|阻止修复问题中添加以下内容

config.vm.provider 'virtualbox' do |vb|
    vb.customize ['modifyvm', :id, '--cableconnected1', 'on']
end

通过对Vagrantfile的此更改,vagrant up可以在新导入的laravel / homestead框上使用

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

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

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章