爲VMwareESXi添加驅動

某些的服務器在安裝ESXi時缺驅動程序,如找我在浪潮服務器NF8460M3安裝時找不到硬盤或者網卡,此時需要自行添加驅動程序到ESXi的安裝包中。

準備驅動打包工具

WMware現在使用的驅動打包工具更新爲基於PowerShell的VMware.PowerCLI,老版的使用的是ESXiCustomizer可能在功能,如EFI的支持上游缺陷。以下具體步驟在 https://docs.microsoft.com/en-us/powershell/gallery/installing-psget 有具體說明。

在線安裝

1. 安裝PowerShellGet

自帶此模塊的列表:

  • Windows 10 or newer
  • Windows Server 2016 or newer
  • Windows Management Framework (WMF) 5.0 or newer
  • PowerShell 6

我自己使用的是windows10,因此不需要重新安裝。

2. 獲取最新版本的PowerShell Gallery(PowerShell庫)

> Install-PackageProvider Nuget -Force
> Exit

另外,更新的命令爲

> Update-Module -Name PowerShellGet
> Exit

3. 安裝VMware.PowerCLI

> Install-Module -Name VMware.PowerCLI

在PowerShell提示符查看是否有相應的模塊:

> Find-Module -Name VMware.PowerCLI 

離線安裝

1. 準備VMware.PowerCLI

方法1:下載相應的模塊到C:\PowerCLI 目錄(由用戶指定目錄名稱 )

> Save-Module -Name VMware.PowerCLI -Path C:\PowerCLI 

方法2:直接官網下載,地址https://code.vmware.com/tool/vmware-powercli

2. 拷貝文件到模塊目錄

執行下面的命令查看PowerShell目錄

> $ENV:PSModulePath

把下載好的文件拷貝到上述命令結果的目錄裏去。
重啓,在PowerShell提示符查看是否有相應的模塊:

> Find-Module -Name VMware.PowerCLI 

打包驅動

打包驅動前需要準備好需要的驅動程序和脫機捆綁包VMware vSphere Hypervisor (ESXi) Offline Bundle。以下是我自己準備的驅動程序和ESXi的脫機捆綁包,並按此進行說明。

VMware vSphere Hypervisor (ESXi) Offline Bundle:
update-from-esxi6.7-6.7_update02.zip
驅動程序爲:
VMW-ESX-6.7.0-lsi_mr3-7.705.09.00-offline_bundle-8586101.zip

啓動PowerShell並檢查

管理員啓動“Windows PowerShell ”,執行

> Get-ExecutionPolicy

查看是否是“RemoteSigned”,否執行

> Set-ExecutionPolicy RemoteSigned

添加脫機捆綁包和驅動

使用 Add-ESXSoftwareDepot commandlet 同時添加 ESXi 脫機捆綁包和驅動作爲庫。

> Add-EsxSoftwareDepot D:\VMW-ESX-6.7.0-lsi_mr3-7.705.09.00-offline_bundle-8586101.zip D:\update-from-esxi6.7-6.7_update02.zip

驗證異步驅動程序現在是否可用作軟件包

> Get-EsxSoftwarePackage 

其中“”爲添加的第三方驅動

列出可用的映像配置文件

> Get-EsxImageProfile

添加異步驅動程序到新映像配置文件

> New-EsxImageProfile -CloneProfile ESXi-6.7.0-20181002001-standard -name VMware-VMvisor-Installer-6.7.0.update01-10302608.x86_64-Inspur_Customized-A000 -Vendor Inspur

修改新生成配置文件的權限

Set-EsxImageProfile -Name  VMware-VMvisor-Installer-6.7.0.update01-10302608.x86_64-Inspur_Customized-A000 -AcceptanceLevel CommunitySupported

在ImageProfile提示中輸入:VMware-VMvisor-Installer-6.7.0.update01-10302608.x86_64-Inspur_Customized-A000

將異步驅動程序添加到新映像配置文件

Add-EsxSoftwarePackage -ImageProfile  VMware-VMvisor-Installer-6.7.0.update01-10302608.x86_64-Inspur_Customized-A000 -SoftwarePackage lsi_mr3

將映像配置文件導出爲 ISO文件

Export-EsxImageProfile -ImageProfile VMware-VMvisor-Installer-6.7.0.update01-10302608.x86_64-Inspur_Customized-A000 -ExportToISO -filepath E:\VMware-VMvisor-Installer-6.7.0.update01-10302608.x86_64-Inspur_Customized-A000.iso
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章