Attached workflow will install ESXi using UCS vMedia policy to mount ESXi install ISO. This workflow does not need to PXE boot the image. It still uses the BMA to create KS.cfg file and store the ISO image but no PXE network is required since it doesn't PXE boot image. It simply installs from the mounted ISO file created in the workflow. Here are the steps to implement:
- Copy Boot.cfg from ESXI ISO to the BMA in the /tmp directory.
- Copy ESXi 6.0 ISO to the BMA in the /tmp directory.
- Add the line ks=cdrom:/KS.CFG to the boot.cfg in the /tmp directory per screen image boot.cfg.png attached below.
- Create UCS vMedia Policy and add it to the Service Profile template. The workflow modifies the mount point so just create a dummy one.
- Install mkisofs utility on BMA (yum install mkiosfs). Make sure BMA DNS settings are configured in /etc/resolv.conf and BMA can reach internet for yum update.
The workflow uses the following script to create the ESXi install image using the ks.cfg from the BMA. This script is inside a SSH task in the workflow. The SSH task needs to be modified to execute on your BMA.
mount -o loop /tmp/VMware-VMvisor-Installer-6.0.0.update02-3620759.x86_64.iso /mnt/iso
mkdir /samba/${PXEBoot_5170.OUTPUT_PXE_BOOT_ID}
mkdir /samba/${PXEBoot_5170.OUTPUT_PXE_BOOT_ID}/esxi_cdrom
cp -r /mnt/iso/* /samba/${PXEBoot_5170.OUTPUT_PXE_BOOT_ID}/esxi_cdrom
umount /mnt/iso
cp /tmp/boot.cfg /samba/${PXEBoot_5170.OUTPUT_PXE_BOOT_ID}/esxi_cdrom
cp /opt/cnsaroot/web/ks-repository/${PXEBoot_5170.OUTPUT_PXE_BOOT_ID}/ks.cfg /samba/${PXEBoot_5170.OUTPUT_PXE_BOOT_ID}/esxi_cdrom
mkisofs -relaxed-filenames -J -R -o /samba/${PXEBoot_5170.OUTPUT_PXE_BOOT_ID}/custom_esxi.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table /samba/${PXEBoot_5170.OUTPUT_PXE_BOOT_ID}/esxi_cdrom
Notes
This have been tested with ESXi 6.0 and ESXi 6.5. It currently fails the ISO install with ESXi 6.5 because of issue with VMware 6.5 ISO disconnecting during the installation. This has been reported as a case with VMware.
Also the script should be optimized to avoid filling up BMA disk by deleting the images. Also script should be a optimized to be re-entrant by not mounting and unmount ISO each time. The should be done once so multiple workflows can run simultaneously.