From 7283a43b3d6f519d5c4bc880de7c532ebf063d64 Mon Sep 17 00:00:00 2001 From: Tinyblargon <76069640+Tinyblargon@users.noreply.github.com> Date: Fri, 15 Nov 2024 21:14:24 +0100 Subject: [PATCH] fix: regression #1154 --- proxmox/resource_vm_qemu.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/proxmox/resource_vm_qemu.go b/proxmox/resource_vm_qemu.go index 38edc773..c401ca0a 100755 --- a/proxmox/resource_vm_qemu.go +++ b/proxmox/resource_vm_qemu.go @@ -1363,13 +1363,7 @@ func resourceVmQemuDelete(ctx context.Context, d *schema.ResourceData, meta inte return diag.FromErr(err) } if vmState["status"] != "stopped" { - var err error - if d.Get("agent") == 1 { - _, err = client.ShutdownVm(vmr) - } else { - _, err = client.StopVm(vmr) - } - if err != nil { + if _, err := client.StopVm(vmr); err != nil { return diag.FromErr(err) }