How to Configure iSCSI Share in Truenas CORE

In this article, I will show you how to configure iSCSI share in TrueNAS CORE to use as a datastore in VMware 7.0. ISCSI share is a method to set up block level storage access between 2 different computers. In this setup, I will use this protocol to store the virtual machines that I create in VMWare in our TrueNAS box.

The TrueNAS CORE web GUI (interface) makes it simple to enable iSCSI and setup a storage volume as an iSCSI target, and then we can connect it using the ESXi web GUI using software iSCSI.

Configure iSCSI share in TrueNAS CORE

Enabling the iSCSI service in TrueNAS

Open a web browser, type TrueNAS IP address, and press enter. Type TrueNAS credentials and then click login.

truenas core login

TrueNAS Dashboard.

truenas core dashboard

How to enable iSCSI Service

Select the Services tab, and then enable iSCSI, Start Automatically.

truenas core services

Select Storage tab, click on disks to see which one you want to use.

truenas core storage disks

How to create storage volume to share in TrueNAS CORE

Select Storage, select Pools, and then click ADD.

truenas core storage pool

Select create new pool option, and then choose create a pool.

truenas core storage create pool

Enter a name and then choose the disk you need to share as iSCSI share.

truenas storage pool manager

Choose the error key to choose the disk and then click create.

truenas create pool

Choose the confirm checkbox and then choose create a pool.

truenas core create pool

In the pool window, we want to create the storage volume. Take a note that how much space we have available, then select three dots button and select Add Zvol.

truenas add zvol

zvol name – type a name.
Comments – a description
Size for this zvol – select the volume size.
Now click SUBMIT to create the new Zvol.

truenas core add zvol

New Zvol has been created.

truenas core add zvol

How to configure iSCSI to share the new volume

Select Sharing tab and then Block Shares (iSCSI)
Click on the Portals tab and then click on the ADD button.

truenas core block share iscsi

Description – type a description
IP Address – type the IP address of an existing network interface that we need the portal to existing on. If we choose the box it must expand to show you the presently available IPs.
Port – Default TCP port is 3260.
Click SUBMIT to create the portal.

truenas iscsi add protals

How to create an Initiator to attach to the portal

It will initiate requests to & receive responses from iSCSI target(s). Choose the Initiators tab and then select ADD.

truenas core block share iscsi

Select Allow All initiators and then the save button.

truenas block share iscsi

Select targets and then click ADD.

truenas core block share iscsi

Target Name – choose a name for the target.
Portal Group ID – choose the ID of the portal group we have created earlier.
Initiator Group ID – choose the ID of the initiator group we have created earlier.
Click SUBMIT to create the target.

truenas core add iscsi targets

Create the Extents tab and then click on ADD.

truenas block share iscsi targets

Name – The name of the extent.
Select Enabled
Extent type – Select Device.
Device – Click here to choose the Zvol we have created earlier.
Under compatibility – select enable TPC
Click SUBMIT to create the extent.

truenas block share iscsi extents

Choose Associated Targets tab & then click on ADD.

truenas core block share iscsi

Target –select the target we have created earlier.
LUN ID – type a number between 0 and 1023.
Extent – choose the extent we just created.
Click SUBMIT to associate the extent with the target.

truenas iscsi add associate targets

It will returned to the Associated the Targets tab and then you will see the newly available target.

truenas iscsi add protals

To add iSCSI TrueNAS to VMware ESXi Host.
Login to VMware ESXI Host

vmware esxi login

Select storage, Select Adapters tab and then select Software iSCSI.

vmware esxi adapter

iSCSI enabled tab, choose Enabled.
Network port binding – select add port binding.

vmware esxi configure iscsi

Select a VMkernel interface and then click select.

vmware esxi vmware interface

Dynamic targets tab – select add dynamic targets
Enter the IP address of the TrueNAS ISCSI Server and then click save configuration.

vmware esxi configure iscsi

Select Refress

vmware esxi storage adapters

Now you can see Iscsi software adapter and then Datastore.

vmware esxi storage adapters

Select New datastore.

vmware esxi storage datastore

Choose create new VMFS datastore type and then click Next.

create new vmfs datastore

Enter the Datastore name, select TrueNAS Iscsi datastore and then click next.

create new datastore select device

Choose full disk or custom size and then click next.

create new datastore partitions

Review the summary and then click finish.

create new datastore summary

Read the warnings and then click Yes.

Now you can see the iSCSI-based datastore listed.

vmware esxi storage datastore

For more details please visit TrueNas

Jamil Parvez
Jamil Parvezhttps://www.xpertstec.com
Jamil Pervez works as a Network Administrator, based in Kuwait with a Primary focus on Microsoft technologies. Microsoft Certified MCSE, MCTP, MCITP, CCNP, CCIP, CCVP with 20 years of experience in administering Windows Servers, Exchange, VMWare, Veeam B&R, Veritas BackupExec.

Related Articles

Latest Articles