use driver delete method

This commit is contained in:
Matthew Hooker 2017-02-01 23:54:10 -08:00
parent efa29f0e7a
commit 228bc9cfd3
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ func (s *stepCreateVM) Cleanup(state multistep.StateBag) {
ui.Say("Unregistering and deleting virtual machine...")
var err error = nil
for i := 0; i < 5; i++ {
err = driver.VBoxManage("unregistervm", s.vmName, "--delete")
err = driver.Delete(s.vmName)
if err == nil {
break
}