故障现象:
如何在ESXi主机上通过命令行禁用或启用native driver。
解决方案:
以更换LSI RAID卡驱动为例,默认的native driver为lsi_mr3,可以将其替换为megaraid-sas。 通过SSH连接主机。 运行命令esxcfg-scsidevs -a命令确认当前主机RAID卡使用的驱动模块为native driver:lsi_mr3 
运行esxcli software vib install -v vib文件路径安装需要替换使用的驱动,如下图。 注意:系统自带的替换驱动版本可能无法匹配设备,因此禁用native driver前,必须先安装版本匹配的替换驱动,否则可能导致主机重启后无法发现RAID卡并且无法恢复。 
将主机进入维护模式并重启后,运行命令esxcli software vib list,确认新安装的驱动已经生效并且版本正确,如下图。 
运行命令esxcli system module set --enabled=false --module=驱动名称,如下图。 
重启主机后,再次使用命令esxcfg-scsidevs -a确认RAID卡已经使用替换的驱动。 
运行命令esxcli system module set --enabled=true --module=驱动名称并重启主机后,系统会自动重新加载native driver。 |