Join  ESXi 6.x to Active Directory Using domainjoin-cli

The enhancement  with vSphere 6.x , Likewise utility called domainjoin-cli which allows you to join a system to an Active Directory Domain. Previously, if you wanted to automate the process of joining an ESXi host to an Active Directory Domain, you had to either manually configure it using the vSphere Web/Client .

Below are the steps need to perform .

  1. /etc/init.d/lwsmd start
  2. chkconfig lwsmd on

For  Joining  to your Active Directory Domain, you have to specify the following parameters:

  • Join – Specifying the operation is a join versus a leave
  • AD Domain Name – Active Directory Domain to join
  • Username – Active Directory username to join to the domain
  • Password – Active Directory password to join to the domain (optional as you will be prompted if it is not specified)

Here is an example of what the command looks like joining my Active Directory Domain in my lab:

/usr/lib/vmware/likewise/bin/domainjoin-cli join administrator

Additional Information

You can verify  that your ESXi is Joined to of Domain or not by using below steps .

  • Go to Path            /usr/lib/vmware/likewise/bin
  • Run command   ./domain-cli query

Below image shows the ESXi is not part of Domain , After Joining to active directory using steps mentioned in the First  you may run this again to verify status .