-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
I couldn't help but notice the vSphere cloud plugin has options for restoring snapshots as a build operation, but this feature only works with named snapshots at the moment. I'd like to see this functionality enhanced such that one could restore a VM back to the "last" snapshot (ie: the one used to launch the current instance of the VM).
The vSphere client and all other vSphere tools have this option, so I suspect there must be a remote API call exposing this exact behavior. That being the case I'd hope it would be a trivial amount of work to implement this feature.
NOTE: The rationale for this request is, we'd like to have VM cleanup logic done automatically as part of our Jenkins jobs, which would essentially shut down a running VM, restore it back to the 'last' snapshot, then restart it, thus ensuring CI operations that use the VM always start in a consistent state. Further, as the number of VMs increases it becomes difficult to ensure the names of snapshots stays consistent over time so it would be helpful to be able to restore the VM back to the last snapshot without needing to refer to it's name explicitly in the job.