From 0a8b172bf92d94566e21fe86d1d529038120780d Mon Sep 17 00:00:00 2001 From: Sylvia Moss Date: Mon, 16 Dec 2019 14:31:15 +0100 Subject: [PATCH] Remove duplicated retry mechanism when deleting VM ffrom virtual box (#8485) This retry was also added to fix a locked by session error reported in #5501 and fixed in #5512. --- builder/virtualbox/common/driver_4_2.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/builder/virtualbox/common/driver_4_2.go b/builder/virtualbox/common/driver_4_2.go index e1a1a0119..0599251ff 100644 --- a/builder/virtualbox/common/driver_4_2.go +++ b/builder/virtualbox/common/driver_4_2.go @@ -76,14 +76,7 @@ func (d *VBox42Driver) CreateSCSIController(vmName string, name string) error { } func (d *VBox42Driver) Delete(name string) error { - ctx := context.TODO() - return retry.Config{ - Tries: 5, - RetryDelay: (&retry.Backoff{InitialBackoff: 1 * time.Second, MaxBackoff: 1 * time.Second, Multiplier: 2}).Linear, - }.Run(ctx, func(ctx context.Context) error { - err := d.VBoxManage("unregistervm", name, "--delete") - return err - }) + return d.VBoxManage("unregistervm", name, "--delete") } func (d *VBox42Driver) Iso() (string, error) {