vm_apply_plan
Preview the blast radius of a multi-step VMware change plan, then execute it step by step after explicit confirmation, stopping on failure and reporting rollback availability.
Instructions
[WRITE] Execute a previously created plan step by step.
Without confirm=True this only previews: it returns blast_radius listing every step (index, action, target object), the count and indices of the destructive ones (delete, power off, revert, guest commands...), and blockers — and runs nothing. Show that to the user and get their explicit decision. Do not set confirm=True on your own because the user asked earlier: they have not seen the preview yet.
Each step is shown with its full parameters (passwords redacted). Each destructive step is measured as its own tool would measure it (vm_delete, vm_power_off, vm_revert_snapshot, vm_guest_exec, cluster_delete ...), and that tool's blockers refuse the plan. A step on something an earlier step creates or changes is marked check "deferred": it is measured immediately before it runs, and the plan stops there if it fails.
Refused: a target other than the one the plan was created against (no target is a target of its own), a step its tool would refuse, anything it could not read, a delete_vm step without its acknowledge_blast_radius (from a vm_delete preview), and any iscsi_* or storage_rescan step — those are gated in vmware-storage; run storage_iscsi_* / storage_rescan there.
With confirm=True steps run sequentially. On failure: stops immediately, keeps the plan file with per-step results, and returns rollback_available. On success: deletes the plan file. If a step fails and rollback_available is true, ask the user whether to rollback, then call vm_rollback_plan.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | The vCenter/ESXi target the plan was created against. | |
| confirm | No | False (default) returns the blast radius and changes nothing. True applies it. | |
| plan_id | Yes | The plan ID returned by vm_create_plan. |