Hi All,
Task:- Delete the snapshot of all VM's from a selective cluster (I have 4 clusters, i want to select a cluster ).
Issue:- I am able to select the cluster and get all VM's information but at the time of snapshot deletion it says that no snapshot are avalible. I attached the workflow. could you help me in fixing the workflow (missing the logic). Thank you inadvance for the help.
Hi,
I recommend to duplicate the getPropertiesForAllSnapshotTask action, and change the first line there from
var vms = VcPlugin.getAllVirtualMachines();
to
var vms = System.getModule("com.vmware.library.vc.cluster").getAllVMsOfCluster(cluster);
Don't forget to add a parameter named "cluster" of type clustercomputeResource to the action.
Then you can have almost the original library workflow, only thing to change there is to call your action rather that the original action, and bind the cluster parameter.
Cheers,
Joerg
Hi,
I recommend to duplicate the getPropertiesForAllSnapshotTask action, and change the first line there from
var vms = VcPlugin.getAllVirtualMachines();
to
var vms = System.getModule("com.vmware.library.vc.cluster").getAllVMsOfCluster(cluster);
Don't forget to add a parameter named "cluster" of type clustercomputeResource to the action.
Then you can have almost the original library workflow, only thing to change there is to call your action rather that the original action, and bind the cluster parameter.
Cheers,
Joerg