Merge pull request #9782 from hashicorp/fix_9151
fully destroy vm if it was cancelled or errored
This commit is contained in:
commit
b0d2201d55
|
@ -54,7 +54,7 @@ func (s *StepRegister) Cleanup(state multistep.StateBag) {
|
|||
}
|
||||
|
||||
if remoteDriver, ok := driver.(RemoteDriver); ok {
|
||||
if s.SkipExport {
|
||||
if s.SkipExport && !cancelled && !halted {
|
||||
ui.Say("Unregistering virtual machine...")
|
||||
if err := remoteDriver.Unregister(s.registeredPath); err != nil {
|
||||
ui.Error(fmt.Sprintf("Error unregistering VM: %s", err))
|
||||
|
|
Loading…
Reference in New Issue