質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
SSH

SSH(Secure Shell)は、セキュアチャネルを通してデータを交換するためのネットワークプロトコルです。リモートサーバーへのコマンド実行やファイル転送を行う時に一般的に使用されます。

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Laravel 5

Laravel 5は、PHPフレームワークLaravelの最新バージョンで、2014年11月に発表予定です。ディレクトリ構造がが現行版より大幅に変更されるほか、メソッドインジェクションやFormRequestの利用が可能になります。

Q&A

解決済

1回答

869閲覧

vagrantでvagrant upするとssh keyあたりでタイムアウトが起こる

RyoM

総合スコア90

SSH

SSH(Secure Shell)は、セキュアチャネルを通してデータを交換するためのネットワークプロトコルです。リモートサーバーへのコマンド実行やファイル転送を行う時に一般的に使用されます。

VirtualBox

VirtualBoxは、現在米オラクル社が開発している、 x86仮想化ソフトウェア・パッケージの一つです。

Vagrant

Vagrantは、VirtualBox上の仮想マシンを コマンドラインから作成してくれるソフトウェアです。 ビルド環境など容易に構築が可能です。

Laravel 5

Laravel 5は、PHPフレームワークLaravelの最新バージョンで、2014年11月に発表予定です。ディレクトリ構造がが現行版より大幅に変更されるほか、メソッドインジェクションやFormRequestの利用が可能になります。

0グッド

1クリップ

投稿2017/09/01 08:48

お世話になります。
vagrantでlaravelの環境を作ろうと思い、
Homesteadを使おうと思っているんですが、

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.

この部分で止まってしまいます。
原因を調べると、
sshの鍵の場所の参照位置が違うという記事と
vagrant upで失敗する原因が鍵不一致の場合の対処法
64bitOSの仮想化支援機能が有効になっていなからという二つの原因が今のところ考えられます。
VagrantとVirtualBoxでの仮想環境構築(Windows版)
BIOSの設定を見ると、disableになってもいない(それ以前にそれ以外のboxではvagrant upが出来ている)ので、ssh鍵の不一致が問題の可能性が高いと思うんですが、そこの対処がいまいちわかりません。
ちなみに、ssh-configをすると

IdentityFile C:/Users/ユーザー名/.vagrant.d/insecure_private_key

となっております。
もし、お分かりの方がいらっしゃれば回答よろしくお願いいたします。
下記にエラー部分を記載させていただきます。

Bringing machine 'homestead-7' up with 'virtualbox' provider... ==> homestead-7: Importing base box 'laravel/homestead'... ==> homestead-7: Matching MAC address for NAT networking... ==> homestead-7: Checking if box 'laravel/homestead' is up to date... A VirtualBox machine with the name 'homestead-7' already exists. Please use another name or delete the machine with the existing name, and try again. C:\Users\ohs60275\job\Homestead>vagrant up Bringing machine 'homestead-7' up with 'virtualbox' provider... ==> homestead-7: Checking if box 'laravel/homestead' is up to date... ==> homestead-7: Setting the name of the VM: homestead-7 ==> homestead-7: Clearing any previously set network interfaces... ==> homestead-7: Preparing network interfaces based on configuration... homestead-7: Adapter 1: nat homestead-7: Adapter 2: hostonly ==> homestead-7: Forwarding ports... homestead-7: 80 (guest) => 8000 (host) (adapter 1) homestead-7: 443 (guest) => 44300 (host) (adapter 1) homestead-7: 3306 (guest) => 33060 (host) (adapter 1) homestead-7: 5432 (guest) => 54320 (host) (adapter 1) homestead-7: 8025 (guest) => 8025 (host) (adapter 1) homestead-7: 27017 (guest) => 27017 (host) (adapter 1) homestead-7: 22 (guest) => 2222 (host) (adapter 1) ==> homestead-7: Running 'pre-boot' VM customizations... ==> homestead-7: Booting VM... ==> homestead-7: Waiting for machine to boot. This may take a few minutes... homestead-7: SSH address: 127.0.0.1:2222 homestead-7: SSH username: vagrant 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 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.

下記がHomestead.ymlの中身です。

Homestead.yml

1--- 2ip: "192.168.50.10" 3memory: 2048 4cpus: 1 5provider: virtualbox 6 7authorize: ~/.ssh/id_rsa.pub 8 9keys: 10 - ~/.ssh/id_rsa 11 12folders: 13 - map: ~/job 14 to: /home/vagrant/Code 15 16sites: 17 - map: homestead.app 18 to: /home/vagrant/Code/public 19 20databases: 21 - homestead 22 23# blackfire: 24# - id: foo 25# token: bar 26# client-id: foo 27# client-token: bar 28 29# ports: 30# - send: 50000 31# to: 5000 32# - send: 7777 33# to: 777 34# protocol: udp 35

一応、Vagrantfileも載せておきます。

# -*- mode: ruby -*- # vi: set ft=ruby : require 'json' require 'yaml' VAGRANTFILE_API_VERSION ||= "2" confDir = $confDir ||= File.expand_path(File.dirname(__FILE__)) homesteadYamlPath = confDir + "/Homestead.yaml" homesteadJsonPath = confDir + "/Homestead.json" afterScriptPath = confDir + "/after.sh" aliasesPath = confDir + "/aliases" require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb') Vagrant.require_version '>= 1.9.0' Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| if File.exist? aliasesPath then config.vm.provision "file", source: aliasesPath, destination: "/tmp/bash_aliases" config.vm.provision "shell" do |s| s.inline = "awk '{ sub(\"\r$\", \"\"); print }' /tmp/bash_aliases > /home/vagrant/.bash_aliases" end end if File.exist? homesteadYamlPath then settings = YAML::load(File.read(homesteadYamlPath)) elsif File.exist? homesteadJsonPath then settings = JSON.parse(File.read(homesteadJsonPath)) else abort "Homestead settings file not found in #{confDir}" end Homestead.configure(config, settings) if File.exist? afterScriptPath then config.vm.provision "shell", path: afterScriptPath, privileged: false end if defined? VagrantPlugins::HostsUpdater config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] } end end

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

VagrantとVirtualBoxのバージョンアップを試してみてください。
Vagrantがどこかのバージョンから秘密鍵の持ち方を変更したので、それが原因になっている可能性があります。

投稿2017/09/01 14:00

fagai

総合スコア2158

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問