Skip to content

vm_qemu: Updating tags triggers VM reboot (unexpected behavior) #1508

@pavan1905

Description

@pavan1905

Provider version: 3.0.2-rc07

Issue:
Updating only the tags field on proxmox_vm_qemu resource triggers VM reboot.

Expected behavior:
Tags are metadata and should not require VM restart.

Actual behavior:
Terraform apply causes VM to reboot even when only tags are changed.

Reproduction:

  1. Create VM using proxmox_vm_qemu
  2. Apply tags = "dev;vm1"
  3. Modify tags = "dev;vm1;test"
  4. Run terraform apply

Observed:
VM restarts during apply.

Impact:
This makes tags unsafe for Day-2 operations in production environments.

Request:
Support non-disruptive updates for metadata fields like tags.

Terraform will perform the following actions:

module.vm["vm1"].proxmox_vm_qemu.vm will be updated in-place

~ resource "proxmox_vm_qemu" "vm" {
id = "pve1/qemu/9200"
name = "terraform-vm-1"
~ tags = "dev;test;vm1" -> "dev;test;test2;vm1"
# (54 unchanged attributes hidden)
# (8 unchanged blocks hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.

Terraform plan shows only tags change:
tags = "dev;test;vm1" -> "dev;test;test2;vm1"

Provider sets:
automatic_reboot: planned value cty.True

Provider explicitly calls:
POST /api2/json/nodes/pve1/qemu/9200/status/reboot

Additional observation:
Provider sends full config instead of partial update:
"key":"tags","value":"dev;test;test2;vm1"
"key":"cores","value":2
"key":"memory","value":2048

This leads to:

  • Unnecessary VM reboot
  • Followed by redundant start call
  • Resulting in:
    Error: VM 9200 already running

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions