Skip to content

Commit 963342a

Browse files
fix(vm): restart vm after update is done.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Marco Attia <[email protected]>
1 parent e998d78 commit 963342a

File tree

1 file changed

+8
-0
lines changed
  • proxmoxtf/resource/vm

1 file changed

+8
-0
lines changed

proxmoxtf/resource/vm/vm.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5769,6 +5769,14 @@ func vmUpdate(ctx context.Context, d *schema.ResourceData, m interface{}) diag.D
57695769
e = vmAPI.UpdateVM(ctx, updateBody)
57705770
if e != nil {
57715771
return diag.FromErr(e)
5772+
}
5773+
5774+
if stoppedBeforeUpdate && d.Get(mkStarted).(bool) {
5775+
if diags := vmStart(ctx, vmAPI, d); diags != nil {
5776+
return diags
5777+
}
5778+
// The VM has been started, so a reboot is no longer required.
5779+
rebootRequired = false
57725780
}
57735781

57745782
if cloudInitRebuildRequired {

0 commit comments

Comments
 (0)