Whats new in ESXi 7 ? – part1

 

Is LiveCD-mode still available with ESXi 7 ?

Yes -it is.


What is LiveCD-mode ?

Never heard about LiveCD-mode before ?
Thats not surprising ….
As far as I know this is a completely undocumented topic.
Actually I never heard any other VMware user mentioning ESXi LiveCDs at all.
Thats why I have no references listed …

Credits: Thanks to Jon Howe for providing a good commandline for the geniso-script.


Behaviour comparison:

Mode: Installer Mode LiveCD LiveCD +state.tgz Production
first action launch installer
(runweasel)
normal boot normal boot normal boot
boots with preconfigured hostname no no yes yes
remembers its own IP does not apply no yes yes
remembers VMs
and datastores
does not apply no no yes

Why use an ESXi in LiveCD-mode ?

A regular ESXi in production mode checks datastores and available VMs at boot-time and compares
the results with the scenario before the reboot.
If anything is suspicious ESXi decides to rather show no datastore or VMs at all than showing something that maybe damaged.
ESXi in LiveCD mode does not know the original environment so it has no reasons to assume anything might be wrong.

Endresult: ESXi in LiveCD-mode is cooperative when ESXi in productionmode turns into a diva.
This is why I use ESXi LiveCDs since version ESXi 3.*

If you never experienced what I mean with ESXi in productionmode turns into a diva
then congratulations: you do not need ESXi LiveCDs and probably waste your time here.


How do you switch to LiveCD mode ?

You use a boot.cfg that does not load the boot-option runweasel.
Thats it …
Now keep in mind that if the bootmedia is an ISO, CDrom or a USB-stock
you nowadays typically have 2 boot-cfg files:
First boot.cfg is in the root directory of the boot-media
It is used if the system starts on a machine which uses a BIOS-firmware.
Second boot.cfg is located in the efi/boot subdirectory.
It will be loaded if EFI /UEFI firmware is used on the physical machine.

TODO: change 1 or 2 boot.cfg files


How do you customize the behaviour in LiveCD mode ?

You create  a custom state.tgz and inject it into the ISO
TODO: prepare a state.tgz by setting up a virtual ESXi 7 inside a VM and set all the options you need.
TODO: make sure your state.tgz is listed in the edited boot.cfg files


How do you pimp your customized LiveCD ?

You edit the menu options in isolinux.cfg and in the boot.cfg files (optional step)


How do you remaster the ISO ?

Lets walk through the process …. for this example I use any Ubuntu 18.04 64bit VM and use the VMware ESXi 7 install ISO as a CD-device.
This should work with most other Linux 64 VMs as well – only requirement: it needs to have a recent version of genisoimage.
Windows hosts may work as well – here you would need to find a compatible mkisofs.exe tool …

#
# check if the VMware Iso is plugged in …
#
#
mkdir /home/esxi7-remaster
#
#
# mount the ESXi 7 installer iso inside the VM
#
mount /dev/sr0 /media/cdrom
#
#
# copy contents of the cdrom to your remaster directory
#
rsync -r /media/cdrom/* /home/esxi7-remaster/
#
# create a backup-copy of the original cfg-files
#
cp /home/esxi7-remaster/boot.cfg /home/esxi7-remaster/install-boot.cfg
cp /home/esxi7-remaster/efi/boot/boot.cfg  /home/esxi7-remaster/install-efi-boot.cfg
cp /home/esxi7-remaster/isolinux.cfg /home/esxi7-remaster/install-isolinux.cfg
#
#
# grab a copy of the 3 example-cfg-files or create your own versions:
#
# live-boot.cfg
# live-efi-boot.cfg
# live-isolinux.cfg
# live-state.tgz
#
# add them to the esxi7-remaster directory
# and copy them in place
#
cp /home/esxi7-remaster/live-boot.cfg /home/esxi7-remaster/boot.cfg
cp /home/esxi7-remaster/live-efi-boot.cfg /home/esxi7-remaster/efi/boot/boot.cfg
cp /home/esxi7-remaster/live-isolinux.cfg /home/esxi7-remaster/isolinux.cfg
#
#
# if you created a custom state.tgz copy it in place as well
# and copy them in place
#
cp /home/esxi7-remaster/live-state.tgz /home/esxi7-remaster/state.tgz
#
# create new  iso
#
genisoimage -relaxed-filenames -J -R -o ESXI7-in-LiveCD-mode.iso
-b isolinux.bin -c boot.cat
-no-emul-boot -boot-load-size 4
-boot-info-table -eltorito-alt-boot
-e efiboot.img -no-emul-boot /home/esxi7-remaster
#
#
#  Note: the bold items need to be adjusted if you use different names – command is one line !

#
# If all worked well you now find your ESXI7-in-LiveCD-mode.iso in the current directory


Configuration files:

The blue files are the original files that comes with the original ISO.
The red files show the mods required for LiveCD mode
##### this file is install.boot.cfg ##################################################

bootstate=0
title=Loading ESXi installer
timeout=5
prefix=
kernel=/b.b00
kernelopt=runweasel cdromBoot
modules=/jumpstrt.gz — /useropts.gz — /features.gz — /k.b00 — /uc_intel.b00 — /uc_amd.b00 — /uc_hygon.b00 — /procfs.b00 — /vmx.v00 — /vim.v00 — /tpm.v00 — /sb.v00 — /s.v00 — /bnxtnet.v00 — /bnxtroce.v00 — /brcmfcoe.v00 — /brcmnvme.v00 — /elxiscsi.v00 — /elxnet.v00 — /i40en.v00 — /i40iwn.v00 — /iavmd.v00 — /igbn.v00 — /iser.v00 — /ixgben.v00 — /lpfc.v00 — /lpnic.v00 — /lsi_mr3.v00 — /lsi_msgp.v00 — /lsi_msgp.v01 — /lsi_msgp.v02 — /mtip32xx.v00 — /ne1000.v00 — /nenic.v00 — /nfnic.v00 — /nhpsa.v00 — /nmlx4_co.v00 — /nmlx4_en.v00 — /nmlx4_rd.v00 — /nmlx5_co.v00 — /nmlx5_rd.v00 — /ntg3.v00 — /nvme_pci.v00 — /nvmerdma.v00 — /nvmxnet3.v00 — /nvmxnet3.v01 — /pvscsi.v00 — /qcnic.v00 — /qedentv.v00 — /qedrntv.v00 — /qfle3.v00 — /qfle3f.v00 — /qfle3i.v00 — /qflge.v00 — /rste.v00 — /sfvmk.v00 — /smartpqi.v00 — /vmkata.v00 — /vmkfcoe.v00 — /vmkusb.v00 — /vmw_ahci.v00 — /crx.v00 — /elx_esx_.v00 — /btldr.v00 — /esx_dvfi.v00 — /esx_ui.v00 — /esxupdt.v00 — /tpmesxup.v00 — /weaselin.v00 — /loadesx.v00 — /lsuv2_hp.v00 — /lsuv2_in.v00 — /lsuv2_ls.v00 — /lsuv2_nv.v00 — /lsuv2_oe.v00 — /lsuv2_oe.v01 — /lsuv2_oe.v02 — /lsuv2_sm.v00 — /native_m.v00 — /qlnative.v00 — /vdfs.v00 — /vmware_e.v00 — /vsan.v00 — /vsanheal.v00 — /vsanmgmt.v00 — /tools.t00 — /xorg.v00 — /imgdb.tgz — /imgpayld.tgz
build=7.0.0-1.0.15525992
updated=0


##### this file is live-boot.cfg ########################################

bootstate=0
title=ESXi7-Live MBR
timeout=5
prefix=
kernel=/b.b00
kernelopt=autoPartition=FALSE
modules=/jumpstrt.gz — /useropts.gz — /features.gz — /k.b00 — /uc_intel.b00 — /uc_amd.b00 — /uc_hygon.b00 — /procfs.b00 — /vmx.v00 — /vim.v00 — /tpm.v00 — /sb.v00 — /s.v00 — /bnxtnet.v00 — /bnxtroce.v00 — /brcmfcoe.v00 — /brcmnvme.v00 — /elxiscsi.v00 — /elxnet.v00 — /i40en.v00 — /i40iwn.v00 — /iavmd.v00 — /igbn.v00 — /iser.v00 — /ixgben.v00 — /lpfc.v00 — /lpnic.v00 — /lsi_mr3.v00 — /lsi_msgp.v00 — /lsi_msgp.v01 — /lsi_msgp.v02 — /mtip32xx.v00 — /ne1000.v00 — /nenic.v00 — /nfnic.v00 — /nhpsa.v00 — /nmlx4_co.v00 — /nmlx4_en.v00 — /nmlx4_rd.v00 — /nmlx5_co.v00 — /nmlx5_rd.v00 — /ntg3.v00 — /nvme_pci.v00 — /nvmerdma.v00 — /nvmxnet3.v00 — /nvmxnet3.v01 — /pvscsi.v00 — /qcnic.v00 — /qedentv.v00 — /qedrntv.v00 — /qfle3.v00 — /qfle3f.v00 — /qfle3i.v00 — /qflge.v00 — /rste.v00 — /sfvmk.v00 — /smartpqi.v00 — /vmkata.v00 — /vmkfcoe.v00 — /vmkusb.v00 — /vmw_ahci.v00 — /crx.v00 — /elx_esx_.v00 — /btldr.v00 — /esx_dvfi.v00 — /esx_ui.v00 — /esxupdt.v00 — /tpmesxup.v00 — /weaselin.v00 — /loadesx.v00 — /lsuv2_hp.v00 — /lsuv2_in.v00 — /lsuv2_ls.v00 — /lsuv2_nv.v00 — /lsuv2_oe.v00 — /lsuv2_oe.v01 — /lsuv2_oe.v02 — /lsuv2_sm.v00 — /native_m.v00 — /qlnative.v00 — /vdfs.v00 — /vmware_e.v00 — /vsan.v00 — /vsanheal.v00 — /state.tgz — /vsanmgmt.v00 — /xorg.v00 — /imgdb.tgz — /imgpayld.tgz
build=7.0.0-1.0.15525992
updated=1


##### this file is install-efi-boot.cfg ########################################
bootstate=0
title=Loading ESXi installer
timeout=5
prefix=
kernel=/b.b00
kernelopt=runweasel cdromBoot
modules=/jumpstrt.gz — /useropts.gz — /features.gz — /k.b00 — /uc_intel.b00 — /uc_amd.b00 — /uc_hygon.b00 — /procfs.b00 — /vmx.v00 — /vim.v00 — /tpm.v00 — /sb.v00 — /s.v00 — /bnxtnet.v00 — /bnxtroce.v00 — /brcmfcoe.v00 — /brcmnvme.v00 — /elxiscsi.v00 — /elxnet.v00 — /i40en.v00 — /i40iwn.v00 — /iavmd.v00 — /igbn.v00 — /iser.v00 — /ixgben.v00 — /lpfc.v00 — /lpnic.v00 — /lsi_mr3.v00 — /lsi_msgp.v00 — /lsi_msgp.v01 — /lsi_msgp.v02 — /mtip32xx.v00 — /ne1000.v00 — /nenic.v00 — /nfnic.v00 — /nhpsa.v00 — /nmlx4_co.v00 — /nmlx4_en.v00 — /nmlx4_rd.v00 — /nmlx5_co.v00 — /nmlx5_rd.v00 — /ntg3.v00 — /nvme_pci.v00 — /nvmerdma.v00 — /nvmxnet3.v00 — /nvmxnet3.v01 — /pvscsi.v00 — /qcnic.v00 — /qedentv.v00 — /qedrntv.v00 — /qfle3.v00 — /qfle3f.v00 — /qfle3i.v00 — /qflge.v00 — /rste.v00 — /sfvmk.v00 — /smartpqi.v00 — /vmkata.v00 — /vmkfcoe.v00 — /vmkusb.v00 — /vmw_ahci.v00 — /crx.v00 — /elx_esx_.v00 — /btldr.v00 — /esx_dvfi.v00 — /esx_ui.v00 — /esxupdt.v00 — /tpmesxup.v00 — /weaselin.v00 — /loadesx.v00 — /lsuv2_hp.v00 — /lsuv2_in.v00 — /lsuv2_ls.v00 — /lsuv2_nv.v00 — /lsuv2_oe.v00 — /lsuv2_oe.v01 — /lsuv2_oe.v02 — /lsuv2_sm.v00 — /native_m.v00 — /qlnative.v00 — /vdfs.v00 — /vmware_e.v00 — /vsan.v00 — /vsanheal.v00 — /vsanmgmt.v00 — /tools.t00 — /xorg.v00 — /imgdb.tgz — /imgpayld.tgz
build=7.0.0-1.0.15525992
updated=0


##### this file is live-efi-boot.cfg ########################################
bootstate=0
title=ESXi7-EFI-Live
timeout=5
prefix=
kernel=/b.b00
kernelopt=autoPartition=FALSE
modules=/jumpstrt.gz — /useropts.gz — /features.gz — /k.b00 — /uc_intel.b00 — /uc_amd.b00 — /uc_hygon.b00 — /procfs.b00 — /vmx.v00 — /vim.v00 — /tpm.v00 — /sb.v00 — /s.v00 — /bnxtnet.v00 — /bnxtroce.v00 — /brcmfcoe.v00 — /brcmnvme.v00 — /elxiscsi.v00 — /elxnet.v00 — /i40en.v00 — /i40iwn.v00 — /iavmd.v00 — /igbn.v00 — /iser.v00 — /ixgben.v00 — /lpfc.v00 — /lpnic.v00 — /lsi_mr3.v00 — /lsi_msgp.v00 — /lsi_msgp.v01 — /lsi_msgp.v02 — /mtip32xx.v00 — /ne1000.v00 — /nenic.v00 — /nfnic.v00 — /nhpsa.v00 — /nmlx4_co.v00 — /nmlx4_en.v00 — /nmlx4_rd.v00 — /nmlx5_co.v00 — /nmlx5_rd.v00 — /ntg3.v00 — /nvme_pci.v00 — /nvmerdma.v00 — /nvmxnet3.v00 — /nvmxnet3.v01 — /pvscsi.v00 — /qcnic.v00 — /qedentv.v00 — /qedrntv.v00 — /qfle3.v00 — /qfle3f.v00 — /qfle3i.v00 — /qflge.v00 — /rste.v00 — /sfvmk.v00 — /smartpqi.v00 — /vmkata.v00 — /vmkfcoe.v00 — /vmkusb.v00 — /vmw_ahci.v00 — /crx.v00 — /elx_esx_.v00 — /btldr.v00 — /esx_dvfi.v00 — /esx_ui.v00 — /esxupdt.v00 — /tpmesxup.v00 — /weaselin.v00 — /loadesx.v00 — /lsuv2_hp.v00 — /lsuv2_in.v00 — /lsuv2_ls.v00 — /lsuv2_nv.v00 — /lsuv2_oe.v00 — /lsuv2_oe.v01 — /lsuv2_oe.v02 — /lsuv2_sm.v00 — /native_m.v00 — /qlnative.v00 — /vdfs.v00 — /vmware_e.v00 — /vsan.v00 — /vsanheal.v00 — /vsanmgmt.v00 — /xorg.v00 — /imgdb.tgz — /state.tgz
build=7.0.0-1.0.15525992
updated=1


#####  this is file  install-isolinux.cfg ########################################
DEFAULT menu.c32
MENU TITLE ESXi-7.0.0-15525992-standard Boot Menu
NOHALT 1
PROMPT 0
TIMEOUT 80
LABEL install
KERNEL mboot.c32
APPEND -c boot.cfg
MENU LABEL ESXi-7.0.0-15525992-standard ^Installer
LABEL hddboot
LOCALBOOT 0x80
MENU LABEL ^Boot from local disk


#####  this is file live-isolinux.cfg ########################################
DEFAULT menu.c32
MENU TITLE VMware-ESXi7-Live
NOHALT 1
PROMPT 0
TIMEOUT 80
LABEL install
KERNEL mboot.c32
APPEND -c boot.cfg
MENU LABEL Boot ESXi 7 Live
LABEL hddboot
LOCALBOOT 0x80
MENU LABEL ^Boot from local disk


Create your custom state.tgz …

Now we are back in safe waters … working with the state.tgz is documented. Check the knowledgebase …

What to configure in a state.tgz for LiveCD-mode ?

I dont know what you are planning to do with it – in my use-case I typically set this:
– listens for an IP via DHCP
– ESXi shell is enabled
– SSH is enabled


FAQ:

Q: Can we built ESXi LiveCDs with more than one version ?
A: You come too late for the party. These was quite easy until 5.5
Nowadays that is no longer worth the effort.
On the contrary: finding boot-files and EFI-files that are compatible for various ESXi builds is no trivial task at all.
So it his highly recommended to not mix EFI-files and isolinux or syslinux binaries in the hope that they might work together.

Q: Which boot-mode has the better survival chance during a thunderstorm: production or livecd-mode.
A: Thats easy: livecd-mode does not write its changes to disk – which means that the ESXi-configuration is stable accross power-failures.
As long as the ISO ir CD does not change next boot has the same config as last boot.

Q: Who could make use of  ESXi  LiveCDs ?
A:  Support-staff, Forensic Investigators and everybody who needs a system-reset on rebooot.

Q: Whats the footprint of ESXi LiveCDs?
A: ESXi Live 3.5 needs to load 35 MB, ESXi Live 6.5 needs about 160 MB, ESXi Live 7 needs about 170 MB

Q: Can I create an ESXi 7 LiveCD that listens to the name Johny and tell it to only read stuff from NFS-servers in Liverpool ?
A: Welcome – looks like I am not the only one with funny, weird ideas.

Q: Which ESXi mode is better suited for reading slightly damaged VMFS ? Production-mode or LiveCD-mode ?
A: Now we are talking. You got it – thats why I use / make them.


Interested ? – feel free to call me via skype: sanbarrow