VMware Cloud Community
rubberduck70
Contributor
Contributor

Unable to join computer to domain using built-in workflows

hi guys

I know there has been a similar thread that there is a bug of some sort of joining a server to the domain using one of the built-in workflows vCO 5.1 Domain Join), is anyone still experiencing this issue when using vCO 5.5?

It was working in 4.2, but in 5.1 and 5.5, we unable to do so. tried various of different authentication types but issue still persists.

Is anyone perhaps aware of a workaround for this?

thank you

Reply
0 Kudos
3 Replies
paurgie
Contributor
Contributor

I don't know if the bug still exists, but I definitely have experienced it in the previous versions.  What I did to get around it ended up being more useful for our environment, so I'm not too terribly interested in going back.

We use the Libary -> vCenter -> Guest Operations -> Processes ->Run program in guest to run netdom to join the system to the domain.  PrograPath is set to "c:\Windows\System32\netdom.exe" and in previous steps we set up two variables that are assembled into the argument parameter like so -

reqDomainOU is set in a presentation dropdown to one of a series of OUs that our servers live in, DEV/Test/QA, etc.

In scripting we do this:

winNetDomArg = "join " + reqName + " /D:OurDomain.local /UD:a_user_with_rights /PD:thatUsersPassword /OU:\""+ reqDomainOU +"\" /reboot";

You need some other special sauce, such as your template's admin/pass, but those are the easy parts.  This allows us to drop the VM into the right OU before we have to lay a hand on it, which is tons more useful than dropping it into a default place, and then we have to go relocate it, reboot for our GPO changes, etc..

Reply
0 Kudos
rubberduck70
Contributor
Contributor

Thanks Paurgie!

So I can clone the existing workflow of "Run program in guest", then in the scripting section, should I add:

winNetDomArg = "join " + reqName + " /D:OurDomain.local /UD:a_user_with_rights /PD:thatUsersPassword /OU:\""+ reqDomainOU +"\" /reboot";


at the bottom of the default code?


FOR -> "reqDomainOU is set in a presentation dropdown to one of a series of OUs that our servers live in, DEV/Test/QA, etc." - insert a parameter as reqDomainOU and use a dropdown or how should I present this?

Reply
0 Kudos
paurgie
Contributor
Contributor

Sorry for the extremely late reply... I wouldn't alter the canned 'Run program in guest' workflow, but call it as built.  I'll explain how I use that code.

We have a workflow that does many things based on a large 'info gathering' step.  One of the things in that step's presentation is selecting an OU from a group of potentials based on the role of the server.  The dropdown has entries like "ou=dev, ou=server, dc=OurDomain, dc=local" and "ou=prod, ou=server, dc=OurDomain, dc=local", the selection is stored in reqDomainOU by the presentation step.  If you don't have that need you could just substitute the path to your server OU instead of parameterizing into reqDomainOU.


The specific line of code I gave is in a separate scripting block after the presentation where we 'prepare' the variables that are eventually passed into the canned 'Run program in guest' workflow.

reqName - the name that was passed in as the name of the VM, and also the 'OS' name

a_user_with_rights - could be either hard coded or passed in as a variable

thatUsersPassword - same as a_user_with_rights

Once that is all put together into winNetDomArg, it is passed in as the 'arguments' parameter along with the other info I gave in my other post. Since this is rebooting right away to 'set' the changes invoked by our group policies from the OU it was placed into, I wait for a couple of minutes just for the OS to get done setting the environment before moving on.  Since we do that work with GP, it's a far more complete option than just blindly joining into 'Computers', moving into the proper OU later and rebooting.

Reply
0 Kudos