There was an error while loading. Please reload this page.
1 parent 54e13bc commit 48b34d4Copy full SHA for 48b34d4
1 file changed
tools/pve/add-iptag.sh
@@ -811,13 +811,7 @@ update_tags() {
811
if [[ "$type" == "lxc" ]]; then
812
pct set "${vmid}" -tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null
813
else
814
- local vm_config="/etc/pve/qemu-server/${vmid}.conf"
815
- if [[ -f "$vm_config" ]]; then
816
- sed -i '/^tags:/d' "$vm_config"
817
- if [[ ${#next_tags[@]} -gt 0 ]]; then
818
- echo "tags: $(IFS=';'; echo "${next_tags[*]}")" >> "$vm_config"
819
- fi
820
+ qm set "${vmid}" --tags "$(IFS=';'; echo "${next_tags[*]}")" &>/dev/null
821
fi
822
823
# Tags unchanged
0 commit comments