What is iSCSI in Windows Server and How to Configure it

How to Configure iSCSI Virtual Disks in Windows Server 2019

In this tutorial, we would learn how to configure iSCSI disks in Windows Server 2019 and setup a iSCSI target server. The following would be covered:

  1. What is iSCSI?
  2. Adding Virtual Disks to VM in VirtualBox
  3. iSCSI Target vs iSCSI Initiator
  4. Configure the iSCSI Initiators
  5. Installing and Configuring iSCSI Target
  6. Connect the iSCSI Initiators to the Target
  7. Access the Local Disks

Video Tutorial here

1. What is iSCSI?

iSCSI stands for Internet Small Computer Systems Interface. It is a standard network-based storage. iSCSI allows you to create storage devices on the network that are accessible via Internet Protocol. The storage disks are provisioned using the iSCSI protocol and are accessible to computers on the network as if they are local to that computer. In other works, network computer see iSCSI disks as local disks.

In this demo, we will setup virtual machines using VirtualBox. Then we add disks to one of the nodes (NODE3). These disk would then be configured to be used by the network as iSCSI disks.

 

2. Adding Virtual Disks to VM in VirtualBox

I have setup VirtualBox with some nodes shown below.

VirtualBox with a DC and three nodes
VirtualBox with a DC and three nodes

Let’s now add some disks to Node3.

Step 1 – With Node3 selected, click on settings and choose Storage.

Adding new disk to the VM
Adding new disk to the VM

Step 2 – Click on the Add Disk icon at the lower end and follow the procedure to add a new disk

Step 3 – Repeat the process to add 3 more disks

Step 4 – After adding the disks, power up the computer. Go to Computer Management > Disk Management and you will see the three disks as shown below:

Disk Management
Disk Management

Step 5 – Bring the three disks online and assign then drive letters.

We would now configure these disks to be used an an iSCSI disk. But before then, let’s  first understand two terms: iSCSI target and iSCSI initiator.

 

3. iSCSI Target vs iSCSI Initiator

An iSCSI target is a source of the iSCSI storage services. This is normally where the iSCSI storage disks in hosted. In this demo, this would be a VM with Windows Server 2019 which has been configured  as an iSCSI target.

A iSCSI initiator is a device that consumes the storage service provided by the iSCSI target. In this demo, we would use configure Node1 and Node2 as iSCSI initiator to access the iSCSI target disks. Both Node1 and Node2 are run Window Server 2019.

 

4. Configure the iSCSI Initiators

As mentioned before, Nod1 and Node2 would be used as the initiators. So we need to configure them as iSCSI initiators. To do that, follow the steps below:

Step 1 – Log in to Node1. Click on tools on the upper right and select iSCSI initiator as shown below:

iSCSI initiator

Step 2 – Click ok in the dialog box that appears

Step 3 – In the iSCSI Properties windows, select the Configuration tab and take note of the Initiator name.

Step 4 – Repeat the same for Node2.

 

5. Installing and Configuring iSCSI Target

To setup Node3 as an iSCSI target, follow the steps below:

Step 1 – Log in to the Node2 and click on Add roles and features

Step 2 – Find the iSCSI Target Server under File and iSCSI Services. See figure below:

Adding the iSCSI Target role
Adding the iSCSI Target role

Step 3 – After the installation complete, goto the File and Storage Services > iSCSI. Click on the link “To create and iSCSI virtual disk, start..“. See figure below:

Creating a new iSCSI virtual drive
Creating a new iSCSI virtual drive

 

Step 4 – Select drive D. Follow the and go Next. Follow the wizard steps to complete the Virtual disk creation. You will need the following

iSCSI virtual disk name: I named it VDiskD

Disk size: enter the size same as the Free space

iSCSI target:  select New iSCSI target. I named it Node3Target

Access Servers: Click on Add > Select ‘Enter a value for the selected type’. The type should be IQN. In the value enter the IQN value. You get this from the Node1 and Node2 as explained in the previous part.

Step 5 – Repeat the same steps for Drive E and Drive F.

At this point, you will have the output shown in the figure below:

You can see that the disks are not connected. You need to connect them from the initiators.

 

6. Connect the iSCSI Initiators to the Target

Follow the steps below to connect the iSCSI initiators to the target.

Step 1: Now you need to go to the iSCSI initiators (Node1 and Node2) and open the initiator properties window.

Connecting the iSCSI initiators to the target
Connecting the iSCSI initiators to the target

Step 2: Enter the name of the target, that is NODE3 and click on Quick Connect. If you get it right, then the connection succeeds

Step 3: Click on the Volume and Devices tab and click on Auto Configure. You will see that the three disks connects as shown below.

Volumes and Devices Configuration
Volumes and Devices Configuration

Step 4: Click OK and exit

Step 5: Repeat steps 1 to step 4 for Node2

 

7. Connect to the Local Disks

Finally we would have access this disk on Node1 and Node2 just like local disk. To get that done we need to take these final few steps:

Step 1: On Node1, go to Computer Management > Disk Management. You will see the three disks. However, they are not offline and not initialised.

Step 2: Right-click on the Disk an choose Online

Step 3: Right-click again and choose Initialise

Step 4: You can then create a simple volume using the disk

Step 5: Repeat steps 2 to 4 for the two other disk

Step 6: Repeat steps 1 to 5 for the Node2

 

At this point, you have successfully completed setup of iSCSI in Windows Server 2019. If you have challenges do let me know.

And finally, i recommend you watch the video explanation on my Channel here.

 

Admin bar avatar

kindsonthegenius

Kindson Munonye is currently completing his doctoral program in Software Engineering in Budapest University of Technology and Economics

View all posts by kindsonthegenius →

Leave a Reply

Your email address will not be published. Required fields are marked *