VMware Cloud Community
IelDoreInce87
Contributor
Contributor
Jump to solution

ESXi 5 kickstart issue

Hello,

I'm trying to automate the installation process of my ESXi servers but I've run into an issue that I can't seem to resolve.

Currently I'm pxe booting the installation media and passing a kickstart script to configure the basic settings. In the kickstart file I have a  %POST section that contacts a webserver to tell me the installation is complete. This action then unstages the PXE environment so it doesn’t run through the installer again.

But by default it appears only port 80 is open outbound and not port 443 within the vmkernel.

My issue is I need to do a HTTPS GET (not a HTTP GET) from the %post part of the ks script but the traffic never leaves the server. At first I thought it was an ssl issue because of the preinstall environment but I've changed the https port from 443 to 80 on the webserver and all works as expected and the traffic is sent over https ( port 80) as desired.

I've tried running esxcli to clear the firewall rules out but I get a local connection error so it doesnt appear I can

Does anyone know if it's possible to do an https outbound connection during the %POST section of the install?

My current Post section:

%post --interpreter=python

import os, httplib

mac = os.popen(\'esxcfg-nics -l | grep vmnic0 | awk \\\'{print $7}\\\'\').read()

h1 = httplib.HTTPSConnection("192.168.3.10")

h1.request(\'GET\', \'/rest/server/unstage/\'+mac.replace(\':\', \'-\'))

h1.getresponse()

%firstboot --interpreter=python

import os, httplib

mac = os.popen(\'esxcfg-nics -l | grep vmnic0 | awk \\\'{print $7}\\\'\').read()

h1 = httplib.HTTPSConnection("192.168.3.10")

h1.request(\'GET\', \'/rest/server/activate/\'+mac.replace(\':\', \'-\'))

h1.getresponse()'

Hopefully this all makes sense and thanks guys!

0 Kudos
1 Solution

Accepted Solutions
mpanot
VMware Employee
VMware Employee
Jump to solution

Try using localcli (instead of esxcli) to disable the firewall.

View solution in original post

0 Kudos
2 Replies
mpanot
VMware Employee
VMware Employee
Jump to solution

Try using localcli (instead of esxcli) to disable the firewall.

0 Kudos
IelDoreInce87
Contributor
Contributor
Jump to solution

THANK YOU!!!!! that worked perfectly

0 Kudos