Home > System Administration > Deploying ESXi with Satellite 6

Deploying ESXi with Satellite 6

Deploy the files to the Satellite server

  • Download the latest ISO from VMware (e.g. VMware-ESXi-5.5U2-RollupISO2.iso).
  • Transfer to the satellite server
  • Run some code
# mount -o loop VMware-ESXi-5.5U2-RollupISO2.iso /mnt
# mkdir /var/lib/tftpboot/boot/esxi55u2
# cd /mnt
# cp -a * /var/lib/tftpboot/boot/esxi55u2
# cd /var/lib/tftpboot/boot/esxi55u2
# sed -i 's#/#/boot/esxi55u2/#g' boot.cfg
# cd ..
# restorecon -R esxi55u2

Create the Operating System inside Satellite

Hosts -> Operating Systems

  • Click New Operating System
    • Operating System
      • Name: ESXi
      • Major version: 5
      • Minor version: 5
      • Description: ESXi 5.5U2
      • OS Family: Red Hat
      • Arch: x86_64
    • Partition Table
      • Kickstart Default
    • Installation Media
      • Any Mirror – Can create a esxi mirror if desired.

Hosts -> Provisioning Templates

  • Click New Template
    • Provisioning Template
      • Name: ESXi OCP PXELinux
        SERIAL 0 115200n8
        DEFAULT esxi5.serial
        PROMPT 0
        MENU TITLE PXE Boot
        LABEL esxi5.serial
             MENU LABEL ^4) ESXi55_Serial
             KERNEL boot/esxi55u2/mboot.c32
             APPEND -c boot/esxi55u2/boot.cfg text com1_Port=0x3f8 gdbPort=none logPort=none tty2Port=com1 ks=<%=foreman_url("provision")%>; ignoreHeadless="True"
        LABEL hddboot
        LOCALBOOT 0x80
        MENU LABEL ^Boot from local disk
        
    • Type: PXELinux
    • Association:
    • ESXi 5.5
  • Click New Template
    • Provisioning Template
      • Name: ESXi OCP Kickstart
        vmaccepteula
        
        install --firstdisk --overwritevmfs
        rootpw --iscrypted <%= root_pass %>
        network --bootproto=dhcp
        reboot
        
        %post --interpreter=busybox --ignorefailure=true
        # Add temporary DNS resolution so the foreman call works
        echo "nameserver <%= @host.subnet.dns_primary %>" >> /etc/resolv.conf
        echo "nameserver <%= @host.subnet.dns_secondary %>" >> /etc/resolv.conf
        wget -O /dev/null <%= foreman_url %>
        echo "Done with Foreman call"
        
        esxcfg-advcfg -k none gdbPort
        esxcfg-advcfg -k none logPort
        esxcfg-advcfg -k com1 tty2Port
        
        #script to set first boot options
        %firstboot --interpreter=busybox
        
        # enable VHV (Virtual Hardware Virtualization to run nested 64bit Guests + Hyper-V VM)
        grep -i "vhv.enable" /etc/vmware/config || echo "vhv.enable = \"TRUE\"" >> /etc/vmware/config
        
        # enable & start remote ESXi Shell (SSH)
        vim-cmd hostsvc/enable_ssh
        vim-cmd hostsvc/start_ssh
        
        # enable & start ESXi Shell (TSM)
        vim-cmd hostsvc/enable_esx_shell
        vim-cmd hostsvc/start_esx_shell
        
        # supress ESXi Shell shell warning
        esxcli system settings advanced set -o /UserVars/SuppressShellWarning -i 1
        
        # ESXi Shell interactive idle time logout
        esxcli system settings advanced set -o /UserVars/ESXiShellInteractiveTimeOut -i 3600
        
        # Disable IPv6 for VMkernel interfaces
        esxcli system module parameters set -m tcpip3 -p ipv6=0
        
        ### FIREWALL CONFIGURATION ###
        # enable firewall
        esxcli network firewall set --default-action false --enabled yes
        
        # services to enable by default
        FIREWALL_SERVICES="syslog sshClient ntpClient updateManager httpClient netdump"
        for SERVICE in ${FIREWALL_SERVICES}
        do
        esxcli network firewall ruleset set --ruleset-id ${SERVICE} --enabled yes
        done
        
        # enter maintenance mode
        esxcli system maintenanceMode set -e true
        
        # Needed for configuration changes that could not be performed in esxcli
        esxcfg-advcfg -k none gdbPort
        esxcfg-advcfg -k none logPort
        esxcfg-advcfg -k com1 tty2Port
        esxcli system shutdown reboot -d 60 -r "rebooting after host configurations"
      • Type: provision
      • Association:
        • ESXi 5.5

Hosts -> Operating Systems

  • Select ESXi 5.5
    • Templates
      • provision: ESXi OCP Kickstart
      • PXELinux: ESXi OCP PXELinux

Files

esxi_kickstart
esxi_pxecfg