How to Join VMware vCenter to Active Directory – CLI & GUI

Loading

A quick guide to show you to how to join our vCenter to Active Directory

1- Login to our vCenter as usual with our administrator@vsphere.local account

2- Go to Administration section

3- Under configuration > Click join AD button to join our vCenter to domain

4- Provide the domain name – OU – Username and Password and Click Join AD

5- In a few moments, the vCenter will be joined to domain.

6- Reboot the vCenter node by node by navigating to System Configuration and Reboot Node

Join the vCSA to domain via the CLI

1- Log in as root through an SSH or console session on the vCenter Server Appliance.

Run this command to enable the shell:

shell.set --enabled true

Run this command to launch the shell:
shell

2- Execute the command domainjoincli to join vcSA to domain

vsan:/opt/likewise/bin # ./domainjoin-cli join ash.local Administrator Pa$$w0rd
Joining to AD Domain:   lab.local
With Computer DNS Name: vsan.lab.local 

SUCCESS

3- Output of domain join can be viewed by the CLI 
root@vSAN ~ # /opt/likewise/bin/domainjoin-cli --loglevel verbose --logfile /tmp/domain.log join --advanced --ou "OU=Computers,DC=ASH,DC=local" ash.local "administrator@ash.local"

4- Execute the command to check the join state

vsan:/opt/likewise/bin # ./domainjoin-cli query
Name = vsan
Domain = LAB.LOCAL
Distinguished Name = CN=VSAN,CN=Computers,DC=lab,DC=local
vsan:/opt/likewise/bin #

5- Execute the command to get a list of valid identity provides


root@sfo-m01-vc03 [ ~ ]#  /opt/vmware/bin/sso-config.sh -get_identity_sources
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/lib/vmware-sso/vmware-sts/webapps/ROOT/WEB-INF/lib/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/vmware/lib64/log4j-slf4j-impl-2.17.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Total number of identitysources retrieved for tenant:vsphere.local : 2
(If the value is undefined against a param, then you might notice "UndefinedConfig" against it.)

********** IDENTITY SOURCE INFORMATION **********
IdentitySourceName        :  vsphere.local
DomainType                :  SYSTEM_DOMAIN

********** IDENTITY SOURCE INFORMATION **********
IdentitySourceName        :  localos
DomainType                :  LOCAL_OS_DOMAIN
root@sfo-m01-vc03 [ ~ ]#


6- Reboot vCSA appliance

vsan:/opt/likewise/bin #
vsan:/opt/likewise/bin #
vsan:/opt/likewise/bin # reboot

(Visited 1,673 times, 1 visits today)

By Ash Thomas

Ash Thomas is a seasoned IT professional with extensive experience as a technical expert, complemented by a keen interest in blockchain technology.