apply_vm_tag
Assign an NSX tag (scope and value) to a virtual machine using its ID. Existing tags remain intact, and group membership is updated.
Instructions
[WRITE] Apply an NSX tag to a virtual machine.
Returns {"status": "applied", "vm_id", "scope", "tag"} — not the VM's tag list. Use list_vm_tags first for the vm_id, and again after to see the result. Additive, so existing tags survive, but note that tag-based group membership shifts as NSX re-evaluates: check with get_group.
Args: vm_id: VM external ID (fabric UUID, from list_vm_tags). tag_scope: Tag scope (e.g. 'env', 'tier', 'owner'). tag_value: Tag value (e.g. 'production', 'web'). target: Optional NSX Manager target from config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vm_id | Yes | ||
| target | No | ||
| tag_scope | Yes | ||
| tag_value | Yes |