What are the vagrant and virtual box versions you are using?
Homestead/Vagrant will not load
I've got VirtualBox/Vagrant/Homestead installed on my Windows 10 laptop. I've also got Git Bash installed.
I been following the instructions at "https://laravel.com/docs/5.6/homestead" line-by-line. Now I'm down to the Section titled "Launching the Virtual Box". When I enter "vagrant up" (without the quotes), I get the following error message.
Don@DESKTOP-G3NA7P9 MINGW64 ~/Homestead ((v7.4.0))
$ vagrant up
Bringing machine 'homestead-7' up with 'virtualbox' provider...
==> homestead-7: Checking if box 'laravel/homestead' is up to date...
==> homestead-7: Clearing any previously set forwarded ports...
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["modifyvm", "a038793e-d20d-449c-8a9e-a5afb7a8f5fd", "--natpf1", "delete", "ssh", "--natpf1", "delete", "tcp27017", "--natpf1", "delete", "tcp33060", "--natpf1", "delete", "tcp4040", "--natpf1", "delete", "tcp44300", "--natpf1", "delete", "tcp54320", "--natpf1", "delete", "tcp8000", "--natpf1", "delete", "tcp8025"]
Stderr: VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available) VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 525 of file VBoxManageModifyVM.cpp
Can anyone out there help me figure out what's going on? This is my first attempt at using a virtual machine of any kind. I'm not totally green in a *nix environment if that helps -- I've got a Raspberry Pi that I tinker with occasionally.
I ran "vagrant box upgrade" just before attempting to start it. So it's up to date -- not sure what the actual version number is though.
The only place I see to get a version number for Virtual Box is in the GUI under about. It says "VirtualBox Graphical User Interface Version 5.2.10 r122406 (Qt5.6.2)".
Does this give you the info you need?
TIA!
Open a git bash command, then type
vagrant -v
That will tell you what version of vagrant you have on your machine.
The latest version of VirtualBox is 5.2.12 & the latest version of Vagrant is 2.1.1
Ensure you have these downloaded and installed as my experience is that Windows is not awesome when you use an older VirtualBox version with a new Vagrant or vice versa.
Also, ensure you have the Microsoft Visual C++ 2010 Redistributable Package for you version of Windows as it is required, but I don't think it is mentioned in the documentation. That is available here: https://www.microsoft.com/en-us/download/details.aspx?id=48145
And this is probably redundant, but do you have virtualization turned on in your BIOS for your machine?
Don@DESKTOP-G3NA7P9 MINGW64 ~/Homestead ((v7.4.0)) $ vagrant -v Vagrant 2.0.4
So even though I ran Vagrant box upgrade and it reported no errors, it must not have upgraded to the latest (since you say 2.11 is the latest).
I'll download and upgrade both AGAIN and try again. Thanks for the info RE the MS VC++ pkg. It would be nice if that info were included in the documentation.
I'll have to check on the BIOS question. I don't remember reading that in the docs so I'll have to look again.
Vagrant does not update on Vagrant Box Upgrade. Vagrant Box Upgrade will upgrade the actual box environment.
To update Vagrant, you need to go to https://www.vagrantup.com/ and click on the download 2.1.1 button in the middle of the page and then select your Windows Version.
Download it, install it and then your machine will need a restart.
Same thing for VirtualBox, go to their site, download the latest and install it.
Ensure Virtualization is enabled on your machine. If all that is done, then start at the top of the Laravel Homestead Docs and scroll down to 'Installing Homestead' and start there. You already should have the laravel/homestead vagrant box on your machine, so you shouldn't have to run that again and if you do, it should tell you it already exists.
Have you already cloned the Homestead repo onto your machine? If not, start there and again, go through each part of the docs section by section.
Thanks for all the help. I should be able to get it working. I reinstalled Vagrant and VBox as well as made sure the Bios change was addressed. I'll work on the rest over the weekend.
I was able to get it working -- I even saved an html file into the Public folder that was listed for the test site. When I browsed to the site in Chrome, it loaded fine. But when I attempted to create the first Laravel project, it created the folders but the were all empty. No files were created.
Tonight is the first time I've had a chance to get back to it. When I attempted to run Vagrant Up tonight, I started throwing errors:
Don@DESKTOP-G3NA7P9 MINGW64 ~/Homestead (master)
$ vagrant up
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...
==> homestead-7: Setting the name of the VM: homestead-7
==> homestead-7: Clearing any previously set network interfaces...
There was an error while executing VBoxManage, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["hostonlyif", "create"]
Stderr: 0%... Progress state: E_FAIL VBoxManage.exe: error: Failed to create the host-only adapter VBoxManage.exe: error: Could not find Host Interface Networking driver! Please r einstall VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkI nterfaceWrap, interface IHostNetworkInterface VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct Han dlerArg *)" at line 94 of file VBoxManageHostonly.cpp
I deleted the Homestead folder and started over. SAME ERROR.
Recommendations for error:
Failed to create the host-only adapter VBoxManage.exe: error: Could not find Host Interface Networking driver! Please reinstall VBoxManage.exe:
as you mentioned I see on the web are "Reinstall the Virtual Box and restart your system." https://stackoverflow.com/questions/37934711/virtual-box-host-only-network-interface
Not sure if you can keep your created boxes, but I think so, you will just need to import them.
@doni49 Did you get this all sorted or are you still fighting with it?
Still fighting with it. But I'm out of town for a funeral. I don't expect to get back to it for a week or two.
I completely uninstalled Virtual Box & Vagrant. Then reinstalled both.
When I run Vagrant up, it throws an error (I dont remember now what the error message says and I'm not near the pc) refusing to start.
Then I try again (not really sure why I expected it to work differently) and this time, it tells me that the box has already been provisioned. If I enter Vagrant ssh, it DOES let me login via ssh and I'm able to brows to the user folder identified as the sync'd home folder. So that tells me the box is actually up and running.
If I attempt to load the site in Chrome, I get "Site not available".
I have yet to even attempt to set up a new Laravel project. I'd like to do that eventually. ;)
Thanks for the follow up.
Sorry for your loss.
What site are you attempting to load? Is it a custom site in your .yaml file or is it the one Homestead sets by default when you run the
bash init.sh
for using a Linux/Mac based command line or
init.bat
for using Windows based?
That test site should look like this in your yaml:
sites:
- map: homestead.test
to: /home/vagrant/code/Laravel/public
Homestead.test
The sites section of my yaml file defines the site. My hosts file points to this virtual box.
If I ping homestead.test, I do get the expected reply.
After I enter vagrant halt, my attempts to ping the site fail.
That is expected behaviour.
If you then attempt to actually access the site through chrome or another browser - it then fails?
Yes. Chrome says "site unavailable", site not found", "could not locate server or something like that.
Is it working in any other browser?
Have you added the address to your
/etc/hosts
file?
Haven't tried in any other browsers. I didn't see any point. Are you saying it might actually work in other browsers?
Chrome does do some things a little different with other browsers when using .app or .dev on your site when using https. See here for more info on what, where and why.
https://github.com/laravel/homestead/issues/755
So that is why it was switched to .test when first installing homestead. But it should be working especially if your ping is returning.
So if you try it in multiple browsers and it works, then at least you know your set-up is correct. You can then start working on your project using the browser it is working in, while you sort out the browser specific issues not letting you work in others.
I myself use Firefox dev edition for building and then test later in Chrome, Edge, IE (shudder) and the rest.
Ok. Back at it again.
I did a ping test and got the following.
Don@DESKTOP-G3NA7P9 MINGW64 ~/Homestead ((v7.4.2))
$ ping homestead.test
Pinging homestead.test [192.168.10.10] with 32 bytes of data:
Reply from 192.168.10.10: bytes=32 time=1ms TTL=64
Reply from 192.168.10.10: bytes=32 time=1ms TTL=64
Reply from 192.168.10.10: bytes=32 time<1ms TTL=64
Reply from 192.168.10.10: bytes=32 time=1ms TTL=64
Ping statistics for 192.168.10.10:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
I tried browsing to it using MS Edge. This is what Edge has to say.
Hmmm...can’t reach this page
Try this
Make sure you’ve got the right web address: http://homestead.test
Search for "http://homestead.test" on Bing
Refresh the page
Details
There was a temporary DNS error. Try refreshing the page.
Error Code: INET_E_RESOURCE_NOT_FOUND
This is what IE has to say.
Can’t reach this page
•Make sure the web address http://homestead.test is correct
•Search for this site on Bing
•Refresh the page
More information More information
There was a temporary DNS error. Try refreshing the page.
Error Code: INET_E_RESOURCE_NOT_FOUND
This is what chrome has to say.
This site can’t be reached
homestead.test refused to connect.
Search Google for homestead test
ERR_CONNECTION_REFUSED
And this is my windows hosts file.
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
192.168.10.10 homestead.test
This is my yaml file.
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/Don/Documents/HomesteadUsers
to: /home/vagrant
sites:
- map: homestead.test
to: /home/vagrant/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
There was an issue last year where that particular error was a known bug in the Windows 10 creator's update. Is your version of Windows current with the newest updates because they apparently fixed this issue.
If you are running current, then take a look at some of these sites for a few solutions on how to fix: (Could be something as simple as updating the drivers for your network card too).
https://medium.com/@win10tricks/how-to-fix-inet-e-resource-not-found-in-windows-10-42da0cc49ff3
https://www.drivereasy.com/knowledge/how-to-fix-inet-e-resource-not-found-error-in-windows/
https://appuals.com/fix-inet_e_resource_not_found-windows-10/
Sorry you are having such a hard time with this. Makes development not so much fun when there are issues like this that keep you from getting started in the first place.
Let me know if this stuff works or not. Cheers
Something else I noticed: All of the Laravel documents from 5.6 down to 5.3 show the example YAML of
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
They seem to matching the mapped file to a identical folder name for Vagrant. I can't seem to find anything indicating that 'must' be the way it is done, but in the case of trouble shooting it might be worth doing. You could try this:
folders:
- map: /Users/Don/Documents/HomesteadUsers
to: /home/vagrant/HomesteadUsers
sites:
- map: homestead.test
to: /home/vagrant/HomesteadUsers/public
If you change your Yaml file, you will need to of course provision your box for the changes to update.
vagrant provision should do the trick.
I updated windows before attempting to install Homestead. That was in April 2018 sometime.
You mentioned the possibilty of upgrading the NIC drivers. What NIC would I be upgrading?
RE the comment about issues like this and getting started, it's especially frustrating because only get a night or two each week to work on it. Which means that each time i get back to it. I have to remember where I left off.
So that effectively eliminates the windows update issue.
To check if your NIC is current:
- Start Button - type Device Manager
- In Device Manager - look for Network Adapters
Your physical NIC should be the first one. You should also see the VirtualBox ones too. Right click your actual adapter (mine is Intel I211 Gigabit Network Connection) and click update driver and it should update if a new driver is available.
And yes - it is frustrating trying to get an environment up and running and honestly, I have never run into these sorts of issues anytime I have set up homestead on a windows 10 machine. It's crazy actually.
"Crazy". That dedcribes it fairly well.
I'll try to AT LEAST check the NIC drivers tonight.
And ensure you run either vagrant provision OR vagrant reload --provisionto ensure that you have applied any setting changes to your yaml and hosts file to the box.
Please or to participate in this conversation.