user269867
user269867

Reputation: 3972

Laravel 5.3 Homestead Installation on Win 10

Following >> https://laravel.com/docs/5.3/homestead

bash init.sh

cp: overwrite '/c/Users/myuser/.homestead/Homestead.yaml'? y
cp: overwrite '/c/Users/myuser/.homestead/after.sh'?
cp: overwrite '/c/Users/myuser/.homestead/aliases'?
Homestead initialized!

I don't know if these needs to be overwritten ?

Also , I configure homestead.yaml

folders:

  - map: ~/Homestead
      to: /home/vagrant/Code

It is showing error[The host path of the shared folder is missing: ~/Homestead]

My homestead installation is $ pwd /Homestead

I am sure some steps are missing can someone help

Installation method - Per Project Installation

$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Running provisioner: shell...
SSH authentication failed! This is typically caused by the public/private
keypair for the SSH user not being properly set on the guest VM. Please
verify that the guest VM is setup with the proper public key, and that
the private key path for Vagrant is setup properly as well.

It is a fresh installation !

vagrant destroy && up

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: Remote connection disconnect. Retrying...
    default: Warning: Authentication failure. 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.

Upvotes: 0

Views: 1094

Answers (1)

user2463
user2463

Reputation: 752

Yes, you should overwrite these files so as to have a clean installation of Homestead (just in case). Now, the reason you are getting this error is because your YAML configuration is wrong. Assuming you have your Laravel code in a Code folder in your Documents folder, your YAML should look like this (NB: this is Windows specific!):

folders:
    - map: "C:/Users/Username/Documents/Code"
      to: "/home/vagrant/Code"

You need to map the folder containing your local code to a folder in your virtual machine. This will then be set up using shared folders. This way, any code changes in your Code folder will be mirrored to your VM.


Personally, I prefer the Per Project Installation because I can have multiple projects running on different VMs mapped to different domains, at the same time. Check it out here: https://laravel.com/docs/5.3/homestead#per-project-installation

Upvotes: 2

Related Questions