Warning: Windows iSCSI is not listed on VMWare HCL as Esxi iSCSI datastore. I am using it as a demo purpose.
In my previous blog I configured Microsoft iSCSI Target Server using GUI way, Here in this chapter I am utilizing Powershell to do the task. First command is to check the status of FS-iSCSITarget-Server role. (Only running Get-WindowsFeature will show all the list of role and features), to show specific role name has to know, run commands in Powershell running as administrators. (I am running these commands directly on windows server 2012 R2)
Get-WindowsFeature -Name FS-iSCSITarget-Server
Next is installing actual role, with all sub features and required management tools.
Install-WindowsFeature -Name FS-iSCSITarget-Server -IncludeAllSubFeature -IncludeManagementTools
Next step, Create Virtual disk before had so it can be mapped later to Target, Make sure you have enough disk space, This is dynamically expanding disk by default.
New-IscsiVirtualDisk -Path "E:\iSCSIDisks\Esxi001boot.vhdx" -SizeBytes 8GB
For nex step initiator IQN addresses are required. I have already shown how to find initiator IQN ID on Esxi server in my earlier blog, It will create target without any vdisk attached.
New-IscsiServerTarget -TargetName "Boot-Esxi001" -InitiatorIds @("iqn:initior01", "iqn:initior02")
This is final step mapping iscsi virtual disk to target.
Add-IscsiVirtualDiskTargetMapping -TargetName "Boot-Esxi001" -Path "E:\iSCSIDisks\Esxi001boot.vhdx"
Series Parts
MICROSOFT WINDOWS 2012 R2 ISCSI TARGET STORAGE SERVER FOR ESXI AND HYPERV
POWERSHELL INSTALLING AND CONFIGURING MICROSOFT ISCSI TARGET SERVER
VMWARE ESXI CONFIGURE (VSWITCH) VMKERNEL NETWORK PORT FOR ISCSI STORAGE
POWERCLI: VMWARE ESXI CONFIGURE (VSWITCH) VMKERNEL NETWORK PORT FOR ISCSI STORAGE
VMWARE ESXI INSTALL AND CONFIGURE SOFTWARE ISCSI STORAGE ADAPTER FOR VMFS VERSION 6 DATASTORE
POWERCLI VMWARE: CONFIGURE SOFTWARE ISCSI STORAGE ADAPTER AND ADD VMFS DATASTORE
VMWARE VCENTER STORAGE MIGRATE/SVMOTION VM AND PORT BINDING MULTIPATHING TESTING
POWERCLI: VIRTUAL MACHINE STORAGE MIGRATE/SVMOTION AND DATASTORE PORT BINDING MULTIPATHING