使用VMware PowerCLI给ESXi 7.0以上版本官方安装包添加community板载网卡、usb网卡驱动
- 安装VMware PowerCLI
-
- 下载VMware PowerCLI离线安装包(已经包含所需依赖)
- 将zip包解压到
C:\Program Files\WindowsPowerShell\Modules 文件夹
- 在
C:\Program Files\WindowsPowerShell\Modules 目录下,shift+右键 ,打开powershell
- 在powershell中执行下面命令,解除文件限制
Get-ChildItem * -Recurse | Unblock-File
- 右键左下角windows微标,以管理员身份运行powershell,在新打开的powershell执行命令
Set-ExecutionPolicy RemoteSigned
- 执行下面命令查看安装是否成功,不报错就是安装成功了
Import-Module VMware.ImageBuilder
ESXi和PowerCLI都经常小版本更新,在制作iso的过程中两者版本必须对应,可以到这里找到最新的PowerCLI离线安装包
- 下载ESXi和Community驱动
-
- 打包ISO文件
-
- 进入存放下载文件的文件夹,
shift+右键 打开powershell
- 执行下面命令,注意根据自己下载的压缩包的文件名修改下面
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
- 运行下面命令,找到目前版本对应的profile
- 复制包含
standard 的profile名称,如我这里是ESXi-7.0U3c-19193900-standard
- 运行命令创建自定义profile,注意
-CloneProfile "ESXi-7.0U3c-19193900-standard" 需要修改成上面复制的名称,-name 后面跟的为创建的新profile的名子
New-EsxImageProfile -CloneProfile "ESXi-7.0U3c-19193900-standard" -name "ESXi-7.0U3c-19193900-bigppwong" -Vendor "bigppwong."
- 添加驱动包到上面创建的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 命令
|