1 - 介绍

ESXi介绍,以及ESXi的资料收集

1.1 - ESXi介绍

ESXi是什么?ESXi可以用来做什么?

1.2 - ESXi资料收集

收集ESXi的各种资料

官方资料

社区资料

学习资料

2 - ESXi安装

介绍ESXi的安装,使用,配置

2.1 - 安装esxi7.0.2

在物理机器上安装最新7.0.2版本的esxi

准备工作

硬件准备

准备了一台性能还可以的物理机器:

  • cpu:intel 7960x
  • 主板:华硕 x299 ws pro/se
  • 内存:32g * 4 @ddr4 3600
  • 显卡:amd r5 240 亮机卡
  • 硬盘:
    • 一块256g sata ssd安装windows10以备不时之需
    • 一块3.94t的服务器u2接口的nvme ssd用来给esxi使用
  • 网卡
    • 主板自带两个intel i210 千兆网卡,连接在千兆交换机上,可以访问外网
    • 一块 aqn-108 五千兆网卡,用网线和另外一台开发主机(同样也有一个五千兆网卡)直连,不走交换机
    • (计划)HP 544+ 40G网卡一对,分别插在 esxi 主机和开发主机上,也是直连

软件准备

从vmware官方下载页面下载 esxi 的最新版本 7.0.2:

Download VMware vSphere - VMware Customer Connect

备注

  1. 默认下载速度超级的慢,几K几K的速度,剩余2-3天,无法忍受。

  2. 由于vmware网站没有被墙,所以一般不会自动开启代理,因此需要在科学上网软件中设置全局代理或者手动将vmware.com网站设置为启用代理,之后便可以用几M的速度下载。

  3. 在 clash 中可以在控制面板临时将规则 “漏网之鱼” 从默认的 DIRECT 设置为 总模式,先临时启用,待下载完成之后再恢复为 DIRECT。

也可以在一些整理好的网站上下载:

然后刻录启动U盘。

安装

从u盘启动,然后按照提示一路安装,没有什么特别。

默认虚拟闪存的调整

在全新安装ESXI 7后,系统默认将会在数据存储中划分120G空间作为虚拟闪存。我目前硬盘足够大所以不介意这点占用。如果敏感则可以在安装过程中进行调整。

参考:虚拟闪存的作用

利用虚拟闪存可以通过使用本地 SSD 磁盘(为 ESXi 主机上运行的所选虚拟机提供闪存缓存)提高虚拟机性能。Virtual Flash Read Cache 可以为对延迟极度敏感的应用程序提供低延迟,从而使之前认为 I/O 过于密集因而似乎不可能实现虚拟化的一些计算机系统/应用程序实现虚拟化。

参考:

2.2 - 配置esxi

对安装好的esxi进行基本配置

2.2.1 - 配置esxi控制台

配置esxi的页面控制台

在主机界面上进行配置

设置控制台的IP地址

主板自带两块intel千兆网卡,mac地址分别是:

  • 04:d4:c4:5a:e2:77
  • 04:d4:c4:5a:e2:78

在路由器的dhcp中手工指定这两个网卡的IP地址,分别为 192.168.0.40 和 192.168.0.41

在 esxi 主机的界面上(不是web页面)上,按 F2 Customize System/View Logs,输入root密码。

选择 “Configuration Management Network” -> “Network Adapter”,选择mac地址为 “04:d4:c4:5a:e2:77” 的网卡。如果默认选择的是另外一块网卡,注意取消勾选。

“Restart management network” 之后,就可以使用 192.168.0.40 这个IP地址访问 exsi 控制台了。

设置esxi主机的hostname

同样在 “Configuration Management Network” 选择 “DNS Configuration”,设置:

  • Primary DNS Server: 192.168.0.1
  • Hostname: skyserver

再次 “Restart management network” 即可生效。

使用控制台进行配置

用上面的IP地址 192.168.0.40,登录控制台页面。

开启ssh

登录 esxi web管理界面,进入 “管理” –> “服务”,在列表中找到 TSM-SSH,右键点启动。

也可以在策略中选择"随主机启动和停止"。

设置swap

登录 esxi web管理界面,进入 “管理” –> “系统” –> “交换”,点击"编辑设置"。

数据存储下拉框中选择需要使用的 datastore:

设置好之后需要重启 esxi 主机。

新增数据存储

为了方便备份数据,增加了一块闲置的3T容量的普通机械硬盘。

进入 “存储” -> “设备”,可以看到当前的存储设备:

config-swap

点击这块硬盘,选择"操作" -> “清除分区表”。

再点击"新增数据存储",选择这块硬盘(注意如果没有删除分区表,会显示没有空闲的设备可以添加)。

2.3 - 通过补丁方式升级esxi

通过打补丁的方式升级esxi的版本

2.3.1 - 升级到esxi 7.0.2

通过打补丁的方式升级esxi的版本到7.0.2

给 exsi 打补丁以升级版本。

在线升级

在 google 中搜索 exsi patch,找到 VMware ESXi 7.0 Patch History (v-front.de) 的网站,选择最新的patch:

点击之后会弹出一个窗口,提示更新补丁的命令如下:

需要用到的命令有三个:

esxcli network firewall ruleset set -e true -r httpClient
esxcli software profile update -p ESXi-7.0U2a-17867351-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
esxcli network firewall ruleset set -e false -r httpClient

报错

如果遇到报错 MemoryError ,则应该是esxi “设置swap” 的步骤没有做或者没有重启:

 [MemoryError]
 Please refer to the log file for more details.

如果报错 “Got no data from process”:

Got no data from process: LANG=en_US.UTF-8 /usr/lib/vmware/esxcli-software profile.update  -d "https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml" -p "ESXi-7.0U2a-17867351-standard"  

没有找到解决的办法,一般建议离线升级。

离线升级

下载升级文件

下载离线升级文件:

Product Patches - VMware Customer Connect

选择 esxi 7.0 版本(注意不是7.0.0或者7.0.1),找到 VMware-ESXi-7.0U2a-17867351-depot ,开始下载。

备注

  1. 默认下载速度超级的慢,最好能科学上网或者找到他人整理好的补丁包。

上传离线文件到exsi主机

将文件上传到 exsi 主机的存储上,在控制台进入 “存储” –> “datastore1” ,注意这里的UUID,后面会用到:

点 “数据存储浏览器” 就能看到当前已有的文件。点击 “上载” 选择 VMware-ESXi-7.0U2a-17867351-depot.zip 文件。

离线升级

ssh登录 esxi 主机,运行 vmware -l 命令看一下当前 exsi 的版本,如我当前是 7.0 GA 版本

VMware ESXi 7.0 GA

先让 esxi 主机进入维护模式,也可以在控制台页面操作:

esxcli system maintenanceMode set -e true
Maintenance mode is already enabled.

之后执行更新命令:

esxcli software profile update -p ESXi-7.0U2a-17867351-standard -d /vmfs/volumes/61090e61-7519507d-1c82-04d4c45ae278/VMware-ESXi-7.0U2a-17867351-depot.zip

注意:这里的路径 /vmfs/volumes/61090e61-7519507d-1c82-04d4c45ae278/ 中的 61090e61-7519507d-1c82-04d4c45ae278 就是前面看到的 datastore 的 UUID。

等待大概20秒就可以看到更新成功的提示信息:

Update Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMW_bootbank_atlantic_1.0.3.0-8vmw.702.0.0.17867351, VMW_bootbank_bnxtnet_216.0.50.0-34vmw.702.0.0.17867351, VMW_bootbank_bnxtroce_216.0.58.0-19vmw.702.0.0.17867351, VMW_bootbank_brcmfcoe_12.0.1500.1-2vmw.702.0.0.17867351, 
   ............
   VIBs Skipped: 

完成之后执行命令重启 exsi 主机:

boot

验证升级结果

exsi 启动时,界面上显示为 “vmware exsi 7.0.2 (vmkernel release build 17867351)” ,这说明已经更新成功。

登录控制台,在 “主机” 页面上 可以看到当前版本:

由于升级之前将主机设置为维护模式了,所以现在还要再修改为正常模式。可以通过控制台执行,点击 “操作” –> “推出维护模式”,或者ssh之后执行命令

esxcli system maintenanceMode set -e false

参考文章:

2.4 - 验证安装和配置

验证esxi的安装和配置

2.4.1 - 在esxi上运行iperf3

使用iperf3验证网卡的速度

准备软件

在esxi6.7上准备iperf

ssh 登录 esxi 6.7, 然后执行以下命令:

mkdir /temp
cd /temp
wget http://vibsdepot.v-front.de/depot/bundles/iperf-2.0.5-1-offline_bundle.zip 
esxcli software vib install -d /temp/iperf-2.0.5-1-offline_bundle.zip  --no-sig-check

结果输出为:

Installation Result
   Message: Operation finished successfully.
   Reboot Required: false
   VIBs Installed: DAST_bootbank_iperf_2.0.5-1
   VIBs Removed: 
   VIBs Skipped: 

清理并进入目录:

rm -rf /temp
cd /opt/iperf/bin
cp iperf iperf.copy

准备网络

查看目前 esxi 的网络情况:

esxcli network ip interface ipv4 get

如果只有一个网卡(兼管理网络),输出类似:

Name  IPv4 Address  IPv4 Netmask   IPv4 Broadcast  Address Type  Gateway      DHCP DNS
----  ------------  -------------  --------------  ------------  -----------  --------
vmk0  192.168.0.58  255.255.255.0  192.168.0.255   STATIC        192.168.0.1     false

另外测试之前关闭esxi的防火墙:

esxcli network firewall set --enabled false

为了测试 hp544+ 网卡(连接为56G)在 esxi 下的性能,需要在 esxi 中取消直通,然后设置相关的网络

  • virtual switches 中添加 virtual switch, 如 “vSwitch-56G”, uplink 选择 hp544+ 网卡
  • port group 中添加新的 port group,如 “56G Network”,virtual switch 选择 “vSwitch-56G”
  • vmkernel NICs 中添加新的 VMkernel NIC,port group, 选择 “56G Network”

再次查看网络:

esxcli network ip interface ipv4 get

可以看到新加的 56g 网络的 IP 地址:

Name  IPv4 Address    IPv4 Netmask   IPv4 Broadcast   Address Type  Gateway      DHCP DNS
----  --------------  -------------  ---------------  ------------  -----------  --------
vmk0  192.168.0.28    255.255.255.0  192.168.0.255    STATIC        192.168.0.1     false
vmk1  192.168.100.28  255.255.255.0  192.168.100.255  STATIC        0.0.0.0         false

测试

作为服务器端启动:

/opt/iperf/bin/iperf.copy -s -B 192.168.100.28

作为客户端

作为客户端执行:

/opt/iperf/bin/iperf.copy -c 192.168.100.1 -t 10 -P 10

-t 表示测试的总时间长度,-P 启动多线程进行并发测试,一般 8-10 比较合适。

或者增加参数, -i 表示每隔多长时间打印一次测试结果,避免长时间等待(默认需要等测试时间 -t 结束才显示结果), -f g 表示用 Gbits 来显示带宽:

/opt/iperf/bin/iperf.copy -c 192.168.100.1 -t 10 -i 2 -f g -P 10

测试结果

场景1

  • 服务器端是直通 + ubuntu server:之前测试 56g eth 模式下测速打开 48G

  • 客户端为 esxi 6.7, 自带驱动,不直通,不开启

  • 测试带宽为: 32G左右

  • cpu使用率有点高,大概20%-30%

结果:和正常的48G相比,只有 2/3 的性能,估计是 rdma 没有开启的原因。

esxcli software vib list | grep mlx
net-mlx4-core                  1.9.7.0-1vmw.670.0.0.8169922          VMW      VMwareCertified     2023-03-19
net-mlx4-en                    1.9.7.0-1vmw.670.0.0.8169922          VMW      VMwareCertified     2023-03-19
nmlx4-core                     3.17.13.1-1vmw.670.2.48.13006603      VMW      VMwareCertified     2023-03-19
nmlx4-en                       3.17.13.1-1vmw.670.2.48.13006603      VMW      VMwareCertified     2023-03-19
nmlx4-rdma                     3.17.13.1-1vmw.670.2.48.13006603      VMW      VMwareCertified     2023-03-19
nmlx5-core                     4.17.13.1-1vmw.670.3.73.14320388      VMW      VMwareCertified     2023-03-19
nmlx5-rdma                     4.17.13.1-1vmw.670.2.48.13006603      VMW      VMwareCertified     2023-03-19

参考

2.4.2 - 在esxi上运行iperf3

使用iperf3验证网卡的速度

准备软件

在esxi7上准备iperf3

esxi 7 自带 iperf3,位于 /usr/lib/vmware/vsan/bin/iperf3,使用时注意先执行以下命令:

cp /usr/lib/vmware/vsan/bin/iperf3 /usr/lib/vmware/vsan/bin/iperf3.copy

复制一份作为服务器端使用,否则直接通过 iperf3 运行服务器端,会报错:

/usr/lib/vmware/vsan/bin/iperf3 -s -B 192.168.0.40
iperf3: error - unable to start listener for connections: Operation not permitted
iperf3: exiting

关于这一点请参考:

另外测试之前关闭esxi的防火墙:

esxcli network firewall set --enabled false

在windows10上准备iperf3

从 iperf 官方网站上下载 iperf3:

iPerf - Download iPerf3 and original iPerf pre-compiled binaries

准备网络

网络连接概述

两台机器之间一共有三组网络连接:

  1. 千兆网络:esxi主机和开发机器之间通过千兆交换机连接,都是千兆有线网卡, ip地址设置为 192.168.0.10 和 192.168.0.40
  2. 五千兆高速网络:esxi主机上插一块 aqn-108 五千兆网卡(支持windows、linux和exsi),开发机器主板自带一块 aqn-111c 五千兆网卡(支持windows、linux,不支持黑苹果),通过网线直连,ip地址设置为 10.0.0.10 和 10.0.0.40
  3. 40G超高速网络:esxi主机上插一块 hp 544+ 40G网卡(支持windows、linux,exsi不确定),开发机器同样插一块 hp 544+ 40G网卡(支持windows、linux,黑苹果不确定),通过40G QSFP网线直连,ip地址设置为 192.168.1.10 和 192.168.1.40

esxi网络设置

5G网络设置

首先确保5G物理网卡已经识别,链路速度为5000Mbps,全双工。

开始创建5g网络的虚拟交换机,上行链路选择上面的5g网卡:

再添加5g的端口组,虚拟交换机选择前面创建的5g交换机:

最后在vmkernel网卡中添加一个vmkernel网卡:

ip地址的设置为:

windows网络设置

5G网络设置

5g网卡的适配器设置如下:

测试

esxi7作为服务器端

测试千兆网络

服务器端 esxi ip地址为 192.168.0.40:

 /usr/lib/vmware/vsan/bin/iperf3.copy -s -B 192.168.0.40
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

客户端为windows10,启动iperf3.exe,走千兆网络,带宽接近千兆的:

iperf3.exe -n 1000M -c 192.168.0.40
Connecting to host 192.168.0.40, port 5201
[  4] local 192.168.0.10 port 65066 connected to 192.168.0.40 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   110 MBytes   923 Mbits/sec
[  4]   1.00-2.00   sec   110 MBytes   921 Mbits/sec
[  4]   2.00-3.00   sec   109 MBytes   917 Mbits/sec
[  4]   3.00-4.00   sec   110 MBytes   918 Mbits/sec
[  4]   4.00-5.00   sec   109 MBytes   918 Mbits/sec
[  4]   5.00-6.00   sec   110 MBytes   919 Mbits/sec
[  4]   6.00-7.00   sec   108 MBytes   902 Mbits/sec
[  4]   7.00-8.00   sec   109 MBytes   918 Mbits/sec
[  4]   8.00-9.00   sec   110 MBytes   918 Mbits/sec
[  4]   9.00-9.15   sec  16.0 MBytes   910 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-9.15   sec  1000 MBytes   917 Mbits/sec                  sender
[  4]   0.00-9.15   sec  1000 MBytes   917 Mbits/sec                  receiver

iperf Done.

测试五千兆网络

服务器端 esxi ip地址为 10.0.0.40:

 /usr/lib/vmware/vsan/bin/iperf3.copy -s -B 10.0.0.40
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

客户端为windows10,启动iperf3.exe,走五千兆直连网络,单线程带宽只有2g多一点:

iperf3.exe -n 5000M -c 10.0.0.40
Connecting to host 10.0.0.40, port 5201
[  4] local 10.0.0.10 port 63397 connected to 10.0.0.40 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   244 MBytes  2.05 Gbits/sec
[  4]   1.00-2.00   sec   251 MBytes  2.11 Gbits/sec
[  4]   2.00-3.00   sec   254 MBytes  2.13 Gbits/sec
[  4]   3.00-4.00   sec   251 MBytes  2.11 Gbits/sec
[  4]   4.00-5.00   sec   263 MBytes  2.20 Gbits/sec
[  4]   5.00-6.00   sec   257 MBytes  2.15 Gbits/sec
[  4]   6.00-7.00   sec   259 MBytes  2.17 Gbits/sec
[  4]   7.00-8.00   sec   263 MBytes  2.20 Gbits/sec
[  4]   8.00-9.00   sec   273 MBytes  2.29 Gbits/sec
[  4]   9.00-10.00  sec   265 MBytes  2.23 Gbits/sec
[  4]  10.00-11.00  sec   266 MBytes  2.23 Gbits/sec
[  4]  11.00-12.01  sec   252 MBytes  2.10 Gbits/sec
[  4]  12.01-13.00  sec   262 MBytes  2.22 Gbits/sec
[  4]  13.00-14.00  sec   273 MBytes  2.29 Gbits/sec
[  4]  14.00-15.00  sec   264 MBytes  2.21 Gbits/sec
[  4]  15.00-16.00  sec   268 MBytes  2.25 Gbits/sec
[  4]  16.00-17.00  sec   262 MBytes  2.20 Gbits/sec
[  4]  17.00-18.00  sec   261 MBytes  2.19 Gbits/sec
[  4]  18.00-19.00  sec   260 MBytes  2.18 Gbits/sec
[  4]  19.00-19.19  sec  52.1 MBytes  2.27 Gbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-19.19  sec  4.88 GBytes  2.19 Gbits/sec                  sender
[  4]   0.00-19.19  sec  4.88 GBytes  2.19 Gbits/sec                  receiver

iperf Done.

通过 -P 参数指定多线程,可以使用更大的带宽,实测下来:

  • 单线程带宽2.2g
  • 两个线程带宽3.5g
  • 三个线程带宽3.3g
  • 四个线程带宽4.7g
  • 再往上加线程带宽还是4.7g
iperf3.exe -c 10.0.0.40 -t 20 -P 5
Connecting to host 10.0.0.40, port 5201
[  4] local 10.0.0.10 port 54228 connected to 10.0.0.40 port 5201
[  6] local 10.0.0.10 port 54230 connected to 10.0.0.40 port 5201
[  8] local 10.0.0.10 port 54231 connected to 10.0.0.40 port 5201
[ 10] local 10.0.0.10 port 54232 connected to 10.0.0.40 port 5201
[ 12] local 10.0.0.10 port 54233 connected to 10.0.0.40 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   106 MBytes   891 Mbits/sec
[  6]   0.00-1.00   sec   106 MBytes   890 Mbits/sec
[  8]   0.00-1.00   sec   106 MBytes   886 Mbits/sec
[ 10]   0.00-1.00   sec   125 MBytes  1.05 Gbits/sec
[ 12]   0.00-1.00   sec   123 MBytes  1.03 Gbits/sec
[SUM]   0.00-1.00   sec   567 MBytes  4.75 Gbits/sec
......
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-8.58   sec   921 MBytes   900 Mbits/sec                  sender
[  4]   0.00-8.58   sec  0.00 Bytes  0.00 bits/sec                  receiver
[  6]   0.00-8.58   sec   918 MBytes   897 Mbits/sec                  sender
[  6]   0.00-8.58   sec  0.00 Bytes  0.00 bits/sec                  receiver
[  8]   0.00-8.58   sec   912 MBytes   891 Mbits/sec                  sender
[  8]   0.00-8.58   sec  0.00 Bytes  0.00 bits/sec                  receiver
[ 10]   0.00-8.58   sec  1.04 GBytes  1.04 Gbits/sec                  sender
[ 10]   0.00-8.58   sec  0.00 Bytes  0.00 bits/sec                  receiver
[ 12]   0.00-8.58   sec  1023 MBytes   999 Mbits/sec                  sender
[ 12]   0.00-8.58   sec  0.00 Bytes  0.00 bits/sec                  receiver
[SUM]   0.00-8.58   sec  4.73 GBytes  4.73 Gbits/sec                  sender
[SUM]   0.00-8.58   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated

参考:

3 - ESXi驱动

介绍ESXi的驱动安装和更新

3.1 - aqn-108网卡

aqn-108网卡在esxi中的使用

3.1.1 - aqn-108网卡在esxi中遇到的问题

明明是最新版本的esxi,驱动也自带了,为什么还是不能识别aqn-108网卡?

给 esxi 主机上加了一个新的 AQuantia aqn-108 5g(5千兆)有线网卡,这个机器的主板原来自带有两个 intel i210 千兆网卡。新加的准备 aqn-108 网卡是准备和另外一台机器做双机直连用。

准备工作

找了一下 AQuantia 网卡的支持,看到最新的消息是从 esxi 7.0.2 (update 2)版本之后就原生自带驱动了。

https://williamlam.com/2021/03/a … i-7-0-update-2.html

在兼容性列表中我找到了对这个网卡的支持,按照设备ID不同列出了5个,其中第一个设备ID为 d108 就是我目前正在用的设备:

设备ID “d108” 的详细信息:

问题描述

Aqn-108 网卡在esxi 7.0 u2 中无法工作。

esxi 已经升级到 7.0 U2:

vmware -l
VMware ESXi 7.0 Update 2

软件列表中存在要求的 atlantic ,版本 1.0.3.0-8vmw 也和支持列表中要求的版本一致:

esxcli software vib list
Name                           Version                              Vendor  Acceptance Level  Install Date
-----------------------------  -----------------------------------  ------  ----------------  ------------
atlantic                       1.0.3.0-8vmw.702.0.0.17867351        VMW     VMwareCertified   2021-08-23

lspci 命令能列出来三张网卡,其中 vmnic2 供应商和设备ID 1d6a:d108 和这块网卡的信息是一致的,说明网卡识别到了:

 lspci -v | grep vmnic
 
0000:04:00.0 Network controller Ethernet controller: Intel Corporation I210 Gigabit Network Connection [vmnic0]
0000:05:00.0 Network controller Ethernet controller: Intel Corporation I210 Gigabit Network Connection [vmnic1]
0000:06:00.0 Network controller Ethernet controller: Marvell AQtion 5Gbit Network Adapter [vmnic2]

下面的命令也能找到 aqn-108 网卡:

vmkvsitools lspci -p | grep vmnic

Segm:Bu:De.F Vend:Dvid Subv:Subd ISA/irq/Vect P M Module       Name    
0000:04:00.0 8086:1533 1043:8557 255/   /     A V igbn         vmnic0
0000:05:00.0 8086:1533 1043:8557 255/   /     A V igbn         vmnic1
0000:06:00.0 1d6a:d108 1d6a:0001 255/   /     A V              vmnic2

pci 设备中是可以看到这个 aqn-108 网卡的,供应商ID和设备ID都吻合:

但在物理网卡列表中却没有这个网卡:

用命令查出来 network nic也是如此:

esxcli network nic list
Name    PCI Device    Driver  Admin Status  Link Status  Speed  Duplex  MAC Address         MTU  Description
------  ------------  ------  ------------  -----------  -----  ------  -----------------  ----  -----------
vmnic0  0000:04:00.0  igbn    Up            Up            1000  Full    04:d4:c4:5a:e2:78  1500  Intel Corporation I210 Gigabit Network Connection
vmnic1  0000:05:00.0  igbn    Up            Up            1000  Full    04:d4:c4:5a:e2:77  1500  Intel Corporation I210 Gigabit Network Connection

尝试解决问题

升级到7.0.2

原来的版本是7.0.0,升级到7.0.2。结果遇到上面的问题无法识别。

手工安装驱动

参考这里的描述

手工安装 atlantic 驱动,期待原生的驱动(原生驱动反而版本更新):

esxcli software vib install -d /vmfs/volumes/61090e61-7519507d-1c82-04d4c45ae278/MRVL-Atlantic-Driver-Bundle_1.0.2.0-1OEM.670.0.0.8169922-offline-bundle-16081713.zip

Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: MRVL_bootbank_atlantic_1.0.2.0-1OEM.670.0.0.8169922
   VIBs Removed: VMW_bootbank_atlantic_1.0.3.0-8vmw.702.0.0.17867351
   VIBs Skipped: 

问题依旧,能看到硬件,但就是无法出现在物理网卡列表中。

重新安装esxi

重新安装esxi,选择最新的 7.0.2,安装完成之后发现问题还是存在,排除升级出问题的可能。

3.1.2 - 更新aqn-108网卡的固件

更新aqn-108网卡的固件以便支持esxi,固件太低会无法驱动

发现原因

在日志文件 /var/log/vmkernel.log 中发现一行记录:

2021-08-23T17:27:36.834Z cpu24:2097768)atlantic: Claiming PCI device [0x1d6a:0xd108 0x0001:0x1d6a]                              
2021-08-23T17:27:36.834Z cpu24:2097768)VMK_PCI: 773: device 0000:06:00.0 pciBar 0 bus_addr 0x92840000 size 0x10000                    
2021-08-23T17:27:37.149Z cpu24:2097768)ALERT: atlantic: 0000:06:00.0 Fw version 105003a is not supported  

这应该是表示网卡的固件版本(太低)而不被 atlantic 驱动支持。

刷新固件

打开 Marvell 的官方网站,进入驱动下载页面:

Support | Driver Downloads | - Marvell

“Part Number” 选择 “AQN-108”,在显示出来的驱动内容中找到 “firmware updater utility”,下载下来 MarvellFlashUpdate_v1.8.0_3.1.121.zip

参照 readme.txt 中的详细说明,在 windows 下刷新 aqn-108 的固件为最新版本。

备注:在这里也可以下载到这个网卡最新的windows和linux驱动。

重新启动

重启 esxi,就能正确的识别并驱动 aqn-108 网卡了。

2021-08-23T23:15:51.798Z cpu14:2097707)atlantic: 0000:06:00.0 DefQRss: 0x1, NetQueue: 0x1                                 
2021-08-23T23:15:51.798Z cpu14:2097707)atlantic: 0000:06:00.0 rss queues: 8                                               
2021-08-23T23:15:51.798Z cpu14:2097707)atlantic: 0000:06:00.0 net queues: 2                                               
2021-08-23T23:15:51.798Z cpu14:2097707)VMK_PCI: 622: device 0000:06:00.0 allocated 11 MSIX interrupts             
2021-08-23T23:15:51.798Z cpu14:2097707)DMA: 687: DMA Engine 'atlantic' created using mapper 'DMANull'.
2021-08-23T23:15:51.798Z cpu14:2097707)Device: 400: Found driver atlantic for device 0x62cf43070480587c

2021-08-23T23:15:51.259Z cpu14:2097707)Elf: 2060: module atlantic has license ThirdParty                                  
2021-08-23T23:15:51.259Z cpu9:2097703)CpuSched: 817: user latency of 2097710 tq:vmknvmeTimerQueue 0 changed by 2097703 vmk
2021-08-23T23:15:51.259Z cpu9:2097703)NVMEMOD:1044 Module vmknvme initialized successfully.                               
2021-08-23T23:15:51.259Z cpu9:2097703)NVMEMOD:1052 NVMF initialized successfully.                                         
2021-08-23T23:15:51.259Z cpu9:2097703)Device: 211: Registered driver 'nvmeBusDriver' from 44                              
2021-08-23T23:15:51.259Z cpu9:2097703)NVMEMOD:1060 Driver vmknvme registered successfully.                                
2021-08-23T23:15:51.259Z cpu9:2097703)Mod: 4789: Initialization of vmknvme succeeded with module ID 44.                   
2021-08-23T23:15:51.259Z cpu9:2097703)vmknvme loaded successfully.                                                        
2021-08-23T23:15:51.260Z cpu9:2097703)Loading module nvme_pcie ...                                                        
2021-08-23T23:15:51.265Z cpu1:2097704)Elf: 2060: module vmkbsd has license VMware                                         
2021-08-23T23:15:51.271Z cpu14:2097707)Device: 211: Registered driver 'atlantic' from 45                                  
2021-08-23T23:15:51.271Z cpu14:2097707)Mod: 4789: Initialization of atlantic succeeded with module ID 45.
2021-08-23T23:15:51.271Z cpu14:2097707)atlantic loaded successfully.  

控制台上也可以在 “物理网卡” 中看到这张 aqn-108 网卡:

后记

反省一下,二十年diy生涯,今天第一次刷网卡固件,汗,见识太少一下子没反应过来网卡也有固件。。。

思维定势,我从来没有玩过高级网卡,甚至都不知道还有网卡固件这回事,导致我没有往这里去想。

后面HP 544+ 网卡到货,第一时间开始刷最新固件。

3.2 - HP 544+网卡

HP 544+网卡在esxi中的使用

3.2.1 - 使用HP 544+网卡

在esxi中使用HP 544+网卡

HP 544+网卡是一块性价比非常高的网卡,适合用来体验一下40g/56g超高速网络。

参考资料

3.2.2 - 升级HP 544+网卡的固件

升级HP 544+网卡的固件到最新版本

准备工作

下载固件刷新工具MFT

打开页面

Mellanox Firmware Tools (MFT)

选择 4.17.0 版本,windows操作系统,下载 WinMFT_x64_4_17_0_106.exe 文件。

下载固件

在 hpe.com 网站搜索 764285-b21:

Software Details | HPE Support Center

类型: 固件(Firmware)更新 - 网卡
版本: 2.42.5700-Flex-3.4.754 (13 五月 2020)

刷新固件

参考视频

参考资料

参考网站:

HPE的官方支持网站:

3.2.3 - 安装HP 544+网卡驱动

为HP 544+网卡安装驱动,包括windows/linux/exsi7

进入 Mellanox 官网,打开

NVIDIA Mellanox InfiniBand and VPI Software | NVIDIA##

安装windows驱动

打开windows驱动下载页面:

Mellanox OFED for Windows - WinOF / WinOF-2

选择winOF,windows 10 1909,下载 Mellanox OFED for Windows - WinOF / WinOF-2

安装linux驱动

TODO:

安装esxi驱动

黑苹果驱动

Mellanox ConnectX-3 40 GbE using ATTO FastFrame macOS driver | MacRumors Forums

参考资料

HPE的官方支持网站:

3.3 - Realtek 8111网卡

Realtek 8111网卡在esxi中的使用

安装驱动

下载下来 net55-r8168-8.045a-napi-offline_bundle.zip 文件,解压缩,将 vib 文件通过 esxi 的数据存储浏览器上传到 datastore1 中。

然后在 manage -》 package 页面中点 Install update ,给出路径如:

/datastore1/upload/net55-r8168-8.045a-napi.x86_64.vib

奈何安装失败!