Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Reboot the VM after installing new additions. #25

Conversation

gregsymons
Copy link
Contributor

This prevents problems with doing things that require the guest additions like
setting up shared folders or port forwardings.

This prevents problems with doing things that require the guest additions like
setting up shared folders or port forwardings.
@gregsymons
Copy link
Contributor Author

This fixes #24

fnordfish added a commit that referenced this pull request Nov 18, 2012
* catch possible reboot loop
* add config `auto_reboot` to disable reboot
* add `--auto-reboot` parameter to the command to enable reboot
* reboot command is executed on the VM directly (avoids passing around another environmaent)

ref #25 and #24
@fnordfish
Copy link
Member

Hi @gregsymons,

thanks for your input! I was very unsure if users would like the box to get rebooted.
I've merged your PR, even if github is telling otherwise, but had to ad some more guards and options.

Thanks again for contributing.

@fnordfish fnordfish closed this Nov 19, 2012
@gregsymons
Copy link
Contributor Author

I looked at your changes and the only concern I have is calling @vm.reload instead of calling Vagrant::Action::VM::Halt and Vagrant::Action::VM::Boot. I originally did @vm.reload, and found that doing so led to provisioners (in my case the Chef::Solo provisioner) running twice--once during reload, and once after the plugin yields to the next action.

@fnordfish
Copy link
Member

@gregsymons you are right, provisioning will be executed twice - which should not happen, of cause.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants