Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to manage snapshots of the VMs? #144

Open
andrewscott0 opened this issue Mar 28, 2019 · 7 comments
Open

How to manage snapshots of the VMs? #144

andrewscott0 opened this issue Mar 28, 2019 · 7 comments

Comments

@andrewscott0
Copy link

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.

@abessifi
Copy link

@tianhao64 any feedback on this please ?

@rfalias
Copy link

rfalias commented Oct 23, 2019

Curious about this as well...
Surprising the automation sdk doesn't have snapshot capabilities. Is this a feature request or already in progress?

@anusha94
Copy link
Contributor

Can anybody confirm if this feature is still not available with the latest SDK? I can forward the request in that case.

@KnutssonDevelopment
Copy link

I looks like it is a VM property, which makes sense. I am able to list them by the vm object anyway.

@KnutssonDevelopment
Copy link

I have posted some example code here: https://vm.knutsson.it/2021/04/get-snapshot-informatin-using-python/

@luponata
Copy link

luponata commented May 4, 2021

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

@avesst
Copy link

avesst commented May 2, 2024

This is still not implemented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants