From 48b34d4c2e721ad417eb45d1467fd9a6c703f372 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 26 May 2026 08:03:57 +0200 Subject: [PATCH] fix(add-iptag): use qm set for VM tags to handle snapshot sections correctly (#14713) --- tools/pve/add-iptag.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tools/pve/add-iptag.sh b/tools/pve/add-iptag.sh index 4ea32df91..7725a90c5 100644 --- a/tools/pve/add-iptag.sh +++ b/tools/pve/add-iptag.sh @@ -811,13 +811,7 @@ update_tags() { if [[ "$type" == "lxc" ]]; then pct set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null else - local vm_config="/etc/pve/qemu-server/${vmid}.conf" - if [[ -f "$vm_config" ]]; then - sed -i '/^tags:/d' "$vm_config" - if [[ ${#next_tags[@]} -gt 0 ]]; then - echo "tags: $(IFS=';'; echo "${next_tags[*]}")" >> "$vm_config" - fi - fi + qm set "${vmid}" --tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null fi else # Tags unchanged