Jump to content











Photo

Windows iSCSI Target Software


  • Please log in to reply
60 replies to this topic

#1 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 02 February 2017 - 01:49 PM

Updated 10th June 2019

Following discussions in the SANBOOT Windows on UEFI system? topic and lots of recent tests, I have updating this post. My original post is included below for continuity purposes (so that the discussion that follows this first post makes sense).

A more detailed comparison of Windows iscsi targets is available here (and also attached to this post in case there are future issues accessing the mistyprojects.co.uk site).

The following is a list of Windows iSCSI Target Software. Some old, some new, most still available. I have also indicated which Targets support installing and booting Windows from Storage Area Network (SAN) - and whether this is supported using Client/Initiators Systems with BIOS or UEFI Firmware.
  • Kernsafe iSCSI SAN - a free version is available for download (iStorage Server Free) - you will need to register for an account in order to apply for a free license. Registering for an account is relatively straightforward - at the time of writing it's possible to download a 20-day trial version without registering. BIOS Clients - SAN Boot Supported. UEFI Clients - SAN Boot NOT supported..
  • StarWind Virtual SAN - as of 10th June 2019 the most recent version is StarWind 8. A Free license/version is available. At the time of writing (10th June 2019) the StarWind Management Console (GUI) can only be used for monitoring purposes, and using the GUI for Target management is disabled in the FREE version/license (see here). Powershell scripts can be used for Target management functions in the FREE version. BIOS Clients - SAN Boot Supported. UEFI Clients - SAN Boot NOT supported..
  • Starwind - legacy versions - including versions 4 / 5.2 / 5.8 / 6.0. As far as I am aware these versions are no longer available commercially. A FREE license appears to have been available for all of these versions at the time of release - with limited functionality. Versions 4.0 and 5.2 both offer a trial period without a licence. Version 5.8 and 6.0 cannot be installed successfully without a license. BIOS Clients - SAN Boot Supported. UEFI Clients - SAN Boot supported.
  • Microsoft iSCSI Software Target 3.3 - an optional Windows Server component for Windows Server 2008 R2 and Windows Server 2008 R2 SP1. BIOS Clients - SAN Boot Supported. UEFI Clients - SAN Boot NOT supported..
  • iSCSI Cake - 15 day trial. BIOS Clients - SAN Boot NOT supported.. UEFI Clients - SAN Boot NOT supported...
  • pyTarget - "...Implement a powerful iSCSI target in python, easily use under most popular systems. ..." - a standalone binary is available for Windows 32-bit (will run without python environment). This project does not have a GUI, however it can be configured from a web interface. Alternatively a .xml configuration file can be used. BIOS Clients - SAN Boot Supported. UEFI Clients - SAN Boot NOT supported..
  • SANDeploy Server - 30 day trial. Two version are available - SANDeploy Server and SANDeploy Boot Server (which includes DHCP and TFTP server). BIOS Clients - SAN Boot Supported. UEFI Clients - SAN Boot NOT supported..
  • iSCSI Console. Open source. Free. Portable (using Mono.exe). BIOS Clients - SAN Boot Supported. UEFI Clients - SAN Boot supported. RECOMMENDED
:cheers:

Misty

Original Post



A list of Windows iSCSI Target software. Please add to the list -

  • Kernsafe iSCSI SAN - a free version is available for download (iStorage Server Free) - you will need to register for an account in order to apply for a free license. Registering for an account is relatively straightforward - at the time of writing it's possible to download a 20-day trial version without registering.
  • StarWind Virtual SAN - a Free license/version is available. Personally I found it very difficult to register and obtain a free license as a corporate email address is required.
  • pyTarget - "...Implement a powerful iSCSI target in python, easily use under most popular systems. ..." - a standalone binary is available for Windows 32-bit (will run without python environment). This project does not have a GUI, however it can be configured from a web interface. Alternatively a .xml configuration file can be used.
  • SANDeploy Server - 30 day trial. Two version are available - SANDeploy Server and SANDeploy Boot Server (which includes DHCP and TFTP server). Not tested.
pyTarget looks particularly promising - a Quick and Dirty GUI would be useful :whistling:

Misty

EDIT - Download link for Erwan.l's pyTarget GUI is in post #19. Direct download link is here.

Attached Files



#2 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 02 February 2017 - 05:47 PM

Writing this on a SAN Booted Windows 8.1 - booted from an pyTarget Target.

Client IQN must be specified in the pyTarget configuration file or SANHOOK/SANBOOT will fail.

Use iPXE set initiator-iqn command to set Client IQN to the same name as the IQN specified in the pyTarget config file.

I thought that there might be problems when Windows booted due to the possibility of Windows setting a different IQN and disk access being lost in the handover. Ran iscsicli.exe in Windows and received the following output -
C:\Windows\system32>iscsicli.exe
Microsoft iSCSI Initiator Version 6.3 Build 9600

Error getting node name: The Microsoft iSCSI initiator service has not been star
ted.
Misty

#3 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 02 February 2017 - 06:31 PM

Did I mention that pyTarget seems to be portable and lightweight - it's only 5 MiB in size.

Documentation is not great. There is a .pdf in the download. Example Config for Target disk -
<host name="iqn.2006-11.1" target_pwd="" initiator_pwd="">         
   <lun id="0" type="0" path="Disk-1" capacity="102400" />
</host>  
path= - supports image and path (e.g. path="D:\target.ima")

Documentation states that -

Capacity field indicates disk capacity, 1M=2 * 1024 = 2048

It's possible that 1 unit is a disk sector - 2048 x 512 byte sectors would equal 1 MB. It would be interesting to see how the same command runs on a 4k sector disk.

If the Target disk does not exist, it will be created as a raw file with path and size specified in the config file.

Have fun.

Misty

p.s. My current config settings (target disk (capacity="41943040") is 20 GB) -
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root>
    <!-- configure target console -->
    <console ip="" port="3260" debug_level="1" />

    <!-- configure the first target -->
    <target name="iqn.py1" ip="192.168.1.1" port="3260" portal="1">
        <!-- the first iqn of this target configured for disk array -->
        <host name="iqn.x200" target_pwd="" initiator_pwd="">
            <lun id="0" type="0" path="E:\x200.pyiscsi.test.ima" capacity="41943040" />
        </host>
	    <!-- negotiation parameter for this target -->
	    <item key="MaxConnections" value="8" />
	    <item key="InitialR2T" value="Yes" />
	    <item key="ImmediateData" value="Yes" />
	    <item key="FirstBurstLength" value="65536" />
	    <item key="MaxBurstLength" value="262144" />
	    <item key="DefaultTime2Wait" value="2" />    
	    <item key="DefaultTime2Retain" value="20" />        
	    <item key="MaxOutstandingR2T" value="16" />  
	    <item key="DataPDUInOrder" value="Yes" />  
	    <item key="DataSequenceInOrder" value="Yes" />     
	    <item key="ErrorRecoveryLevel" value="2" />
	    <item key="MaxRecvDataSegmentLength" value="65536" />
    </target>
</root>


#4 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 02 February 2017 - 07:00 PM

Did I mention that pyTarget seems to be portable and lightweight - it's only 5 MiB in size.

Documentation is not great. There is a .pdf in the download. Example Config for Target disk -

<host name="iqn.2006-11.1" target_pwd="" initiator_pwd="">         
   <lun id="0" type="0" path="Disk-1" capacity="102400" />
</host>  
path= - supports image and path (e.g. path="D:\target.ima")

Documentation states that -

It's possible that 1 unit is a disk sector - 2048 x 512 byte sectors would equal 1 MB. It would be interesting to see how the same command runs on a 4k sector disk.

If the Target disk does not exist, it will be created as a raw file with path and size specified in the config file.

Have fun.

Misty

p.s. My current config settings (target disk (capacity="41943040") is 20 GB) -
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root>
    <!-- configure target console -->
    <console ip="" port="3260" debug_level="1" />

    <!-- configure the first target -->
    <target name="iqn.py1" ip="192.168.1.1" port="3260" portal="1">
        <!-- the first iqn of this target configured for disk array -->
        <host name="iqn.x200" target_pwd="" initiator_pwd="">
            <lun id="0" type="0" path="E:\x200.pyiscsi.test.ima" capacity="41943040" />
        </host>
	    <!-- negotiation parameter for this target -->
	    <item key="MaxConnections" value="8" />
	    <item key="InitialR2T" value="Yes" />
	    <item key="ImmediateData" value="Yes" />
	    <item key="FirstBurstLength" value="65536" />
	    <item key="MaxBurstLength" value="262144" />
	    <item key="DefaultTime2Wait" value="2" />    
	    <item key="DefaultTime2Retain" value="20" />        
	    <item key="MaxOutstandingR2T" value="16" />  
	    <item key="DataPDUInOrder" value="Yes" />  
	    <item key="DataSequenceInOrder" value="Yes" />     
	    <item key="ErrorRecoveryLevel" value="2" />
	    <item key="MaxRecvDataSegmentLength" value="65536" />
    </target>
</root>

 

Would you want a GUI may be?  B)

Something coded in delphi, portable?



#5 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 02 February 2017 - 07:23 PM

Would you want a GUI may be?  B)
Something coded in delphi, portable?

Sounds great. Was this a spontaneous offer (having perhaps not read properly post #1), or did you in fact take the bait?

...pyTarget looks particularly promising - a Quick and Dirty GUI would be useful :whistling:


Misty

#6 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 02 February 2017 - 07:32 PM

pytarget looks promising !

Getting an error for now with pytarget.

 

my config

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root>
    <!-- configure target console -->
    <console ip="" port="3260" debug_level="1" />

    <!-- configure the first target -->
    <target name="iqn.py1" ip="192.168.1.123" port="3260" portal="1">
        <!-- the first iqn of this target configured for disk array -->
        <host name="iqn.x200" target_pwd="" initiator_pwd="">
            <lun id="0" type="0" path="C:\Users\erwan\Desktop\pyTarget-1.5.7.1.binary-for-windows-x86\test.vhd" capacity="268435456" />
        </host>
	    <!-- negotiation parameter for this target -->
	    <item key="MaxConnections" value="8" />
	    <item key="InitialR2T" value="Yes" />
	    <item key="ImmediateData" value="Yes" />
	    <item key="FirstBurstLength" value="65536" />
	    <item key="MaxBurstLength" value="262144" />
	    <item key="DefaultTime2Wait" value="2" />    
	    <item key="DefaultTime2Retain" value="20" />        
	    <item key="MaxOutstandingR2T" value="16" />  
	    <item key="DataPDUInOrder" value="Yes" />  
	    <item key="DataSequenceInOrder" value="Yes" />     
	    <item key="ErrorRecoveryLevel" value="2" />
	    <item key="MaxRecvDataSegmentLength" value="65536" />
    </target>
</root>


#7 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 02 February 2017 - 07:34 PM

Sounds great. Was this a spontaneous offer (having perhaps not read properly post #1), or did you in fact take the bait?

Misty

 

I confess : I took the bait :)

I use iscsi in many situations and having a portable/free iscsi target would be great.

 

Putting a GUI work should not be too much work :

 

-point to an image file...

-retrieve size, system ip, etc, generate the config file...

-launch the exe

 

I need to sort out the error I am getting before I initiate a GUI (socket error...).

 

error solved : IIS (web server) was running on tcp:80, service stopped...


  • misty likes this

#8 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 02 February 2017 - 07:44 PM

pytarget looks promising !
Getting an error for now with pytarget....

I don't think it likes VHD files. Haven't tested properly, but I'm guessing that the 1 sector header on fixed VHD's is mounted along with the rest of the file - this is purely conjecture at this point.

Misty

P.s. If the disk image is in the same directory as the exe then the path can be omitted - handy for portable operation(s).



#9 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 02 February 2017 - 07:57 PM

The capacity is not user friendly ...

 

Test.img is 256MB.

256*1024*1024 * 2 = 536870912.

 

Now getting another error.

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root>
    <!-- configure target console -->
    <console ip="" port="3260" debug_level="1" />

    <!-- configure the first target -->
    <target name="iqn.py1" ip="192.168.1.123" port="3260" portal="1">
        <!-- the first iqn of this target configured for disk array -->
        <host name="iqn.x200" target_pwd="" initiator_pwd="">
            <lun id="0" type="0" path="test.img" capacity="536870912" />
        </host>
	    <!-- negotiation parameter for this target -->
	    <item key="MaxConnections" value="8" />
	    <item key="InitialR2T" value="Yes" />
	    <item key="ImmediateData" value="Yes" />
	    <item key="FirstBurstLength" value="65536" />
	    <item key="MaxBurstLength" value="262144" />
	    <item key="DefaultTime2Wait" value="2" />    
	    <item key="DefaultTime2Retain" value="20" />        
	    <item key="MaxOutstandingR2T" value="16" />  
	    <item key="DataPDUInOrder" value="Yes" />  
	    <item key="DataSequenceInOrder" value="Yes" />     
	    <item key="ErrorRecoveryLevel" value="2" />
	    <item key="MaxRecvDataSegmentLength" value="65536" />
    </target>
</root>


#10 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 02 February 2017 - 08:16 PM

Is it this error...
error: [Errno 10013] An attempt was made to access a socket in a way forbidden b
y its access permissions
...this appears to be due to a conflict if a webserver is running on port 80 (e.g. TPS). Doesn't appear to effect functionality, however web console will not be working.

Misty

#11 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 02 February 2017 - 08:24 PM

Is it this error...

error: [Errno 10013] An attempt was made to access a socket in a way forbidden b
y its access permissions
...this appears to be due to a conflict if a webserver is running on port 80 (e.g. TPS). Doesn't appear to effect functionality, however web console will not be working.

Misty

 

 

Yep, that was the one.

I have a new error now which is more "cryptic".

 

xtC5sld.png

 

i must be doing something wrong.

works if i use

<lun id="0" type="0" path="disk-1" capacity="102400" />


#12 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 02 February 2017 - 08:31 PM

Got it to work :)

 

My disk is 256MB = 262144KB.

Multiply by 2 and I get the right capacity i.e 524288.

Or easier ... 256 *2048 ... should have read closer...

I must be slow today...

 

GUI time now.



#13 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 02 February 2017 - 09:20 PM

Got it to work :)
 
My disk is 256MB = 262144KB.
Multiply by 2 and I get the right capacity i.e 524288.
Or easier ... 256 *2048 ... should have read closer...
I must be slow today...

RT(F)M! :)

....GUI time now.

:thumbsup:

Misty

P.s. Just tried a fixed VHD as target. Created the VHD on my server using DiskPart - partitioned, formatted, etc. Connected from a Windows 7 PC (not SAN boot - just connected as storage) - it mounted the single partition without any problems.

#14 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 02 February 2017 - 09:21 PM

A quick and dirty GUI here.

 

I spent less than 5 mns on it : be nice :)

 

Eventually update the textboxes : IQN and listening IP.

Click GO and select an image file.

It will generate a config.xml file.

 

edit : link fixed as dropbox is letting me down.



#15 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 02 February 2017 - 09:51 PM

Download error
Error (429)
This account's links are generating too much traffic and have been temporarily disabled! 
Bloody fast work though!

Misty

#16 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15070 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 February 2017 - 09:40 AM

I don't think it likes VHD files. Haven't tested properly, but I'm guessing that the 1 sector header on fixed VHD's is mounted along with the rest of the file - this is purely conjecture at this point.

Misty

Just for the record, there is NO 1 sector header in fixed VHD, there is a 1 sector footer (the CONECTIX descriptor sector) appended to the RAW image.

 

:duff:

Wonko



#17 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 03 February 2017 - 04:13 PM

@Wonko
Thanks for the info. I couldn't recall if it was a header, or footer, or both! Due to other commitments and an ability to get easily distracted, I have had to limit my experiments with VHD files. I have a guide to update - a guide I seem to recall you volunteering me for!!!


:jaclaz: + :whip: = guide

Misty

#18 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 15070 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 03 February 2017 - 04:51 PM

@Wonko
Thanks for the info. I couldn't recall if it was a header, or footer, or both! Due to other commitments and an ability to get easily distracted, I have had to limit my experiments with VHD files. I have a guide to update - a guide I seem to recall you volunteering me for!!!

 

But on the other hand, I didn't actually ask you (yet) to volunteer for this:
http://reboot.pro/to...b4dos/?p=201980

 

though I reserve all rights to do so in the future.

 

And yes, I just took note that I might need a special permission from you know who :rolleyes:  , that would be - I guess - the most tricky part :unsure:.

 

:duff:

Wonko



#19 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 03 February 2017 - 07:24 PM

Working pytarget GUI here.

 

-pick disk image file

-modify iqn (optional)

-modify listening ip (optional)

-start / stop

 

The exe will generate the config.xml and launch pytarget while displaying the output in the memo box.

The exe needs to be in the same folder as pytarget.exe.

 

GUI is ugly but this is not a beauty contest :)

No error checking, etc ...



#20 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 03 February 2017 - 07:40 PM

@erwan.l
It looks beautiful in it's simplicity!

I'm not in a position to test this evening as I'm off out to bid farewell to a colleague.

Will test as soon as I have the opportunity and will feedback.

:cheers:

Misty

#21 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 03 February 2017 - 09:06 PM

A screenshot for pytarget GUI

 

enGEYrv.png



#22 erwan.l

erwan.l

    Platinum Member

  • Developer
  • 2794 posts
  • Location:Nantes - France
  •  
    France

Posted 03 February 2017 - 10:35 PM

I can boot windows 7 thru iscsi but end up with a 0x7b.

I have disabled LWF (see here), and forced services (nic and msiscsi) to start=0, disabled firewall, deleted the disk id to force rediscovery at next reboot ... but no success so far.

 

Enabling debugging, i get the below.

 

NIAxKbs.png



#23 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 04 February 2017 - 02:33 PM

Hi erwan,

I have not yet been able to get the GUI to work yet.

Config generated by the GUI

<?xml version="1.0" encoding="UTF-8"?>
<root app="pytarget" time="2/3/2017 9:48:58 PM">
  <console ip="" port="3260" debug_level="1"/>
  <target name="pytarget" ip="192.168.1.1" port="3260" portal="1">
    <host name="iqn1234" target_pwd="" initiator_pwd="">
      <lun id="0" type="0" path="E:\x200.pyiscsi.test.img" capacity="41943040"/>
    </host>
  </target>
</root>
Starting the GUI, the following error messages were displayed -
INFO:   pyTarget 1.5.7.1 2010-12-26
INFO:   start iSCSI Service ...
INFO:   initialize virtual device, please wait...
INFO:   start iSNS Service ...
INFO:   start Http Service ...
ERROR:  C:\pxesrv\pyTarget1571\pytarget.exe\tagt\config.pyo 183 Read config.xml
FAILED
ERROR:  C:\pxesrv\pyTarget1571\pytarget.exe\tagt\config.pyo 183 Read config.xml
FAILED
Same config with pytarget.exe executed directly (GUI not used) worked fine -
INFO:   pyTarget 1.5.7.1 2010-12-26
INFO:   start iSCSI Service ...
INFO:   start iSNS Service ...
INFO:   initialize virtual device, please wait...
INFO:   start Http Service ...
Let me know if you need any more info of if there's anything else I can do to test.

Misty

#24 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 04 February 2017 - 02:37 PM

Attempted to install Windows 7 (SP1 - 32-bit) directly to a pyTarget Target - it failed to boot during stage 2 (the first reboot after running setup.exe).

A windows 7 disk created with a different Target software (Kernsafe iStorage Server) booted ok when moved to pytarget.

Haven't got a clue what's happening.

Misty

P.s. I haven't tried cloning Windows 7 to a pyTarget Target.

EDIT - I just happened to have an AoE disk cloned from a Windows 2008 R2 SP1 system lying around :whistling: - mounted this in pyTarget - it took ages to complete the first boot and then prompted to reboot on reaching the desktop - seemed fine on reboot.

#25 misty

misty

    Gold Member

  • Developer
  • 1033 posts
  •  
    United Kingdom

Posted 04 February 2017 - 03:55 PM

...I have disabled LWF (see here), and forced services (nic and msiscsi) to start=0, disabled firewall, deleted the disk id to force rediscovery at next reboot ... but no success so far...

@erwan
I've never set the msiscsi service to start=0 - could this be the problem?

On my Windows 8.1 Update 1 system (installed directly to a pyTarget Target disk) I ran iscsicli on the SAN nooted Windows and received the following output -
C:\Windows\system32>iscsicli.exe
Microsoft iSCSI Initiator Version 6.3 Build 9600

Error getting node name: The Microsoft iSCSI initiator service has not been star
ted.
Had similar output on a booted Windows 7 SP1 system.

Also, what did you do when you "...deleted the disk id to force rediscovery at next reboot..."?

Misty




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users