Homestead/Vagrant will not load

Published 3 months ago by doni49

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.

[email protected] 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.

Jerome2116

What are the vagrant and virtual box versions you are using?

doni49

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!

Jerome2116

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?

doni49

[email protected] 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.

Jerome2116

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.

doni49

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.

doni49

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:

[email protected] 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.

rhand

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.

Jerome2116

@doni49 Did you get this all sorted or are you still fighting with it?

doni49

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.

Jerome2116

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
doni49

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.

Jerome2116

That is expected behaviour.

If you then attempt to actually access the site through chrome or another browser - it then fails?

doni49

Yes. Chrome says "site unavailable", site not found", "could not locate server or something like that.

Jerome2116

Is it working in any other browser?

Have you added the address to your

/etc/hosts

file?

Please sign in or create an account to participate in this conversation.