使用VMware PowerCLI給ESXi 7.0以上版本官方安裝包添加community板載網(wǎng)卡、usb網(wǎng)卡驅(qū)動
- 安裝VMware PowerCLI
-
- 下載VMware PowerCLI離線安裝包(已經(jīng)包含所需依賴)
- 將zip包解壓到
C:\Program Files\WindowsPowerShell\Modules 文件夾
- 在
C:\Program Files\WindowsPowerShell\Modules 目錄下,shift+右鍵 ,打開powershell
- 在powershell中執(zhí)行下面命令,解除文件限制
Get-ChildItem * -Recurse | Unblock-File
- 右鍵左下角windows微標,以管理員身份運行powershell,在新打開的powershell執(zhí)行命令
Set-ExecutionPolicy RemoteSigned
- 執(zhí)行下面命令查看安裝是否成功,不報錯就是安裝成功了
Import-Module VMware.ImageBuilder
ESXi和PowerCLI都經(jīng)常小版本更新,在制作iso的過程中兩者版本必須對應(yīng),可以到這里找到最新的PowerCLI離線安裝包
- 下載ESXi和Community驅(qū)動
-
- 打包ISO文件
-
- 進入存放下載文件的文件夾,
shift+右鍵 打開powershell
- 執(zhí)行下面命令,注意根據(jù)自己下載的壓縮包的文件名修改下面
Add-EsxSoftwareDepot 命令后面的文件名
Add-EsxSoftwareDepot .\VMware-ESXi-7.0U3c-19193900-depot.zip
Add-EsxSoftwareDepot .\Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip
Add-EsxSoftwareDepot .\ESXi703-VMKUSB-NIC-FLING-51233328-component-18902399.zip
- 運行下面命令,找到目前版本對應(yīng)的profile
- 復(fù)制包含
standard 的profile名稱,如我這里是ESXi-7.0U3c-19193900-standard
- 運行命令創(chuàng)建自定義profile,注意
-CloneProfile "ESXi-7.0U3c-19193900-standard" 需要修改成上面復(fù)制的名稱,-name 后面跟的為創(chuàng)建的新profile的名子
New-EsxImageProfile -CloneProfile "ESXi-7.0U3c-19193900-standard" -name "ESXi-7.0U3c-19193900-bigppwong" -Vendor "bigppwong."
- 添加驅(qū)動包到上面創(chuàng)建的profile
Add-EsxSoftwarePackage -ImageProfile "ESXi-7.0U3c-19193900-bigppwong" -SoftwarePackage "net-community"
- 輸出ISO包
Export-ESXImageProfile -ImageProfile "ESXi-7.0U3c-19193900-bigppwong" -ExportToISO -filepath ESXi-7.0U3c-19193900-bigppwong.iso
如果想刪除profile可以用Remove-EsxImageProfile 命令
|