PXE自動化部署vsphere esxi6.5

先決條件:

    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

wKiom1mxBaqz6w21AAC85QzLuGU095.png-wh_50

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

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

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

wKioL1mxCSCBv7oAAABlWmSJ0YY776.png-wh_50

    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

    

wKioL1mxCrTQUzxpAAAqKJ9wiQs043.png-wh_50

wKiom1mxCtTSv9GRAAC44yV7Mgw786.png-wh_50

wKioL1mxCrSAi3ntAACTgqsa3DM896.png-wh_50

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

    

wKiom1mxC03RMEmxAAChIEdQHno834.png-wh_50

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

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