VMware Cloud Community
Cosz3
Enthusiast
Enthusiast
Jump to solution

Can not create datastore with discovered iSCSI target.

hello,

I am trying to test vsphere with iSCSI.

I deployed a iSCSI target service on CentOS 7 with test steps:

1. disable firewalld, disable Selinux

2. yum -y install targetcli, and start up target service

3. configure iSCSI target

     a. create block storage:

         QQ20171129-111620@2x.png

     b. create iqn:

          QQ20171129-111832@2x.png

     c. create LUN mapping to the block storage:

          QQ20171129-112051@2x.png

    d. I did not create ACL on iSCSI target, I just want to everyone have access to this iSCSI. I do not know if it correct or not to not configure ACL on iSCSI, hope someone could give me some hint here.

4. I check the iSCSI server port 3260 is listennning.

After I deploy an iSCSI server as above. I go to configure vsphere vcenter.

I did these steps:

1.  I created a new virtual standard switch vSwitch 1 with vmkernel, and uplink vmnic 5.

     QQ20171129-113129@2x.png

2. I start a software iSCSI storage adapter

     QQ20171129-113249@2x.png

4. I bind the vmnic 5 with iSCSI storage adapter vmhba64

     QQ20171129-113726@2x.png

5. I use dynamic discover the iSCSI target,

     QQ20171129-113908@2x.png

6. Then the vsphere find this

     QQ20171129-114015@2x.png

           QQ20171129-114221@2x.pngQQ20171129-114208@2x.pngQQ20171129-114153@2x.png

    as you can see there, the devices tab, path tab, there is nothing there, I do not know if it is normal (but I created a LUN 0 on iSCSI target server before.)

      I have a question about the iSCSI name, is this iSCSI  name (on vsphere) should be the same name as iqn which I create on iSCSI target server ? 

7. Finally I try to create a datastore with the iSCSI, I can not find the iSCSI corresponding disk device on vsphere

     QQ20171129-115044@2x.png

        QQ20171129-115210@2x.png

questions:

1.  On iSCSI server I did not configure ACL, I hope everyone can connected to the iSCSI server, does it affect something or leading some error?

2.  Should the iSCSI Name on vsphere be the same as the iqn of iSCSI target server that I configured.

3.  The vsphere find the iSCSI target server, but Why I can not find the corresponding disk devices LUN 0 on iSCSI target server?  

I really need someone's helps, a million thanks to all of you.

Best regards

shengping

1 Solution

Accepted Solutions
jfene72
Enthusiast
Enthusiast
Jump to solution

Fixed. Had to add the following line on the centos box using targetcli and restart the service using systemctl restart target.service

set attribute authentication=0 demo_mode_write_protect=0

pastedImage_0.png

View solution in original post

9 Replies
hussainbte
Expert
Expert
Jump to solution

You should be able to see the devices under target before you proceed to adding the Datastore.

if you can share the vmkernel log form host after adding the targets using static discovery .. not dynamic

If you found my answers useful please consider marking them as Correct OR Helpful Regards, Hussain https://virtualcubes.wordpress.com/
vijayrana968
Virtuoso
Virtuoso
Jump to solution

Did you perform rescan on adapter for new devices ? This should work without setting up ACL for everyone. Rescan the host adapter and then check if it discover new disk device there else check connectivity between both initiator and target host.

hussainbte
Expert
Expert
Jump to solution

these 2 KBs should be a good start to troubleshoot

VMware Knowledge Base

VMware Knowledge Base

If you found my answers useful please consider marking them as Correct OR Helpful Regards, Hussain https://virtualcubes.wordpress.com/
Marmotte94
Enthusiast
Enthusiast
Jump to solution

Hi,

Your IP of your VMK1 is bad.

Check on SSH from your esxihost :

# vmkping -I vmk1 <IPv4ofYourArray>

Source : https://kb.vmware.com/s/article/1003728

Thank you,

Please, visit my blog http://www.purplescreen.eu/
vijayrana968
Virtuoso
Virtuoso
Jump to solution

I see, the IP configuration of VMKernel seems to be set to automatic which acquired APIPA. This need to be static with referenced subnet.

jfene72
Enthusiast
Enthusiast
Jump to solution

I followed this guide and managed to get ESXi to see the target -> Configure iSCSI Target & Initiator on CentOS 7 / RHEL7

Try disabling CHAP authentication.

pastedImage_1.png

pastedImage_2.png

pastedImage_4.png

My main issue though is that I'm unable to create a datastore using this disk. Trying to figure out why atm.

pastedImage_5.png

jfene72
Enthusiast
Enthusiast
Jump to solution

Fixed. Had to add the following line on the centos box using targetcli and restart the service using systemctl restart target.service

set attribute authentication=0 demo_mode_write_protect=0

pastedImage_0.png

Cosz3
Enthusiast
Enthusiast
Jump to solution

hello,

I found this Configure iSCSI Target & Initiator on CentOS 7 / RHEL7​​ yesterday as well, and get the exactly the same problem with you posted.

I guess I configured the iSCSI target wrong before. it cause the vsphere can not find LUN device in iSCSI server.

Reply
0 Kudos
Cosz3
Enthusiast
Enthusiast
Jump to solution

Thank you for all of yours help :smileygrin: