Using a new install of Laravel with Laravel Homestead I've been trying to get Vagrant to boot, but it keeps timing out. I tried using the Default
virtual switch, as well as the DockerNAT
and NewInternalVirtualSwitch
which is a virtual switch I added using the Hyper-V Manager.
I know I can leave the provider as VirtualBox and turn off Hyper-V, but since we use Vagrant and Docker for different application doing this over the last couple days has become tedious since Docker for Windows
on Windows 10 Pro requires Hyper-V to be on so each time you have to shut down and restart in either direction.
Has anyone gotten Laravel Homestead to work using the Hyper-V provider, and what steps did you have to take to get networking to work which appears to be the issue?
Homestead.yaml
ip: 192.168.10.10
memory: 2048
cpus: 1
provider: hyperv
authorize: ~/.ssh/example/id_rsa.pub
keys:
- ~/.ssh/example/id_rsa
folders:
-
map: 'D:\Projects\example\server'
to: /home/vagrant/server
sites:
-
map: server.app
to: /home/vagrant/server/public
databases:
- example
name: example
hostname: example
Vagrant Up
Bringing machine 'example' up with 'hyperv' provider...
==> example: Verifying Hyper-V is enabled...
==> example: Importing a Hyper-V instance
example: Please choose a switch to attach to your Hyper-V instance.
example: If none of these are appropriate, please open the Hyper-V manager
example: to create a new virtual switch.
example:
example: 1) DockerNAT
example: 2) Default Switch
example: 3) NewInternalVirtualSwitch
example:
example: What switch would you like to use? 3
example: Cloning virtual hard drive...
example: Creating and registering the VM...
example: Setting VM Integration Services
example: Successfully imported a VM with name: ubuntu-16.04-amd64_1
==> example: Starting the machine...
==> example: Waiting for the machine to report its IP address...
example: Timeout: 120 seconds
example: IP: fe80::215:5dff:fe38:107
==> example: Waiting for machine to boot. This may take a few minutes...
example: SSH address: fe80::215:5dff:fe38:107:22
example: SSH username: vagrant
example: SSH auth method: private key <--- Stalls out for a couple minutes
Error
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.
Update
Also tried tip 4 using an external virtual switch and it makes it further, but still fails with an error while trying to assign a hostname:
==> example: Machine booted and ready!
==> example: Setting hostname...
No host IP was given to the Vagrant core NFS helper. This is
an internal error that should be reported as a bug.