ESXi Kickstart Python Script joining to vCenter VCSA6.5

ESXi Kickstart Python Script joining to vCenter VCSA6.5

I saw many users are wondering why the python scripts to join a ESXi host to a vCenter failed.

The working scripts can be found http://www.virtuallyghetto.com/2011/03/how-to-automatically-add-esxi-host-to.html

It was really a great scripts, but it is old and need be revised.

There is 2 things need to be think over, ESXi version and vCenter version.

Till ESXi 6.0u2, the python still is python 2. But ESXi 6.5, the python is upgraded to python 3.

(Pity, I have no idea to mount media to run python 2 in ESXI 6.5. )

vCenter is also need to be checked. Above vCenter 6, https were introduced.

So in short, ESXI 6.0U2 join vCenter 5.5, the joinvCenter.py can work fine.

If you use ESXi 6.0U2 join vCenter 6, the joinvCenter.py need to be advised.

Here is the solutions based joinvCenter.py.

a. Add ssl in the import part. “import sys,re,os,urllib,urllib2,base64,syslog,socket,ssl”

b. Add Disable SSL certificate part after the url.

# Disabling SSL certificate verification

context = ssl.create_default_context()

context.check_hostname = False

context.verify_mode = ssl.CERT_NONE

Version history
Revision #:
1 of 1
Last update:
‎10-18-2017 01:51 AM
Updated by: