delete_drs_rule
Delete a VM-VM DRS rule from a vSphere cluster. Preview first to see the exact rule definition, then confirm to remove it; the audit trail records the full rule for recovery.
Instructions
[WRITE] Delete a VM-VM DRS rule - confirm-gated, guarded.
REFUSES non-VM-VM rules: VM-Host rules can carry licensing/compliance placement constraints (must-run-on licensed hosts) and hang off cluster groups - manage those in the vSphere UI. The preview and result both record the full rule definition so a mistaken delete can be recreated from the audit trail. Audited.
Returns: Preview dict (action="preview", would_delete) or result dict (action="deleted", deleted). Errors return a dict with "error" + hint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | vCenter target name from config.yaml; omit to use the default target. | |
| cluster | Yes | Exact cluster name. | |
| confirm | No | False (default) returns the blast radius and changes nothing. True deletes it. Do not set True because the user asked earlier; they have not seen the preview yet. | |
| rule_name | Yes | Exact rule name (see list_drs_rules). |