Quantcast
Channel: VMware Communities : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 180259

node.getSnapshot() returns null

$
0
0

I need to revert a set of 6 snapshot. I use code from the VMSnapshot.java example:

 

First get a list of VirtualMachineSnapshotTree and call the traverseSnapshotInTree method:

    List<VirtualMachineSnapshotTree> listvmst = snapInfo.getRootSnapshotList();

    snapmor = traverseSnapshotInTree(listvmst, "mySnapshotName", false);

 

Then in the recusive traverseSnapshotInTree method I scan all nodes and when found the right one I get the snapshot:

    private static ManagedObjectReference traverseSnapshotInTree(List<VirtualMachineSnapshotTree> snapTree, String findName, boolean print) {

        ...

        for (VirtualMachineSnapshotTree node : snapTree) {

            if (findName != null && node.getName().equalsIgnoreCase(findName)) {

                return node.getSnapshot();

            }

        }

    }

 

Everything worked fine untill a few day ago : The node.getSnapshot() method now returns null for 1 snapshot, then also for a 2nd one as this still works correctly for all other snapshots and all nodes are found and seems to be correctly built.

This sounds as the snapshot or its node are corrupted.

 

Did anybody experimented the same problem ?

 

Thanks for any idea

 

VMware-vSphere-SDK-5.1.0-774886


Viewing all articles
Browse latest Browse all 180259

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>