Dencker Dencker - 1 month ago 26
PHP Question

Laravel Homestead: "VM not created.. moving on"

I did a global install of Laravel homestead, edited my

~/.homestead/Homestead.yaml
-file and spun up the VM with
homestead up
. Everything worked fine, but then I needed to add another site. I edited
Homestead.yaml
to contain the new project, the tried to run
homestead provision
to apply the changes to the VM. The only thing that outputs is:

==> default: VM not created. Moving on...


I interpret that as the VM is not running, but it is. The only thing working here is
homestead destroy
followed by
homestead up
, but that (by its nature) detroys the VM's saved state. I though that vagrant commands was applicable to homestead as well, but
vagrant suspend && vagrant up --provision
doesn't help.

So.. How do I apply my new config to an already-existing homestead VM?

Answer

I found the answer at Laracasts. Copied directly from there:

Try doing this... You should see a vagrant box that is listed that is linked to your composer/vendor...

vagrant global-status

Example Output:

$ vagrant  global-status
id       name    provider   state   directory
-----------------------------------------------------------------------------------------------------
1ace413  default virtualbox running (...)/laravel/homestead

Then go ahead and run:

vagrant provision {ID}

Example input:

vagrant provision 1ace413

ID being the id of the vagrant instance in the above step.

You should then be good to go!