
自動化 ESXi 安裝(Automating ESXi Installations)
|
257
7.2 為自動部署建立一份 Kickstart 組態配置文件
問題
您希望自動化安裝一個新的 ESXi,或是使用 PXE 透過網路自動化升級現存的 ESX/
ESXi 伺服器。
解決方案
使用 VMware 腳本選項,輕鬆的部署新的 ESXi 伺服器。
討論
您可以使用 Kickstart 腳本與 DHCP 伺服器建立一個 PXE 啟動環境,用以部署新的伺服
器或是升級現存的伺服器。此訣竅假設您已經完成 DHCP 伺服器的配置,我們將會把重
點放在 ESXi 的 Kickstart 選項。
以下是一個基本的 Kickstart 腳本,它可以在安裝 ESXi 與配置網路時使用,以建立一個
基礎系統。
# Accept the VMware End User License Agreement
vmaccepteula
# Set the root password for the DCUI and ESXi Shell
rootpw yourpasswordhere
# Install on the first local disk available on machine and overwrite the VMFS
datastore.
i
nstall --f
i
rstd
i
sk --overwr
i
tevmfs
# Set the network to DHCP on the first network adapater, ...