当前位置:网站首页>ESXi封装网卡驱动

ESXi封装网卡驱动

2022-04-23 16:07:00 Rokas.Yang

对于ESXi vmkernel不支持的网卡,需要手动封装网卡驱动到ESXi镜像,再安装ESXi。

1.准备环境

以ESXi7.0U3d为例,封装intel的i219及i225驱动需要两个文件:

image-20220420235640-oxyetxy.png
  • ESXi的Offline Bundle版本,下载链接 (需注册账号并登陆)

2.powershell安装必要组件

准备一台win10以上的系统,管理员身份打开powershell。

键入以下命令安装VMware命令行模块:

Install-Module -Name VMware.PowerCLI

预期之内会提示信任库之类的问题,键入Y即可。

注意:!!!不要中断,这一步非常慢,10-20分钟不等,代理或科学上网可稍微提升下速度。

键入一下命令信任模块:

set-ExecutionPolicy RemoteSigned

同理,输入Y即可。

3.开始封装驱动

将第一步下载好的ESXi镜像和网卡驱动放到同一个文件夹。

打开powershell,以此键入以下命令(路径和文件名需替换下):

$esxiOfflineBundle = "C:\esxi\VMware-ESXi-7.0U3d-19482537-depot.zip"  #指定Office Bundle版本的Esxi路径
$intelNicOfflineBundle = "C:\esxi\Net-Community-Driver_1.2.7.0-1vmw.700.1.0.15843807_19480755.zip" #指定网卡驱动路径
$esxiImageProfileName = "ESXi-7.0U3d-19482537-standard"
$newImageProfileName = "ESXi-7.0U3d-19482537-Intel-i225"  #配置文件名随意,最好和最后一部输出的ISO文件名保持一致
Add-EsxSoftwareDepot $esxiOfflineBundle
Add-EsxSoftwareDepot $intelNicOfflineBundle
New-EsxImageProfile -CloneProfile $esxiImageProfileName -Name $newImageProfileName -Vendor ashin
Add-EsxSoftwarePackage -ImageProfile $newImageProfileName -SoftwarePackage "net-community"
Export-EsxImageProfile -ImageProfile $newImageProfileName -ExportToIso -FilePath "C:\esxi\ESXi-7.0U3d-19482537-Intel-i225.ISO" #输入文件的路径即名称

确保以上每个命令都不会报错,黄色字体的警告可忽略,红色字体则表示报错,有报错则解决报错。

成功之后,对应文件夹会生成封装好的ESXi iso镜像:

同时,自测powershell6.x以上版本,会报各种各样的错误,致命错误为VMware.ImageBuilder module不支持当前powershell版本,可更换成5.x版本使用,powershell历史版本下载,到此下载

版权声明
本文为[Rokas.Yang]所创,转载请带上原文链接,感谢
https://cloud.tencent.com/developer/article/1986122