- How to use VMware vSAN ReadyNode Configurator - Fri, Dec 17 2021
- VMware Tanzu Kubernetes Toolkit version 1.3 new features - Fri, Dec 10 2021
- Disaster recovery strategies for vCenter Server appliance VM - Fri, Nov 26 2021
Licensing
Note that you can use the free version of VMware ESXi to connect to iSCSI or NFS storage. I'll demonstrate this below. In fact, no matter the license, any version of the VMware ESXi hypervisor can connect to shared storage.
You can then have several free ESXi hosts accessing the same datastore. However, because you don't have a central management server (VMware vCenter server), you can only manage your VMs individually, host by host. And you don't have the possibility to move VMs from one host to another using vMotion technology.
Requirements
- At least one ESXi host with two physical NICs (management and storage traffic)
- Shared storage offering the iSCSI protocol
- Network switch between shared storage and the ESXi host
- vSphere client software
We'll be using the new HTML5 host client, which is different than the old Windows client. One advantage of the HTML5 host client is that you don't need to install any software on your management computer because you connect via a web browser. You don't need plugins, and you can just connect through the URL https://ip_of_ESXi/ui (replace "ip_of_ESXi" with your installation's IP address). Note that if you're managing a vCenter server-based VMware infrastructure, you'll still need an Adobe Flash plugin.
Networking
First, we need to add a VMkernel network interface card (NIC) to our system so the ESXi host can connect to the remote storage device. To do so select Networking > VMkernel NICs > Add VMkernel NIC.
We will also add a new port group. Please name the port group accordingly. In my example, I named it simply iscsi. Note that our storage system is on another subnet.
The result should look like the screenshot below:
But that's not all. Before we go further, we need to make sure that:
- At the vSwitch level: Both physical NICs connected to the ESXi hosts are active.
- At the port group level: A single NIC is set as active. The other one is set as unused.
Navigate to Networking > Virtual Switches > select vSwitch0 > Edit settings, expand the NIC teaming section and make sure both NICs are marked as active. If for some reason one of the NICs isn't active, please select the NIC and click the Mark as active button.
We also need to override the failover order at the port group level because by default, the port group inherits the setting from our vSwitch. First, navigate to Networking > Port groups TAB, select the iscsi port group > Edit settings > expand the NIC teaming section and then make sure to select Override failover order – Yes. Use the correct NIC for iSCSI storage traffic (vmnic1 in our case).
Next, do the same for the Management Network and the VM network, and now, only select vmnic0.
Override failover order on the Management and VM network port groups
iSCSI adapter activation and configuration
After the process above, the next thing to do is to enable the software iSCSI adapter, which is disabled by default. To do this, select Storage > Adapters TAB > configure iSCSi.
Then just go to the Dynamic targets section and click the Add dynamic target button.
Now you can click the Save button. Next, go back to Storage > Adapters > Configure iSCSI. You should see the Static targets section populated.
If this is not the case, something went wrong during your configuration. Check your settings and make sure that everything is as explained above.
Then, while still in the Storage section, go to Datastores and create a new datastore. Click New datastore and create a new Virtual Machine File System (VMFS) datastore.
Then enter a name to recognize this datastore later.
Select VMFS 6 from the drop-down menu. (By default, VMFS 5 is preselected.)
You'll see a summary page. Click the Finish button.
You should see this new datastore populated among all the other datastores.
That's all. We have configured an ESXi 6.5 host, connected it to a remote storage device via iSCSI and created a new VMFS 6 datastore.
If you plan to connect another ESXi host to the same storage device, you don't have to create the datastore again. However, you'll still need to configure the ESXi host in the same manner. Both hosts will be able to use the shared datastore for running virtual machines.
VMFS is a clustered file system that can manage multiple connections and is able to implement per-file locking. The latest VMFS 6 can handle up to 2048 different paths. You can run up to 2048 VMs on single datastore too. The maximum file size is 62 TB, and the maximum volume size can be up to 64 TB.
i do wish to include all the previuos lessons in this series in every post
Very beautiful guide, I have only one problem, I can IP in static, but there is not the flag where I Can write the IP. Do you now why? See in image attached. Thank you
https://drive.google.com/file/d/0BznsEFqkNbx_dVZLNDVVdVFnTTA/view?usp=sharing
I solved my problem, I didn’t see the left arrow near IPv4 settings.
Scuse me.
Thanl you
Funny but there no way to set the adapter as not in use.
I can only select to be Stalnd-by.
So then when I try to set iSCSI at all times I have error that has multiple connections.
Should I create separate vSwitch?
“Funny but there no way to set the adapter as not in use.
I can only select to be Stalnd-by.”
There is a workaround for this here: https://www.virtualizestuff.com/2017/01/02/iscsi-binding-dude-where-is-unused-adapters/
It requires enabling SSH on the host temporarily but it definitely works.
I assume you have 2 NICs in your host. Use 1 for management, and the other one for iSCSi. It’s not necessary to create a separate vSwitch, but it might be easier in your case, as you seems to have problems.
Thank you for this very helpful post!
Only hick-up I found was that the list of static targets was not automatically populated, I had to add my target iSCSI (NAS) manually, but after that everything worked like a charm!
Regards,
Bart
Thanks for this post Vladan.
I have 3 NICs. I added all of them to vSwitchO. When I set the ‘Failover Order’ on the port groups all 3 NICs are listed. There is only 1 NIC in your screenshot. I do not have an option to remove objects from that list. I can only set them to ‘Active’ or ‘Standby’. VMware 6.0.
Thanks
You’re probably not at the “Portgroup level” but rather at the “vSwitch” level. Select Port Groups TAB and do the edits there. you’ll you’l have an option to “remove” (scroll down to “override failover order” check the box to “Yes” > select NIC > Mark unused.) Hope that helps.
There’s a bug in 6.5 that doesn’t give you the option of removing the second NIC. Here’s the workaround I found: vSphere 6.5 iSCSI Binding Bug
Hi there.
Firstly, THANK YOU – I’m on page 1 with ESXi, just learning from the start, so I didn’t 100% understand everything I was doing, but following your step by step got me running iSCSI. Now is the fun bit, where I break it again to figure out exactly what all the different options do.
One thing which caught me out (and at least one other person in the comments) note the line:
At the port group level: A single NIC is set as active. The other one is set as unused.
This does not 100% correspond with the picture under the port group setup. Follow the instruction, not the picture. You can mark the second one as unused.
Note I had a couple of problems when I was running 6.5.0 build 48877370 but I did the (free) update to 6.5.0 update 1 5969303 which I got from here:
https://my.vmware.com/group/vmware/patch#search
and installed using the zip-file install advice here:
https://tinkertry.com/easy-upgrade-to-esxi-650d
Using the datastore install method I discovered here:
http://www.virtuallyghetto.com/2015/11/neat-way-of-installing-or-updating-any-vib-using-just-the-esxi-embedded-host-client.html
And now it seems to run a little closer to the article described. This might be due to the hardware I was using (Dell PowerEdge 2950), I’m not sure. Good luck to everyone!
This worked great with individual hosts but i don’t see this in vcenter 6.5? Is there more configuration needed?
You lost me at:
“At the port group level: A single NIC is set as active. The other one is set as unused.”
Where to look, what to see?
The port group tabs now shows 3 groups, VM networks with 0 active ports, iSCSI with 1 active port and VM Management with 1 active port. Both the latter two groups seems to use vmnic0 and nothing using vmnic1.
Trying to figure this out so I can set my NAS as a iSCSI sever for datastores in my home network and make all my servers virtual on a ESXi machine, but I’m quite new to this so a bit overwhelmed still.
I have done as per the article and i am perfectly see the iscsi working on the esxi and i did the same on the second host for the same iscsi target but not working on the second host. Please advise.
Hello,
I have added one new LUN/Hardisk in open filer,However i am not able to view new LUN in esxi.
Note: Previous LUN is able to view in same esxi.
Please advise.
It would be great to have the PowerCLI commands to implement the GUI hunt and peck
hello folks,
i have configured my esxi 6.5 for iscsi with 2 port-groups using one uplink for each. so therefore I have two vmkernel nics on the port binding with the iscsi target. I can only see one vmkernel nic getting traffic to my storage and not the other. Is there something I am missing from the ESXi side? please advise. thank you.!!!!
Make sure to configure load balancing and select “round-robbin” storage policy. NOTE: Verify that the iSCSI array supports the round-robin path policy by contacting the array vendor.
When attaching a pre-existing iSCSI vmfs6 volume on the second ESXi host, how do you get it to add the vmfs as an already existing datastore instead having it to wipe it and create a new one?
Thanks Vladan!
OK nevermind. Figured it out I think. I originally set up them datstore as vmfs6 on esxi 6.7, then when i tried to attach the iSCSI to an older esxi 6.0 machine, I realized 6.0 can’t see vmfs6, it can only handle vmfs5.
I’ve got it configured and the static targets show up. In my case 3 of them. 2 of them thru the dedicated nic’s but also the 3rd one that is connected thru my switch.
However, I can not for the life of me get it to see the san. It doesn’t show up in devices, not even after refresh or rescan. Add datastore also doesn’t show it.
Is my san misconfigured perhaps ? It’s a synology.
Hi
my problem is this:
via "mklabe or setptbl" I changed the partition type to "msdos" and then created a data storage. But after creating my data store the partition type automatically reset to "gpt" and doesn't let me create another data store. Then I changed it back to "msdos" but after that my datastores that I created are gone.
Does anyone of you have such an experience?
I am very grateful in advance
Great guide. Thank you for the assistance! Works for ESXI 7 in case anyone is wondering.