new1234.jpg
Home > VMware > VMware: Creating iSCSI network in vSphere ESXi 5.0

VMware: Creating iSCSI network in vSphere ESXi 5.0

I was trying to configure my central storage (StarWind iSCSI SAN) in my homelab, but couldn’t find the software iSCSI Adapter.. huh.. it’s removed?

Storage Adapter:

image

Nope.. by default it’s not installed, you must manual add the adapter by clicking Configuration > Storage Adapter > Add Storage Adapter

image

– Select: Add Software iSCSI Adapter

image

A new software iSCSI adapter will be added to the Storage Adapters list. After it has been added, select the software iSCSI adapter in the list and click on Properties to complete the configuration

image

Event: Change Software Internet SCSI Status = Completed

Create new vSwitch (in my case two VMkernel ports):

image

– Network label: iSCSI01

image

– Configure IP Address and Subnet Mask

..image

– Finish the configuration, repeat this step to configure the 2nd iSCSI02 port

vSwitch2 result:

image

VMkernel – Override switch failover order:

Now we need to change the failover order for each VMkernel:

image image

iSCSI01: Active Adapter VMNIC4 – Unused Adapter: VMNIC5
iSCSI02: Active Adapter VMNIC5 – Unused Adapter: VMNIC4

Configure Software iSCSI Initiator:

Go to the properties of the iSCSI initiator: Configuration > Storage Adapters > iSCSI Storage Adapter: vmhba** > Properties

And setup Dynamic Discovery – Sent Target location (in my case the StarWind VSA)

image

– Add target: 192.168.70.2:3260

Next we need to bind a pNIC to the iSCSI VMkernel.. looong loooong time ago (vSphere 4) ..we need to configure this by CLI (esxcli swiscsi nic add -n vmk1 -d vmhba33) but now it’s possible to do this via the GUI.

When you go to tab: Network Configuration > Add..

image

– Click: Add..

image

– Now you can select a Physical NIC to bind the VMkernel for your iSCSI targets

image

Overview:

VMkernel Port Bindings iSCSI01
VMkernel Adapter vmk1
Port Group Policy Compliant
Path Status Not Used
Physical Network Adapter VMNIC4
Switch vSwitch2
IP Address 192.168.70.10
Subnet Mask 255.255.255.0
Configured Speed 1000 Mbps (Full Duplex)
VMkernel Port Bindings iSCSI02
VMkernel Adapter vmk2
Port Group Policy Compliant
Path Status Not Used
Physical Network Adapter VMNIC5
Switch vSwitch2
IP Address 192.168.70.11
Subnet Mask 255.255.255.0

Now you can add the storage by clicking the “Add storage wizard”

sanderdaems

Sander Daems is founder and author of this blog and working as a Lead (Sr.) Consultant by UNICA ICT Solutions. Sander has over 15 years experience in IT, primary focus: virtualization and modern worksplace.

More Posts - Website

Follow Me:
TwitterLinkedIn

  1. July 13th, 2011  (Quote) at 03:15  (Quote) | #1

    Nice job – This was going to be one of my first posts queued up on vSphere 5. You covered it nicely, including the most confusing or often forgotten part of the process to configure multipathing for swISCSI in vSphere 4.

    Jas

  2. July 13th, 2011  (Quote) at 12:21  (Quote) | #2

    Yes, nice post. The binding of pNICs to the iSCSI vKernel is gone. -:).

    The last necessary CLI task when configuring iSCSI? … -:).

    Best
    Vladan

  3. July 13th, 2011  (Quote) at 13:26  (Quote) | #3

    Vladan :

    The last necessary CLI task when configuring iSCSI? … -:).

    Best
    Vladan

    Think so 🙁 you can also set MTU size/Multipath etc. in this section.. it’s no rocket science anymore

  4. Jason Carter
    July 13th, 2011  (Quote) at 13:34  (Quote) | #4

    You can set the MTU size via GUI as well?

  5. July 13th, 2011  (Quote) at 14:53  (Quote) | #5

    Great!, no command line. It will be nice to get my hands on this soon

  6. July 14th, 2011  (Quote) at 09:16  (Quote) | #6
  7. September 13th, 2011  (Quote) at 10:32  (Quote) | #7

    Thanks. nice post!!

  8. Daniele
    September 14th, 2011  (Quote) at 15:25  (Quote) | #8

    You have put vmk1 and vmk2 on the same subnet: 192.168.70.0/24; How the ESXi can route packets ? Thanks!

  9. Freaky
    September 25th, 2011  (Quote) at 14:17  (Quote) | #9

    Does it finally have *TRUE* active-active iSCSI?

    By that I mean will (or can) it use all active connections at the same time? And no, round-robin is not the same. Round-robin might boost read performance because it will issue commands on line 1, the starts issueing them on line 2, etc whilst data still comes in on 1. It doesn’t do shit for write though as the command will contain all the data to be written so only bandwidth of one line will be used at the same time (as somewhat opposed to read commands when hopping with say 3 commands).

  10. w1ll1ng
    September 28th, 2011  (Quote) at 01:19  (Quote) | #10

    Nice post!
    regarding using cli, anyone knows the correct syntax. I used applicable esxi 4.1 cmds but don’t work.

  11. ali
    September 30th, 2011  (Quote) at 12:55  (Quote) | #11

    thanks, nice guide. i learn things which i do not know…

  12. Foster
    October 12th, 2011  (Quote) at 19:35  (Quote) | #12

    Would there be any advantage to making the unused nic in each switch a Standby in case of failure of one nic?

  13. October 14th, 2011  (Quote) at 17:46  (Quote) | #13

    You should try this software : http://slymsoft.com/autoconf-iscsi/

    It’s an automating tool to create iSCSI configuration on ESXi 4 or 5 very easily.

  14. bikeman122
    October 19th, 2011  (Quote) at 19:48  (Quote) | #14

    Changing the MTU size to Jumbo Frame size (9000) in a multipathing solution on the Vmkernel port seems not to be working on ESXi 5.0. Leaving it to a MTU of 1500 works fine.
    In a non mutlipathing invironment changing the VMkernel group to 9000 work also fine.
    Strange behaviour.

  15. Keng Lam
    October 22nd, 2011  (Quote) at 10:54  (Quote) | #15

    Very nice post. No need to use CLI to do this. anymore, yeah! Very useful.

  16. chad markley
    October 31st, 2011  (Quote) at 03:46  (Quote) | #16

    This was great!! Thank you so much for taking the time to write such a great post. I have been doing all my iSCSI work from the command line but with v5 I can do it all from the GUI! Very nice, very nice!

  17. matt
    November 5th, 2011  (Quote) at 01:32  (Quote) | #17

    Point-click is for children. Real men do everything via a command-line because it can be automated. Do you want to point-click your way across a thousand hosts? thought so.

    Got any info on the “new” CLI commands? I’ve got nowhere so far. Which is supremely aggravating.

  18. November 6th, 2011  (Quote) at 14:45  (Quote) | #18

    Hi Matt, I agree and it must be automated of course 🙂

    I’m writing a new script “Configure_iSCSI_network_vSphere5.ps1” it will be released in a few days, stay tuned!

  19. Manhattan
    December 20th, 2011  (Quote) at 04:29  (Quote) | #19

    Thanks for the post – its the clearest I’ve seen on Overriding switch fail-over order in the two VMkernels.
    I followed it to the letter – only difference on my setup – direct IP no VLAN – I have two iSCSI Targets – vSphere Client finds all iSCSI targets but only allows one Active I/O even though there are two VMkernels – doesn’t show the available extra LUNs under “Add Storage” – didn’t have these issue under ESX3.5 – any clues re setting up two active links to two iSCSI Targets – what am I missing ?

  20. December 21st, 2011  (Quote) at 19:18  (Quote) | #20

    In the past I’ve created a separate vSwitch for each vmknic-pnic pair. With all the explicit NIC settings this seemed more complicated. Is there a reason to do this as opposed to separate vSwitches?

  21. mkruger
    January 14th, 2012  (Quote) at 05:41  (Quote) | #21

    @SafeTinspec,

    I don’t think it really matters much whether 1 or 2 virtual switches are used. The important thing is the number of vmkernel port groups…as shown in the last screen shot. IMHO, easier using 2 virtual switches…but that’s just personal preference.

    @SanderDaems
    How do you configure round robin in ESXi 5? Is that something which needs to be configured via CLI?

  22. January 16th, 2012  (Quote) at 09:15  (Quote) | #22

    mkruger :

    @SafeTinspec,

    @SanderDaems
    How do you configure round robin in ESXi 5? Is that something which needs to be configured via CLI?

    I’ve written an article to configure Multipath with PowerCLI:

    https://blog.vmpros.nl/2011/05/25/vmware-configure-multipath-policy-via-powercli/

  23. February 3rd, 2012  (Quote) at 22:11  (Quote) | #23

    @mkruger

    Once a device is defined, right-click it and “manage paths” Change from “fixed” to “round robin”

  24. Xeiran
    April 10th, 2012  (Quote) at 18:50  (Quote) | #24

    On vSphere 4.x, various SAN vendors recommended changing the round robin I/O operation limit from 1000 (default) to 10 in order to more evenly balance the load. Anybody know if this setting has made it to GUI as well, or is it still only available via CLI?

    Old 4.x CLI command to use was:
    esxcli –server nmp roundrobin setconfig -d –iops 10 –type iops

  25. Xeiran
    April 10th, 2012  (Quote) at 18:53  (Quote) | #25

    dangit, formatting didn’t get my command correctly, correct command is:
    esxcli –server ServerName nmp roundrobin setconfig –d DeviceIdentifyer –iops 10 –type iops

  26. naveed
    April 12th, 2012  (Quote) at 19:07  (Quote) | #26

    good job.. finally I found out

  27. Sketchy
    May 19th, 2012  (Quote) at 06:42  (Quote) | #27

    What have you and others found as the best way to verify that mpio is actually being used after it was configured properly

  28. Matthieu
    May 30th, 2012  (Quote) at 07:13  (Quote) | #28

    I have a doubt…
    I want to have my D:\ drive on a VM (Exchange server) connected via ISCSI to my NETAPP.
    Not a datastore on ESX!

    I have to create a Vswitch for that?

    Thanks a lot

  29. May 30th, 2012  (Quote) at 10:21  (Quote) | #29

    Matthieu :

    I have a doubt…
    I want to have my D:\ drive on a VM (Exchange server) connected via ISCSI to my NETAPP.
    Not a datastore on ESX!

    I have to create a Vswitch for that?

    Thanks a lot

    Yes to use RDM’s in VM’s you can create 1 (prefer 2) vSwitches. Configuration: 1x vmkernel 1pNIC and 1 portgroup called ISCSI01 (for vSwitch2: ISCSI02), don’t configure RR.

    Add (both) the network adapter(s) to the virtual machine and configure the iSCSI initiator.

    Please check if there’s a MPIO driver from the storage vendor to configure the multipath correct.

  30. May 31st, 2012  (Quote) at 20:23  (Quote) | #31

    Nice post

    I only have one question. I added all that is necessary for the ISCSI datastore.
    But when i try to add the datastore I get the Error
    “Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “ha-datastoresystem” on ESXi “10.27.0.11” failed.”

    The IScsi Target is a Software Iscsi server on Redhat 6.2 64. This is just for Testing purposes. As i need to have a test environment ready.

    Regards Toine

  31. June 1st, 2012  (Quote) at 10:48  (Quote) | #32

    Toine Eetgerink :

    Nice post

    I only have one question. I added all that is necessary for the ISCSI datastore.
    But when i try to add the datastore I get the Error
    “Call “HostDatastoreSystem.QueryVmfsDatastoreCreateOptions” for object “ha-datastoresystem” on ESXi “10.27.0.11″ failed.”

    The IScsi Target is a Software Iscsi server on Redhat 6.2 64. This is just for Testing purposes. As i need to have a test environment ready.

    Regards Toine

    Maybe this article will help you:

    https://blog.vmpros.nl/2012/02/27/vmware-call-hostdatastoresystem-queryvmfsdatastorecreateoptions-for-object-ha-datastoresystem-on-esxi-servername-failed/

  32. June 1st, 2012  (Quote) at 20:38  (Quote) | #33

    Dear Sander

    Thank you. This was the issue. i saw the post already but they were talking about adding a new disk.

    SO i skipped it, But now i used it, perfect thanx .

    BTw wy is it that it works after this command.??

    Regards toine

  33. Mike Allen
    July 10th, 2013  (Quote) at 21:16  (Quote) | #34

    anyone get this vmware networking config to work right with Datacore SS-V iscsi san?

  34. Jonathan B.
    May 6th, 2015  (Quote) at 10:56  (Quote) | #35

    this is still a best practice, big thanks!!

  1. at | #1
  2. at | #2
  3. at | #3