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.
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
I have just put together a sample package for this. Please see the document here: http://communities.vmware.com/docs/DOC-21821
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?
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.
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.
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
I have just put together a sample package for this. Please see the document here: http://communities.vmware.com/docs/DOC-21821