Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cskiwi's avatar

Getting homestead up and running

Hi,

I'm having problems with my laravel homestead for some time and it's getting worse everytime I'm trying to fix it.

  • Running on Windows 10 technical preview (Build 9879)
  • Virtualbox version: VirtualBox-4.3.20-96997-Win (which I can't get the gui up and running btw)

Currently I'm having these problems homestead up gives the following error:

'vagrant' is not recognized as an internal or external command,
operable program or batch file.

But vagrant is installed and globally availible because when I do from anywhere in cmd:

vagrant up laravel/homestead gives the following error:

The machine with the name 'laravel/homestead' was not found configured for
this Vagrant environment.

vagrant global-status is giving the following output (I do remember showing some boxes here earlier

id       name   provider state  directory
--------------------------------------------------------------------
There are no active Vagrant environments on this computer! Or,
you haven't destroyed and recreated Vagrant environments that were
started with an older version of Vagrant.

Any one any idea's how to get the boxes up and running

0 likes
46 replies
Serringer's avatar

Same problem here. And I am able to use vagrant on itself, but homestead seems not to be able to find vagrant. Windows 8.1 here. Everything else installed today with latest stable versions

sitesense's avatar

Try downgrading to Homestead 2.0.7 - there are currently some problems with Windows path to home folder.

edit your composer.json file in %appdata%\Composer and change your laravel/homestead dependency to:

"laravel/homestead": "2.0.7"
2 likes
sitesense's avatar

Something just came up whilst discussing this on Github...

Were you using the standard windows command line (cmd) when installing?

If so, try using Git Bash or powershell to install.

Standard cmd doesn't understand the path that's currently used for the home folder (~/), but those I mentioned do.

Give it a try and give feedback, you might help uncover the bug :)

davidxd33's avatar

Same problem here on Windows 8.1 @ git bash. Did a composer global update now I cannot start up my box anymore using homestead up or vagrant up.

Serringer's avatar

I updated once more a few minutes ago and it reverted back to 2.0.7 and now works.

1 like
ivanv's avatar

Same issue on my Windows 8.1 pc. I could run vagrant and homestead in the console (git bash). But "homestead update" couldn't find vragrant. I reverted to the 2.0.7 version of homestead and then everything worked.

cskiwi's avatar

Tried downgrading, it can find the homestead if version 2.0.7, but then the following happens:

$ homestead up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'laravel/homestead'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Setting the name of the VM: homestead
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 => 8000 (adapter 1)
    default: 443 => 44300 (adapter 1)
    default: 3306 => 33060 (adapter 1)
    default: 5432 => 54320 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.

If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you're using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

I tried opening the virtualbox GUI but that won't work, so I think there lies my problem any suggestions on fixing that?

ivanv's avatar

I encountered that problem aswell some time ago and I think it was fixed by updating VirtualBox and/or Vagrant to the newest version... Might be worth a try...

bashy's avatar

If you can't open Virtualbox it could be problem with it, yes. Try the above :)

cskiwi's avatar

Reinstalled both vagrant and Virtualbox but no luck, still can't open virtualbox

Swannie's avatar

Vagrant 1.7.0 installer for windows is broken - or at least it was this morning.

Install Vagrant 1.6.5 and the latest VirtualBox.

My issue (as posted by 'cskiwi') was resolved after "upgrading" homestead from 2.0.8 to 2.0.7.

My second problem of port forwarding was solved by inserting the "auto_correct: true" into the mapping in the Vagrantfile. It seems on my Windows 8.1 Pro install that NT Kernel & System is listening on port 8000 for some strange reason.

The auto-correct changes it to 2200 and it's all good.

I hope this helps!

cskiwi's avatar

I've downgraded my vagrant to 1.6.5, I have the latest version of VirtualBox,

I don't really know where you want me to put the auto_correct: true if I put that in my vagrant file of the laravel box, it gives me errors:

C:/Users/Glenn/.vagrant.d/boxes/laravel-VAGRANTSLASH-homestead/0.2.1/virtualbox/Vagrantfile:6: syntax error, unexpected
':', expecting keyword_end
  auto_correct: true
ivanv's avatar

Is virtualization enabled in the BIOS? I'm pretty sure it is required to run a VM. I also read something about Windows Hyper-V interfering with other VM's, but I can't confirm this...

I have a Windows 10 preview running on VMware Player. I installed the latest Git for Windows, VirtualBox and Vagrant, but when I run "vagrant" I get some weird error that I cannot solve either: http://stackoverflow.com/questions/22543643/vagrant-and-git-bash (I don't even have a .vagrant.d folder) But I guess running a VM in a VM isn't the best idea anyway... :)))

cskiwi's avatar

Virtualization is enabled, and I'm not running it from a VM, its the only OS on this PC :) also tried the bash thingy; not working either

dugjohnson's avatar

I'm having the same problem. Traced it down a LITTLE further, figured I'd pass my findings along. If you set the $_ENV variable = null in the vendor/laravel/homestead/homestead file, it will launch (finds vagrant, etc). The environment variable is looking for the .vagrant folder in the .homestead folder beneath the HOME directory in Windows, and that folder does not exist there. Could be a problem with the init process. Could be that the pathing needs to be changed (there IS a .vagrant under %HOMEPATH%/appdata/roaming/composer/vendor/laravel/homestead directory but don't know if that is what we are looking for). Sorry I don't have a complete solution, but work intrudes.

HHWebTeam's avatar

I am unsure whether my issue is related after fixing my initial problem back using Homestead 2.0.7. When trying to run 'homestead up' I get the below error:

C:/Users/danielweeks/AppData/Roaming/Composer/vendor/laravel/homestead/scripts/homestead.rb:60:in `configure': undefined method `each' for nil:NilClass (NoMethodError)
        from C:/Users/danielweeks/AppData/Roaming/Composer/vendor/laravel/homestead/Vagrantfile:17:in `block in <top (required)>'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/loader.rb:37:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/loader.rb:37:in `load'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:103:in `block (2 levels) in load'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:97:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:97:in `block in load'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:94:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:94:in `load'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/vagrantfile.rb:28:in `initialize'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:574:in `new'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:574:in `vagrantfile'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:359:in `host'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:168:in `block in action_runner'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:33:in `call'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:33:in `run'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:346:in `hook'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:556:in `unload'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/bin/vagrant:169:in `ensure in <main>'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.6.3/bin/vagrant:169:in `<main>'

Any ideas?

bashy's avatar

That's related to no database name in yaml config I think

cskiwi's avatar

@dugjohnson Thanks for your answer. but I don't really think that is the problem. because the file you are saying that needs an edit. is a project stub for a new laravel project (if I recall correctly), so changing anything there isn't going to fix my problem imho :)

bashy's avatar

What version are you using now @cskiwi?

If homestead up can't recognise vagrant program, the paths set by Homestead are wrong/can't find it. Seeing as vagrant command works. You should be able to open Virtualbox program at any time.

Tried something better than Homestead?

dugjohnson's avatar

@cskiwi Sorry for the confusion. I wasn't suggesting you make those changes. I was dropping clues here for whoever finally figures out what the real problem is. I fixed mine by rolling back a version and locking it in using composer.json until the next time I have time to experiment.

cskiwi's avatar

@bashy

Homestead: 2.0.7 Vagrant: 1.6.5

And no other things then this tested, and I'm using this because it's a project of 3 and this is used by the 2 others and on my other computer this is also working, and this is a laptop with more limited resources so having the ability to launch the vm when needed is a plus then.

And I have now virtualbox installed, installing another vm system isn't something I really wanna do, because that could cause more problems then I already have.

bashy's avatar

Well if you tell us what problems you have, we can try solve it. What's your first problem?

bashy's avatar

Yeah no problem, was just making sure you hadn't fixed that part or anything.

So first issue is not being able to open Virtualbox application. What happens when you open it?

bashy's avatar

Then you have an issue with the program itself. Have you confirmed it works in Windows 10 preview?

Mort's avatar

@cskiwi, does VirtualBox open if you try to run the program as Administrator?

bashy's avatar

First thing I do when I install Windows is turn off UAC, I forget that exists. If that is the reason, something would popup?

cskiwi's avatar

I have UAC disabled.

And I did not confirm if it works on win10 but I can't find anyone else having this problem. So I would think it's not OS related

bashy's avatar

Well it's something on there making it not open itself. That's not even Vagrant/Homestead related.

Double click the Virtualbox.exe where you installed it and check event viewer for details.

Next

Please or to participate in this conversation.