Jump to content











Photo

Windows iSCSI Target Software


  • Please log in to reply
45 replies to this topic

#26 erwan.l

erwan.l

    Gold Member

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

Posted 04 February 2017 - 05:40 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

 

 

At least the config.xml is ok since it works with pytarget.

 

I have update the GUI here, download it again and put debug=6 (in the gui).

It should give more details about what happens.


  • misty likes this

#27 erwan.l

erwan.l

    Gold Member

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

Posted 04 February 2017 - 05:42 PM

@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

 

 

msiscsi start=0 was a bad idea : messed up my service...

Now fixed and back to start=2.

 

About forcing volumes discovery, I delete the registry key system\MountedDevices.

 

Will report on which windows 7 version I am using

 

Edit :

-my windows 7 version : Microsoft Windows [version 6.1.7601]

-my iscsi initiator works fine and i can attach a remote iscsi device from this windows



#28 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 04 February 2017 - 09:18 PM

@erwan.l
Firstly, just cloned and successfully booted a Windows 7 (SP1 - 32-bit) Target. I used pytarget.exe for the first boot.

Rebooted and used the GUI - this also worked.

:thumbsup:

When running iscsicli.exe in the SAN Booted Windows 7 I received the following output -
Microsoft iSCSI Initiator Version 6.1 Build 7601

[iqn.x200] Enter command or ^C to exit
So the iscsi initiator service is running in a cloned Windows 7, but not in an installed Windows 8.1. At some point I need to check the output on a cloned Windows 8.1.

Misty

#29 erwan.l

erwan.l

    Gold Member

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

Posted 04 February 2017 - 11:19 PM

@erwan.l
Firstly, just cloned and successfully booted a Windows 7 (SP1 - 32-bit) Target. I used pytarget.exe for the first boot.

Rebooted and used the GUI - this also worked.

:thumbsup:

When running iscsicli.exe in the SAN Booted Windows 7 I received the following output -

Microsoft iSCSI Initiator Version 6.1 Build 7601

[iqn.x200] Enter command or ^C to exit
So the iscsi initiator service is running in a cloned Windows 7, but not in an installed Windows 8.1. At some point I need to check the output on a cloned Windows 8.1.

Misty

 

 

Very nice.

So we know pytarget can achieve the same as other known to work iscsi targets.

Pytarget is free, opensource and portable : this goes straight away on my top of the list of "must have softwares" !

 

I am still failing to clone a windows 7 and will therefore wait for your updated gui to restart from scratch.

 

Good to know the new GUI is working fine (I fixed what I suspected to be a possible bug after your previous report).

If you have other suggestions/requests, let me know.



#30 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 05 February 2017 - 05:58 PM

So we know pytarget can achieve the same as other known to work iscsi targets.

Windows 7 working from cloned system. I've not been able to install Windows 7 to a target - something that has been possible with other Target software I have used. On my most recent test I noticed the following error (displayed multiple times - in the pytarget console) -
WARNING:        detect iscsi pdu data invaild, reject request
Windows 8.1 (Update 1) installed successfully to a Target. Cloned system not tested yet.

Windows 10 failed to install to a Target on my test system, however it also failed to install using a different Target software (Kernsafe). Error message during Windows Setup - "Windows installation cannot continue because a required driver could not be installed."

Windows 10 working when cloned to a target (NOTE - GUI used :thumbsup:). Running iscsicli in the SAN Booted OS -
Microsoft iSCSI Initiator Version 10.0 Build 14393

Error getting node name: The Microsoft iSCSI initiator service is not running. Please start the service and retry. 
This is similar to Windows 8.1. As I mentioned in post #25, running iscsicli in SAN Booted Windows 8.1 resulted in -
Microsoft iSCSI Initiator Version 6.3 Build 9600

Error getting node name: The Microsoft iSCSI initiator service has not been star
ted.
Windows 7 output from running iscsicli in SAN Booted Windows 7 (see post #28)
Microsoft iSCSI Initiator Version 6.1 Build 7601

[iqn.x200] Enter command or ^C to exit
Not sure if this is a factor in installing Windows 7 to a target. Other factors may be the range of other iSCSI options not being configured (or perhaps incorrectly configured). The pytarget documentation mentions the following options -
  <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" /> 

...Pytarget is free, opensource and portable : this goes straight away on my top of the list of "must have softwares" !...

:thumbsup: - I agree.




...I am still failing to clone a windows 7 and will therefore wait for your updated gui to restart from scratch...

Not sure what you mean by "...will therefore wait for your updated gui to restart from scratch..."
I'm assuming a typo - I certainly won't be updating any gui! Don't let my account details fool you - I'm no developer!!!!

 

...Good to know the new GUI is working fine (I fixed what I suspected to be a possible bug after your previous report). If you have other suggestions/requests, let me know...

Firstly, thanks for the fix :thumbsup:
Secondly, you may regret asking for suggestions/requests!
The first thing that springs to mind is reading the existing config and parsing any target details (including "Disk Image" and "Initiator IQN") to the GUI to avoid having to manually browse for the disk image if it doesn't need to be changed. Also, I noticed that the disk image will not be used if it's manually entered in the "Disk Image" field in the GUI. Attempted this I received the following error -
WARNING:        open device  FAILED
WARNING:        get file() status FAILED.
When using the same settings in the GUI and using the Browse button to select the disk image it worked fine.

At the moment only *.img files can be selected. Can you add an option to open any file type (equivalant to "All Files" option in Notepad) - or add .vhd and .ima?

Can't think of anything else at the moment.

I would like to say a big thank you for all of your hard work on this and your other projects. :worship:

:cheers:

Misty

#31 erwan.l

erwan.l

    Gold Member

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

Posted 05 February 2017 - 07:59 PM

 

Not sure what you mean by "...will therefore wait for your updated gui to restart from scratch..."
I'm assuming a typo - I certainly won't be updating any gui! Don't let my account details fool you - I'm no developer!!!!

 
Firstly, thanks for the fix :thumbsup:
Secondly, you may regret asking for suggestions/requests!
The first thing that springs to mind is reading the existing config and parsing any target details (including "Disk Image" and "Initiator IQN") to the GUI to avoid having to manually browse for the disk image if it doesn't need to be changed. Also, I noticed that the disk image will not be used if it's manually entered in the "Disk Image" field in the GUI. Attempted this I received the following error -
WARNING:        open device  FAILED
WARNING:        get file() status FAILED.
When using the same settings in the GUI and using the Browse button to select the disk image it worked fine.

At the moment only *.img files can be selected. Can you add an option to open any file type (equivalant to "All Files" option in Notepad) - or add .vhd and .ima?

Can't think of anything else at the moment.

I would like to say a big thank you for all of your hard work on this and your other projects. :worship:

:cheers:

Misty

 

 

I meant "guide" not "gui", sorry :)

 

About the filename manually entered not working : bug fixed.

About the ability to choose img files but also "all files" : done.

About the GUI reading the xml : done.

 

Download v0.3 here.

 

edit : link fixed


  • misty likes this

#32 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 05 February 2017 - 08:35 PM

Thanks erwan,

I've only done a very quick test loading different images from the browse button and adding manually to the "Disk Image" field - in all cases pytarget is starting without any critical errors (the only error is due to something else (TPS) already using port 80).

Fantastic :worship: :thumbsup:

:cheers:

misty

P.s. Download link needs editing. I suspect that I am the only one playing at the moment - just in case I am wrong a working download link is in post #19. Direct download link is here.

P.p.s. Copy and paste is not functioning properly when the GUI is running. Whatever I try to copy from other files is ignored and the output from the pytarget GUI is instead copied.

#33 erwan.l

erwan.l

    Gold Member

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

Posted 05 February 2017 - 09:20 PM


P.p.s. Copy and paste is not functioning properly when the GUI is running. Whatever I try to copy from other files is ignored and the output from the pytarget GUI is instead copied.

 

I was wondering how much time it would take before somebody would notice that :)

I had to do a ugly hack : because this console exe does not seem to support pipe in/out, I have to select all / copy / paste the text from the (hidden) console to be able to display it in my GUI.



#34 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 06 February 2017 - 08:06 AM

Looks like my initial reports of it not being possible to install Windows 7 directly to a pytarget iSCSI target were premature. I noticed the following bug report on the pytarget sourceforge page (see here) -
 

i am study PXE, when i am using pytarget as iscsi target to install fedora 17, it will fail to finish. when i install windows 7, pytarget will change port routine, and install windows 7 take long time, about 5 hours to install a windows 7, but i am install windows 8 and windows 8 server very fast, how can i solve this problem


I gave it another try and just left setup running (first time round it appeared to be hanging so I forced a restart after an hour). I noticed from my TPS log that the initial stage of setup (before the first reboot) took approximately 90 minutes - for the majority of that time setup appeared to hang at the "Installing Updates" and "Completing Installation" phase. Some output from the pytarget GUI console (Debug level was set to 6 (debug mode) - still not sure about difference between the Debug levels 0-6)-
Spoiler


When setup rebooted the next stage took approximately 45 minutes before the system rebooted - with the system appearing to hang at the "Completing Installation" phase for the majority of the time.

Following the next reboot the system appeared to be running at normal (for a SAN booted Windows) speed when completing setup (entering username, PC name, etc).

Shame about the speed, which may make installing Windows 7 to pytarget impractical for many.

Maybe tweaking the iSCSI settings referenced in #30 will make a difference - I don't know where to start though!

Great news that it works though. Another :thumbsup: for pytarget.

And for the GUI too :thumbsup: - BTW, I love the simplicity of the GUI.

Misty

P.s. This test was carried out on Gigabit Ethernet.

P.p.s. Running iscsicli in the SAN booted Windows 7 returned something similar to the following -
Error getting node name: The Microsoft iSCSI initiator service has not been star
ted.


#35 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 06 February 2017 - 07:20 PM

@erwan.l
Another request. Is it possible to add the option to create a new disk image instead of using an existing image? The only thing required in the interface is the option to specify a size for the new image. Adding disk capacity and disk path to the .xml created when starting the GUI should automatically create the image when pytarget.exe is executed.

Regards,

Misty

#36 erwan.l

erwan.l

    Gold Member

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

Posted 06 February 2017 - 07:47 PM

@erwan.l
Another request. Is it possible to add the option to create a new disk image instead of using an existing image? The only thing required in the interface is the option to specify a size for the new image. Adding disk capacity and disk path to the .xml created when starting the GUI should automatically create the image when pytarget.exe is executed.

Regards,

Misty

 

 

Download exe (i did not change the version) and give it a try.

Not sure about the created disk size thus


  • misty likes this

#37 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 06 February 2017 - 08:28 PM

Fast work again! Quick test - set capacity as 2097152 (2097152 x 512 bytes = 1 GiB) and typed a path in the "Disk Image" field - worked fine.

No problems connecting in iPXE using the SANHOOK command. Disk was accessible in WinPE.

Another request (told you you'd regret asking for suggestions/requests!!!! Any chance of changing the capacity field to MiB in the GUI and handling the conversion to units? Still not sure if one unit = 512 bytes or one sector. Only way to find out would be to run pytarget on a native 4k sector hard disk - something that I do not own.

Misty

P.s. There is no rush Erwan - I'm trying to write a guide and all these distractions are really not helping ;)

#38 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 07 February 2017 - 09:12 AM

Another request (told you you'd regret asking for suggestions/requests!!!! Any chance of changing the capacity field to MiB in the GUI and handling the conversion to units? Still not sure if one unit = 512 bytes or one sector. Only way to find out would be to run pytarget on a native 4k sector hard disk - something that I do not own.

Well, if you want to make a test (provided that you have an XP that surely works OR that you find the way to run the driver in a newer windows) the MS VSS driver can create/mount images with a set geometry of 4 K sectors, JFYI:

http://reboot.pro/to...storage-driver/

 

:duff:

Wonko
 


  • misty likes this

#39 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 07 February 2017 - 08:08 PM

@Wonko
Thanks for the link. I'll have to dig out a backup of XP to test. Any example commands for creating and mounting a virtual disk with 4k sectors would be most appreciated.

:cheers:

#40 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 07 February 2017 - 10:18 PM

Just tried the MS VSS driver as recommended by Wonko (64-bit version 6.1.7600 installed). Interesting tool. Shame the maximum disk size when creating a new image is 512 MB.

Created a new disk with a sector size of 4096 bytes. Started pyTarget with capacity set as 204800 (100MB if 1 unit = 512 bytes). Image was 100MB on the 4k sector virtual disk. Looks like 1x unit = 512 bytes whatever the sector size of the backing disk.

Misty

#41 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 08 February 2017 - 09:05 AM

Just tried the MS VSS driver as recommended by Wonko (64-bit version 6.1.7600 installed). Interesting tool. Shame the maximum disk size when creating a new image is 512 MB.

Created a new disk with a sector size of 4096 bytes. Started pyTarget with capacity set as 204800 (100MB if 1 unit = 512 bytes). Image was 100MB on the 4k sector virtual disk. Looks like 1x unit = 512 bytes whatever the sector size of the backing disk.

Misty

Hmmm.

The sector size of the (virtual) disk has nothing to do with size of the backing image for it. 

It only affects the way the (virtual) disk is accessed, both as disk and as volume(s) in it.

 

Check this (only seemingly unrelated), about accessing the SAME disk with BOTH geometries :w00t::

http://www.msfn.org/...ent-interfaces/

http://www.msfn.org/...ent-interfaces/

 

:duff:

Wonko



#42 erwan.l

erwan.l

    Gold Member

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

Posted 08 February 2017 - 11:51 AM

Fast work again! Quick test - set capacity as 2097152 (2097152 x 512 bytes = 1 GiB) and typed a path in the "Disk Image" field - worked fine.

No problems connecting in iPXE using the SANHOOK command. Disk was accessible in WinPE.

Another request (told you you'd regret asking for suggestions/requests!!!! Any chance of changing the capacity field to MiB in the GUI and handling the conversion to units? Still not sure if one unit = 512 bytes or one sector. Only way to find out would be to run pytarget on a native 4k sector hard disk - something that I do not own.

Misty

P.s. There is no rush Erwan - I'm trying to write a guide and all these distractions are really not helping ;)

 

"on tour" in Uk for the next 2 days, I will implement that request by end of this week : easy one.



#43 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 08 February 2017 - 03:32 PM

"on tour" in Uk for the next 2 days, I will implement that request by end of this week : easy one.

Enjoy the tour!

I'm off for a few days from Friday - I will have very limited access to computers and will look forward to the new version on my return.

:cheers:

P.s. I'll try to come up with a more complicated request next time :whistling:

#44 erwan.l

erwan.l

    Gold Member

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

Posted 10 February 2017 - 06:45 PM

Enjoy the tour!

I'm off for a few days from Friday - I will have very limited access to computers and will look forward to the new version on my return.

:cheers:

P.s. I'll try to come up with a more complicated request next time :whistling:

 

Enjoy your time away from the keyboard !



#45 erwan.l

erwan.l

    Gold Member

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

Posted 10 February 2017 - 06:46 PM


Another request (told you you'd regret asking for suggestions/requests!!!! Any chance of changing the capacity field to MiB in the GUI and handling the conversion to units? Still not sure if one unit = 512 bytes or one sector. Only way to find out would be to run pytarget on a native 4k sector hard disk - something that I do not own.

 

 

Done.

Latest version "talks" MBytes now, no more capacity.



#46 misty

misty

    Silver Member

  • Developer
  • 703 posts
  •  
    United Kingdom

Posted 10 February 2017 - 09:49 PM

Thanks Erwan.

Will test when I get back from my trip.

Quick suggestion for the UI - instead of Size, what about Size (MB)? Should not affect functionality - would be purely for the sake of being more user friendly.

Misty




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users