I am trying to setup an automated install of ESXi hosts using the kickstart script and the jointovCenter python script from here http://www.virtuallyghetto.com/2011/03/how-to-automatically-add-esxi-host-to.html
Everything works great and ESXi auto-installs with the kickstart script and then after %firstboot it runs this script, or if i run it manually with # python joinvCenter.py from the service console. In the logs it lists out all of the syslog messages generated from the script saying it successfully joined vCenter but it does not actually join and I see no signs of life from vCenter or in the vCenter logs. vCenter does not appear to do anything, like sending out the agent etc.
Does anyone know why it would not be joining the host to the vCenter cluster? I am at a dead end here since all of the logs show success when running the script.
If you just copied the script, there is an error in line 101 with the case sensitivity:
# Code to create ConnectHostSpec
I saw that in the comments on the blog post. I already changed those to lower case and it still does not work.
The only difference i can think of is that I am using ESXi 5 instead of 4.1 iused in the blog post. What else could cause this not to work?
I have made sure the FQDN and permissions are correct and that the host is joined to the domain correctly.
You must not change them to lower but to upper cases.
The line I pasted is the correct one.
I tried the script against vSphere 5 (vCenter and ESX) and it worked (with another problem *) after changing the line as mentioned.
*) you need to run the script twice with a few second break between, because the first time the vcenter task times out.
Thanks Chris, i got it working with those changes. Now here is the problem. These scripts only work if the hosts FQDN is added to the DNS server otherwise the scripts won't work because they require name resolution. Is there a way i can the windows DHCP server to add the hostname it gives out to the DNS server? if i manually create the A Pointer records and then run the scripts again they work perfectly.
i have a question,
i have all the settings you mentioned, my log state that all went succesful, but what do you mean with,
" you need to run the script twice with a few second break between, because the first time the vcenter task times out."
do you mean to run the Python sript twice or just the ConnectHostSpec
i hope you can help me out,