As far as I know, you cannot have a single script / set of commands that will be executed where it was stopped if it tries to restart the OS, for example:
config.vm.provision "shell", inline: <<-SHELL echo $(date) > ~/rebootexample reboot echo $(date) >> ~/rebootexample SHELL
In this example, the second paging will not be completed.
You can split the script / commands up and use a plugin like tarp reload .
An example of a Vagrantfile fragment to highlight its possible use:
# execute code before reload config.vm.provision "shell", inline: <<-SHELL echo $(date) > ~/rebootexample SHELL # trigger reload config.vm.provision :reload # execute code after reload config.vm.provision "shell", inline: <<-SHELL echo $(date) >> ~/rebootexample SHELL
jaxim
source share