#!ipxe echo echo ****************************************************************************** echo * IPXE-Script V3 / Auto install ESXi over Internet, Antonio Jorba, 2016 echo * !! No warranty, use this installer at your own risk and with caution !! echo * Remember that the DATA on the first disk may be OVERWRITTEN without warning! echo * So use this script with caution, you may lose data otherwise! echo ****************************************************************************** echo echo Press a key to continue when you have read the above warning, prompt otherwise power off your system now! ###################### MAIN MENU #################################### # Menu defaults set menu-timeout 10000 isset ${menu-default} || set menu-default DHCP :start menu Install VMware ESXi 6 over IPXE (internet source), Antonio Jorba, 2016 item --gap -- ------------------------- Installation options ------------------------------ item --key d dhcp Auto-configure Interface via DHCP (autom. after 10 sec) item --key n network Show network settings item item --key w wipe Wipe complete first disk / Install ESXi item --key k keepvms Keep existing VMFS volumes / Install ESXi item item shell Drop to iPXE shell item reboot Reboot computer item item --key x exit Exit iPXE and continue BIOS boot choose --timeout ${menu-timeout} --default ${menu-default} selected || goto cancel set menu-timeout 0 goto ${selected} :cancel echo You cancelled the menu, dropping you to a shell :shell echo Type 'exit' to get back to the menu shell set menu-timeout 0 goto start :reboot reboot :exit exit :failed echo Booting failed, dropping to shell goto shell ############ MAIN MENU ITEMS ############ :dhcp set menu-timeout 0 echo configure interface with DHCP, please wait ifconf --configurator dhcp net0 :network echo echo Interface settings: isset ${net0/mac} && echo MAC address: ${net0/mac} || echo No MAC address setting isset ${net0/chip} && echo Network chip: ${net0/chip} || echo No chip data found isset ${net0/ip} && echo IP address: ${net0/ip} || echo No IP address found isset ${net0/netmask} && echo Netmask: ${net0/netmask} || echo No netmask setting isset ${net0/gateway} && echo Gateway: ${net0/gateway} || echo No Gateway setting isset ${net0/dns} && echo DNS: ${net0/dns} || echo No DNS server setting isset ${net0/domain} && echo domain: ${net0/domain} || echo No domain setting echo prompt Press a key to continue with the menu goto start # Set kernel and config parameter to unpacked custom ISO on webserver :wipe echo ******************************************************************************* echo Installing ISO files and config from: kernel http://www.jorba.de/esxi/ipxe/ESXi-6.0.0-20160804001/iso/mboot.c32 -c http://www.jorba.de/esxi/ipxe/ESXi-6.0.0-20160804001/config/boot-wipe.cfg echo echo This is a wipe install, that removes all partitions from first disk! echo prompt press a key to continue goto instmsg :keepvms echo ******************************************************************************* echo Installing ISO files and config from: kernel http://www.jorba.de/esxi/ipxe/ESXi-6.0.0-20160804001/iso/mboot.c32 -c http://www.jorba.de/esxi/ipxe/ESXi-6.0.0-20160804001/config/boot-nowipe.cfg echo echo This installation keeps existing VMS partitions, echo but may delete other existing data on first disk! echo prompt press a key to continue :instmsg echo echo Installation over http will take some time, depending on your connection! echo After the installation, the system is automatically rebooting. echo Don't forget to change the default 'root/password', configure your mgmt network echo and provide a permanent license from VMware for a fully functional system. echo Notice: On N3150/J3160 systems or similar, no output will be shown after the echo message 'relocating modules', but installation will continue, so be patient! echo echo URL for embedded ESXi management host client after installation: echo https://${net0/ip}/ui/ echo echo Final warning: prompt Press a key to install ESXi, otherwise power off your system now! boot || goto failed