【问题标题】:"vagrant up" it stops at SSH auth method: private key“vagrant up”它在 SSH 身份验证方法处停止:私钥
【发布时间】:2017-09-08 19:40:49
【问题描述】:

我正在尝试在具有宅基地环境的计算机上安装 laravel。我按照official documentation 上的所有步骤操作。当我执行“vagrant up”时,我的控制台显示以下错误。

在 SSH 身份验证方法处停止。以前我用 "ssh-keygen -t rsa -b 4096 -C "me@email.com"

配置了 ssh-keygen

我在 .rb 文件中添加了主机部分:

甚至 .yaml 文件。我想我编辑得当

在 hosts 文件中,我在文件底部添加了:“192.168.10.10 administracio.dev”。

然后当我让这个错误崩溃时,它显示以下错误:

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 和 vagrant up
  • 我已经得到了你提到的所有配置,但是这东西在我的电脑上可以工作,但在我的笔记本电脑上不行。有什么方法可以传递我的所有配置或其他东西?
  • 这里展示代码和配置时,请使用文字,不要使用图片。图片与剪贴板、搜索引擎和屏幕阅读器不兼容,让阅读器更难为您提供帮助。
  • 好的!下次复制。

标签: laravel ssh vagrant virtualbox homestead


【解决方案1】:

经过几天尝试用“SSH auth method: private key”解决问题,发现windows 10和vagrant有冲突。

作为验证虚拟化状态的工具,使用了该程序:“https://www.intel.com/content/www/us/en/download/12136/28539/intel-processor-identification-utility-windows-version .html

我向你展示了初始状态的捕获:

通过禁用以下 Windows 功能来修复它:

一旦上述功能被停用并重新启动计算机,我将分享处理器的新状态,显然虚拟化已经在工作:

PS:关于你已经在板上激活虚拟化(bios)

有了这个解决方案,vagrant 已经非常适合我了。

【讨论】:

    【解决方案2】:

    防火墙消息阻止了启动框。

    第一步

    流浪文件:

    config.vm.provider "virtualbox" 做 |vb|
       vb.gui = 真
    结尾
    

    第二步

    sudo 用户:

    sudo ufw disable

    【讨论】:

      【解决方案3】:

      我遇到了这个问题,这就是我如何让 Vagrant 和 WSL2 并排工作

      我有以下环境:

      • 在 BIOS 中启用硬件虚拟化

      • Windows 10(带有 Release Preview 频道的预览体验计划)

        -- 带有 WSL 2 版本 10.0.19041 Build 19041 的 Windows 10

      • 虚拟盒子 6.1.12

        -- 已安装扩展包

      • 流浪者 2.2.9

      这些是对我有用的设置:

      • Windows Hypervisor 平台:关闭
      • 虚拟机平台:开启
      • 适用于 Linux 的 Windows 子系统:开启

      【讨论】:

        【解决方案4】:

        在运行 Ubuntu 20.04 Focal Fossa (focal64) 时,对我来说最重要的是

        如果该框似乎可以正常启动,您可能需要增加 超时(“config.vm.boot_timeout”)值。

        我更改了我的 Vagrantfile 并添加了这一行:

          config.vm.boot_timeout = 600 # wait max 10 minutes
        

        看来,我的系统上的默认值(300 秒)不足以让它运行

        【讨论】:

          【解决方案5】:

          我今天遇到了同样的问题,我发现我的 VirtualBox 设置(网络 | 高级 | 已连接电缆)设置正确(即选中了复选框。)我开始比较这个已经稳定了几个月的 VM 与我的一些其他虚拟机发现唯一的区别在于网络适配器,因为适配器 2 与其他所有虚拟机不同。

          适配器 1 设置如下:

          Attached To:   NAT
          Adapter Type:  Intel PRO/1000 MT Desktop ....
          

          而适配器 2 设置为以下...

          Attached To:   Host-only Adapter
          Adapter Type:  PCnet-FAST III ...
          

          我从未更改过 VirtualBox 中的任何这些网络设置。一旦我将适配器 2 适配器类型设置为与上述适配器 1 相同的设置,然后我将 vagrant halt 和 vagrant up 并恢复正常。

          【讨论】:

            【解决方案6】:

            解决方案也适用于我:在 Bios 中设置“Intel Virtualization Technology = Enabled”时,“SSH auth method: private key”步骤不再冻结,VM 正常启动。 在Bios中重新设置“Intel Virtualization Technology = Disabled”时,“SSH auth method: private key”步骤再次被冻结。

            主板:华硕 Z170 Pro Gaming (lga1151), Bios 菜单:高级\Cpu 配置, 虚拟盒子:5.1.22, 流浪者:1.9.5, 视窗 10

            【讨论】:

              【解决方案7】:

              (代表 OP 发布)

              解决方法:我在 BIOS 环境中激活了硬件加速。

              【讨论】:

                猜你喜欢
                • 1970-01-01
                • 1970-01-01
                • 2017-12-30
                • 1970-01-01
                • 2021-01-14
                • 2019-10-11
                • 1970-01-01
                • 1970-01-01
                • 2017-04-19
                相关资源
                最近更新 更多