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.

Configure OpenFiler

Log into your OpenFiler server via the web interface.  Go to Services and click Enable next to iSCSI target server.

Lab-in-a-Box-11-server-setup-01

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.

Lab-in-a-Box-11-server-setup-02

Go to Volumes and click on create new physical volumes.

Lab-in-a-Box-11-server-setup-03

You will be presented with a list of the hard disks attached to the VM.  Click /dev/sdb.

Lab-in-a-Box-11-server-setup-04

We will use the entirety of the disk for iSCSI, so simply scroll down and click on the Create button.

Lab-in-a-Box-11-server-setup-05

The partition will appear in the list on /dev/sdb.  Now click on Volume Groups on the right.

Lab-in-a-Box-11-server-setup-06

Give the Volume Group a name, and tick the box next to /dev/sdb.  Click Add volume group to finish.

Lab-in-a-Box-11-server-setup-07

Click Add Volume on the right.  Give the Volume a Name and DescriptionMove the slider all the way to the right and change the Filesystem type to iSCSI.  Click Create to finish.

Lab-in-a-Box-11-server-setup-08

Lastly we’ll set up the iSCSI Target.  Click iSCSI Targets on the right and then click Add next to the Target IQN.

Lab-in-a-Box-11-server-setup-09

Click on LUN Mapping and click the Map button.

Lab-in-a-Box-11-server-setup-10

Click on Network ACL and next to Storage Network, change Access to Allow.  Click Update to finish.

Lab-in-a-Box-11-server-setup-11

Lastly, click on CHAP Authentication, enter a username and password and click Add.

Lab-in-a-Box-11-server-setup-12

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 ConfigurationStorage AdaptersAdd…

Lab-in-a-Box-11-esx-setup-01

On the Add Storage Adapter pop-up, click OK.

Lab-in-a-Box-11-esx-setup-02

You will receive this warning, simply click OK and then wait for the process to complete.

Lab-in-a-Box-11-esx-setup-02-warning

Click on the vmhba33 adapter and click Properties…

Lab-in-a-Box-11-esx-setup-03

Click the CHAP… button at the bottom.

Lab-in-a-Box-11-esx-setup-04

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.

Lab-in-a-Box-11-esx-setup-05

Click on the Dynamic Discovery tab and then Add…

Lab-in-a-Box-11-esx-setup-06

Enter the IP address of the iSCSI server – 10.5.2.7 and click OK.

Lab-in-a-Box-11-esx-setup-07

Click Close and a warning box will pop-up.  Click Yes.

Lab-in-a-Box-11-esx-setup-08

After the adapter has been rescanned, the OpenFiler iSCSI disk should appear under the list of devices, as below.

Lab-in-a-Box-11-esx-setup-09

Click on Storage and Add Storage…

Lab-in-a-Box-11-esx-setup-10

Leave the Storage Type on Disk/LUN and click Next.

Lab-in-a-Box-11-esx-setup-11

Select the OpenFiler iSCSI Disk and Next.

Lab-in-a-Box-11-esx-setup-12

Leave the File System Version on VMFS-5 and click Next.

Lab-in-a-Box-11-esx-setup-13

Click Next on Disk Layout.

Lab-in-a-Box-11-esx-setup-14

Give the datastore a name and click Next.

Lab-in-a-Box-11-esx-setup-15

Leave it on the maximum size and click Next.

Lab-in-a-Box-11-esx-setup-16

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