Category Archives: scripted

performing scripted installation of esxi by pxe booting the installer

 

Of course internet community is full of blogs on how to do ESXi4.1 scripted installation. Based on those materials I’m here to show how to integrate both ESXi4.1 and ESXi5.0 under same PXE server. Trust me very simple (No Big Deal), nothing too much different. All you need to know what is changed I ESXi5.0.

PRE-REQUISITE

  1. WebServer – I prefer IIS
  2. TFTP Server – I Prefer SolarWinds
  3. PXE I prefer pxelinux.0
  4. DHCP Server – I Prefer Microsoft DHCP

A. WebServer Configurations:

1.Install IIS webserver using next next Smile.

2.Configure MIME Type as shown below

image

3. Create folders ESXi and ESXi5 under C:\Inetpub\wwwroot

image

4. Extract ESXi 5.0 ISO here as shown here  and 4.1U1 as shown below

image

B. TFTP Server Configuration

Download free TFTP server from SolarWinds

Installation is pretty straight forward. SolarWinds all products are very simple to install and configure. I love their syslog server and had blog about it in the past here

Once installed, there is no configuration needed, just ensure you PXE directory defined as per your requirement C:\PXE (where all files for PXE booting will reside)

image

Under PXEboot folder create folder structure shown below

image

Download pxelinux.0 from http://ping.windowsdream.com/dl/pxelinux.0 and copy it in C:\PXEboot directory as shown below also copy menu.c32. This file helps us boot the server, no modification is needed in this file. Just copy it there.

image

Open pxelinux.cfg folder and create a file without extension as default, as shown below

image

Open default file in wordpad(not notepad) and copy below text into it.Changes highlighted in yellow below

DEFAULT menu.c32
MENU TITLE ESXi Installation
NOHALT 1
PROMPT 0
TIMEOUT 80
LABEL install
  MENU LABEL ESXi5 ^Installer
  KERNEL ESXi5/mboot.c32
  APPEND -c ESXi5/boot.cfg

label ESXi4.1U1 Installer
menu label ^ESXi4.1U1 Installer
kernel ESXi/mboot.c32
append ESXi/vmkboot.gz ks=
http://192.168.73.168/ESXi/ks.cfg — ESXi/vmkernel.gz — ESXi/sys.vgz — ESXi/cim.vgz — ESXi/ienviron.vgz — ESXi/install.vgz

 

LABEL hddboot
  LOCALBOOT 0×80
  MENU LABEL ^Boot from local disk

Copy following 8 files in to C:\PXEboot\ESXi shown below. These files are copied from C:\Inetpub\wwwroot\ESXi, these files are needed only for ESXi4.1U1 installation and should be copied in ESXi folder only

Only for ESXi4.1

Similar copy all files from C:\Inetpub\wwwroot\ESXi5 to C:\PXEboot\ESXi5 as shown below.

Only for ESXi5.0

Only for ESXi5.0 you have to edit boot.cfg file in C:\PXEboot\ESXi5 and that also only one line you need to modify (just to capture screen capture I have opened this file in notepad)

boot.cfg to edit only for ESXi5.0

C. DHCP Server – Configuration

Define the scope in DHCP as per your requirements

Add following two options to DHCP server and done

image

All done and now time to test Thumbs up

image

Install ESXi5.0 from a CD or DVD Using a Script

In the previous post we saw how to interactively install ESXi, here I will show you how to install using script. Only difference between this method and interactive method is you do not need provide any inputs. Just one simple line pointing to ks.cfg file and all done.

What you need? i.e. pre-requisites

  1. IIS or any Webserver
  2. ISO image to burn it on CD/DVD (assuming you do not have ILO)

Configuration of IIS Server

  1. Install IIS using standard next next method. Nothing special there.
  2. Extract ESXi5.0 ISO image using ISO Buster
  3. Below is what it might look after extracting the imageimage
  4. Create a folder by name e.g. ESXi5 under C:\Inetpub\wwwroot\ as shown below and copy the above files or entire content of the CD image
  5. Create a answer file with name ks.cfg as shown below

#
# Sample scripted installation file
#
# Accept the VMware End User License Agreement
vmaccepteula
# Set the root password for the DCUI and Tech Support Mode
rootpw mypassword
# Install on the first local disk available on machine
install –firstdisk –overwritevmfs
# Set the network to DHCP on the first network adapater
network –bootproto=dhcp –device=vmnic0

# Reboot the OS but do not eject CD.

reboot –-noeject

  1. Copy the ks.cfg file into C:\Inetpub\wwwroot\ESXi5
  2. Start the server, ensure it boots from the CD as shown below and press enterimage
  3. When you see below screen press SHIFT + Oimage

  4. You get below screen, remove run runweasel by press backspaceimage

  5. Type the webserver address as shown belowimage
  6. Press Enter and watch the stuff.