Skip to content

Commit

Permalink
fix: regression #1154
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinyblargon authored Nov 15, 2024
1 parent 845584b commit 7283a43
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 7283a43

Please sign in to comment.