Is there anyway to convert a string to VC:virtualmachine?
What does this string represent? The name of the virtual machine? If yes, there is a workflow 'Get virtual machines by name' under Library > vCenter > Virtual Machine management > Basic
Note there can be more than one virtual machine matching the given name.
llian,
Your right I did see that but my problem may be uneak. What I want is to have the tenants in vRA only see (a must) their VMs, select that VM and then do what they want with it. My thinking this would be its own workflow that would be placed in front of snapshot or rename workflow for example. Am I going about this the wrong way. Ive had little (very little) training and what training and what Ive had nothing to do with vCenter. Im trying not to reinvent the wheel but did not see anything like this anywhere. Any help you all can give me is appreciated.
James
There is a way, suppose you have store your VM name in a string name as an Input and your output is vmname with VC:VirtualMachine type
Input >> string >> name
Output >> VC:VirtualMachine >> vmname
#####Convert String to VC:VirtualMachine type
name = "virtulamachinestringname"
query = "xpath:name='"+name+"'";
name = Server.findAllForType("VC:VirtualMachine", query);
vmname = name[0];
Providing the code to convert string to VC:VirtualMachine type was VERY HELPFUL to a project I am working on. Worked Perfect! Thanks for sharing!