Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm actually using Microsoft Hyper-V Server, which I would think would be similar to a server core installation.

My goal is to use OpenFiler to store my VHD files and access them via iSCSI.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

run iscsicpl, it's the exact same interface as Win7 (and very similar to 2008/Vista). It's all already built in and ready to go.

Make sure you autostart the iSCSI service: sc config msiscsi start=auto

I highly recommend setting up a small (~200MB) LUN and just setting it aside for future use as a quorum drive in case you ever cluster hyper-v. It's a tiny investment to make sure you're storage is ready to go later on.

share|improve this answer
    
... how did I not know that this worked on Server Core? Man I wish I had known this months ago... –  Mark Henderson May 25 '10 at 4:00
    
Yep. It can be grafted into WinPE too, very useful for PXE-boot service images and installing iSCSI Boot machines. But in all versions of Windows (besides Home) from 2008/Vista and newer, iscsicpl works out of the box. –  Chris S May 25 '10 at 4:03
    
I think my first question on SF (almost 12 months ago) was about grafting iscsi into WinPE. It didn't get an acceptable answer until two weeks ago! Well, we live and we learn! –  Mark Henderson May 25 '10 at 4:10
    
Wow, that's awesome! I didn't think a GUI configuration was an option. I always thought that the “server core” thing was command line only. –  Corey May 25 '10 at 4:12
    
I've only been around here for about 4 months. The MS article on WinPE with iSCSI is wrong, there's registry entries that screw up TCPIP... 2008R2 Core isn't bad at all for basic configurations. Start with sconfig, netsh, and ocsetup –  Chris S May 25 '10 at 4:21

There's very good instructions on how to do that on this page here, but in case that link ever goes dead, I'll reproduce the content here:

sc config msiscsi start= auto
[SC] ChangeServiceConfig SUCCESS

Then I entered:

net start msiscsi
The Microsoft iSCSI Initiator Service service is starting.
The Microsoft iSCSI Initiator Service service was started successfully.

Then, you use the Iscsicli command-line interface to connect to an iSCSI Target and list the available targets. The command I entered was:

iscsicli QAddTargetPortal 192.168.1.31
Microsoft iSCSI Initiator Version 6.0 Build 6000 
The operation completed successfully.

Next I entered:

iscsicli ListTargets
Microsoft iSCSI Initiator Version 6.0 Build 6000 

Targets List:
quorum
data
The operation completed successfully.

You can then connect to a target using the following code as an example:

iscsicli qlogintarget data
Microsoft iSCSI Initiator Version 6.0 Build 6000 
Session Id is 0xfffffa800626e018-0x4000013700000006
Connection Id is 0xfffffa800626e018-0x5
The operation completed successfully.

The following code checked to make sure the operation was successful:

iscsicli reporttargetmappings
Microsoft iSCSI Initiator Version 6.0 Build 6000 

Total of 1 mappings returned
Session Id : fffffa800626e018-4000013700000006
Target Name : data
Initiator : Root\ISCSIPRT\0000_0
Initiator Scsi Device : \\.\Scsi4:
Initiator Bus : 0
Initiator Target Id : 0
Target Lun: 0x0  OS Lun: 0x0

The operation completed successfully.

You log out by using the logouttarget switch with the session ID, as the following sample code shows:

iscsicli logouttarget fffffa800626e018-4000013700000006
Microsoft iSCSI Initiator Version 6.0 Build 6000 

The operation completed successfully.

To confirm the operation was successful, I entered the following code:

iscsicli reporttargetmappings
Microsoft iSCSI Initiator Version 6.0 Build 6000 

No Mappings
The operation completed successfully.

The mappings obtained through the qlogintarget command aren’t persistent and will be lost at reboot. If you want a persistent connection, use the perssitenlogintarget switch, as the following code shows:

iscsicli persistentlogintarget data T * * * * * * * * * * * * * * * 0
Microsoft iSCSI Initiator Version 6.0 Build 6000 

The operation completed successfully.

To confirm that the operation was successful, I entered:

iscsicli listpersistenttargets
Microsoft iSCSI Initiator Version 6.0 Build 6000 

Total of 1 peristent targets
Target Name : data
Address and Socket : 192.168.1.31 3260
Session Type : Data
Initiator Name : Root\ISCSIPRT\0000_0
Port Number :
++Security Flags : 0x0
++Version : 0
++Information Specified: 0x20
++Login Flags : 0x8
++Username :

The operation completed successfully.

Entering T * * * * * * * * * * * * * * * 0 specifies all the required switches. To remove a persistent target, apply the information obtained from the listpersistentargets command, using the following code as an example:

iscsicli removepersistenttarget Root\ISCSIPRT\0000_0 data * 192.168.1.31 3260
Microsoft iSCSI Initiator Version 6.0 Build 6000 

The operation completed successfully.

To confirm the success of the operation, I entered:

iscsicli listpersistenttargets
Microsoft iSCSI Initiator Version 6.0 Build 6000 
Total of 0 peristent targets
The operation completed successfully. 
share|improve this answer
    
This works awesome for scripting/automation, as the GUI version doesn't work. –  Chris S May 25 '10 at 4:05
    
Thanks for the quick reply. I'm definitely a GUI type of guy, so I think I will stick with iscsicpl. –  Corey May 25 '10 at 4:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.