VMware Cloud Community
domrein
Contributor
Contributor

Get Vc:VirtualMachine back from cloneVM_task

Hi all,

does anyone know a way to get a managed object (VcVirtualMachine would be the best) from the cloneVM_task?

Or do I have to get it via VcPlugin.getAllVirtualMachines(); and filter by name?

Reply
0 Kudos
1 Reply
iiliev
VMware Employee
VMware Employee

Hi,

Check the scripting action com.vmware.library.vc.basic.vim3WaitTaskEnd. It allows you to wait until a given vCenter task (in your case, cloneVM_Task call) complete and returns the result of the task.

Reply
0 Kudos