VMware Cloud Community
BrettK1
Enthusiast
Enthusiast

Externally add AD OUs for VM Template Input selection?

I've just added the AD integration in vRA 8.6, and it's nice to have it pre-create the computer object in a specified OU before letting the Customization Spec join the VM.

Entering all possible OU choices and their respective DNs to populate the 'relativeDN' field on the other hand seems like a fools task, especially when OU structures change, and updating multiple Templates to reflect these changes would just be problem ridden forevermore.

I'm wondering if there's a simpler method of doing this than involving vRO?  Thus far we aren't using vRO for anything, so using it will be a lift (maybe worthwhile in the long run, but short term...)?  -  Given a base DN, create a oneOf with Titles that are each child OU (with full path name), and a const that is the DN of that OU.

Edit: I'm removing the term "dynamically" as I've seen this to mean "change one dropdown list based on other values", where I'm just trying to "poll external data and create the dropdown from that at request time"

0 Kudos
2 Replies
hhc_rleefyi
Contributor
Contributor

I have a workflow that.

1) set the OU I want, which we have several categories for our server placement.  Once I know the OU I want.

2) There is a built in action called "getADOUObjectByName" this will return the OU object.

3) This gets passed to another workflow (and can put them in one workflow) that I pass in the computerName (string), domainName (string), the parent (which is the OU)(any).  There are 2 built in Actions in this workflow.

   1) "createComputer" which creates the computer in the OU

   2) I need the AD:Computer for other workflow items so I also get the AD:Computer object by calling the action "getComputerFromContainer", which also takes the computer(string), container (ou) and returns the AD:Computer object that was created.

 

0 Kudos
BrettK1
Enthusiast
Enthusiast

Thanks, unfortunately your workflow starts AFTER what I'm looking for.

"1) set the OU I want, which we have several categories for our server placement. Once I know the OU I want."

I'm specifically trying to generate the list of OUs at request time, from a set base OU, because I don't know what OU the user will want, and there are at least 30 to choose from (maybe only 10 or so are 'common', but still)
Creating the computer object is simple (using the AD Plugin) once that is done, but I don't want users attempting to type in the applicable OU by hand (or generating the list of OUs manually at Template creation time).

Edit: changed 'dynamically' to "at request time"

So far it's looking like this is a vRO type thing (unless there's other simpler methods):
https://docs.vmware.com/en/vRealize-Automation/8.5/Using-and-Managing-Cloud-Assembly/GUID-5E57E22B-7...
with some examples:
https://kuklis.github.io/cma/post/custom-form-dropdown-external-source/

Another Edit:  I finally got this working, using a vRO action as described above.  Another page was necessary as the 'array of properties' method failed validation for some strange reason, so I had to use an alternate method that I'm not quite sure what it is, but is described here: https://kuklis.github.io/cma/post/vra8-external-inputs-and-input-property-groups/

0 Kudos