VMware Cloud Community
adamhodgkins
Contributor
Contributor
Jump to solution

iSCSI nightmare!!!!

Hi,

We have an ESX4.0 environment and I am trying to connect an iSCSI target to it using the iSCSI Software Adapter.

I had previously connected an iSCSI target to this system as a proof of concept and now it is going into production.  I removed the switch, turned off iSCSI and rebooted the host, and this is now not showing the old iSCSI name which is fine.

I am now trying to add the storage that will be used in production and I'm having problems.  I've re-created the switch, gone to the properties of the iSCSI to enable it.  I tried to give it a new name called brian but when I click ok on the box I get the following error message:

Object reference not set to an instance of an object

When I leave the name blank with the iSCSI adapter enabled all buttons apart from the 'Configure' button are greyed out.  I have tried removing the switch and re-creating it with a different IP address but still the same thing happens.....?

I've tried doing a Refresh and Rescan of the storage adapters but I can't seem to get this working.

Any help would be greatly appreciated!!!

Thank you

Adam

Reply
0 Kudos
1 Solution

Accepted Solutions
opbz
Hot Shot
Hot Shot
Jump to solution

ISCSI config can be very messy but overall not too hard.

some things unfortunatelly have to be done from command line, like setting MTU to 9000 and binding your vmknics to your swiscsi

Here is a document on how to do it for Equallogics. main bit of it is that it shows the commnds you need. Obviously for other types of SANs you might need different subnetting but overall the general gist of this is valid.

by the way if you are using equallogics you might be able to use their automated confgiration script...called MEM

anyways good luck

View solution in original post

Reply
0 Kudos
14 Replies
AndreTheGiant
Immortal
Immortal
Jump to solution

Try disable iSCSI, reboot the host, and then re-enable the iSCSI (and keep the default name, or use a IQN format).

Then remember to enable the new IQN on the storage side.

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
adamhodgkins
Contributor
Contributor
Jump to solution

Hi,

I have already tried disabling iSCSI, reboot then re-enable.  It is showing up as enabled but there is no information there and everything is greyed out.  I've attached screen shots.

Thanks

Adam

Reply
0 Kudos
adamhodgkins
Contributor
Contributor
Jump to solution

.

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal
Jump to solution

The ICQ name must be set.

Try to put a name, using ICQ standard: http://en.wikipedia.org/wiki/ISCSI

Also check that vmkping can ping the target IP.

Otherwise you can try to configure the iSCSI from the CLI:

http://blog.scottlowe.org/2007/06/29/esx-iscsi-basic-configuration-from-the-cli/

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos
adamhodgkins
Contributor
Contributor
Jump to solution

Hi,

I've tried using the following name but this didn't work:

iqn.1998-01.com.vmware:brian

I can't ping the iSCSI target IP but should that stop me being able to configure the VMWare side of it?

I've had a look at the instructions for configuring through the command line, is it standard that iSCSI software adapters are all called vmhba40, or is there a way that I can check and see what number it is?

Thanks

Adam

Reply
0 Kudos
DSTAVERT
Immortal
Immortal
Jump to solution

Hi,

How do you mean check the security config?  Nothing has changed with that on the system in between the config change?

Thank you

Adam

Make sure your chap settings are correct if you have used them.

If you can't ping you should start looking there first.

-- David -- VMware Communities Moderator
Reply
0 Kudos
JohnADCO
Expert
Expert
Jump to solution

If you look at your san you should be able to find the proper IQN name that was working in test.

With iSCSI?  As a general rule?    You never change your IQN's from default.    Leave the san target iqn as default, leave the host initiator IQN at default as well.

If they ping,  try putting the target (SAN iSCSI port) ip's in the dynamic discovery again.    Then go to the san and make sure you can add the host initiator again and put it in the host group.

Only then can you rescan the HBA and see luns / establish iSCSI sessions with your iSCSI san.

Reply
0 Kudos
dquintana
Virtuoso
Virtuoso
Jump to solution

Hello, please verify that you are using the correct permissions configuration, chap or mutual chap, and first verify the password.

Dont forget verfy that you can ping the storage.

Diego Quintana

Ing. Diego Quintana - VMware Communities Moderator - Co Founder & CEO at Wetcom Group - vEXPERT From 2010 to 2020- VCP, VSP, VTSP, VAC - Twitter: @daquintana - Blog: http://www.wetcom.com-blog & http://www.diegoquintana.net - Enjoy the vmware communities !!!

Reply
0 Kudos
AndreTheGiant
Immortal
Immortal
Jump to solution

I can't ping the iSCSI target IP but should that stop me being able to configure the VMWare side of it?

If you can't vmkping to the target then the problem is a network problem.

Check network connectivity and addressing.

Andre

Andrew | http://about.me/amauro | http://vinfrastructure.it/ | @Andrea_Mauro
Reply
0 Kudos
JohnADCO
Expert
Expert
Jump to solution

iSCSI is a two way config.   the san is sort of dependent on ESX feeding it the initiator name, and then once the san knows the name you can add it a host.   Once added as a host then ESX can complete the configuration allowing the luns to be scanned then picked up.

Sometimes it can just be a pain and will require a reboot of the host in order for thigs to work properly / pick up all the luns or maybe even just new luns.

So no, unless your iSCSI network is working it is not really possible to confgure the ESX side or the SAN side.

opbz
Hot Shot
Hot Shot
Jump to solution

ISCSI config can be very messy but overall not too hard.

some things unfortunatelly have to be done from command line, like setting MTU to 9000 and binding your vmknics to your swiscsi

Here is a document on how to do it for Equallogics. main bit of it is that it shows the commnds you need. Obviously for other types of SANs you might need different subnetting but overall the general gist of this is valid.

by the way if you are using equallogics you might be able to use their automated confgiration script...called MEM

anyways good luck

Reply
0 Kudos
adamhodgkins
Contributor
Contributor
Jump to solution

Hi all,

Thanks to everyone for your help, I've finally cracked it!!!!!

I don't know why this worked (maybe someone could shed some light on this.....) but what I did was to remove the switch & associated VMK that I had created for iSCSI via the GUI from the vSphere and re-create doing everything from the command line.......... hey presto iSCSI has now started working!

Thanks again everyone!!

Adam

Reply
0 Kudos
jimheuton
Contributor
Contributor
Jump to solution

We had a similar scenario when one of our ESX4 cluster nodes had a memory problem.  We couldn't reconfigure the iSCSI Software Adapter, it somehow had lost the default initiator name - was set to "iSCSI Software Adapter" instead of original name "vmhba35", and wouldn't allow us to manually set the WWN for the initiator - received "Object reference not set to an instance of an object" error message.

Found the following post and followed the steps outlined by WaffleSniffer to basically delete the iSCSI config and start over (thankfully, without having to rebuild the server!) - http://communities.vmware.com/thread/277197

Steps:

1. Disable the software iSCSI initiator

2. On the ESX(i) host rename all the files in the folder /etc/vmware/vmkiscsid - there should be 3 or 4 files in here (initiatorname.iscsi, iscsid.conf, vmkiscsid.db, etc)  - you could just delete them but i'd recommend renaming first...

3. Reboot the host

4. Once rebooted, enable the software iSCSI initiator and reconfigure as required.

After performing these steps the default vmhba reappeared and allowed us to manually change the WWN back to the original.  After a quick rescan it found all SAN LUNs and we were back in business!

Hope this helps someone else (and thanks WaffleSniffer)!!!

Reply
0 Kudos
jimheuton
Contributor
Contributor
Jump to solution

Oh, the error we were seeing that lead me to the post by WaffleSniffer was:

Error accessing iscsi interface: iScsiLibException: status(80000000): unknown error; Message= IMA_VS_GetDiscoveryStatus

Reply
0 Kudos