Home > VMWare > ‘Upgrading’ from ESX to ESXi – a multipart series – Part 2a – Installation – V-PXEServer

‘Upgrading’ from ESX to ESXi – a multipart series – Part 2a – Installation – V-PXEServer

Intro

Tools

Part 2 -Installation Options

Part 2a – V-PXESERVER

Part2b – ESX Deployment Appliance

In my ESX to ESXi upgrade, I’ll look at a few tools for hands free installation, first in the series is  V-PXEServer –  This is a simple WinPe boot disk that effectively hosts TFTP, DHCP and PXE.

Simon Long’s blog has installation instructions and has done a really good write up on the deployment process. In addition, he has added some handy customisations like speeding up the deployment and providing customised company backgrounds etc while the process runs – though it appears that the author of the appliance has made changes to the build as it now seems to deploy in about 5 minutes, where Simon was getting 15 minute deploy times.

To install the appliance on ESX, I pretty much followed Simon’s blog, word for word, but if you were to need to run this without a copy of VMware workstation, you’d need to do the following convert the VM first (Simon includes details on using converter for the migration, but this required the VM to be accessible – you can get a 30 day trial of workstation at https://www.vmware.com/tryvmware:

  • If you are running this on VMware workstation, simply Click File – > open – > Select the extracted .vmx file -> ‘Take ownership’ if prompted.
  • If you are running this on ESX / ESXi:
    • Copy contents of zip to a Datastore  (Use WinSCP, or Veeam FastSCP or similar)
    • Using Putty, I connected to an ESX host that has access to the Datastore that the files are stored on and browsed to the Folder path /vmfs/volumes/<datastore>/V-PXEServer
    • This was built on Workstation, so I needed to I import the vmdk from workstation to ESX format file using vmkfstools
      • vmkfstools –I ./V-PXEServer.vmdk ./V-PXEserver_new.vmdk
    • Next, I renamed the original vmdks to V-PXEServer.vmdk.old, and the new one to V-PXEserver.vmdk
      • mv ./V-PXEServer.vmdk ./V-PXEServer.vmdk.old
      • mv ./V-PXEServer_new.vmdk ./V-PXEServer.vmdk
    • To import the host to VC was now as simple as right clicking the .vmx file using the datastore browser and selecting ‘import’ then following the wizard. (I know I could have done this from the command line, I was lazy)
    • Remove the existing Nic and CD Rom and re-add new ones in ESX, as the ones in the Appliance do not work on ESXi.  As the import came from workstation, I had problems with the configured CD rom drive and nic, so I added new ones (right-click edit settings)
  • When booting the appliance, you will be prompted for all the info required for configuration
    • You need to supply an IP address, Subnet Mask and Default Gateway
    • TFTP and DHCP will be started automatically and a default DHCP pool will be created – you can edit this within the tool that pops up if you really want to.
    • You will next need to attach the ISO for the Installable version of ESXi (Embedded will not work)
      • To attach to an ESX(i) VM, open the console to the VM using the viclient and select the icon that has a cd with a spanner on it – choose ‘connect to iso on local disk’
      • VMWorkstations, right click the VM, select settings – > click on the CD Rom drive and select ‘use ISO Image File’
    • You have 2 options
      • Copy the ISO to c:\PXEserver\TFTPRoot\Boot\ESXi_4x  (If you browse the start menu, you will find an explorer tool called ExplorerXP)  – then disconnect the ISO
      • Connect the ISO directly to the PXE server using the ‘Connect CD/ISO to PXE server’ icon on the desktop, then double-clicking the ‘PXE TFTP DHCP Server’ icon on the desktop.

Clearly, this installation was extremely straightforward and very quick to get ready.

First time round (on VMware workstation), this setup took less than 10 minutes.

Deploying an ESXi Image was done as follows:

  • Boot a new host (on the same physical Subnet, or if it is a VM, one that is connected to the same vSwitch) (else set up a PXE helper)
  • Select which image you want to boot
    • Install from CD / ISO mounted on the PXE server
    • Install from Local disk on PXE server (installs form the location we copied to above)

  • Watch the installation whizz away
  • You will get a few prompts as the process continues, so the installation is not totally automated – more like mounting an ISO and installing, but installation takes about 5 minutes. (network depending)

Once you have set this up for the first time and know what you are doing, I reckon you’ll consistently be able to get ESXi hosts built to the stage where they are accessible on the network (but not yet configured) in about 10 minutes INCLUDING setting up the PXE server etc – end to end, my best run was under 6 minutes, but this was isolated in a VM workstation, so no network latency etc in the way.

I tested this utility with various ISOs, including ones with custom Dell / HP providers installed and had no problems.

Just like Simon Long, I decided that having a server PXE boot and possibly wait for input was not optimal, so I added a timeout of 30 seconds.

To create a 30 second timeout on the boot screen, you need to use the ExplorerXP tool to browse to C:\PXEServer\TFTPRoot\Boot\pxelinux.cfg and open the file called ‘default’

You will find a line in the config file that says

# TIMEOUT 300

Simply remove the ‘#’ and change the value to your selected timeout. (300 means 300 seconds)

You will also see 2 PNG files in this folder, you can replace them if you would like to provide you own Background for a more professional deploy look.

The underlying PXE is just PXE linux, so can be customised as per usual PXE Linux methodology : http://syslinux.zytor.com/wiki/index.php/The_Syslinux_Project

I decided to take this a step further and get rid of the prompts during the installation phase of the ESXi install – I have created a new post for this as we’ll recycle it through the series. – http://www.get-virtual.info/2011/03/04/modifying-an-esxi-iso-to-reduce-the-number-of-keypresses-required-for-build/

Conclusion:

Ease of setup : Extremely quick and easy to setup (managed to set this up in literally 2 Minutes once I had been through it the first time)

Near impossible to make a mistake (though watch out as you will be dropping a PXE server on a VLAN and hosts will boot to this PXE server if they are set to boot from network first) –

Ease of deployment :  Key strokes required on ESXi host to specify install location etc, but steps above show how to remove these. (A more complete guide at : http://vinternals.wordpress.com/2009/07/27/unattended-esxi-installation/ you can eliminate some of these – but this is still no different to modifying an ISO and booting from an ISO that has the same edits made)

Deployment time : 4 minutes per ESXi host (without modifying ISO) – provided you are there for the key presses

Modified ISO :  About 3 minutes per ESXi host, but you’ll need to replace upgrade the install.tgz file each time you upgrade your ISO.

Likes :

  • I really like the fact that this runs as a quickly imported WinPE disk and that DHCP, PXE etc is all hosted in one unit.
  • It is a superb feature that I can mount an ISO to the VM and then chose to install direct from that ISO, without any further changes.
  • Easy to edit boot config options, but custom boot options may require a little python knowledge
  • Familiar Windows interface

Dislike:

  • I am unsure on the licensing situation, with regards to WinPE. Google seems to tell me that WinPE licenses are required when using it.
  • No customisation of the ESXi that is depoyed

Thoughts:

  • Borrowing the ideas from this tool, I should be able to extract the PXE Server and TFTP ideas on awindows host and actually install this on a full fat Windows host. I will then be able to write PowerCli / Powershell code to manage what happens to the old host prior to shut down / upgrade etc (i.e. capture host profile, put in maintenance mode, join cluster and so on)
Categories: VMWare Tags:
You must be logged in to post a comment.