我正在按照官方指南在Homestead上运行Laravel 5.1.

但当我try 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.

try vagrant destroy并删除~/.homestead文件夹以从头开始,但结果相同.

使用Ubuntu 16.04 64位、Vagrant 1.8.4和VirtualBox 5.0.18.虚拟化在我的计算机中启用,其他设备启动时不会出现问题.

推荐答案

Running Win 10 Pro v 1607、VirtualBox 5.0.30、Vagrant 1.9.1和Homestead 1.0.1.

我的问题和上面描述的一样.Wagrant up命令将干净地运行,但在SSH username: private key消息处挂起.

当我改变虚拟盒中的网络设置时,终于开始工作了.

  1. 使用windows UI启动VirtualBox程序
  2. 单击"适配器1"选项卡中的"网络",然后打开"高级"
  3. 单击"电缆连接"复选框
  4. 在控制台$prompt,vagrant halt
  5. 然后vagrant up

一切都如期进行.解开"电缆连接",再次将流浪者吊死.重置"电缆连接"并再次正确运行.

导入基本Lavel/Homestead框的默认设置会使"电缆连接"设置处于未选中/关闭状态

vagrant issue 7648 for some background

如果不想一直勾选电缆连接盒,永久性解决方案是:

Homestead文件夹中定位Vagrantfile文件(可能其文件路径为~/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盒子可以使用

Laravel相关问答推荐

未将Laravel Blade属性传递给组件或类

使用Laravel判断其他数据库中是否存在记录

V-icon 在 Vuetify 3 中不显示图标

阻止用户查看其他用户正在查看的内容的最佳方法是什么?

使用 Laravel 计算页面浏览量

Laravel 5 - 更改模型文件位置

在 laravel 5.3 中截断的错误日志(log)

Laravel 从 5.1 升级到 5.2.0 错误

如何为路由 laravel 5 使用OR中间件

Laravel 框架类在 PHPUnit 数据提供程序中不可用

在 Laravel 中下载后如何重定向?

未定义的类常量App\Providers\RouteServiceProvider::HOME

未找到列:1054 未知列 laravel

Laravel:在另一个控制器中加载方法而不更改 url

laravel 队列 - 同步驱动程序如何工作?它是在单独的进程/线程还是主执行线程中执行?

在 laravel 的测试套件中只运行一个单元测试

laravel如何访问具有表编号名称的列?

Laravel 单元测试依赖注入

如何判断 Laravel 集合是否为空?

使用 Carbon 将小时转换为 PM 和 AM