Now that you have created it, you can use this cdrom to boot from and it will try to fetch the kickstart file from a webserverĮven though Vmware ESX feels like a Redhat machine, it is not. # You now need the mkisofs command # sudo /opt/local/bin/port install cdrtools # brew install cdrtools # Or if you have vmware fusion you don't need to install the cdrtools #/Library/Application\ Support/VMware\ Fusion/mkisofs -l -J -R -r -T -o $ESX_CUSTOM_ISOFILE -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table $ESX_CUSTOM_ISO_TEMPDIR mkisofs -l -J -R -r -T -o $ESX_CUSTOM_ISOFILE -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table $ESX_CUSTOM_ISO_TEMPDIR ' $ESX_CUSTOM_ISO_TEMPDIR/isolinux/isolinux.cfgĬat $ESX_CUSTOM_ISO_TEMPDIR/isolinux/isolinux.cfg \ \ \ \ append initrd=initrd.img debugLogToSerial=1 mem=512M text quiet ks= \ \ \ \ \ menu label Install ESX in ks mode \ # Adding a new kickstart option to the isolinux.cfg file # Note: pleasing mac sed that has no \t to tab things with \ \ \ sed -i -e '/timeout 1/ a\ # Adjust the timeout sed -i -e 's/^timeout 300/timeout 1/' $ESX_CUSTOM_ISO_TEMPDIR/isolinux/isolinux.cfg # Change the default kicstart from esx to our own esx-ks sed -i -e 's/^default esx/default esx-ks/' $ESX_CUSTOM_ISO_TEMPDIR/isolinux/isolinux.cfg # Make some files writeable, by default they are read-only (cdrom) chmod +w $ESX_CUSTOM_ISO_TEMPDIR/isolinuxĬhmod +w $ESX_CUSTOM_ISO_TEMPDIR/isolinux/isolinux.binĬhmod +w $ESX_CUSTOM_ISO_TEMPDIR/isolinux/isolinux.cfg # Copy the original cdrom content to our new place rsync -av $MOUNT_POINT/ $ESX_CUSTOM_ISO_TEMPDIR # This is the file we need to change cat $MOUNT_POINT/isolinux/isolinux.cfg # Mount the Original ESX Cdrom MOUNT_POINT = $( hdiutil mount $ESX_ISOFILE -nobrowse|tail -1 |cut -d ' ' -f 2-|cut -d '/' -f 2- ) echo $MOUNT_POINT The first step is to create a custom cdrom that contains the all our configuration settings instead of using the GUI. I did not test it with ESXi but suspect this work as well this example requires you to download the Vmware ESX (or Vsphere 4 as it’s called now) dvd to continue.the commands used are MacOSX commands, so it might need small adaptations to run on a Unix based system.I can also say that the automation it’s particular handy to avoid the ESX trial expiration period ….
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |