Categories: Gestalt ITVMware

A Simple VMware ESXi Rapid Deployment System – Part 3 of 3

 

Introduction and Requirements– Part 1
Testing and Exporting to vSphere – Part 2

Customising the ESXi Rapid Deployment Server

I couldn't just stop there could I? I decided to make a few alterations to make it a little prettier and hopefully quicker.

Removing some ESXi installation steps which are not required

I'll start off by talking about making some changes to the ESXi installation to help make the deployment a little quicker. I got the idea from Stuart Radnidge's great post; Unattended ESXi Installation. Stu talks about editing one of the Python files that make-up the ESXi installation. Stu has a link to a pre-prepared Install.tgz for you to replace the default Install.tgz that comes in the ESXi ISO. Unfortunately this wouldn't work for me as I was using the ESXi ISO that comes with HP Management Agents so I had to make the changes myself:

  • Extract the INSTALL.TGZ from the ESXi ISO using Winrar and save it locally
  • Using WinSCP or Veeam FastSCP upload the file to your home directory on a generic Linux box. (You could use the Service Console of an ESX Host)
  • Open Putty and SSH to the Linux Box that you just uploaded the .tgz to.
  • Login and su –
  • Create a /tmp/esxi directory: mkdir /tmp/esxi
  • Run the following command to decompress and extract the files from the install.tgz:  tar -C /tmp/esxi -xzvf INSTALL.TGZ
  • Next run the following command nano /tmp/esxi/usr/lib/vmware/installer/ThinESXInstall.py
  • Scroll down to Lines 22/23 and edit the line that reads:

Steps = [ WelcomeStep, LicenseStep, TargetSelectionStep, ConfirmStep, \
WriteStep, PostConfigStep, CompleteStep, RebootStep ]

  • This is how I edited it, you can of course decided which steps you do and don't want.

Steps = [ TargetSelectionStep, ConfirmStep, \
WriteStep, PostConfigStep, RebootStep ]

  • Once you’ve finished editing, CTRL+X and then Y to save and exit.
  • To create our new install.tgz change into /tmp/esxi by running: cd /tmp/esxi
  • Then run: tar -czvf /tmp/INSTALL.TGZ *
  • Once the process is complete, download locally your new INSTALL.TGZ file using WinSCP or Veeam FastSCP

Now we need to put this install.tgz file onto the following directory on the Rapid Deployment App: C:\PXEServer\TFTPRoot\Boot\ESXi_4x. The quickest way I found to do this was to create an ISO with the install.tgz in. Connect that to the VM and copy the file across.

Customising the PXE Delpoyment Menu

The second part of my customisation was to change the deployment menu to suit my companies needs. The menu is configured using the pxelinux.cfg configuration file. Its a pretty simple config file which is edited using the text editor which comes with V-PXEServer and with this PXELINUX WIKI you have all the information you need. These are the customisations I made:

  • Change the background to image to a Corporate Image (Image needs to be 640×480)
  • Removed the options; Network Boot, Command Line, Boot Normal
  • Changed the option names to make them more "User Friendly"
  • Changed the option noted to display a better description
  • Change the Font colours
  • Added a Timeout of 15 seconds, So if nothing is selected it would boot from Local Disk. I decided to do this in case a server PXE booted by accident without me knowing.

Here is a screenshot of my customised menu.

Now that our customisation is complete it's time to test out to see if these little tweeks have made any difference. I have recored a little video showing the deployment process.

Note: The recording has been speeded up, but I have included a clock at the bottom to show you how long it takes.

 

6 MINUTES!!! That'll do, that's a massive improvement.

I hope my 3 part series has shown you how simple it is to setup an ESXi Deployment System. If you wanted to you could take it one step further and remove the step of the installation where you are asked which HardDisk you want to install ESXi onto. If I have some spare time I may look into it. Unfortunately I have little experience with Python, so if anyone out there can offer a hand that would be great. Just contact me in the usual ways.

Simon Long

View Comments

  • Great series of post!
    We use HP Rapid Deployment Pack for rapid deploymen of physical and virtual linux box.
    The next step is using it for rapid deployment of ESXi: I think that i can "borrow" a lot of tips from your posts :)
    Thanks!

  • Hi Simon,

    Great post, but am having some issues with this.......

    Like you, I'm using HP provided version of ESXi 4.1 installable, which has 2 noticable omissions in their ISO from your ABC above - namely:

    - INSTALL.TAR is now INSTALL.VGZ
    - There is no IMAGE.TGZ

    I have managed to convert the install file by doing the following:
    - Copy the install.vgz to an ESXi 4.1 host
    - Convert it using 'vmtar -x install.vgz -o install.tar
    - Copy that back to the PXEServer VM

    What happens now is that the PXEServer menu shows-up (including the edits I've made - menu changes, background etc), then running the installer having populated the ESXi_4x with the contents of the HP ISO plus the new INSTALL.TAR file is:
    - The kernel module loads, as does the SYS and CIM module, but then it flashes a message that dissapears to quickly and returns to the boot menu.

    Am a bit stuck now - any thoughts?
    Many thanks.
    Jeremy. :0)

    • Hi Jeremy, If I'm honest I haven't tested this with 4.1.

      You say you added an HP ISO, have you tried it without this? Not sure if it would make any difference, but I don't know for sure if adding this would cause any problems.

      • Hi Simon,

        I've tried it with the HP ISO and the VMware ISO, and I either get a message about 'no image to install' if removing the reference to the image.bz2 file in the PXE config, or I get a purple screen of death post-PXE about the installation image being corrupted.

        I've also tried extracting the .dd file from the VMware ISO and uploading that to the PXE server, but that gives a PSOD as well......

        Any thoughts on correct format or file type for the installation source, and how to reference it in the PXE config? I'll continue picking through options in the meantime.......

        Cheers.
        Jeremy.

Share
Published by
Simon Long

Recent Posts

Google Cloud VMware Engine @ VMworld 2021

Another VMworld is upon us!!! Sadly, it's only virtual again this year. However, that does…

3 years ago

Google Cloud VMware Engine – Learning Resources

As part of my recent move to Google, I'm working on quickly getting up to…

3 years ago

Hey Google!

I am delighted to announce the next chapter in my career. Today is my first…

3 years ago

EP13 – Defending Remotely

In episode thirteen of The VCDX Podcast, I am joined by two special guests who…

3 years ago

Getting Started With Oracle Cloud VMware Solution (OCVS) – Migrating Workloads Using VMware HCX

In my recent ‘Getting started with Oracle Cloud VMware Solution (OVCS)’ post; Getting Started With…

3 years ago

Getting Started With Oracle Cloud VMware Solution (OCVS) – Connecting To An On-Premises Environment

In my recent ‘Getting started with Oracle Cloud VMware Solution (OVCS)’ post; Getting Started With…

3 years ago