How to manage snapshots of the VMs?
How do I do snapshot related operations on a VM? Say I want to capture snapshots or revert back to a snapshot, how can I do that? I've tried searching this on the vsphere automation sdk for python docs but it doesn't seem to have any information related to this.
Thanks.
@tianhao64 any feedback on this please ?
Curious about this as well... Surprising the automation sdk doesn't have snapshot capabilities. Is this a feature request or already in progress?
Can anybody confirm if this feature is still not available with the latest SDK? I can forward the request in that case.
I looks like it is a VM property, which makes sense. I am able to list them by the vm object anyway.
I have posted some example code here: https://vm.knutsson.it/2021/04/get-snapshot-informatin-using-python/
I have posted some example code here: https://vm.knutsson.it/2021/04/get-snapshot-informatin-using-python/
Good to know!, unfortunately this is working only on a separate API implementation: "Pyvmomi"
I keep wondering why they haven't implemented the same snapshot concept with the newer REST API
Anyway it's however possible to know the presence of snapshots with the following code:
vsphere_client.vcenter.VM.get('vm-208100').to_dict()['disks'][0]['value']['backing']['vmdk_file']
--> '[Datastore-A] vm_name/vm_name_disk-000001.vmdk'
Unfortunately we cannot know the date and any descriptions of the snapshot, but it is a start
This is still not implemented?