vSphere Lab-in-a-Box 11: Set up iSCSI
In this post, we will set up the OpenFiler VM as an iSCSI target for the virtual ESXi servers, and connect the virtual ESXi servers to it.
Log into your OpenFiler server via the web interface. Go to Services and click Enable next to iSCSI target server.
Go to System and scroll down to Network Access Configuration. Under Name enter Storage Network. Under Network/Host enter 10.5.2.0 (the storage network segment) and change the Netmask to 255.255.255.0. Click Update to finish.
Go to Volumes and click on create new physical volumes.
You will be presented with a list of the hard disks attached to the VM. Click /dev/sdb.
We will use the entirety of the disk for iSCSI, so simply scroll down and click on the Create button.
The partition will appear in the list on /dev/sdb. Now click on Volume Groups on the right.
Give the Volume Group a name, and tick the box next to /dev/sdb. Click Add volume group to finish.
Click Add Volume on the right. Give the Volume a Name and Description. Move the slider all the way to the right and change the Filesystem type to iSCSI. Click Create to finish.
Lastly we’ll set up the iSCSI Target. Click iSCSI Targets on the right and then click Add next to the Target IQN.
Click on LUN Mapping and click the Map button.
Click on Network ACL and next to Storage Network, change Access to Allow. Click Update to finish.
Lastly, click on CHAP Authentication, enter a username and password and click Add.
This completes the iSCSI setup stage within OpenFiler. Next we will configure the virtual ESXi servers so they can access the iSCSI target as a datastore.
Configure Virtual ESXi Servers
Open the vSphere Client and select your first virtual ESXi server. Click on Configuration – Storage Adapters – Add…
On the Add Storage Adapter pop-up, click OK.
You will receive this warning, simply click OK and then wait for the process to complete.
Click on the vmhba33 adapter and click Properties…
Click the CHAP… button at the bottom.
Under the CHAP (target authenticates host) section, change the Option to Use CHAP and enter the CHAP username and password from above. Click OK to finish.
Click on the Dynamic Discovery tab and then Add…
Enter the IP address of the iSCSI server – 10.5.2.7 and click OK.
Click Close and a warning box will pop-up. Click Yes.
After the adapter has been rescanned, the OpenFiler iSCSI disk should appear under the list of devices, as below.
Click on Storage and Add Storage…
Leave the Storage Type on Disk/LUN and click Next.
Select the OpenFiler iSCSI Disk and Next.
Leave the File System Version on VMFS-5 and click Next.
Click Next on Disk Layout.
Give the datastore a name and click Next.
Leave it on the maximum size and click Next.
Click Finish to complete the setup of the iSCSI shared datastore and then wait for it to appear in the list.
Now perform the same tasks for the second virtual ESXi server, to connect it to the same iSCSI datastore.
In the next post, we’ll set up NFS on the OpenFiler host and connect the virtual ESXi servers to that as well.
Lab-in-a-Box Series: 01 Introduction 02 ESXi Installation on Physical Hardware 03 Installation of vSphere Client 04 Lab Host Configuration 05 Domain Controller Setup 06 Domain and Related Services 07 Configuration of Virtual ESXi Servers 08 vCenter Server Setup 09 vCenter Server Configuration 10 Set up OpenFiler NAS 11 Set up iSCSI 12 Set up NFS 13 Set up Secondary Domain Controller 14 vMotion Tests