vm_delete_snapshot
Delete a VMware snapshot permanently, previewing its blast radius first unless confirmed. Consolidates delta disks and frees space without changing the VM's current state.
Instructions
[WRITE] Permanently delete a named snapshot, consolidating its delta disk into the parent.
Without confirm=True this only previews: it returns blast_radius (VM and instance UUID, the snapshot's name, id and creation time, remove_children, how many child snapshots sit below it and how many snapshots would be removed) and deletes nothing. Show it to the user and get their decision. Do not set confirm=True on your own because the user asked earlier: they have not seen the preview yet.
Frees disk space and does NOT change the VM's current state (unlike vm_revert_snapshot). Works while the VM is powered on. Refused: a snapshot name that is not found, a name that matches more than one snapshot on the VM (vSphere allows duplicates; rename one first), and a snapshot tree that cannot be read. Run vm_list_snapshots first for exact names.
Consolidation is slow for old/large deltas (often minutes). By default (wait=False) this returns a task id immediately so it does not block your context — poll it with vm_task_status. Set wait=True only for small snapshots (blocks up to 30 min).
Returns: Dict with action (preview, snapshot_delete_started, snapshot_deleted), blast_radius, and result (carries the task id to poll via vm_task_status).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | False (default) = async, return task id at once; True = block. | |
| target | No | vCenter/ESXi target from config.yaml; omit for the default target. | |
| confirm | No | False (default) returns the blast radius and changes nothing. True applies it. | |
| vm_name | Yes | Exact name of the VM owning the snapshot. | |
| snapshot_name | Yes | Exact snapshot name from vm_list_snapshots output. | |
| remove_children | No | False (default) = children are kept and consolidated; True = delete the entire snapshot subtree below this one as well. |