Hello colleagues,
I'm trying for some time to write a script in the ESX perl vi toolkit, which will remove a snapshot , but with no succsess.
The snapshot could be in the "RootSnapshotList" (which is the latest snapshot), or in the ChildSnapshotList of the VirtualMahine.
it could be great if you could post an example of such sample code.
Thanks in advance
As you would have noticed that the virtual machine snapshots are stored as a tree structure. The subroutine "find_snapshot_name" traverses through this tree to match the snapshot name entered by the user and returns the reference of that particular node. You can edit this subroutine to change the matching criteria and put all the relevant snapshots (that match the criteria) in a separate array. Once the filtering is done, you can return this array from the subroutine.
Hope this information is helpful.