9 Replies Latest reply on Aug 7, 2019 8:03 AM by ccnasaurabh1

    Install ESXi Hosts Using VRO

    ccnasaurabh1 Novice

      Hi

       

      I got a requirement to new build and rebuild ESXi host using VRO and iLO.

       

      Please share any solution to automate the ESXi rebuilding and configure the same network and storage in the same host.

       

      After rebuild ESXi we need to configure same network and storage.

       

      Thanks

      Saurabh

        • 1. Re: Install ESXi Hosts Using VRO
          daphnissov Guru
          Community WarriorsvExpert

          That is a very large ask and people are probably not coming forward to simply hand over extensive automation to you on a silver platter. Helping you build it when you already have something started is one thing; giving you work that has taken dozens of hours for free is another.

          1 person found this helpful
          • 2. Re: Install ESXi Hosts Using VRO
            ccnasaurabh1 Novice

            How I can extend silver plates ? Can i use vSphere auto deploy feature to automate esxi build?

            • 3. Re: Install ESXi Hosts Using VRO
              David788 Novice

              First of all, you should decide if you want to install ESXi hosts with PXE boot, with attaching customized ISO to iLO/iDRAC (or any other remote management which your servers have).

              Each option have his own prerequisities.

               

              1. PXE boot is maybe prefered option and requiring correct native VLAN tag on physical switchport where your ESXi is connected.

              then you would need DHCP server preferably controlled by vRO workflow run, to get IP which you like to have on the ESXi host while booting.

              HTTP/FTP/TFTP server is also required, to by able to transfer the data.  Or in general you may use VMware AutoDeploy, to substitute DHCP and fileshare, but physical switch config have to be the same.

               

              2. attaching bootable ISO via iLO requiring you to talk from vRO workflow run to iLO via awailable API from iLO (I'm using racadm commandline for Dell servers),

              Mount the ISO to virtual CDROM, set next boot to Virtual CDROM, if not set already, and boot the host. Preparation of ISO files is up to your possibilities.

               

              AutoDeoloy is not something with automagically install ESXi, technical process on backgroung is the same which you can nuild by your own in your infrastructure.

               

              Once you decide one or other way, than you can start diging deeper to the point what you actually have to develop.

              • 4. Re: Install ESXi Hosts Using VRO
                ccnasaurabh1 Novice

                I have decided to go with iLO to mount iso and install esxi then pull out a health report from the vrops for newly created esxi.

                 

                Thanks

                Saurabh

                • 5. Re: Install ESXi Hosts Using VRO
                  David788 Novice

                  So if via iLO and mounting ISO to install ESXi host, then you have to find the way for where to store the ISO (some SMB, FTP, SFTP, HTTP share), from which iLO will be able to mount it.

                  Depends on your decision, if kickstart will be stored locally on the ISO, or remotely on some http server, where "future" VMkernel have access.

                  If you will go for locally stored kickstart on ISO, then you would need to develop vRO workflow, which will create bootable ISO on demand, or create all possible ISOs at front, which is mostly not possible, as you might not know all future hostnames and IPs.

                  Therefore I would suggest to use remotelly stored kickstart and publish it via HTTP.

                   

                  The procedure of preparing ISO using remote kickstart is to edit files:

                  /BOOT.CFG for BIOS boot

                  /EFI/BOOT.CFG for UEFI boot

                   

                  line: kernelopt=runweasel ks=http://00.00.00.00/kickstart/ks-osdc-pdp101.cfg nameserver=00.00.0.0 ip=00.00.00.000 netmask=255.255.255.0 gateway=00.00.00.000

                  More options here: https://docs.vmware.com/en/VMware-vSphere/6.5/vsphere-esxi-vcenter-server-65-installation-setup-guide.pdf

                   

                  Workflow procedure:

                  1. SSH to iLO and issue command to mount ISO to virtual CDROM from HTTP or any other file supported file share

                  2. Setup BIOS order to boot from virtual CDROM

                  3. reboot the server

                  4. Server will boot from ISO

                  5. ESXi installer will download Kickstart from pre-defined location

                  6. ESXi installer will install ESXi host based on Kickstart script (Setup hostname, networking, etc...)

                   

                  Once ESXi is installed, you have to decide how you will inform Workflow run, that installation is finished.

                  There ale again multiple options, if you have SSH access from vRO to ESXi hosts, I will go with way: SSH every few minutes to newly installed ESXi host and look for custom file and value inside.

                  This custom tile could be created as very last step in kickstart run.

                  So once this file exist with desired value, you can say, that ESXi host is installed and Kickstart run already finished.

                  Then you might continue with attaching ESXi host to vCenter and perform remaining steps.

                  1 person found this helpful
                  • 6. Re: Install ESXi Hosts Using VRO
                    ccnasaurabh1 Novice

                    Thanks mate for your last response !

                     

                    It's very useful but still I need some more clarification on below workflow procedures.

                     

                    Workflow procedure:

                    1. SSH to iLO and issue command to mount ISO to virtual CDROM from HTTP or any other file supported file share  >>>>>> Could you please more elaborate this step and share the commands to mount a iSO into iLO using SSH or how i can create a workflow for that.

                     

                    5. ESXi installer will download Kickstart from pre-defined location>>>>>>>>>>Could you please more elaborate this step, How i can download script run into the esxi which just rebooted,

                     

                    6. ESXi installer will install ESXi host based on Kickstart script (Setup hostname, networking, etc...) Could you please more elaborate this step.

                     

                     

                    I have planning to install ESXI through ilo.

                     

                    Thanks

                    Saurabh   

                    • 7. Re: Install ESXi Hosts Using VRO
                      David788 Novice

                      Hi,

                       

                      1. SSH to iLO and issue command to mount ISO to virtual CDROM from HTTP or any other file supported file share  >>>>>> Could you please more elaborate this step and share the commands to mount a iSO into iLO using SSH or how i can create a workflow for that.

                      --This might be helpfull for you: https://unixhealthcheck.com/blog?id=270

                       

                      5. ESXi installer will download Kickstart from pre-defined location>>>>>>>>>>Could you please more elaborate this step, How i can download script run into the esxi which just rebooted,

                      6. ESXi installer will install ESXi host based on Kickstart script (Setup hostname, networking, etc...) Could you please more elaborate this step.

                      -- To answer both question at once I would say it would be good to at first get familiar with Kickstart it self.

                      In principal kickstart is the same for ESXi hosts or  for Linux servers, just for ESXi hosts might be way more simple in terms of content, so you probably do not need any tool, which will create ks.cfg for you, and you may write it by your self.

                      https://docs.vmware.com/en/VMware-vSphere/6.5/vsphere-esxi-vcenter-server-65-installation-setup-guide.pdf -- Section: Options for Installing ESXi / Scripted ESXi Installation

                      About the Default ks.cfg Installation Script  -- Just be carefull with using --firstdisk --overwritevmfs if you are having SAN or local disks with usefull data.

                      https://be-virtual.net/automated-installation-with-vmware-esxi-5-56-06-5/

                      https://rudimartinsen.com/2018/06/09/customizing-esxi-installation-with-kickstart-files-and-pxe-boot/

                      https://blog.comdivision.com/blog/2018/05/esxi-autoinstall-with-kickstart-and-pxe

                      • 8. Re: Install ESXi Hosts Using VRO
                        ccnasaurabh1 Novice

                        Thanks a lot David788 !!

                         

                        I Did that, Only one last question - How i can apply host profile into on newly created host through VRO or PowerShell.

                         

                        Please share any command or best way to apply host profile. Rest of the work i have done.

                         

                        Thanks

                        Saurabh

                        • 9. Re: Install ESXi Hosts Using VRO
                          ccnasaurabh1 Novice

                          Hi David

                           

                          I have created a VRO Workflow for building & Rebuilding esxi host on demand but I am trying to save all required inputs in VRO Attribute so that vro can auto populate all required values for rebulding the host.

                           

                          Because I f i am trying to rebuild any ESXi host so the same Inputs for storage and networking ,DV switch e.t.c needs to fill out manually on the VRA form.

                           

                          So could you please share any idea to save all required inputs into attribute so that while rebuilding the ESXi all required inputs will be auto populate on the VRA form.

                           

                          or any script can pull out allesxi & vCenter info.

                           

                          Thanks!