diff --git a/plugins/providers/virtualbox/action/destroy_confirm.rb b/plugins/providers/virtualbox/action/destroy_confirm.rb index 797f9b737..062450680 100644 --- a/plugins/providers/virtualbox/action/destroy_confirm.rb +++ b/plugins/providers/virtualbox/action/destroy_confirm.rb @@ -5,10 +5,11 @@ module VagrantPlugins module Action class DestroyConfirm < Vagrant::Action::Builtin::Confirm def initialize(app, env) - message = I18n.t("vagrant.commands.destroy.confirmation", - :name => env[:machine].name) + force_key = :force_confirm_destroy + message = I18n.t("vagrant.commands.destroy.confirmation", + :name => env[:machine].name) - super(app, env, message) + super(app, env, message, force_key) end end end diff --git a/plugins/providers/virtualbox/action/import.rb b/plugins/providers/virtualbox/action/import.rb index 64e2507ab..e63dfc950 100644 --- a/plugins/providers/virtualbox/action/import.rb +++ b/plugins/providers/virtualbox/action/import.rb @@ -37,9 +37,11 @@ module VagrantPlugins return if env["vagrant.error"].is_a?(Vagrant::Errors::VagrantError) # Interrupted, destroy the VM. We note that we don't want to - # validate the configuration here. + # validate the configuration here, and we don't want to confirm + # we want to destroy. destroy_env = env.clone destroy_env[:validate] = false + destroy_env[:force_confirm_destroy] = true env[:action_runner].run(Action.action_destroy, destroy_env) end end