I am using vagrant-triggers for a before-destroy-trigger, like this
config.trigger.before :destroy do
run_remote "bash /vagrant/cleanup.sh"
end
When vagrant VM is not running
$ vagrant status
Current machine states:
default poweroff (virtualbox)
I cannot execute "vagrant destroy"
$ vagrant destroy
==> default: Running triggers before destroy...
==> default: Executing remote command "bash /vagrant/cleanup.sh"...
The provider for this Vagrant-managed machine is reporting that it
is not yet ready for SSH. Depending on your provider this can carry
different meanings. Make sure your machine is created and running and
try again. Additionally, check the output of `vagrant status` to verify
that the machine is in the state that you expect. If you continue to
get this error message, please view the documentation for the provider
you're using.
So for time being, the VM has to be running, if I want to destroy it. Please fix this, I don't want to to boot my VM when not necessary.
I am using vagrant-triggers for a before-destroy-trigger, like this
When vagrant VM is not running
I cannot execute "vagrant destroy"
So for time being, the VM has to be running, if I want to destroy it. Please fix this, I don't want to to boot my VM when not necessary.