お世話になります。
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
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。