I am looking for an alternative to the vim3WaitTaskEnd method...
Scenario:
Lets say I have an array of VMs that I need to migrate to another host. The following example loops through my array of VMs one at a time waiting for each migration to complete before moving onto the next VM. I'd rather batch the tasks together or queue them up (similar to running workflows in parallel works) then wait for all tasks to complete.
for (s = 0; s < targetVM.length; s++) { task = targetVM[s].migrateVM_Task(resourcePool, Host2, VcVirtualMachineMovePriority.highPriority, null); actionResult = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(task, true, 10); }
Any thoughts or direction would be greatly appreciated.
Adam