Hello,
I'm newbie in vCO. I'm want create a workflow to schedule a virtual machine deletion.
Input parameter is "Virtualmachine" type String. Into the script I want to use this string to use as a VC:VirtualMachine type.
How can convert string type to VC:VirtualMachine type?
Thanks
In the List of Input Parameters in your workflow, just click on the actual Type of the parameter to change it.
(you must be in Workflow editor mode CRTL+E for the workflow)
Regards,
Joerg
Gesendet: Mittwoch, 26. Oktober 2011 12:19
An: info@jlew.de
Betreff: New message: "Change string type to VC:VirtualMachine Attribute type"
VMware Communities<http://communities.vmware.com/index.jspa>
Change string type to VC:VirtualMachine Attribute type
created by numulite<http://communities.vmware.com/people/numulite> in Orchestrator - View the full discussion<http://communities.vmware.com/message/1851729#1851729
Hello Joerg,
I want to create an scheduled workflow to delete specific Virtual Machine. Once it is deleted, another workflow create it again.
If I set VirtualMachine parameter as VC:VirtualMachine when I try to delete again the virtual machine, workflows fails because the virtual machine's id (ex: vm-524) has been changed when I created it again.
Regards.
In that case, at the end of your re-create workflow, store the new VC:VirtualMachine object as a configuration element...and use that configuration element as the source input for your delete VM workflow...this of course assumes the delete/re-create is for a single VM....
Hi Burke,
Sorry I'm not explained all the process...
New virtual machine is created with P2V process. I create a workflow that execute a powercli into Converter Server (It's a virtual machine and I use a VIX connection to execute the script) to re-create the virtual machine. How can obtain the VC:VirtualMachine object created by the Converter server?
I think that it could be more easy create into the workflow an script to search a virtual machine that match the name with the string value. When the script found this virtual machine, delete it. But I don't know how to create that script.... :'(
Regards
ah, now I understand the use-case... tricky one 🙂
provides the converter any output (which may contain the Managed Object ID)?
Identifying a VM by the name is dangerous, because it's not necessarily unique (e.g. if you have multiple vCenter-Server connected to a single vCO).
However: The script which calls the converter has somehow to provide a unique name and place in that specific vCenter's Inventory, so with this information you can try to find the VM afterwards.
For a start you may use the xpath filter in the getAllxxxxx-Methods of a SDKConnection, more infos about that:
http://www.google.com/search?q=xpath+orchestrator+site%3Acommunities.vmware.com
Regards,
Joerg