- 论坛徽章:
- 0
|
The goal of the project was to be able to automagically build our ESX hosts without having to physically touch them at all. So once cabled, we would be able to deploy our ESX version 100% automagically.
Step one, configure your DHCP Server...
I happen to use a MS DHCP server, in the scope options you need to configure option 66 which is the location of your TFTP server.
You'll also need to configure option 67, which is the file that you want to download via TFTP.
Step two, is to build a TFTP server.
In our environment, SuSE is our prevalent Linux distro so that is the flavor that I will be using here.
First off, make sure that you have the TFTP configuration file set-up correctly within /etc/xinetd.d/tftp
view sourceprint?
01.service tftp
02.{
03.
socket_type = dgram
04.
protocol = udp
05.
wait = yes
06.
user = root
07.
server = /usr/sbin/in.tftpd
08.
server_args = -s -c /tftpboot/
09.
disable = no
10.}
Now, simply restart xinetd and verify that TFTP is running.
view sourceprint?
1.service xinetd restart
Then verify that TFTP is running.
view sourceprint?
1.netstat -a -u | grep tftp
Next, I downloaded syslinux from http://www.kernel.org/pub/linux/ ... yslinux-3.86.tar.gz
Explode it, and extract the pxelinux.0 into your /tftpboot directory, also create a pxelinux.cfg directory and within it, we need to create our default file. This default file is going to build the menu out for you when the system PXE boots.
My menu looks like:
view sourceprint?
01.default ../ESXi4.1/menu.c32
02.menu title VMware VMvisor Boot Menu
03.timeout 10000
04.
05.label ESXi Installer
06.menu label ^ESXi Installer
07.kernel ../ESXi4.1/mboot.c32
08.append ../ESXi4.1/vmkboot.gz ks=http://vssbuildsy01exdu.domain.org/esx4-1i/ks?name= --- ../ESXi4.1/vmkernel.gz --- ../ESXi4.1/sys.vgz --- ../ESXi4.1/cim.vgz --- ../ESXi4.1/ienviron.vgz --- ../ESXi4.1/install.vgz
09.IPAPPEND 1
10.
11.label ESX Full Installer
12.menu label ^ESX Full Installer
13.kernel ../ESX4.1/isolinux/vmlinuz
14.append initrd=initrd.img mem=512M ks=http://vssbuildsy01exdu.domain.org/ksGen?scName=
15.IPAPPEND 1
16.
17.label memtest86+-1.65
18.
kernel ../memtest/memtest86+-1.65
19.
20.LABEL delldiags
21.
MENU LABEL Dell Diagnostics
22.
kernel memdisk
23.
append initrd=../32bitdiag/diags.img
24.
25.#load pxe knife
26.
LABEL pxeknife
27.
MENU LABEL PXE Knife
28.
kernel menu.c32
29.
append pxeknife/pxeknife.conf
30.
31.
32.label ^Boot from local disk
33.menu label ^Boot from local disk
34.localboot 0x80
From here, you need to explode whatever media you wish to PXE boot, as you can see in the case above, I'm using ESX 4.1 and ESXi4.1 installable. I'm also PXE booting the 32-bit Dell Diagnostics, memtest, and PXE-Knife.
In my instance, I exploded the ESX and ESXi ISO images, I then copied menu.c32 from the ESXi ISO and inintrd.img from the ESX ISO into the /tftpboot directory.
so my /tftpboot directory looks like:
So, now we PXE boot our server, and this is what we get!
You'll see that when I hit tab on my installer line, I've already pre-populated the kickstart information in the default file above.
|
|