Photubias
Enthusiast
Enthusiast

Kickstart changes for ESXi 5.5 ?

Jump to solution

First of all: Happy New Year Smiley Happy

I have been migrating from ESXi5.1 to ESXi5.5 and I have a complete setup with self written auto deployment scripts (Windows WDS patched with SysLinux and then deploying ESXi5.5 using kickstart files).

This has worked perfectly since ESXi 4.1 and throughout ESXi5 to ESXi5.1.

However since ESXi5.5 it fails to complete successfully, I attached my ks.cfg script.

It works perfectly until after the password change (which I wanted be, for some reason, "123"), internal use only!

Whatever I do, it does not enable SSH.

What I also found: if I uncomment the "reboot" command, the machine just continues to reboot indefinitely while performing the firstboot script on every reboot.

BTW: keyboard Belgian no longer works on ESXi 5.5, that's not a big issue but still. It has also been taken away from the official documentation which I read of course.

Thanks in advance for the help

1 Solution

Accepted Solutions
spravtek
Expert
Expert

Is your DNS working correctly in your environment? Maybe try adding 127.0.0.1 in your host file during setup...

Something like this:

%pre --interpreter=busybox
Echo > /etc/resolv.conf
Echo “127.0.0.1 localhost  ... ..."

Failing that, you could go through some troubleshooting tips here (you might already have tried them all though): http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100284...

View solution in original post

0 Kudos
16 Replies
spravtek
Expert
Expert

Hi,

According to the installation-setup guide, the Belgian keyboard should still be available, I haven't tested it myself since I'm not fond of Azerty so can't verify (Page 147 of http://pubs.vmware.com/vsphere-55/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-55-install...)

If you run the command for enabling the ssh after the installation (if it is succesful), do you get any errors, or do you get/see any errors during the deployment regarding this?

0 Kudos
Photubias
Enthusiast
Enthusiast

Hi,

thanks for the fast reponse.

When I try the commands manually they succeed without any errors or warnings. I also do not see any errors during the installation. Is there some log of the "%firstboot" section? I remember reading somewhere that it is quite difficult to track problems in that section.

If you read this KB: http://kb.vmware.com/kb/2004582 there is no longer a listing of Belgian as a keyboard type.

0 Kudos
admin
Immortal
Immortal

Hi,

I have done the 5.5 scripted installation more than 100 times now, but didnt face any issues for enabling SSH.
But the first boot script in my Ks file is little different for the ssh.

After enabling SSH, I've used  "/etc/init.d/SSH start" to start the service. Could try that way ?

~dGeorgey

0 Kudos
spravtek
Expert
Expert


dGeorgey's suggestion is worth a try ...

The firstboot logs could be saved to persistent storage using something like this:

# copy %firstboot logs to persisted datastore

cp /var/log/hostd.log "/vmfs/volumes/$(hostname -s)_datastore1/firstboot-hostd.log"

cp /var/log/esxi_install.log "/vmfs/volumes/$(hostname -s)_datastore1/firstboot-esxi_install.log"

0 Kudos
Photubias
Enthusiast
Enthusiast

Hi, thanks for the reply.

I'll try it out immediately, strange that

"vim-cmd hostsvc/start_ssh" would not work and

"/etc/init.d/SSH start" would, not?

In the mean time I found that placing the IPv6 (that does not work) before the password code still changes the password but not disables IPv6.

It seems that something strange is happening with busybox because it is not accepting the same commands as the regular ESXi interpreter (which also might be busybox for all I know) ...

0 Kudos
Photubias
Enthusiast
Enthusiast

Hi,

so "/etc/init.d/SSH start" works, which is good news.

However, after a reboot the SSH service is again disabled and not running.

hostname -s throws out errors so I have no logs, I'm editing that out and retrying an installation (which takes about 10min. each time)

0 Kudos
Photubias
Enthusiast
Enthusiast

And so the plot thickens ...

All esxcli & vim-cmd commands fail with the message:

"Connect to localhost failed: Connection failure"

There is also no hostd.log, so this must be a hostd problem?

If I manually (re)start hostd: /etc/init.d/hostd restart then it throws the warning "ramdisk exists", but works.

However esxcli commands still do not work, unless I reboot but then the "firstboot" will no longer be executed ...

Any idea's?

0 Kudos
spravtek
Expert
Expert

Is your DNS working correctly in your environment? Maybe try adding 127.0.0.1 in your host file during setup...

Something like this:

%pre --interpreter=busybox
Echo > /etc/resolv.conf
Echo “127.0.0.1 localhost  ... ..."

Failing that, you could go through some troubleshooting tips here (you might already have tried them all though): http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100284...

View solution in original post

0 Kudos
Photubias
Enthusiast
Enthusiast

Thinks for thinking along, it HAS something to do with the network, because if I change the network to our production network (which has internet access) after the initial PXE installation, esxcli DOES work.

But that is not really feasible, on our deployment network without internet esxcli keeps giving the same error "connect to localhost failed", if I wait for half an our, then suddenly esxcli starts working ...

At all times, I can succesfully ping localhost (which was already in /etc/hosts), so that's not it.

I feel we're close Smiley Happy

Current workaround:

%post --enterpreter=busybox

halt

-> Then when machines are down, change NIC to production network and then boot them, the %firstboot section will now work completely ...

0 Kudos
spravtek
Expert
Expert

Does the use of the command "localcli" work, bypassing the hostd might be helpfull if the issue is related to it ... ?

0 Kudos
Photubias
Enthusiast
Enthusiast

Hi,

Yes! localcli works (albeit a whole lot slower than esxcli)!

I can now just replace all esxcli commands in the kickstart file with localcli


Secundary problem remains: "vim-cmd" (to enable SSH) does not work, error for this:

"Failed to login: Invalid response code: 503 Service Unavailable"

This error brings me to your earlier solution, however that one is clearly not correct:

echo "127.0.0.1 ... ..." would just echo it to the console, right?

I imagine you meant something like

echo "127.0.0.1 ... ..." >> /etc/hosts

which I tried and it doesn't really work

0 Kudos
spravtek
Expert
Expert

Hey,

The /etc/hosts should look something like this:

"127.0.0.1  localhost.x.x.domain localhost localhost.localdomain"

I never had to actually put in the kickstart, nor really had to play too much with the /etc/hosts on esxi hosts, but it might help solve the issues you're having, it sure is acting a little weird though.

0 Kudos
Photubias
Enthusiast
Enthusiast

OK, so it got resolved, I gave spravtek the right answer but actually it was due to DNS servers being sollicited by the DHCP server on the network.

However, since the deployment network had no uplinks, the DNS servers were not reachable/usable.

Still strange though that ping localhost works, nslookup localhost of course not.

And I also did not have this issue with ESXi5.0 or 5.1 (or ESXi 4.x)

Thanks for the assistance

0 Kudos
spravtek
Expert
Expert

Hey, glad it got resolved ... Thanks for letting us know the outcome!

0 Kudos
jl3128
Contributor
Contributor

Thanks for this thread!  I ran into similar problem.  The %firstboot section of ks.cfg was never getting run.  It was because hostd was not running during install.  My dhcp server was handing out DNS servers that were unreachable, or didn't have the zone for the defined domain name, and that was messing up busybox and hostd.  I commented out option domain-name and option domain-name-servers, restarted isc-dhcp-server, and everything works as expected now.

0 Kudos
Photubias
Enthusiast
Enthusiast

Yes, I really do think something has changed (bug introduced?) in ESXi5.5 Because it worked, with the same setup, on previous versions.

0 Kudos