10

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?

rdiz
  • 6,136
  • 1
  • 29
  • 41

4 Answers4

20

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!

Community
  • 1
  • 1
rdiz
  • 6,136
  • 1
  • 29
  • 41
  • This, as well as the other answer, do not explain why `*homestead* provision` is not working for the OP, or provide any solutions for that. – trysis Feb 23 '15 at 04:42
  • 1
    1) I am the OP. 2) The question was not why it wasn't working: "So.. How do I apply my new config to an already-existing homestead VM?", so yes; this perfectly answers the question. – rdiz Feb 23 '15 at 06:08
  • Wow I did not realize that, I apologize. I more meant you did not say how to solve your problem with `homestead provision`, but reading the question again and knowing more than I knew yesterday I see that you sort of did. – trysis Feb 23 '15 at 13:27
12

I recently change my laptop from 32 bit to 64 bit and have to redo installation and setup of my Homestead again.

After setup everything I run below command

vagrant reload --provision

and I get the same feedback which is

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

After that I try this command and all works well.

vagrant up

I think for first time running Homestead, no need to reload --provision.

Apit John Ismail
  • 2,047
  • 20
  • 19
0

You can run vagrant provision to update homesteads websites. However you have to find where the Vagrantfile for the Homestead VM is. If you did the global install it should be in .composer/vendor/laravel/homestead/ directory. You need to change into that directory

cd ~/.composer/vendor/laravel/homestead

Then you need to provision the VM

vagrant provision

Your homestead box should then reflect the changes in the Homestead.yml file.

Edit: I am not at my mac right now so the directory path is a guess of what I remember it being the last time I provisioned my box so please take that into consideration but I am very sure that path should be correct.

ddelnano
  • 459
  • 5
  • 19
  • Thanks for your answer. Actually though, I already tried that. The exact same output :-/ – rdiz Feb 05 '15 at 09:06
0

I had my VM provision vertualbox running so i had to exit first

Emma
  • 1