Vagrant: up and provision

Tag: vagrant Author: ydzzq1969 Date: 2013-09-28

I have a very simple Vagrant file like this: = "precise32"

  config.vm.synced_folder "./src", "/vagrant/src/" "forwarded_port", guest: 8080, host: 8080

  config.vm.provision :shell, :path => ""

When I do vagrant up the is not called, but I have to reload --provision. How do I run on the first up?

Best Answer

From Vagrant 1.3 onwards, provisioning runs automatically only at the very first boot, when the machine gets created.

If you need to run it on the subsequent reload or up, you have to call it explicitly:

vagrant up --provision

See also:


thanks, I thought up means creating the machine. issue to update doc and provide an second script