According to VMware KB 84339, if the iSCSI adapter IQN is not the user setting then it is auto-generated by ESXi, and the IQN may change post upgrade. If access control is configured on the target side, based on the IQN, then the ESXi host may not be able to discover the LUN or datastore.
Today we will simulate this upgrade issue, we upgrade vSphere 7.0 U1c to 7.0U2a (build-17867351). This ESXi host is connected to an iSCSI datastore.
Demo Environment
- vSphere 7.0 U1c build-17325551
- iSCSI Software Adapter enabled
- iSCSI Adapter IQN: iqn.1998-01.com.vmware:61dd29c9-bfb7-5707-6f97-000c29f2fde1-68ae16f6
- Open Platform Software Defined Storage
Now we will upgrade vSphere 7.0 U1c to 7.0U2a. We can see the iSCSI adapter IQN is changed to "iqn.1998-01.com.vmware:localhost.localdomain:1988924762:65" after upgrading to vSphere 7.0 U2a. If the iSCSI LUN access control is configured on the target side based on the generated IQN, the ESXi host may not be able to discover the LUN or datastore.
To prevent this issue. Before upgrading to vSphere 7.0 U2, we need to use the esxcli get and set commands to set the generated iSCSI adapter IQN.
esxcli iscsi adapter get -A vmhba65
esxcli iscsi adapter set -A vmhba65 -n iqn.1998-01.com.vmware:61dd29c9-bfb7-5707-6f97-000c29f2fde1-68ae16f6
Now the iSCSI adapter IQN is a user setting, it won't change after the upgrade.
We can see the iSCSI adapter IQN won't change after the upgrade.
For details, please refer to this VMware KB https://kb.vmware.com/s/article/84339