1. 程式人生 > >VMware ESXi自動化部署實踐

VMware ESXi自動化部署實踐

前言

VMware ESXi本身部署就很簡單,任何人分分鐘鍾即可掌握,但是在短時間內需要部署幾十臺ESXi就顯得力不從心了,本文主要介紹通過映象定製kickstart自動化部署ESXi,PXE網路部署可參考擴充套件閱讀部分。

讓ESXi的部署速度再快一點

下載ESXi映象

經驗證ESXi 5和6均可使用此方法

ESXi版本:VMware-VMvisor-Installer-5.5.0.update02-2718055.x86_64-Dell_Customized-A05.iso

配置自動化檔案

ks.cfg

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 20 21 22 23 24
#
# Sample scripted installation file
#

# Accept the VMware End User License Agreement
vmaccepteula

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

# 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 # A sample post-install script %post --interpreter=python --ignorefailure=true import time stampFile = open('/finished.stamp', mode='w') stampFile.write( time.asctime() )

ISOLINUX.CFG

1
2
3
4
5
6
7
8
9
10
11
12
DEFAULT menu.c32
MENU TITLE Dell-ESXi-5.5U2-2718055-A05 Boot Menu NOHALT 1 PROMPT 0 TIMEOUT 80 LABEL install KERNEL mboot.c32 APPEND -c boot.cfg ks=cdrom:/KS.CFG MENU LABEL Dell-ESXi-5.5U2-2718055-A05 ^Installer LABEL hddboot LOCALBOOT 0x80 MENU LABEL ^Boot from local disk

整合映象檔案

整合工具我使用UltraISO,下載地址如下

使用方法

  1. Windows下使用UltraISO開啟官方映象
  2. 把ks.cfg和ISOLINUX.CFG新增並覆蓋至根目錄
  3. 點選儲存即可

測試方案

  1. 建議先通過VMware Workstation模擬測試
  2. 在生產環境中驗證可行性