Laravel Homestead doesn't work, it just keeps timing

I'm trying to set up Laravel Homestead on Windows 8.1 x64 and I can't seem to pass the error below.

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Setting the name of the VM: casensitive_default_1420409560257_10693
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...
    default: Warning: Connection timeout. Retrying...

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.

      

This is a very popular bug with Homestead and I found a couple of similar posts on stackoverflow like one and two . But setting boot_mode in my Vagrantfile didn't solve the problem.

Vagrant.configure("1") do |config|
  config.vm.boot_mode = :gui
end

      

To make sure I have VT-x I downloaded the intels tool I am making: i7 core; and I have verified that virtualization is enabled in BIOS.

In the Vagrantfile, I am using the default settings (most of them seem to be commented out) and I set config.vm.box to:

"laravel/homestead"

      

and my Homestead.yaml is installed (and already had id_ras.pub and id_rsa):

---
ip: "192.168.10.10"
memory: 2048
cpus: 1

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/d/projects
      to: /home/vagrant/projects

sites:
    - map: roopla.app
      to: /home/vagrant/projects/test_app/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

      

It's pretty far from my usual Composer, PHP, GruntJS, BowerJS, AngularJS day and I'm not sure what I'm really doing, initially I was just learning Laravel 4/5 and then I jumped sideways because Homestead looked useful and stuck. so I just blindly follow the instructions, so any pieces of knowledge that can be transferred would be much appreciated.

+3


source to share


1 answer


Make sure you haven't turned it on first Hyper-V

.

Secondly, you might be having problems with ssh keys. The simplest solution is to change your roaming file to not use SSH keys, but your login and password.

Check out my roaming file:

require 'json'
require 'yaml'

VAGRANTFILE_API_VERSION = "2"

homesteadYamlPath = File.expand_path("Homestead.yaml")
afterScriptPath = File.expand_path("after.sh")
aliasesPath = File.expand_path("aliases")

require_relative 'scripts/homestead.rb'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
    if File.exists? aliasesPath then
        config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
    end

    config.ssh.username = "vagrant"
    config.ssh.password = "vagrant"   

    Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))    

    if File.exists? afterScriptPath then
        config.vm.provision "shell", path: afterScriptPath
    end

    config.vm.network "forwarded_port", guest: 11300, host: 11301
end

      



I added 2 lines here:

    config.ssh.username = "vagrant"
    config.ssh.password = "vagrant"  

      

because I had the same problem as you and now Homestead works for me with no problem.

0


source







All Articles