How to recover an  iSCSI datastore on Server 2012   in VMware ESXi 6

Situation: I moved all my network gear to a nicer rack, reconnected everything and when I checked my vsphere, this is what I saw:

The four machines that are showing up are on the local datastore, the rest are on a server 2012 ISCSI datastore, and in this article I will show you the simple steps that you need to take to bring this ISCSI datastore back and restore your machines.

The first step is to check your server 2012 and make sure ISCSI is up and running, with your ESXi server showing as a target. Here is mine.

Now that we know the server is fine, we just need to reconnect to it from Vsphere.

Go to Configuration>Storage adapters>iSCSI Software Adapter and right click the adapter.

In the properties, go to the Dynamic Discovery tab, server locations will be blank, so you need to click add and you will see the screen bellow.

Add the ip of your ISCSI server and the port (In this case default 3260).

Click on the ok button

And you will notice that your machines will come back as shown bellow:

And your second datastore will also show in the storage tab.

Conclusion:

If you have a NAS or SAN in your environment, make sure you know how to troubleshoot datastore connectivity before unplugging network equipment. Though its best practice, verify that storage devices have static ips.