VMware ESXi 3.5 update 4をPXEBootする

必要なもの

3c90x.o
aacraid_esx30.o
adp94xx.o
ahci.o
aic79xx.o
aic7xxx.o
ata_piix.o
bnx2.o
bnx2x.o
cciss.o
CDCEther.o
DAC960.o
dell
deltadisk
e100.o
e1000.o
e1000e.o
ehci-hcd.o
etherswitch
forcedeth.o
fsaux
hid.o
hpcru.o
hpsa.o
ide.o
igb.o
ioat.o
ipmi_devintf.o
ipmi_msghandler.o
ipmi_si_drv.o
ips.o
iscsi_mod.o
ixgbe.o
lpfc_740.o
lvmdriver
megaraid2.o
megaraid_sas.o
migration
mptscsi_2xx.o
nfsclient
procfs
qla2300_707_vmw.o
qla4010.o
qla4022.o
random.o
s2io.o
sata_nv.o
sata_promise.o
sata_sil.o
sata_svw.o
sata_vsc.o
shaper
tcpip
tg3.o
unm_nic.o
usb-ohci.o
usb-storage.o
usb-uhci.o
usb.o
vfat
vmfs2
vmfs3
vmklinux

使用したもの

TFTPサーバーの設定

これをダウンロードするか、Syslinuxをダウンロードして、下記の通りのディレクトリ構成でTFTPレポジトリ(TFTPルートディレクトリ)を作成してください。

  • 「xx-xx-xx-xx-xx-xx」はすべて対象PCのMACアドレスに変更してください。(A〜Fは小文字です
  • 「binmod.tgz」「cim.tgz」「configBundle.tgz」「environ.tgz」「oem.tgz」「vmkernel.gz」は、この段階ではダミーファイルです。
TFTPレポジトリ
tftpboot
│  mboot.c32
│  menu.c32
│  pxelinux.0
│
├ ESXi_default
│      binmod.tgz
│      cim.tgz
│      configBundle.tgz
│      environ.tgz
│      oem.tgz
│      vmkernel.gz
│
├ ESXi_xx-xx-xx-xx-xx-xx
│      binmod.tgz
│      cim.tgz
│      configBundle.tgz
│      environ.tgz
│      oem.tgz
│      vmkernel.gz
│
└ pxelinux.cfg
        01-xx-xx-xx-xx-xx-xx
        default

default(文字コードSJISUTF-8以外、SJISとかEUC/改行コード:LRたぶんなんでも大丈夫)
default menu.c32
menu title PXE Boot VMware ESXi
timeout 100

label Hard
menu label Boot from local drive
localboot 0

label ESXi_default
menu label Boot VMware ESXi
kernel mboot.c32
append /ESXi_default/vmkernel.gz --- /ESXi_default/binmod.tgz --- /ESXi_default/environ.tgz --- /ESXi_default/cim.tgz --- /ESXi_default/oem.tgz --- /ESXi_default/configBundle.tgz
ipappend 2

01-xx-xx-xx-xx-xx-xx(文字コードSJISUTF-8以外、SJISとかEUC/改行コード:LRたぶんなんでも大丈夫)
default menu.c32
menu title PXE Boot VMware ESXi
timeout 100

label ESXi_xx-xx-xx-xx-xx-xx
menu label Boot VMware ESXi
kernel mboot.c32
append /ESXi_xx-xx-xx-xx-xx-xx/vmkernel.gz --- /ESXi_xx-xx-xx-xx-xx-xx/binmod.tgz --- /ESXi_xx-xx-xx-xx-xx-xx/environ.tgz --- /ESXi_xx-xx-xx-xx-xx-xx/cim.tgz --- /ESXi_xx-xx-xx-xx-xx-xx/oem.tgz --- /ESXi_xx-xx-xx-xx-xx-xx/configBundle.tgz
ipappend 2

label Hard
menu label Boot from local drive
localboot 0

DHCPサーバーの設定

DHCPサーバーのDHCPオプションを下記のように設定してください。

  • ルーター内臓のDHCPサーバー機能では、たぶんこれらは設定できないと思います。
オプション名
[66]Server-Name(TFTPサーバ名) TFTPサーバーのIPアドレス
[67]Bootfile-Name(ブートファイル名) pxelinux.0

PXEブートの動作確認

ここまででPXEブートができて、「Boot from local drive」と「Boot VMware ESXi」が選択できるようになることを確認してください。

  • MACアドレスが「xx-xx-xx-xx-xx-xx」であるPCをPXEブートした場合は「Boot VMware ESXi」が規定になります。
  • 逆にMACアドレスが「xx-xx-xx-xx-xx-xx」でないPCをPXEブートした場合は「Boot from local drive」が規定になります。
2009.05.25(追記)

TFTPサーバーがtftpd(0.17-16)の場合、pxelinux.cfg以下の設定ファイルを読み込めずにうまくPXEブートができない現象がありました。よくよくpxelinuxのドキュメントを見てみると、サポートしているTFTPサーバーっていうものがあるようです。

[doc/pxelinux.txt]

    ++++ SETTING UP THE TFTP SERVER ++++

PXELINUX currently requires that the boot server has a TFTP server
which supports the "tsize" TFTP option (RFC 1784/RFC 2349).  The
"tftp-hpa" TFTP server, which support options, is available at:

 http://www.kernel.org/pub/software/network/tftp/
 ftp://www.kernel.org/pub/software/network/tftp/

... and on any kernel.org mirror (see http://www.kernel.org/mirrors/).

Another TFTP server which supports this is atftp by Jean-Pierre
Lefebvre:

 ftp://ftp.mamalinux.com/pub/atftp/

If your boot server is running Windows (and you can't fix that), try
tftpd32 by Philippe Jounin (you need version 2.11 or later; previous
versions had a bug which made it incompatible with PXELINUX):

 http://tftpd32.jounin.net/


ESXiをUSBにインストールする

USB メモリブートする VMware ESXi 3.5 を作成する - maruko2 Note等を参考にしながら、ESXiをインストールしたUSBメモリを準備してください。

ESXi起動ファイルの抽出

KNOPPIXを起動させて、作成したUSBメモリから「binmod.tgz」「cim.tgz」「environ.tgz」「oem.tgz」「vmkernel.gz」を抜き取り、TFTPレポジトリ内に配置します。

ESXiのPXEブートの動作確認

ここまででESXiが起動すれば完成です。

ESXiの設定保存方法

このままではリブートのたびに設定情報が初期化されるので、Stateless ESXiにある情報を元に「configBundle.tgz」を更新してあげます。

複数台のESXiのPXEブート

「ESXi_xx-xx-xx-xx-xx-xx」を複製してやれば、それぞれの設定情報を保持できます。