ESX 3.5 image installs

Note, these are just my notes on how the process works.  This document is by no means complete and assumes some level of Linux/Unix knowledge.

Building an ESX 3.5 server using a disk image has a number of advantages over manually installing ESX 3.5 or using Kickstart.

  1. It’s faster, if patching time is taken into account it can be much faster.   Using local storage it is possible to build, patch and deploy a single server over a gigabit ethernet network in about 3 minutes.
  2. Easier to manage.  All servers are nearly identical.

Creating an Image:

  1. Install ESX 3.5
  2. Install patches
  3. Install configuration script
  4. Remove the /etc/vmware/esx.conf file
    1. rm /etc/vmware/esx.conf
  5. Remove the /etc/sysconfig/network-scripts/vswif0 file
    1. rm /etc/sysconfig/network-scripts/vswif*
  6. Shutdown ESX 3.5
    1. shutdown -h now
  7. Boot the server from a Linux LiveCD
    1. Configure networking
      1. Using a VLan (Some older Linux LiveCDs don’t support using VLans)
        1. ifconfig eth0 up
        2. vconfig eth0 add vlanid
        3. ifconfig eth0.vlanid ipaddr netmask
      2. Without a vlan
        1. ifconfig ipaddr netmask up
    2. Determine the device with the image
      1. fdisk -l
    3. Create and image and copy it to the remote Linux/Unix/ESX server using ssh
      1. dd if=/dev/sourcedisk | gzip | ssh remotehost “cat > outfile.img.gz”

Building a Server from the ESX 3.5 image

  1. Boot the server from a Linux LiveCD
    1. Configure networking
      1. Using a VLan (Some older Linux LiveCDs don’t support using VLans)
        1. ifconfig eth0 up
        2. vconfig eth0 add vlanid
        3. ifconfig eth0.vlanid ipaddr netmask
      2. Without a vlan
        1. ifconfig ipaddr netmask up
    2. Determine the device to write the image to (destination device must be the same size or larger than the device that contained the original image)
      1. fdisk -l
    3. Dump the image from the remote hosts onto the install disk
      1. ssh remotehost cat outfile.img.gz|gunzip -c > /dev/destinationdev
    4. Flush the disk write cache
      1. sync
    5. Reboot the server
    6. Eject the LiveCD