Add iSCSI initiator to the Windows Server 2008/2008R2/SBS 2008/SBS 2011 installation DVD

Goal

These days, in large environments, iSCSI has become the defacto standard to make block storage readily available to other computers. A possible deployment scenario is attaching an iSCSI target to a Windows server to create backups using the built-in Windows backup software.

However, the Windows installation DVD (which is required for a BMR, Bare-Metal Restore) doesn’t come with the Microsoft iSCSI initiator. So we’re going to add it ourselves.

This works for all installation DVD’s starting with Windows Vista up to Windows 7 including all server versions.

Updates

25/01/2012: the registry entries are now a hyperlink to a file you can download. WordPress was leaving out the “\ 0” (without the space) which could lead to all sorts of errors including “initiator instance does not exist”.

Prerequisites

  • The Windows Automated Installation Kit, installed, specific for the operating system you wish to restore. If you want to restore a Windows 2008 server, you need the Windows Vista AIK, if you want to restore a Windows 2008 R2 server, you need the Windows 7 AIK.
  • A Windows Vista/7/Server 2008/Server 2008R2/SBS 2008/SBS 2011 DVD.
  • A clean Windows installation. Preferably install a new machine.
  • This also works with the Small Business Server 2008 or 2011 operating system. SBS 2008 is based on Windows 2008 Server (which, in turn, is based on Windows Vista) and SBS 2011 on Windows 2008R2 Server (which is based on Windows 7).

Caveats

  • The major release of Windows you wish to restore must match the DVD you’re creating. You cannot use a Windows 7 DVD to restore a Windows Vista/2008 Server and you cannot use a Windows Vista/2008 Server DVD to restore a Windows 7. So:
    • Restore Windows Vista/2008 Server -> Windows Vista AIK & DVD
    • Restore Windows 7/2008 R2 Server -> Windows 7 AIK & DVD
  • Basically we’re going to be ripping out the necessary components out of an existing Windows installation and put these components on the installation DVD.
  • We’re going to use the pre-installation environment from the Windows DVD because the pre-installation environment from the AIK, winpe.wim, doesn’t contain recenv.exe, what you need to restore a backup.
  • All systems involved should have the same architecture.

Stealing the iSCSI initiator components

For this you’ll need a clean installed Windows OS. You need to copy the following files from it:

%systemroot%\System32\drivers\msiscsi.sys
%systemroot%\System32\en-US\iscsicli.exe.mui
%systemroot%\System32\en-US\iscsicpl.dll.mui
%systemroot%\System32\en-US\iscsicpl.exe.mui
%systemroot%\System32\en-US\iscsidsc.dll.mui
%systemroot%\System32\en-US\iscsiexe.dll.mui
%systemroot%\System32\en-US\iscsilog.dll.mui
%systemroot%\System32\iscsicli.exe
%systemroot%\System32\iscsicpl.dll
%systemroot%\System32\iscsicpl.exe
%systemroot%\System32\iscsidsc.dll
%systemroot%\System32\iscsied.dll
%systemroot%\System32\iscsiexe.dll
%systemroot%\System32\iscsilog.dll
%systemroot%\System32\iscsium.dll
%systemroot%\System32\iscsiwmi.dll
%systemroot%\System32\oledlg.dll

Keep the tree intact.

Setting up the root

Open the Deployment Tools Command Prompt as Administrator and use the included copype script to set up the root:

In the command prompt:

C:\Program Files\Windows AIK\Tools\PETools>copype
Usage: copype [x86 | amd64 | ia64] destination

Example: copype x86 c:\windowspe-x86

C:\Program Files\Windows AIK\Tools\PETools>copype amd64 c:\tmp 
===================================================
Creating Windows PE customization working directory

    c:\tmp
===================================================

        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
        1 file(s) copied.
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\bcd
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\boot.sdi
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\bootfix.bin
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\efisys.bin
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\efisys_noprompt.bin
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\etfsboot.com
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\fonts\chs_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\fonts\cht_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\fonts\jpn_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\fonts\kor_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\amd64\boot\fonts\wgl4_boot.ttf
11 File(s) copied
C:\Program Files\Windows AIK\Tools\PETools\amd64\EFI\boot\bootx64.efi
C:\Program Files\Windows AIK\Tools\PETools\amd64\EFI\microsoft\boot\bcd
C:\Program Files\Windows AIK\Tools\PETools\amd64\EFI\microsoft\boot\fonts\chs_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\amd64\EFI\microsoft\boot\fonts\cht_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\amd64\EFI\microsoft\boot\fonts\jpn_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\amd64\EFI\microsoft\boot\fonts\kor_boot.ttf
C:\Program Files\Windows AIK\Tools\PETools\amd64\EFI\microsoft\boot\fonts\wgl4_boot.ttf
7 File(s) copied
        1 file(s) copied.

Success

Updating path to include peimg, cdimage, imagex

   C:\Program Files\Windows AIK\Tools\PETools\
   C:\Program Files\Windows AIK\Tools\PETools\..\AMD64

c:\tmp>

You should now have the following directory structure:

Copying boot.wim from the installation DVD

Insert your Windows installation DVD and copy the following file

\sources\boot.wim

to

C:\tmp\ISO\sources

Mounting the .wim image

We must mount the boot.wim image using imagex, this will allow us to edit the files inside the .wim file. A .wim file can contain multiple images (that’s how they create DVD’s that can install multiple editions of Windows 7), so it’s important we supply the correct image_number argument. We can check which images a .wim file contains using the same imagex tool:

C:\tmp>imagex /info /?

ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385

IMAGEX [FLAGS] /INFO img_file [img_number | img_name] [new_name] [new_desc]

Returns the stored XML descriptions for the specified WIM or image.

  img_file - The path of the WIM file to be queried for XML information.
  img_number - The number that identifies an image within the WIM file.
  img_name - The name that identifies an image within the WIM file.
  new_name - The new unique name for the specified image.
  new_desc - The new description for the specified image.

Accepted FLAGS:

  /BOOT
  Marks a volume image as bootable. Available for Windows PE images only.

  /CHECK
  If not provided, existing checks are removed during updates.

  /TEMP
  Specifies the path where temporary files are stored.

  /XML
  Returns the output as well-formed XML.

Example:
  imagex /info d:\imaging\data.wim

C:\tmp>imagex /info C:\tmp\ISO\sources\boot.wim

ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385

WIM Information:
----------------
Path:        C:\tmp\ISO\sources\boot.wim
GUID:        {868be8f0-f22c-494b-b20a-e9d997a921e5}
Image Count: 2
Compression: LZX
Part Number: 1/1
Boot Index:  2
Attributes:  0x8
             Relative path junction

Available Image Choices:
------------------------
<WIM>
  <TOTALBYTES>168641635</TOTALBYTES>
  <IMAGE INDEX="1">
    <DIRCOUNT>2182</DIRCOUNT>
    <FILECOUNT>9853</FILECOUNT>
    <TOTALBYTES>985750801</TOTALBYTES>
    <HARDLINKBYTES>334277841</HARDLINKBYTES>
    <CREATIONTIME>
      <HIGHPART>0x01CB88D1</HIGHPART>
      <LOWPART>0xDB7CCA61</LOWPART>
    </CREATIONTIME>
    <LASTMODIFICATIONTIME>
      <HIGHPART>0x01CB88D1</HIGHPART>
      <LOWPART>0xDBE0C44B</LOWPART>
    </LASTMODIFICATIONTIME>
    <WINDOWS>
      <ARCH>9</ARCH>
      <PRODUCTNAME>Microsoft® Windows® Operating System</PRODUCTNAME>
      <EDITIONID>WindowsPE</EDITIONID>
      <INSTALLATIONTYPE>WindowsPE</INSTALLATIONTYPE>
      <PRODUCTTYPE>WinNT</PRODUCTTYPE>
      <PRODUCTSUITE></PRODUCTSUITE>
      <LANGUAGES>
        <LANGUAGE>en-US</LANGUAGE>
        <DEFAULT>en-US</DEFAULT>
      </LANGUAGES>
      <VERSION>
        <MAJOR>6</MAJOR>
        <MINOR>1</MINOR>
        <BUILD>7601</BUILD>
        <SPBUILD>17514</SPBUILD>
        <SPLEVEL>1</SPLEVEL>
      </VERSION>
      <SYSTEMROOT>WINDOWS</SYSTEMROOT>
    </WINDOWS>
    <NAME>Microsoft Windows PE (x64)</NAME>
    <DESCRIPTION>Microsoft Windows PE (x64)</DESCRIPTION>
    <FLAGS>9</FLAGS>
  </IMAGE>
  <IMAGE INDEX="2">
    <DIRCOUNT>2413</DIRCOUNT>
    <FILECOUNT>10532</FILECOUNT>
    <TOTALBYTES>1072858042</TOTALBYTES>
    <HARDLINKBYTES>379422568</HARDLINKBYTES>
    <CREATIONTIME>
      <HIGHPART>0x01CB88D1</HIGHPART>
      <LOWPART>0xEA7C5A8E</LOWPART>
    </CREATIONTIME>
    <LASTMODIFICATIONTIME>
      <HIGHPART>0x01CB8951</HIGHPART>
      <LOWPART>0x471198E5</LOWPART>
    </LASTMODIFICATIONTIME>
    <WINDOWS>
      <ARCH>9</ARCH>
      <PRODUCTNAME>Microsoft® Windows® Operating System</PRODUCTNAME>
      <EDITIONID>WindowsPE</EDITIONID>
      <INSTALLATIONTYPE>WindowsPE</INSTALLATIONTYPE>
      <PRODUCTTYPE>WinNT</PRODUCTTYPE>
      <PRODUCTSUITE></PRODUCTSUITE>
      <LANGUAGES>
        <LANGUAGE>en-US</LANGUAGE>
        <DEFAULT>en-US</DEFAULT>
      </LANGUAGES>
      <VERSION>
        <MAJOR>6</MAJOR>
        <MINOR>1</MINOR>
        <BUILD>7601</BUILD>
        <SPBUILD>17514</SPBUILD>
        <SPLEVEL>1</SPLEVEL>
      </VERSION>
      <SYSTEMROOT>WINDOWS</SYSTEMROOT>
    </WINDOWS>
    <NAME>Microsoft Windows Setup (x64)</NAME>
    <DESCRIPTION>Microsoft Windows Setup (x64)</DESCRIPTION>
    <FLAGS>2</FLAGS>
  </IMAGE>
</WIM>

C:\tmp\>

Mount the image. The one we want is the “Microsoft Windows Setup (x64)”, which has number 2.

C:\tmp>imagex /mountrw /?

ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385

IMAGEX [FLAGS] /MOUNTRW [image_file image_number | image_name image_path]

Mounts a WIM image with read/write permission, to a specified path.

  image_file - The path of the WIM file containing the specified image.
  image_number - The number that identifies the image within the WIM file.
  image_name - The name that identifies the image within the WIM file.
  image_path - The path where the specified image will be mounted.

Without FLAGS:

  Lists mounted images.

Accepted FLAGS:

  /CHECK
  Enables WIM integrity checking. If not provided, existing checks are removed.

Example:
  imagex /mountrw d:\imaging\data.wim 2 c:\mounted_images

C:\tmp>imagex /mountrw c:\tmp\ISO\sources\boot.wim 2 C:\tmp\mount

ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385

Mounting: [c:\tmp\ISO\sources\boot.wim, 2] -> [C:\tmp\mount]...

[ 100% ] Mounting progress

Successfully mounted image.

Total elapsed time: 47 sec

C:\tmp>

If we now visit C:\tmp\mount, what we see is actually the content of boot.wim.

Integrating the iSCSI initiator components

Copying files

Copy the files you retrieved from your source installation to where you mounted the boot.wim tree. The files must match in location, so if you had for example

C:\Windows\System32\iscsicli.exe

This must become

C:\tmp\mount\Windows\System32\iscsicli.exe

Verify all files stated above are present.

Modifying the registry

Next up is modifying the registry to integrate the iSCSI initiator driver in the Windows setup environment. Open the Windows registry editor (regedit.exe) and select the HKEY_LOCAL_MACHINE root. This will allow you to load an external registry file. We have to load two hives. Select File -> Load Hive and browse to:

C:\tmp\mount\Windows\System32\config\SYSTEM

Key Name: PE_Sys

Next up, load:

C:\tmp\mount\Windows\System32\config\SOFTWARE

Key Name: PE_Soft

The result should look like this:

Right click and save the following .reg file:

http://users.telenet.be/redshift/iscsi.reg

Then select File -> Import and import the .reg file you just downloaded.

Unload the loaded hives by selecting File -> Unload Hive on PE_Soft and PE_Sys.

You’re done, all necessary components have been integrated. If you want you can extra drivers (storage, networking, etc…) using the dism tool.

Saving changes to the .wim file

Make sure there are no open explorer windows on C:\tmp\mount and the registry hives are unloaded. We use the same imagex tool to commit the changes and unmount the .wim file:

C:\tmp>imagex /commit /?

ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385

IMAGEX [FLAGS] /COMMIT mount_path ["image_name"]

Commits the changes made to a mounted image without unmounting the image.

  mount_path - The path of the mounted image to commit.
  image_name - If the /append flag is set, then a unique image name must be provided.

Accepted FLAGS:

  /APPEND
  Captures the changes made to the wim into a new image in the wim.

  /TEMP
  Specifies the path where temporary files are stored.

Example:
  imagex /commit c:\mounted_images
  imagex /commit /append c:\mounted_images new_image_name

C:\tmp>imagex /commit c:\tmp\mount 
ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385

Committing: [c:\tmp\mount]...

[ 100% ] Committing Image progress

Successfully committed image.

Total elapsed time: 19 sec

C:\tmp>imagex /unmount /?

ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385

IMAGEX /UNMOUNT [/COMMIT] [image_path]

Unmounts a WIM image from the specified path.

  image_path - The path to be unmounted.

Without FLAGS:

  Lists mounted images.

Accepted FLAGS:

  /COMMIT
  Saves changes to the mounted WIM file. If not specified changes are discarded.

Example:
  imagex /unmount /commit c:\mounted_images

C:\tmp>imagex /unmount c:\tmp\mount 
ImageX Tool for Windows
Copyright (C) Microsoft Corp. All rights reserved.
Version: 6.1.7600.16385

Unmounting: [c:\tmp\mount]...

[ 100% ] Mount cleanup progress

Successfully unmounted image.

Total elapsed time: 7 sec

C:\tmp>

You can combine these last two steps by using

imagex /unmount /commit c:\tmp\mount

Creating a bootable ISO

We use the oscdimg tool to create a bootable image:

oscdimg -u2 -bc:\tmp\etfsboot.com c:\tmp\ISO c:\tmp\image.iso

This will result in a file C:\tmp\image.iso. You can burn this ISO to disc.

Testing

After you’ve created the image, you should test it. Boot up a machine with it. What will first appear is the regular Windows Setup phase. You won’t be able to install Windows with it, as install.wim is missing. However, you can still use all the other tools present. After selecting languages, click “Repair your computer”. The system will offer to repair an existing Windows installation if there is one present in the machine’s disk. Be sure to deselect the OS it’s offering by clicking in the blank space. Then press Next >. Now we have a window with System Recovery Options.

First we need to initialize networking. Do this by selecting Command Prompt and enter:

 wpeutil initializenetwork

Verify network operating with ipconfig:

ipconfig

Continue on by starting the msiscsi service:

net start msiscsi

Now start the iSCSI initiator applet:

iscsicpl

Configure your iSCSI backup target in the initiator. Select System Image Recovery in the System Recovery Options menu to start restoring a backup.

References

Microsoft: Deployment Image Servicing and Management Technical Reference

Advertisements

46 thoughts on “Add iSCSI initiator to the Windows Server 2008/2008R2/SBS 2008/SBS 2011 installation DVD

  1. Normally we were using Acronis backup soluition for SBS, but the ISCSI target I created was for the systemstate backup. Now i think it would be possible to use the iscsi target and a normal windows backup. As an alternative solution.

  2. Thanks. It’s a very usefull post.
    I’d like to make a disk to restore Windows Server 2008 R2 SP1 by booting via WDS. I used the WinRE.win from the W8R2 SP1 disk (from install.win). I copied iSCSI Initiator’s files from fresh installed W8R2 SP1. I can build and boot my image successfully, but when I run “wpeutil initialize network” I get the error: “The command failed with status 0x8007042c”.
    Can you help me?

  3. Vadim :

    Thanks. It’s a very usefull post.
    I’d like to make a disk to restore Windows Server 2008 R2 SP1 by booting via WDS. I used the WinRE.win from the W8R2 SP1 disk (from install.win). I copied iSCSI Initiator’s files from fresh installed W8R2 SP1. I can build and boot my image successfully, but when I run “wpeutil initialize network” I get the error: “The command failed with status 0x8007042c”.
    Can you help me?

    You need to use boot.wim from the installation CD.

    The 0x8007042c error means it’s missing certain components, maybe that winre.wim you’re using doesn’t even have the necessary components to enable networking.

  4. I have also create an image. Everything works. But when I want to connect to a iSCSI device Progress report on Quick Connect says “Initiator Instance Does Not Exist”

    Someone any idea what this could be?

  5. Georgia :

    I have also create an image. Everything works. But when I want to connect to a iSCSI device Progress report on Quick Connect says “Initiator Instance Does Not Exist”

    Someone any idea what this could be?

    What installation CD were you trying to modify? Can you connect to your iSCSI target from another computer without problems?

  6. glennmatthys :
    What installation CD were you trying to modify? Can you connect to your iSCSI target from another computer without problems?

    Hi,

    Thanks for the response.
    I have used the original Windows 2008 R2 server CD. First I have installed this CD. Then Copied the iSCSI files from this. And then copied the boot.wim from this CD. I can connect from other Windows 2008 R2 server to this iSCSI device without any problem.

    When I add the ip number on the Discover Portal I receive an error “Initiator Instance Does Not Exist”

    It look like I miss something…

  7. Hi Georgia,

    I get exactly the same problem as you. Networking starts properly. Starting the msiscsi service works, and I can load the iscsicpl. But i can’t see any targets.

    I’m pretty sure that the problem is to do with which Windows installation disk / iSCSI files are used (Windows 7 / Windows 2008 / 32bit / 64bit) and which registry settings that are imported into the wim.

    I’ve tried multiple combinations (on Windows 7 & 2008) but have so far been unable to get a 64-bit boot DVD to connect to an iSCSI target successfully. That said, I do have a 32-bit Windows 7 boot CD working properly – albeit using a different set of registry key entries than Glenn has suggested here.

    See here: http://www.gregorystrike.com/2010/01/08/winpe-v3-0-and-microsoft-iscsi-initiator/

    Unfortunately i need to restore 32 bit and 64 bit hosts stored on an iSCSI SAN, and to do this I need 2 different boot CDs – one for each architecture.

    Hi Glenn,

    Exactly which Windows version (and SP) did you use to create this page, and which boot DVD did you use to copy the boot.wim from?

    Many thanks.

    • Thank you for writing this article. I am having the “Initiator Instance Does Not Exist” error as well. I am restoring 2008R2 using a windows 7 x64 machine for the image setup. Like the posters above: network works fine, but no iscsi target appears.

  8. Hooray! After 2 days of toil I finally was able to finagle your instructions to work. Things to keep in mind:
    – Probably best to use the e1000 drivers if you’re restoring in a VM. I noticed that when I used dism that wpeutil would yield the message: 0x8007042c
    – You should use this registry script instead:

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\PE_Soft\Microsoft\Windows NT\CurrentVersion\Svchost]
    “Godzilla”=hex(7):4d,00,53,00,69,00,53,00,43,00,53,00,49,00,00,00,00,00

    [HKEY_LOCAL_MACHINE\PE_Soft\Microsoft\Windows NT\CurrentVersion\iSCSI]

    [HKEY_LOCAL_MACHINE\PE_Soft\Microsoft\Windows NT\CurrentVersion\iSCSI\Discovery]
    “AllowiSNSFirewallException”=dword:00000001

    [HKEY_LOCAL_MACHINE\PE_Soft\Microsoft\Windows NT\CurrentVersion\iSCSI\Discovery\Authentication Cache]

    [HKEY_LOCAL_MACHINE\PE_Soft\Microsoft\Windows NT\CurrentVersion\iSCSI\Discovery\Send Targets]

    [HKEY_LOCAL_MACHINE\PE_Soft\Microsoft\Windows NT\CurrentVersion\iSCSI\Discovery\Static Targets]

    [HKEY_LOCAL_MACHINE\PE_Soft\Microsoft\Windows NT\CurrentVersion\iSCSI\Discovery\Tunnel Address]
    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Enum\Root\LEGACY_MSISCSI]
    “NextInstance”=dword:00000001

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Enum\Root\LEGACY_MSISCSI000]
    “Service”=”MSiSCSI”
    “Legacy”=dword:00000001
    “ConfigFlags”=dword:00000000
    “Class”=”LegacyDriver”
    “ClassGUID”=”{8ECC055D-047F-11D1-A537-0000F8753ED1}”
    “DeviceDesc”=”@%SystemRoot%\\system32\\iscsidsc.dll,-5000”

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Enum\Root\ISCSIPRT]

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Enum\Root\ISCSIPRT000]
    “ClassGUID”=”{4d36e97b-e325-11ce-bfc1-08002be10318}”
    “Class”=”SCSIAdapter”
    “HardwareID”=hex(7):52,00,4f,00,4f,00,54,00,5c,00,69,00,53,00,43,00,53,00,49,\
    00,50,00,72,00,74,00,00,00,00,00
    “ConfigFlags”=dword:00000000
    “Driver”=”{4d36e97b-e325-11ce-bfc1-08002be10318}\000”
    “Mfg”=”@iscsi.inf,%msft%;Microsoft”
    “Service”=”iScsiPrt”
    “DeviceDesc”=”@iscsi.inf,%iscsiprt%;Microsoft iSCSI Initiator”
    “Capabilities”=dword:00000000

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Enum\Root\ISCSIPRT000\Device Parameters]

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Enum\Root\ISCSIPRT000\Device Parameters\StorPort]

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Enum\Root\ISCSIPRT000\LogConf]

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Enum\Root\ISCSIPRT000\Control]
    “ActiveService”=”iScsiPrt”

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Services\iScsiPrt]
    “DisplayName”=”iScsiPort Driver”
    “ImagePath”=hex(2):73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,44,00,\
    52,00,49,00,56,00,45,00,52,00,53,00,5c,00,6d,00,73,00,69,00,73,00,63,00,73,\
    00,69,00,2e,00,73,00,79,00,73,00,00,00
    “ErrorControl”=dword:00000001
    “Start”=dword:00000000
    “Type”=dword:00000001

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Services\iScsiPrt\Parameters]
    “BusType”=dword:00000009

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Services\iScsiPrt\Enum]
    “0”=”Root\\ISCSIPRT\000″
    “Count”=dword:00000001
    “NextInstance”=dword:00000001

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Services\MSiSCSI]
    “DisplayName”=”@%SystemRoot%\\system32\\iscsidsc.dll,-5000”
    “Group”=”iSCSI”
    “ImagePath”=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
    74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
    00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,\
    6b,00,20,00,6e,00,65,00,74,00,73,00,76,00,63,00,73,00,00,00
    “Description”=”@%SystemRoot%\\system32\\iscsidsc.dll,-5001”
    “ObjectName”=”LocalSystem”
    “ErrorControl”=dword:00000001
    “Start”=dword:00000002
    “Type”=dword:00000020
    “ServiceSidType”=dword:00000001
    “RequiredPrivileges”=hex(7):53,00,65,00,41,00,75,00,64,00,69,00,74,00,50,00,72,\
    00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,43,00,68,00,\
    61,00,6e,00,67,00,65,00,4e,00,6f,00,74,00,69,00,66,00,79,00,50,00,72,00,69,\
    00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,43,00,72,00,65,00,\
    61,00,74,00,65,00,47,00,6c,00,6f,00,62,00,61,00,6c,00,50,00,72,00,69,00,76,\
    00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,43,00,72,00,65,00,61,00,\
    74,00,65,00,50,00,65,00,72,00,6d,00,61,00,6e,00,65,00,6e,00,74,00,50,00,72,\
    00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,49,00,6d,00,\
    70,00,65,00,72,00,73,00,6f,00,6e,00,61,00,74,00,65,00,50,00,72,00,69,00,76,\
    00,69,00,6c,00,65,00,67,00,65,00,00,00,53,00,65,00,54,00,63,00,62,00,50,00,\
    72,00,69,00,76,00,69,00,6c,00,65,00,67,00,65,00,00,00,00,00
    “FailureActionsOnNonCrashFailures”=dword:00000001
    “FailureActions”=hex:50,46,00,00,01,00,00,00,01,00,00,00,03,00,00,00,14,00,00,\
    00,01,00,00,00,c0,d4,01,00,01,00,00,00,e0,93,04,00,00,00,00,00,00,00,00,00
    “RebootMessage”=”See Note 3 below”
    “FailureCommand”=”customScript.cmd”

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Services\MSiSCSI\Parameters]
    “ServiceDll”=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,\
    00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,\
    69,00,73,00,63,00,73,00,69,00,65,00,78,00,65,00,2e,00,64,00,6c,00,6c,00,00,\
    00
    “ServiceDllUnloadOnStop”=dword:00000001

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Services\MSiSCSI\Enum]
    “0”=”Root\\LEGACY_MSISCSI\000″
    “Count”=dword:00000001
    “NextInstance”=dword:00000001

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Services\MSiSCSI]
    “ImagePath”=hex(2):25,00,73,00,79,00,73,00,74,00,65,00,6d,00,72,00,6f,00,6f,00,\
    74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
    00,76,00,63,00,68,00,6f,00,73,00,74,00,2e,00,65,00,78,00,65,00,20,00,2d,00,\
    6b,00,20,00,47,00,6f,00,64,00,7a,00,69,00,6c,00,6c,00,61,00,00,00

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}]
    “LegacyAdapterDetection”=dword:00000000
    “Class”=”SCSIAdapter”
    “ClassDesc”=”@%SystemRoot%\\System32\\SysClass.Dll,-3005″
    @=”@%SystemRoot%\\System32\\SysClass.Dll,-3005”
    “IconPath”=hex(7):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
    74,00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
    00,65,00,74,00,75,00,70,00,61,00,70,00,69,00,2e,00,64,00,6c,00,6c,00,2c,00,\
    2d,00,31,00,30,00,00,00,00,00
    “Installer32″=”SysClass.Dll,ScsiClassInstaller”

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}000]
    “InfPath”=”iscsi.inf”
    “InfSection”=”iScsiPort_Install_Control”
    “ProviderName”=”Microsoft”
    “DriverDateData”=hex:00,80,8c,a3,c5,94,c6,01
    “DriverDate”=”6-21-2006”
    “DriverVersion”=”6.0.6000.16386”
    “MatchingDeviceId”=”root\\iscsiprt”
    “DriverDesc”=”Microsoft iSCSI Initiator”
    “EnumPropPages32″=”iscsipp.dll,iSCSIPropPageProvider”

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}000\Parameters]
    “TCPConnectTime”=dword:0000000f
    “TCPDisconnectTime”=dword:0000000f
    “WMIRequestTimeout”=dword:0000001e
    “DelayBetweenReconnect”=dword:00000005
    “MaxPendingRequests”=dword:000000ff
    “EnableNOPOut”=dword:00000000
    “MaxTransferLength”=dword:00040000
    “MaxBurstLength”=dword:00040000
    “FirstBurstLength”=dword:00010000
    “MaxRecvDataSegmentLength”=dword:00010000
    “MaxConnectionRetries”=dword:ffffffff
    “MaxRequestHoldTime”=dword:0000003c
    “LinkDownTime”=dword:0000000f
    “IPSecConfigTimeout”=dword:0000003c
    “InitialR2T”=dword:00000000
    “ImmediateData”=dword:00000001
    “ErrorRecoveryLevel”=dword:00000002
    “PortalRetryCount”=dword:00000005
    “NetworkReadyRetryCount”=dword:0000000a
    “SrbTimeoutDelta”=dword:0000000f

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}000\PersistentTargets]
    @=””

    [HKEY_LOCAL_MACHINE\PE_Sys\ControlSet001\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}\Properties]
    “DeviceType”=dword:00000004
    “DeviceCharacteristics”=dword:00000100
    “Security”=hex:01,00,04,90,00,00,00,00,00,00,00,00,00,00,00,00,14,00,00,00,02,\
    00,34,00,02,00,00,00,00,00,14,00,ff,01,1f,10,01,01,00,00,00,00,00,05,12,00,\
    00,00,00,00,18,00,ff,01,1f,10,01,02,00,00,00,00,00,05,20,00,00,00,20,02,00,\
    00

  9. When I use your registry scrip then I receive the message “The service name is invalid” when I try to start iscsi (net start msiscsi). Or must I load first the original and then yours?

    • I assume you are using 2008R2 x64? Can you try injecting the windows 7 x64 iscsi files? I don’t know if there is any difference, but those are the ones I used. and no, I did not preload any other reg files.

  10. So I just can’t get it to work… Using 2008R2 x64 boot.wim and with Windows 7 x64 or Windows 7 SP1 x64 iscsi files, i just can’t get the msiscsi service to start. And although i didn’t expect it to work 2008r2 x64 with windows 7 x86 iscsi files doesn’t work either.

  11. Hmm.. I followed all the steps in this guide exactly save for the registry. I can’t imagine what could be causing the problem for you still. Let me try reposting the steps I took just for you to refer to make sure you did the same. If you’re still having problems I can send you the compiled iso.

    on workstation
    ————————-
    copype amd64 c:\tmp

    Insert your Windows installation DVD and copy the following file
    \sources\boot.wim
    to
    C:\tmp\ISO\sources

    imagex /info C:\tmp\ISO\sources\boot.wim

    imagex /mountrw C:\tmp\ISO\sources\boot.wim 2 C:\tmp\mount

    copy in iscsi drivers

    We have to load two hives. Select File -> Load Hive and browse to:
    C:\tmp\mount\Windows\System32\config\SYSTEM
    Key Name: PE_Sys
    C:\tmp\mount\Windows\System32\config\SOFTWARE
    Key Name: PE_Soft

    import reg file

    dism /image:”C:\tmp\mount” /add-driver /driver:”C:\VMTools_Driver\vmxnet3″

    imagex /commit c:\tmp\mount

    imagex /unmount c:\tmp\mount

    oscdimg -u2 -bc:\tmp\etfsboot.com c:\tmp\ISO c:\tmp\image.iso

    on server
    —————————–
    wpeutil initializenetwork
    netsh int ip set address “Local Area Conneciton 2” static 10.0.0.5 255.0.0.0
    net start msiscsi
    iscsicpl

    Hope this helps!!!

  12. This really can’t be that difficult…

    I didn’t check the registry keys posted by doblernator last night – so i missed that wordpress has substituted double quotes incorrectly. Once they are all corrected, i can get the iscscicpl to load, but i still get the Initiator Instance Does Not Exist message. ARGGGGHHH!

    Now, I’m back to trying to find the correct combination of iscsi files, registry files, AIK version, and boot.wim.

    Please, please, please, can those of you who have got a Windows 7 / Windows Server 2008 R2 64-bit boot CD to work, and can connect to an iSCSI target, please let me know which exact version of iSCSI files and boot.wim you have used.

    I’m using the WAIK 3.0 / KB3AIK_EN.iso

    I now have 4 test environments:
    * Windows 7
    * Windows 7 SP1
    * Windows 2008 R2
    * Windows 2008 R2 SP1

    3 different sets of registry keys to try
    * Those posted by Glenn above
    * Those posed by doblernator above (cleaned up so the quotes are correct)
    * From Microsoft – which work with 32bit Windows 7 (these are identical to those i linked to earlier) – http://technet.microsoft.com/en-us/library/ee619769%28WS.10%29.aspx

    And three different CD images to get the boot.wim from:
    * Windows 7 VLA
    * Windows Server 2008 R2 VLA
    * Windows Server 2008 R2 with SP1 VLA

    Surely one of these combinations must work, or something in the process I’m using is wrong…

    copype amd64 c:\winpe

    copy d:\sources\boot.wim c:\winpe\ISO\sources

    imagex /mountrw C:\winpe\ISO\sources\boot.wim 2 C:\winpe\mount

    copy /y C:\Windows\System32\iscsicli.exe C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\iscsicpl.exe C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\iscsicpl.dll C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\iscsidsc.dll C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\iscsied.dll C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\iscsiexe.dll C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\iscsilog.dll C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\iscsium.dll C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\iscsiwmi.dll C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\oledlg.dll C:\winpe\mount\Windows\System32
    copy /y C:\Windows\System32\Drivers\msiscsi.sys C:\winpe\mount\Windows\System32\Drivers
    copy /y C:\Windows\System32\en-us\iscsicli.exe.mui C:\winpe\mount\Windows\System32\en-us
    copy /y C:\Windows\System32\en-us\iscsicpl.dll.mui C:\winpe\mount\Windows\System32\en-us
    copy /y C:\Windows\System32\en-us\iscsicpl.exe.mui C:\winpe\mount\Windows\System32\en-us
    copy /y C:\Windows\System32\en-us\iscsidsc.dll.mui C:\winpe\mount\Windows\System32\en-us
    copy /y C:\Windows\System32\en-us\iscsiexe.dll.mui C:\winpe\mount\Windows\System32\en-us
    copy /y C:\Windows\System32\en-us\iscsilog.dll.mui C:\winpe\mount\Windows\System32\en-us

    notepad C:\winpe\iscsi_pe.reg
    REG LOAD HKLM\PE_Sys C:\winpe\mount\Windows\System32\config\SYSTEM
    REG LOAD HKLM\PE_Soft C:\winpe\mount\Windows\System32\config\SOFTWARE
    regedit /s C:\winpe\iscsi_pe.reg
    REG UNLOAD HKLM\PE_Sys
    REG UNLOAD HKLM\PE_Soft

    imagex /unmount /commit C:\winpe\mount

    oscdimg -u2 -bc:\winpe\etfsboot.com c:\winpe\ISO c:\winpe\restore.iso

    Any help very much appreciated.

  13. glennmatthys :

    I was able to reproduce that “Initiator instance does not exist” error, I’m figuring out why it happens and I’ll update this article when I find a fix.

    Found the problem, wordpress was leaving out the slash zero characters in my registry entries (slash zero = null in programming). I replaced the registry entries with a .reg file you can download. That should fix any “Initiator Instance Does Not Exist” errors.

  14. OK I’ve got this working to a point with Server 2008 but I run into a problem when I try and do the actual restore. The recovery software can’t find the backup. I know that the iscsi drive is attached because if I browse for drivers I can see it and navigate it’s file structure. But I’m never given an option to point the recovery software to the actual location of the backups. Why is there no browse for backups?

    • If you are absolutely sure you’ve mounted the right iSCSI target, and the restore software doesn’t automatically detect the backups you’ve made on it, then there’s probably something wrong with your backup. Are you using the right software combinations? (Win 2k8 x86 -> need Win 2k8 x86 restore CD, etc…)

      • Same issue here… All x64… I can browse to the proper folders but the image restore gui can not find it, wbadmin gives the same… hmmmm….

  15. Hi, in my case everything works great but when I enter iscsicpl the ISCSI initiator didn’t start.
    Can someone help me?

  16. Thax for detailed article.
    Whoever,is receiving Error: 0x8007042c when running: ‘wpeutil initializenetwork’
    #1 when copying iscsi files, make you DO NOT overwrite any existing files.
    #2 make sure you are using boot.wim and not winpe.wim
    #3 And if you working with VmWare you’ll need to install drivers specific to Vmware

    Thx
    H

  17. can you update this for pe4 and win8/12 iscsicli files? I found there are no legacy but rather spaceport and msvhdhba classes now.

  18. This is fantastic! My only concern is that I cannot assign myself an IP to connect to my iSCSI target. netsh set address commands are coming back as, “The filename, directory name, or volume label syntax is incorrect”.

    Any suggestions on how to initialize networking to set a static IP to be able to connect to my iSCSI target?

  19. Would anyone be able to lead me into the right direction for loading the networking drivers onto the WinRE enviroment as well?

    I was able to follow these instructions and launch the iSCSI initiator from my WinRE disc, but now I cannot move any further as the WinRE has no networking drivers.

  20. I’m trying to do this with Server 2012. Has anyone had luck with 2012? I’m getting an error when importing the registry file that says “Error accessing the registry”. I tried a different host. I don’t think its caused by 2012.

    • Hey Zachary,
      i’am using Windows Server 2012R2 and get the same error. I’ve configured all security setting to: “Anyone” “Full Access” even the UAC is deactivated! But nothing works…

      • I was able to do it by giving myself full access to all keys in the registry that are modified in the guide

  21. Hi.

    This is a brilliant post – and worked for me with no issues on my first server. However, when I try to restore my backup on a different server, I can get the network running, load the iscsi and connect to the NAS box where the backup is stored, but the restore program will not see the backup.

    I can open the DOS prompt and navigate and traverse the directory structure (in this case e:\WindowsImageBackup) but the restore software refuses to recognise the drive.

    As I said, worked great with 1 server, moved to a different one, no joy.

    Any ideas?

    Adam.

  22. I’ve created the disk according to the article (and a very nice article by the way) and everything appears to work. One caveat, I had to do a netsh to set the IP address for the server. The issue that I am having appears to be with the iSCSI Initiator. It says that it connected and displays the correct IP and port for the Server that has the backups, but under the Target tab if I click on the Devices button, all I get is the spinning circle. I allowed it to do this for over 30 min. Also, the Recovery will not start either.

    Any suggestions?

  23. Pingback: Cdimage Windows Server 2008 | Hiddenphone5

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s