ESXi

 View Only
  • 1.  API for ESXi to revert VM snapshots

    Posted Apr 10, 2018 09:54 AM

    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



  • 2.  RE: API for ESXi to revert VM snapshots

    Posted Apr 10, 2018 09:34 PM

    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



  • 3.  RE: API for ESXi to revert VM snapshots

    Posted Nov 23, 2020 02:17 PM

    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



  • 4.  RE: API for ESXi to revert VM snapshots

    Posted Dec 30, 2020 01:35 PM

    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