安裝VMware PowerCLI
Windows10系統中使用管理員身份打開PowerShell,執行一條命令在線安裝:
#查找模塊
Find-Module -Name VMware.PowerCLI
#安裝模塊
#Install-Module -Name VMware.PowerCLI -Scope CurrentUser
#Install-Module -Name VMware.PowerCLI -Scope AllUsers
Install-Module -Name VMware.PowerCLI
耐心等待,我在辦公室是很快裝完了,之前在家裏要好久。
準備ESXi 6.7鏡像LNV
VMware-ESXi-6.7.0-8941472-LNV-20180706.zip需要註冊登錄才能下載
https://my.vmware.com/cn/web/vmware/details?downloadGroup=OEM-ESXI67-LENOVO&productId=742
放到d盤esxi下的pkg目錄
下載ESXi-Customizer-PS
http://vibsdepot.v-front.de/tools/ESXi-Customizer-PS-v2.6.0.ps1
Powershell中默認禁止執行腳本,所以先修改策略允許執行
set-ExecutionPolicy RemoteSigned
開始注入封裝
我沒有加入8169模塊,那個會有報錯。
cd d:\esxi
d:\esxi\ESXi-Customizer-PS-v2.6.0.ps1 -izip .\pkg\VMware-ESXi-6.7.0-8941472-LNV-20180706.zip -vft -load net55-r8168,sata-xahci
PS D:\esxi> d:\esxi\ESXi-Customizer-PS-v2.6.0.ps1 -izip .\pkg\VMware-ESXi-6.7.0-8941472-LNV-20180706.zip -vft -load net55-r8168,sata-xahci
This is ESXi-Customizer-PS Version 2.6.0 (visit https://ESXi-Customizer-PS.v-front.de for more information!)
(Call with -help for instructions)
Logging to C:\Users\lenovo\AppData\Local\Temp\ESXi-Customizer-PS-13488.log ...
Running with PowerShell version 5.1 and VMware PowerCLI version 12.0.0.15939655
Adding base Offline bundle .\pkg\VMware-ESXi-6.7.0-8941472-LNV-20180706.zip ... [OK]
Connecting the V-Front Online depot ... [OK]
Getting Imageprofiles, please wait ... [OK]
Using Imageprofile Lenovo_ESXi6.7-8941472_20180706 ...
(dated 06/25/2018 05:13:07, AcceptanceLevel: PartnerSupported,
For more information, see http://kb.vmware.com/kb/55918.)
Load additional VIBs from Online depots ...
Add VIB net55-r8168 8.045a-napi [New AcceptanceLevel: CommunitySupported] [OK, added]
Add VIB sata-xahci 1.42-1 [OK, added]
Exporting the Imageprofile to 'D:\esxi\Lenovo_ESXi6.7-8941472_20180706-customized.iso'. Please be patient ...
All done.
PS D:\esxi>