VMware Cloud Community
FreddyFredFred
Hot Shot
Hot Shot

help with user inputs

Hello,

I'm new to Orchestrator and I'm having a very difficult time getting started on a project. (this is with vcenter, no cloud stuff)

Basically I'm trying to setup a workflow that will probably be offered to users initially via the web interface that orchestrator provides but then we'd like to have another system start the process (by calling orchestrator via SOAP/REST to start a workflow and passing the parameters the workflow is expecting)

My problem is taking inputs and then figuring out how to reference datastores, folders, clusters, etc to deploy a VM from template.

In my system I will ask users to fill out some info (group, "level" of VM needed, OS) and then I'll figure out what to do on the back end.

For example, I present the user with a drop down list of predefined choices as to which group they are in. Suppose they choose ABC (which is defined as a string). How do I tell Orchestrator to create a VM in folder ABC? ( folder ABC already exists in vcenter).

Similarly, if they choose ABC, I would then clone the VM to datastore ABC but can't figure out how to do that. (If it was something like use datastore(ABC) or use datastore.name = ABC I would be fine but it seems I need to create objects of all kinds of different types and I'm having a hard time)

Can anyone help?

Thanks

0 Kudos
2 Replies
ChristianWehner
VMware Employee
VMware Employee

Hi,

welcome to the vCO community (the best community around here Smiley Wink!! )

It is not as easy as I could present you a solution within one post here :smileyplain:

First you have to search the VmFolder Object by name and also all the other input you need to provision a virtual machine. I built you two sample actions to search a VmFolder and a Datastore by name which I couldn't upload at the moment :smileyconfused: I will send them to you by message.

If you have all the Objects you need, you could provision your virtual machine. You could find here some threads where you will find examples of how to.

If you need more help, we should know some more information about your provisioning. Do you use Storage DRS? Do you provision VMs by cloning a template or build them from scratch  Do you use customization specifications? And so one. Cause you need other Orchestrator Actions and Workflows to get this running.

But don't loose your head, it isn't as complicated as it sounds!

Regards

Chris

0 Kudos
FreddyFredFred
Hot Shot
Hot Shot

Hi Christian,

Basically I’m asking the user for their group, the OS they want and a VM “level” (which I will use to add ram/cores/HD space as needed)

I will clone from template. I do have a customization spec in vcenter I can use but I’m not opposed to using the option in orchestrator and filling in all those parameters (from another post on there, it seems calling an existing spec isn’t necessarily easy)

I want to take these inputs (as strings) and then figure out the following:

Which datastore to put it on (either by matching a group name to their datastore or just finding the one with the most free space for example.. which I seem to have working from some code I found on the forums)

What to call the VM (VM###_text which I figue I can ask vcenter for a list of all vm’s matching a regular expression to find my next ###)

Put the VM into a folder (based on the input the user gave)

Place VM on a cluster

Give an IP (depending on what we do, I may need to query an external system to give me the IP or if the external system will start this workflow, it will be able to pass me the IP)

My current workflow has other workflows for each thing I need to get (I have one workflow to try and figure out what storage to use, another to figue out the template, etc). All those set attributes on the parent workflow and the last step would be to call the builtin clone workflow.

Thanks

0 Kudos