VMware Aria Automation Orchestrator

 View Only
  • 1.  convert string to VC:virtualmachine

    Posted Nov 20, 2017 10:46 PM

    Is there anyway to convert a string to VC:virtualmachine?



  • 2.  RE: convert string to VC:virtualmachine

    Broadcom Employee
    Posted Nov 20, 2017 11:47 PM

    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.



  • 3.  RE: convert string to VC:virtualmachine

    Posted Nov 21, 2017 02:10 PM

    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



  • 4.  RE: convert string to VC:virtualmachine

    Posted Aug 11, 2020 07:07 AM

    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];



  • 5.  RE: convert string to VC:virtualmachine

    Broadcom Employee
    Posted Nov 23, 2022 05:37 PM

    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!