In our company, we're using both Vagrant and Docker, it is currently an internal and overly opinionated pain for those that aren't devops. So in order to use Docker for Windows we all had to update to Windows 10 Pro to use Hyper-V but to use Vagrant we need to turn off Hyper-V. Enabling and disabling Hyper-V on Windows 10 Pro requires a mandatory restart as Windows needs to perform an update in either direction.
Is it possible to use the hyperv provider as an option with Laravel Homestead so Vagrant and Docker can be running, without so much conflict and not require shutting down and restarting each time Hyper-V is required or not required?
v5.0.1 Does have a hyperv provider. Please check out https://www.vagrantup.com/docs/hyperv/limitations.html and report any bugs you run into.
Thanks @svpernova09. This is probably a stupid question. I've pulled in the homestead box v5.0.1 after choosing the Hyper-V provider, but I'll need to update our Laravel project's composer package. Does the box version correspond directly to the package version? There are two major versions above v5.0.1 available on packagist so I'm just verifying since the versions are so different and I wasn't sure if they are one-to-one box-to-package or not, whether there are other differences between versions, or if support of the Hyper-V provider box isn't maintained opposed to the other providers?
You want to change the provider value in your Homestead.yaml and then vagrant destroy, vagrant up.
--
On Dec 11, 2017, 17:23 -0600, Martin Pultz notifications@github.com, wrote:
Thanks @svpernova09. This is probably a stupid question. I've pulled in the homestead box v5.0.1 after choosing the Hyper-V provider, but I'll need to update our Laravel project's composer package. Does the box version correspond directly to the package version? There are two major versions above v5.0.1 available so I'm just verifying since the versions are so different I wasn't sure if they are one-to-one box-to-package or not, and whether there are other differences between versions, or if support of the Hyper-V provider box isn't maintained opposed to the other providers?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
The box version is independent of the Homestead repo version.
--
On Dec 11, 2017, 17:23 -0600, Martin Pultz notifications@github.com, wrote:
Thanks @svpernova09. This is probably a stupid question. I've pulled in the homestead box v5.0.1 after choosing the Hyper-V provider, but I'll need to update our Laravel project's composer package. Does the box version correspond directly to the package version? There are two major versions above v5.0.1 available so I'm just verifying since the versions are so different I wasn't sure if they are one-to-one box-to-package or not, and whether there are other differences between versions, or if support of the Hyper-V provider box isn't maintained opposed to the other providers?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Hi @svpernova09 I've been trying to get the application to work using v5.0.1 of the homestead box, but after choosing virtual switch DockerNAT I get this output with the error at the end, which at least seems to start up the VM, but you can't hit any endpoints using Postman:
Bringing machine 'cfna' up with 'hyperv' provider...
==> cfna: Verifying Hyper-V is enabled...
==> cfna: Importing a Hyper-V instance
cfna: Please choose a switch to attach to your Hyper-V instance.
cfna: If none of these are appropriate, please open the Hyper-V manager
cfna: to create a new virtual switch.
cfna:
cfna: 1) Default Switch
cfna: 2) DockerNAT
cfna:
cfna: What switch would you like to use? 1
cfna: Cloning virtual hard drive...
cfna: Creating and registering the VM...
cfna: Setting VM Integration Services
cfna: Successfully imported a VM with name: ubuntu-16.04-amd64
==> cfna: Starting the machine...
==> cfna: Waiting for the machine to report its IP address...
cfna: Timeout: 120 seconds
cfna: IP: 172.19.114.238
==> cfna: Waiting for machine to boot. This may take a few minutes...
cfna: SSH address: 172.19.114.238:22
cfna: SSH username: vagrant
cfna: SSH auth method: private key
cfna:
cfna: Vagrant insecure key detected. Vagrant will automatically replace
cfna: this with a newly generated keypair for better security.
cfna:
cfna: Inserting generated public key within guest...
cfna: Removing insecure key from the guest if it's present...
cfna: Key inserted! Disconnecting and reconnecting using new SSH key...
==> cfna: Machine booted and ready!
==> cfna: 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.
Or using virtual switch Default Switch I get this output and error at the end, but doesn't appear to start the VM.
Bringing machine 'cfna' up with 'hyperv' provider...
==> cfna: Verifying Hyper-V is enabled...
==> cfna: Importing a Hyper-V instance
cfna: Please choose a switch to attach to your Hyper-V instance.
cfna: If none of these are appropriate, please open the Hyper-V manager
cfna: to create a new virtual switch.
cfna:
cfna: 1) Default Switch
cfna: 2) DockerNAT
cfna:
cfna: What switch would you like to use? 2
cfna: Cloning virtual hard drive...
cfna: Creating and registering the VM...
cfna: Setting VM Integration Services
cfna: Successfully imported a VM with name: ubuntu-16.04-amd64
==> cfna: Starting the machine...
==> cfna: Waiting for the machine to report its IP address...
cfna: Timeout: 120 seconds
cfna: IP: fe80::215:5dff:fe38:103
==> cfna: Waiting for machine to boot. This may take a few minutes...
cfna: SSH address: fe80::215:5dff:fe38:103:22
cfna: SSH username: vagrant
cfna: 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.
Try creating a new virtual switch. I don’t think Vagrant will be able to use the same one Docker does.
--
On Dec 12, 2017, 01:04 -0600, Martin Pultz notifications@github.com, wrote:
Hi @svpernova09 I've been trying to get the application to work using v5.0.1 of the homestead box, but after choosing virtual switch DockerNAT I get this output with the error at the end, which at least seems to start up the VM.
Bringing machine 'cfna' up with 'hyperv' provider...
==> cfna: Verifying Hyper-V is enabled...
==> cfna: Importing a Hyper-V instance
cfna: Please choose a switch to attach to your Hyper-V instance.
cfna: If none of these are appropriate, please open the Hyper-V manager
cfna: to create a new virtual switch.
cfna:
cfna: 1) Default Switch
cfna: 2) DockerNAT
cfna:
cfna: What switch would you like to use? 1
cfna: Cloning virtual hard drive...
cfna: Creating and registering the VM...
cfna: Setting VM Integration Services
cfna: Successfully imported a VM with name: ubuntu-16.04-amd64
==> cfna: Starting the machine...
==> cfna: Waiting for the machine to report its IP address...
cfna: Timeout: 120 seconds
cfna: IP: 172.19.114.238
==> cfna: Waiting for machine to boot. This may take a few minutes...
cfna: SSH address: 172.19.114.238:22
cfna: SSH username: vagrant
cfna: SSH auth method: private key
cfna:
cfna: Vagrant insecure key detected. Vagrant will automatically replace
cfna: this with a newly generated keypair for better security.
cfna:
cfna: Inserting generated public key within guest...
cfna: Removing insecure key from the guest if it's present...
cfna: Key inserted! Disconnecting and reconnecting using new SSH key...
==> cfna: Machine booted and ready!
==> cfna: 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.
Or using virtual switch Default Switch I get this output and error at the end, but doesn't appear to start the VM.
Bringing machine 'cfna' up with 'hyperv' provider...
==> cfna: Verifying Hyper-V is enabled...
==> cfna: Importing a Hyper-V instance
cfna: Please choose a switch to attach to your Hyper-V instance.
cfna: If none of these are appropriate, please open the Hyper-V manager
cfna: to create a new virtual switch.
cfna:
cfna: 1) Default Switch
cfna: 2) DockerNAT
cfna:
cfna: What switch would you like to use? 2
cfna: Cloning virtual hard drive...
cfna: Creating and registering the VM...
cfna: Setting VM Integration Services
cfna: Successfully imported a VM with name: ubuntu-16.04-amd64
==> cfna: Starting the machine...
==> cfna: Waiting for the machine to report its IP address...
cfna: Timeout: 120 seconds
cfna: IP: fe80::215:5dff:fe38:103
==> cfna: Waiting for machine to boot. This may take a few minutes...
cfna: SSH address: fe80::215:5dff:fe38:103:22
cfna: SSH username: vagrant
cfna: 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.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
Thanks @svpernova09 I did try using the default switch as well but it doesn't boot all the way, and from what I read today I'm not much farther figuring this out. It appears as if you can use DockerNAT as a virtual switch based on some examples I've found, but I don't really understand much about Vagrant. We deploy to Laravel Forge so using Homestead is perfect otherwise I found Docker much easier to learn and use. With our update to Windows 10 Pro so we could drop DockerToolbox and pick up Docker for Windows in the office this issue with Hyper-V has become a nightmare.
Networking is the pain point of vagrant and hyper v. Try creating a new virtual switch. Vagrant doesn’t need anything special at all.
--
On Dec 12, 2017, 21:03 -0600, Martin Pultz notifications@github.com, wrote:
Thanks @svpernova09 I did try using the default switch as well but it doesn't boot all the way, and from what I read today I'm not much farther figuring this out. It appears as if you can use DockerNAT as a virtual switch based on some examples I've found, but I don't really understand much about Vagrant. We deploy to Laravel Forge so using Homestead is perfect, but with our update to Windows 10 Pro so we could drop DockerToolbox and pick up Docker for Windows in the office this issue with Hyper-V has become a nightmare.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
@svpernova09 I've created a new internal virtual switch using the Hyper-V Manager, and it stalls out as it attempts to boot the machine, then a couple minutes later eventually times out with an error:
Bringing machine 'cfna' up with 'hyperv' provider...
==> cfna: Verifying Hyper-V is enabled...
==> cfna: Importing a Hyper-V instance
cfna: Please choose a switch to attach to your Hyper-V instance.
cfna: If none of these are appropriate, please open the Hyper-V manager
cfna: to create a new virtual switch.
cfna:
cfna: 1) DockerNAT
cfna: 2) Default Switch
cfna: 3) NewInternalVirtualSwitch
cfna:
cfna: What switch would you like to use? 3
cfna: Cloning virtual hard drive...
cfna: Creating and registering the VM...
cfna: Setting VM Integration Services
cfna: Successfully imported a VM with name: ubuntu-16.04-amd64_1
==> cfna: Starting the machine...
==> cfna: Waiting for the machine to report its IP address...
cfna: Timeout: 120 seconds
cfna: IP: fe80::215:5dff:fe38:107
==> cfna: Waiting for machine to boot. This may take a few minutes...
cfna: SSH address: fe80::215:5dff:fe38:107:22
cfna: SSH username: vagrant
cfna: 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.
Check out Tip 1 here: https://blogs.technet.microsoft.com/virtualization/2017/07/06/vagrant-and-hyper-v-tips-and-tricks/
This looks like it's not getting an IP correctly from the Host OS via the switch.
@svpernova09 that makes it past the previous sticking point and seems to complete the boot, but right at the end when it is trying to set the hostname it throws this error:
No host IP was given to the Vagrant core NFS helper. This is
an internal error that should be reported as a bug.
Bringing machine 'cfna' up with 'hyperv' provider...
==> cfna: Verifying Hyper-V is enabled...
==> cfna: Importing a Hyper-V instance
cfna: Please choose a switch to attach to your Hyper-V instance.
cfna: If none of these are appropriate, please open the Hyper-V manager
cfna: to create a new virtual switch.
cfna:
cfna: 1) DockerNAT
cfna: 2) Default Switch
cfna: 3) Development
cfna:
cfna: What switch would you like to use? 3
cfna: Cloning virtual hard drive...
cfna: Creating and registering the VM...
cfna: Setting VM Integration Services
cfna: Successfully imported a VM with name: ubuntu-16.04-amd64
==> cfna: Starting the machine...
==> cfna: Waiting for the machine to report its IP address...
cfna: Timeout: 120 seconds
cfna: IP: fe80::215:5dff:fe38:102
==> cfna: Waiting for machine to boot. This may take a few minutes...
cfna: SSH address: 192.168.0.18:22
cfna: SSH username: vagrant
cfna: SSH auth method: private key
cfna:
cfna: Vagrant insecure key detected. Vagrant will automatically replace
cfna: this with a newly generated keypair for better security.
cfna:
cfna: Inserting generated public key within guest...
cfna: Removing insecure key from the guest if it's present...
cfna: Key inserted! Disconnecting and reconnecting using new SSH key...
==> cfna: Machine booted and ready!
==> cfna: 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.
Most helpful comment
You want to change the provider value in your Homestead.yaml and then vagrant destroy, vagrant up.
--
JoeFerguson.me
MemphisPHP.org
On Dec 11, 2017, 17:23 -0600, Martin Pultz notifications@github.com, wrote: