Now we have the vCenter VM setup, its a good time to get the iSCSI VM setup done so this can be added as storage to the cluster when it is created.

VM Configuration

The VM has 8GB of RAM an 2 vCPU's as standard on a Windows Server 2019. The boot disk is only 60GB and the data disk is 1TB. This where we will configure iSCSI to point to. In terms of network, the VM has a connection to the Management network and then a connection to each iSCSI network.

As usual, I won't go through the installation process of Server 2019 but we will pick up after the install.

iSCSI Role Installation

First we need to open Server Manager and wait until it has finished collecting information.

Now we need to click 'Manage' and then 'Add Roles and Features'. When the pane opens, click Next on the first two screens. Then you should see this screen:

Expand 'File and Storage Services', and check iSCSI Target Server:

Click Next twice and then you will see a summary of what will be installed:

Click 'Install', and the installation should begin. Once it has finished, the install will show as successful:

You can now click on Close to complete.

iSCSI services have now been installed on the server, next we need to configure it.

iSCSI Server Configuration

I have configured the network interfaces like this:

This shows the IP addresses we have configured on the interfaces, relating to both iSCSI networks and the management network.

Now, open up an administrative PowerShell window.

First we need to add a new iSCSI target (I have added all the IP addresses the servers will have):

PS> New-IscsiServerTarget -TargetName "VMwareiSCSITarget" -InitiatorId @("IPAddress:192.168.101.1","IPAddress:192.168.102.1","IPAddress:192.168.101.2","IPAddress:192.168.102.2","IPAddress:192.168.101.3","IPAddress:192.168.102.3")

Now we need to configure the storage we will use (E: is the 1TB volume):

PS> New-IscsiVirtualDisk -Path "E:\vmware.vhdx" -SizeBytes 900GB 

Now we need to map the Target to the Storage we configured:

PS> Add-IscsiVirtualDiskTargetMapping -TargetName "VMwareiSCSITarget" -Path "E:\vmware.vhdx"

Next, its a good idea to enable authentication on the target, this ensures it is secure:

PS> Set-IscsiServerTarget -TargetName "VMwareiSCSITarget" -EnableChap $True -Chap (New-Object PSCredential("vmwareusername", (ConvertTo-SecureString -AsPlainText "vmwarepassword" -Force))) -PassThru 

Finally, we need to restart the services to ensure our configuration has applied:

PS> Restart-Service -Name WinTarget

We now have iSCSI Services setup on the server, next we get the ESXi hosts setup in vCenter.


0 Comments

Leave a Reply

Avatar placeholder

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