vim_vm_snapshot¶
VM snapshots via pyVmomi SOAP (vCenter REST has no snapshot surface in 9.2).
Probed against VCF 9.2: GET /api/vcenter/vm/{id}/snapshots returns 404.
This module uses vim.VirtualMachine.CreateSnapshot_Task and friends
through the SOAP service to author and manage snapshots.
- saltext.vcf.clients.vim_vm_snapshot.list_(opts, vm_id_or_name, profile=None)[source]¶
Return a tree of snapshots:
[{"id", "name", "description", "children": [...]}].
- saltext.vcf.clients.vim_vm_snapshot.current(opts, vm_id_or_name, profile=None)[source]¶
Return the current (active) snapshot dict, or None.
- saltext.vcf.clients.vim_vm_snapshot.create(opts, vm_id_or_name, name, *, description='', memory=False, quiesce=False, vss_options=None, profile=None)[source]¶
Create a snapshot, return the
vim.TaskmoId.vss_options — optional dict for Windows-guest VSS quiesce. Supported keys:
vss_backup_type(1=full, 2=incremental, 5=differential, 6=log),vss_backup_context(e.g.backup_context_backup),vss_partial_file_support(bool),vss_bootable_system_state(bool),timeout(seconds). Setting any value impliesquiesce=Trueand usesCreateSnapshotEx_Taskwith a WindowsQuiesceSpec.
- saltext.vcf.clients.vim_vm_snapshot.revert(opts, vm_id_or_name, snapshot_name, *, suppress_power_on=False, profile=None)[source]¶
Revert to a named snapshot. Returns vim.Task moId.
- saltext.vcf.clients.vim_vm_snapshot.remove(opts, vm_id_or_name, snapshot_name, *, remove_children=False, profile=None)[source]¶
Delete a snapshot by name. Returns vim.Task moId.
- saltext.vcf.clients.vim_vm_snapshot.remove_all(opts, vm_id_or_name, profile=None)[source]¶
Delete every snapshot on the VM. Returns vim.Task moId.