Merge pull request #9782 from hashicorp/fix_9151

fully destroy vm if it was cancelled or errored
pull/9784/head
Megan Marsh 6 years ago committed by GitHub
commit b0d2201d55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save