vm_clean_slate
Revert a VM to its baseline snapshot to reset it to a clean state. Previews the blast radius before making any changes, then powers off and restores the snapshot.
Instructions
[WRITE] Revert a VM to its baseline snapshot (Clean Slate).
Without confirm=True this only previews: it returns blast_radius (VM identity, power state and whether it is powered off first, the snapshot and when it was taken, snapshot count, blockers) and changes 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.
With confirm=True: powers off the VM first if it is running, then reverts to the named snapshot. Use this to reset a lab/dev VM to a clean starting state after a task completes. Irreversible — everything written since the snapshot is lost. Refused: no snapshot of that name, more than one, or a VM whose state cannot be read. Returns a dict (action, blast_radius).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Optional vCenter/ESXi target name from config. | |
| confirm | No | False (default) returns the blast radius and changes nothing. True applies it. | |
| vm_name | Yes | Name of the VM to revert. | |
| snapshot_name | No | Snapshot name to revert to (default: "baseline"). | baseline |