VMware Cloud Community
irene_zimmerman
Contributor
Contributor
Jump to solution

How to join a ESX to an Active Directory Domain

I'd like to join a ESX Host to a AD domain but I cant figure out how to do that in a vco workflow.

Has anybody done that already?

How do I have to use the joinDomain_Task() ?

Thanks a lot.

0 Kudos
1 Solution

Accepted Solutions
Burke-
VMware Employee
VMware Employee
Jump to solution

I know this reply is to quite an old thread, but I felt it would still be beneficial to reply as I have just been asked for this same thing... I'm not sure why I didn't see or reply to this previously Smiley Wink

I have just put together a sample package for this. Please see the document here: http://communities.vmware.com/docs/DOC-21821

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter

View solution in original post

0 Kudos
4 Replies
jamesbowling
VMware Employee
VMware Employee
Jump to solution

I have never personally used it but it looks relatively straight forward.  Just need to pass domainName (string), userName (string), password (string) to use it.  userName would be a user with privileges to add computers to the domain mentioned in domainName.  Are you having an issue using it or just looking to use it?

James B. | Blog: http://www.vSential.com | Twitter: @vSential --- If you found this helpful then please awards helpful or correct points accordingly. Thanks!
irene_zimmerman
Contributor
Contributor
Jump to solution

Hi,

Thanks for your reply.

It is not the task itself, it is more the way how to get there.

The task is a function of VcHostActiveDirectoryAuthentication

From the host I want to join I can get the Authentication Manager (host.configManager.authenticationManager) but the supportedStore attribute, where I expect the VcHostActivDirectoryAuthentication to be, is empty.

So, how do I join the host into the domain?

Thanks.

0 Kudos
lamw
Community Manager
Community Manager
Jump to solution

To use the JoinDomain_Task() you will need to start from a HostSystem (ESX or ESXi host) and traverse to the following base class which provides that method.

HostSystem->configManager->authenticationManager->supportedStore[]->HostDirectoryStore as mentioned in the vSphere API reference guide http://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.apiref.doc_50%2Fvim.host.Direc...

You will see that the HostDirectoryStore class extends the HostActiveDirectoryAuthentication which provides several methods for joining/leaving an AD domain. You will see these are just base classes, so you just need to create a reference to this object in your vCO WF and then use the JoinDomain_Task().

Hopefully this helps, I don't have access to a vCO system with AD, but this should get you going in the right direction.

Burke-
VMware Employee
VMware Employee
Jump to solution

I know this reply is to quite an old thread, but I felt it would still be beneficial to reply as I have just been asked for this same thing... I'm not sure why I didn't see or reply to this previously Smiley Wink

I have just put together a sample package for this. Please see the document here: http://communities.vmware.com/docs/DOC-21821

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos