To configure the iSCSI Initiator to connect to an iSCSI drive on a Windows Server Core system, perform the below steps:
- Start up the Microsoft iSCSI Initiator service and then configure it to start automatically. You can use the sc (service control) command line tool to set the service for automatic startup:
sc \\<server_name> config msiSCSI start= auto
net start msiSCSIto start the service
- Set the advanced features of the Windows firewall to allow for the iSCSI Initiator service. You can use the netsh command line tool or the Windows Firewall snap-in on a remote Windows Server 2008 system.
- Once the iSCSI service has been started, you will need to add a target portal to be able to add the server to the target server and assign LUNs for storage. The below command will perform this:
iSCSIcli QAddTargetPortal <Portal IP Address>
Next, configure the LUN information on the target. When the command has completed, run the
iSCSIcli ListTargetscommand to verify the target name. When the target has been identified, you should login to the target using the below command:
iSCSIcli QloginTarget <Targetname>
To ensure the target persists after reboots, execute the below command:
iSCSIcli PersistentLoginTarget <target_iqn> T * * * * * * * * * * * * * * * 0
- Ensure that the target and list the mappings on the target have been persisted. The two commands for this are
- Confirm connectivity to the storage and then prepare the storage by using diskpart.
For more information on iSCSI on Windows Server please see http://blogs.technet.com/daven/archive/2008/06/19/iscsi.aspx