6、PXE安裝ESXI6.0

1、安裝PXE環境涉及軟件

yum -y install dhcp* httpd tftp-server*


2、配置DHCP

vim /etc/dhcp/dhcpd.conf 

allow booting;

allow bootp;

ignore client-updates;

option routers 192.168.130.229;

option subnet-mask 255.255.255.0;

subnet 192.168.130.0 netmask 255.255.255.0{

        range 192.168.130.10 192.168.130.20;

        next-server 192.168.130.229;

        filename "gpxelinux.0";

}


vim /etc/rc.d/init.d/dhcpd

將user=dhcpd、group=dhcpd改爲user=root、group=root


chkconfig dhcpd on

service dhcpd start


3、配置TFTP

vim /etc/xinetd.d/tftp 

service tftp

{

        socket_type             = dgram

        protocol                = udp

        wait                    = yes

        user                    = root

        server                  = /usr/sbin/in.tftpd

        server_args             = -s /var/lib/tftpboot

        disable                 = no

        per_source              = 11

        cps                     = 100 2

        flags                   = IPv4

}


chkconfig xinetd on

service xinetd start


4、配置HTTP

chkconfig httpd on

service httpd start


5、配置引導文件

yum -y install syslinux

cp /usr/share/syslinux/gpxelinux.0 /var/lib/tftpboot/


6、配置選項菜單

vim /var/lib/tftpboot/boot.msg

#########################################################

1 esxi6.0

#########################################################


7、配置default文件

mkdir /var/lib/tftpboot/pxelinux.cfg


vim /var/lib/tftpboot/pxelinux.cfg/default

default 1

prompt 1

timeout 60

display boot.msg


label 1

  kernel http://192.168.130.229/iso/esxi6.0/mboot.c32

  append -c http://192.168.130.229/iso/esxi6.0/boot.cfg ks=http://192.168.130.229/ks/esxi6.0/ks.cfg


8、拷貝鏡像並做相應修改

mkdir -p /var/www/html/ks/esxi6.0 /var/www/html/iso/esxi6.0

mount /dev/cdrom /mnt

cp -r /mnt/* /var/www/html/iso/esxi6.0


將所有的/刪除,並添加prefix=http://192.168.130.229/iso/esxi6.0

vim /var/lib/tftpboot/esxi6.0/boot.cfg

bootstate=0

title=Loading ESXi installer

timeout=5

prefix=http://192.168.130.229/iso/esxi6.0

kernel=tboot.b00

kernelopt=runweasel

modules=b.b00 --- jumpstrt.gz --- useropts.gz --- k.b00 --- chardevs.b00 --- a.b00 --- user.b00 --- uc_intel.

b00 --- uc_amd.b00 --- sb.v00 --- s.v00 --- mtip32xx.v00 --- ata_pata.v00 --- ata_pata.v01 --- ata_pata.v02 -

-- ata_pata.v03 --- ata_pata.v04 --- ata_pata.v05 --- ata_pata.v06 --- ata_pata.v07 --- block_cc.v00 --- ehci

_ehc.v00 --- elxnet.v00 --- emulex_e.v00 --- weaselin.t00 --- esx_dvfi.v00 --- ima_qla4.v00 --- ipmi_ipm.v00 

--- ipmi_ipm.v01 --- ipmi_ipm.v02 --- lpfc.v00 --- lsi_mr3.v00 --- lsi_msgp.v00 --- lsu_hp_h.v00 --- lsu_lsi_

.v00 --- lsu_lsi_.v01 --- lsu_lsi_.v02 --- lsu_lsi_.v03 --- lsu_lsi_.v04 --- misc_cni.v00 --- misc_dri.v00 --

- net_bnx2.v00 --- net_bnx2.v01 --- net_cnic.v00 --- net_e100.v00 --- net_e100.v01 --- net_enic.v00 --- net_f

orc.v00 --- net_igb.v00 --- net_ixgb.v00 --- net_mlx4.v00 --- net_mlx4.v01 --- net_nx_n.v00 --- net_tg3.v00 -

-- net_vmxn.v00 --- nmlx4_co.v00 --- nmlx4_en.v00 --- nmlx4_rd.v00 --- nvme.v00 --- ohci_usb.v00 --- qlnative

.v00 --- rste.v00 --- sata_ahc.v00 --- sata_ata.v00 --- sata_sat.v00 --- sata_sat.v01 --- sata_sat.v02 --- sa

ta_sat.v03 --- sata_sat.v04 --- scsi_aac.v00 --- scsi_adp.v00 --- scsi_aic.v00 --- scsi_bnx.v00 --- scsi_bnx.

v01 --- scsi_fni.v00 --- scsi_hps.v00 --- scsi_ips.v00 --- scsi_meg.v00 --- scsi_meg.v01 --- scsi_meg.v02 ---

 scsi_mpt.v00 --- scsi_mpt.v01 --- scsi_mpt.v02 --- scsi_qla.v00 --- uhci_usb.v00 --- xhci_xhc.v00 --- tools.

t00 --- xorg.v00 --- imgdb.tgz --- imgpayld.tgz

build=

updated=0


9、配置KS文件

vim /var/www/html/ks/esxi6.0/ks.cfg 

#Accept the vmware End User License Agreement

accepteula

# Set the root password for the DCUI and Tech Support Mode

rootpw Test@2017

clearpart --firstdisk=local --overwritevmfs

#Part disk

install --firstdisk=local  --overwritevmfs

#Set the network to DHCP IP on the first network adapater

network --bootproto=dhcp --device=vmnic0

#Final reboot

reboot


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章