1. 程式人生 > >PXE自動化部署vsphere esxi6.5

PXE自動化部署vsphere esxi6.5

esxi pexlinux ks

先決條件:

1、硬件需要支持esxi操作系統

2、目標主機網卡支持pex啟動

3、ESXI安裝鏡像校驗完整

4、需要有TFTP、FTP支持

5、防火墻運行TFTP/FTP流量通過


安裝過程:

1、C盤創建文件夾pexboot

2、獲取 SYSLINUX 版本 3.86 並進行解壓,然後將 pxelinux.0 文件復制到 pexboot裏面(pxelinux.0文件在syslinux-3.86.zip\core)

3、在ftpboot文件夾裏面創建文件夾pxelinux.cfg,在此文件夾創建文本文檔,重命名為“default”,取消文件後綴

4、使用寫字板打開default文件寫入下列內容

DEFAULT install
NOHALT 1
LABEL install
  KERNEL ESXi6.5/mboot.c32 					
  APPEND -c ESXi6.5/boot.cfg
  IPAPPEND 2

技術分享

5、在pxeboot文件裏面創建ESXI6.5,將esxi6.5安裝鏡像全部內容減壓到此目錄

6、修改鏡像文件裏面的boot.cfg文件

a. 去掉文件中所以的 / (可以使用替換,將/替換為為空內容)
b. 添加下列內容
    prefix=ESXI6.5
    kernelopt=ks= (ftp地址按自己的環境寫)

技術分享

7、在ESXI6.5文件夾中新建文件ks.cfg,寫入下列內容(mypassword為安裝完成後esxiroot密碼)

#
# 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 adapter
network --bootproto=dhcp --device=vmnic0

# Reboot at the end
reboot

8、使用TFTP、dhcp

技術分享

技術分享

技術分享

9、配置FTP服務器,使用filezilla server


技術分享

10、至此配置已全部完成,可以開始從網絡不是esxi,開機等待安裝完成就可以了

本文出自 “汜水流年_” 博客,請務必保留此出處http://timefiles.blog.51cto.com/8475652/1963475

PXE自動化部署vsphere esxi6.5