VMware Cloud Community
Schorschi
Expert
Expert

Deploy ESXi via PXE, but end up with an installable instance i.e. Stateful

Ok, this one has me looking at the world side ways... If you don't have a headache before now, you might. You have been warned... Below are the ISOLinux CFG files examples of the boot prompt command-line for installable variant of ESXi, and PXELinux boot command-lines for stateless. Here is the problem, if I call the command-line used in ISOLinux method via PXE (PXELinux) to boot into an installable version of ESXi, what I really get is a stateless instance! This is not what I want in this case. If I call the boot command-line for stateful, i.e. should get a installable instance of ESXi, that lives on a hard-disk I select, etc., as prompted, not stateless instance of ESXi, right? But when I have PXE seed the boot command-line parameters I get only stateless. What gives? Oh, please don't ask or comment on why I want to deploy ESXi via PXE/TFTP and have stateful or installable as the result, it is needed, that is what is desired, so suggesting that I use stateless only is not the issue here. We need PXE deployment of stateful, that is the question here.

ESXi Installable 3.5u4 ISO syslinux.cfg... via cdrom-media load... installable results... Ok, fine...

kernel mboot.c32

append vmkernel.gz --- binmod.tgz --- ienviron.tgz --- cim.tgz --- oem.tgz --- license.tgz --- install.tgz

ESXi Installable 4.0 ISO syslinux.cfg... via cdrom-media load... installable results... Ok, fine...

kernel mboot.c32

append vmkboot.gz --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.tgz --- image.tgz --- install.tgz

ESXi 3.5u4 PXE stateless... via PXE, Ok, fine...

kernel mboot.c32

append vmkernel.gz --- binmod.tgz --- environ.tgz --- cim.tgz --- oem.tgz --- license.tgz

ESXi 4.0 PXE stateless... via PXE, Ok, fine...

kernel mboot.c32

append vmkboot.gz --- vmk.gz --- sys.vgz --- cim.vgz --- oem.tgz --- license.tgz

But... the following via PXE, I only get stateless? It appears that install.tgz is never executed?

kernel mboot.c32

append vmkernel.gz --- binmod.tgz --- ienviron.tgz --- cim.tgz --- oem.tgz --- license.tgz --- install.tgz

With Fedora, RedHat, etc. you can force the issue via the installation method selection or via Kickstart, but ESXi that is not the case, so how does one install ESXi 'installable' via a network deployment mechanism?

Reply
0 Kudos
18 Replies
zhangtong3910
VMware Employee
VMware Employee

Not the modules:

append vmkernel.gz --- binmod.tgz --- ienviron.tgz --- cim.tgz --- oem.tgz --- license.tgz --- install.tgz

Please try with this:

append vmkboot.gz --- vmkernel.gz ---sys.vgz --- cim.vgz --- ienviron.tgz --- image.tgz --- install.tgz

Reply
0 Kudos
Schorschi
Expert
Expert

That does not work for ESXi 3.5 which I need also to do. In my original email I outlined the LINUXISO boot commands as well as the stateless ESXi boot commands. These all work for their respective purpose, be it load from media (ISO, stateful) or PXE (Stateless), What I need for ESXi 3.5 and 4 is the way to do stateful built but deployed or served by PXE/TFTP over the wire. The problem appears to be identical for ESXi regardless of version, that TFTP is choking on the size of install.tgz.

Reply
0 Kudos
zhangtong3910
VMware Employee
VMware Employee

What's the meaning of chocking on the size of install.tgz? Out of memory while mboot.c32 loading image.tgz?

Stateful PXE installation needs to load much larger packages that staless PXE boot up. If you have memory problem, please try on another host with enough memory.

Reply
0 Kudos
Schorschi
Expert
Expert

Yup. I am thinking the same thing. I am still testing. The ESXi 3.5 test box has 2GB ram, the ESXi 4 test box has 4GB ram. I started with ESXi 3.5, the PXE/TFTP boot and download seems to work, but then the system locks up, stating that /sbin/install can not be found (ALT-F1 view), so I am thinking install.tgz is not fully downloaded as expected. I will be testing ESXi 4 later today providing I don't get buried in other issues. Smiley Happy

Reply
0 Kudos
zhangtong3910
VMware Employee
VMware Employee

You'd better make a integrity hash check for your ISO image :smileygrin:

Schorschi
Expert
Expert

I also need to double check the files, for example, I just noticed that mboot.c32 for ISO versus PXE is different (in size). Different versions. I did not expect that.

Reply
0 Kudos
Schorschi
Expert
Expert

The different mboot.c32 files was it, at least for me. What a pain. The respective boot command-lines for 3.5u4 and 4.0 where correct the LINUX ISO command-line specifcation work, I was trying to stack the installable and the ESXi image (stateless) files into the same directory under PXELINUX/TFTPboot, thinking the mboot.c32 files were the same under the hood, nope, not the case. Rats.

Reply
0 Kudos
parulz
Contributor
Contributor

Can you elaborate a bit more on exactly which ESXi 4.0 modules did you append for deploying ESXi 4.0 via PXE/ TFTP to achieve "Stateful" i.e, installed on hard disk which can retain its state even after reboots?

Also if I do not use Syslinux, then do I still need to copy the mboot.c32 file from Syslinux replacing the one from ISO for "Stateful" install? In other words which mboot.c32 should be used for "stateful" deploy of ESXi 4.0?

You have mentioned below modules for ESXi 4.0 to acheive "Stateful" install, however, binmod.tgz is not present in the ESXi 4.0 ISO - VMware-VMvisor-Installer-4.0.0-164009.x86_64.iso.

kernel mboot.c32

append vmkernel.gz --- binmod.tgz --- ienviron.tgz --- cim.tgz --- oem.tgz --- license.tgz --- install.tgz

And are you using some other "installable" version of ESXi 4.0?

Thanks in advance.

Reply
0 Kudos
zhangtong3910
VMware Employee
VMware Employee

Using isolinux.cfg and mboot.c32 in VMware-VMvisor-Installer-4.0.0-164009.x86_64.iso, it contains:

append vmkboot.gz --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.tgz --- image.tgz --- install.tgz

Reply
0 Kudos
Schorschi
Expert
Expert

Installable, installed or staged for PXE/TFTP download, as is from the ISO, is stateful. It lives on a disk, it hold configuration across reboots. Where as stateless, is configured with every reboot, lives only in memory. Either can be deployed via PXE/TFTP.

Reply
0 Kudos
parulz
Contributor
Contributor

I tried with below modules:

kernel mboot.c32

append vmkboot.gz --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.tgz --- install.tgz --- image.tgz

However, it takes forever to load image.tgz. I am not sure how long should I wait as it stops printing anymore "....".

Hence I am still not able to see the ESXi 4.0 being installed successfully in a stateful mode. Post that I have to try using the Midwife scripts as well.

Looking forward to your response on what might be going wrong here.

TIA.

Reply
0 Kudos
parulz
Contributor
Contributor

Thanks guys, finally got the image.tgz loading and ESXi 4.0 coming up. However it asks for the user inputs as it is a installable (ISO) install. I hate it.

Now I wanna see how Midwife scripts are going to help me. Will keep you bothering till I get it working Smiley Happy

Thanks again!!

Reply
0 Kudos
Schorschi
Expert
Expert

Google it. Chris Wolfe blog has good explanation and links to the Lance B. method for extracting files from ISO for stateless (direct memory load).

Lance also has a document published that explains the extraction from the ISO image in detail.

http://communities.vmware.com/docs/DOC-7512

Enjoy!

Reply
0 Kudos
parulz
Contributor
Contributor

Yeah I was referring to the very useful Lance's doc for Midwfie scripts - http://communities.vmware.com/docs/DOC-7510

And for Stateless VMware has an official document for 4.0

Thanks for your help guys.

Reply
0 Kudos
Schorschi
Expert
Expert

Award points? If for no other reason than to mark the question closed! Smiley Wink

Reply
0 Kudos
parulz
Contributor
Contributor

My queries are all answered. Thanks!! The question can be closed with an award of 10 Pts. Smiley Happy

I don't see an option to do it myself. So if someone is monitoring this, please allocate 10 pts to Schorschi.

Thanks buddy.

Reply
0 Kudos
shaka
Enthusiast
Enthusiast

What did you do to get past the issue of image.tgz not loading completely? I have the same issue.

Reply
0 Kudos
parulz
Contributor
Contributor

I increased the retry timeout value of my TFTP server.

Reply
0 Kudos