I'm putting this here so that others don't make the same mistake.
In PVE's GUI, the iSCSI plugin (Datacenter > Storage > Add > iSCSI) doesn't offer a parameter to configure the username/password for Mutual CHAP authentication. I added the credentials to /etc/iscsi/iscsid.conf and tested with iscsiadm only to realise that it doesn't read the config file. I'm not sure if this is by design.
It turned out that the iSCSI plugin in the GUI does read /etc/iscsi/iscsid.conf.
I ran iscsiadm in debug mode on a working iSCSI initiator and found that it had the following debug output. iscsiadm in PVE didn't have it despite the config file being filled.
In PVE's GUI, the iSCSI plugin (Datacenter > Storage > Add > iSCSI) doesn't offer a parameter to configure the username/password for Mutual CHAP authentication. I added the credentials to /etc/iscsi/iscsid.conf and tested with iscsiadm only to realise that it doesn't read the config file. I'm not sure if this is by design.
It turned out that the iSCSI plugin in the GUI does read /etc/iscsi/iscsid.conf.
I ran iscsiadm in debug mode on a working iSCSI initiator and found that it had the following debug output. iscsiadm in PVE didn't have it despite the config file being filled.
Code:
# iscsiadm -d 9 -m node -l all
...
iscsiadm: updated 'node.session.auth.username', '' => 'USERNAME'
iscsiadm: updated 'node.session.auth.password', '' => 'PASSWORD'
iscsiadm: updated 'node.session.auth.username_in', '' => 'USERNAME'
iscsiadm: updated 'node.session.auth.password_in', '' => 'PASSWORD'