Contributor
Contributor

API for ESXi to revert VM snapshots

Hi all,

I have an ESXi host with many Virtual Machines running on it.

I need to build a custom application (in Python, Java or .NET) to connect to the ESXi host to revert selected VMs to particular snapshots at the user's discretion.

I am relatively new to products in the vSphere product line.

  • Is this achievable and which API should I be looking at?
  • Is it free?
  • Based on your experience, is the learning curve steep and is it difficult to do something like this?

Thank you

0 Kudos
3 Replies
Leadership
Leadership

Hi,

That's fairly easy to do in a PowerCLI script, bash script, C++, or ... well in a lot of different language API bindings.

For python, have a look here:

GitHub - vmware/pyvmomi: VMware vSphere API Python Bindings

or  just have a look here:

VMware API and SDK Documentation

There's no additional cost.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
Enthusiast
Enthusiast

I am trying to find the API endpoints for listing and restoring snapshots etc. 

But I cannot find anything on this here:

https://vmware.github.io/vsphere-automation-sdk-rest/vsphere/index.html

0 Kudos
Enthusiast
Enthusiast

I found out in the meantime that the REST API does not support these operations yet. 

One must stick with the vSphere Web Services API for that purpose:

https://code.vmware.com/apis/1067/vsphere

0 Kudos