TT: Join VMware vCenter Server Appliance to Active Directory

This step-by-step tutorial will show you how to join a vCenter Appliance server to an existing Active Directory.

The setup is pretty simple:

Active Directory = itbasement.net
VMware infrastructure = vSphere 5
vCenter = VMware vCenter Server Appliance (ver. 5.0.0.2968 Build 380565)

When I first tried to join my vCenter Server Appliance to my Active Directory through the web interface, I was getting this type of error:

“Cannot join domain, failed to open connection to required ports on DC”

After searchin more info on the topic I found this KB#2002626.

Let’s get started!

1. Connect to vCenter using SSH or directly through vSphere Client Console.
2. First, make sure you properly set the DNS so that it points out your Active Directory. To double check, you can run the command:

itb-vcenter:~ # cat /etc/resolv.conf
3. Next, you have to setup the hostname for this appliance:
itb-vcenter:~ # domainjoin-cli setname itb-vcenter
4. Now we can join the vCenter to our Active Directory:
itb-vcenter:~ # domainjoin-cli join itbasement.net administrator@itbasement.net Passw0rd
With Computer DNS Name: itb-vcenter.itbasement.net
SUCCESS
Good, our vCenter is now connected to the Active Directory.

5. We have one final step to complete,: add permission for a domain user/group to access the vCenter infrastructure.

I’m pretty sure that most of you know how to do this, but for those of you who don’t, here it is:
- Connect to vCenter with ViClient and at the datacenter level go to permissions as in the example bellow:
- Select Add.. and choose your domain, your user or group and click OK.
- Select the role you want to assign to the Grop/User and then click OK.

Basically, that’s all you need to do.
Have fun!

About Razvan Oncescu

System Engineer

No comments yet... Be the first to leave a reply!