Windows – Creating A Diskless iSCSI Boot Windows 2003 Server

Windows – Creating A Diskless iSCSI Boot Windows 2003 Server

Introduction

This article explains how to create a diskless Windows 2003 server which is booted from an iSCSI drive.

The infrastructure used for this article is an Openfiler 2.3 Server used to deploy the iSCSI target disks and a Virtual Machine deployed under VMWare Server 1.0.8 running on a Fedora Core 8 64-Bit host.

A separate network was used for the iSCSI traffice between the Openfiler and VMWare servers and the Virtual Machine was deployed using two Network Cards.  The first NIC was connected to the iSCSI Network to allow booting from the disk whilst the second was connected to the Host Only LAN to provide normal network connectivity.

Instructions for the Openfiler Server and the VMWare Server 1.0.8 builds are outside the scope of the article.

Pre-requisites

In order to create a diskless Windows 2003 server build which boots from an iSCSI drive the follolwing pre-requisites must be met :-

  • A network SAN / NAS server deploying iSCSI Disks
  • gPXE ROM drivers for the PCNet32 Network Card
  • A DHCP server used to provide reservations for the iSCSI server
  • The Microsoft iSCSI Initiator Boot software

Creating an initial Windows 2003 server image

As Windows 2003 is unable to install to an iSCSI disk an initial installation of the OS is required before it can be re-configured to run on an iSCSI disk.

To create an initial installation of Windows 2003 go through a Windows 2003 installation as normal to a server with a local disk.

For this article a normal installation was performed to a Virtual Disk attached to the Virtual Machine.

Install the Microsoft iSCSI initiator  software

Once the server has been built with an initial installation logon to the server and install the Microsoft iSCSI Initiator Boot software.  In order to install the Microsoft iSCSI Initiator Boot software perform the following steps :-

  1. Launch the software
  2. When prompted click on Next to continue
  3. When prompted for the installation options ensure the the Microsoft MPIO Multipathing Support for iSCSI is not ticked and click on Next to continue
  4. When prompted tick the Configure iSCSI Network Boot Support option
  5. Select the Network Card which is to be used for the iSCSI traffic and click on Next to continue

Configure a local shutdown script

It is important to re-check the iSCSI configuration whenever any hardware is changed in the server and the easiest way to ensure this is to run it when ever the server is shutdown or rebooted.  To create a Shutdown script on the server itself to perform the iSCSI configuration check perform the following steps :-

  1. Click on Start, Run and type in gpedit.msc to launch the local Group Policy editor
  2. In the Group Policy editor expand the Computer Configuration
  3. Expand the Windows Settings branch
  4. In the Scripts branch double click Shutdown in the right hand pane
  5. In the Shutdown Properties dialog box click on Add
  6. In the Script Name box enter C:\Windows\System32\Iscsibcg.exe
  7. In the Script Parameters box enter /Verify /Fix
  8. Click on OK to add the Shutdown script and then exit the Group Policy editor

Sysprep the server

Following any additional configuration changes for your environment have been made to the server the next step is to Sysprep the server so that the server image automatically configures itself when used.  To Sysprep the server perform the following steps :-

Copy the Sysprep files to the server

  1. Unpack the DEPLOY.CAB file from the Support folder on the Windows 2003 CD to C:\Sysprep

Run the Setupmgr program

  1. From the C:\Sysprep folder run the program Setupmgr.exe
  2. When prompted click on Next
  3. Select Create New and then click on Next to continue
  4. Select Sysprep setup and then click on Next to continue
  5. Select the relevant OS version installed on the server and then click on Next to continue
  6. Select Yes, fully automate the installation and then click on Next to continue
  7. Configure the Name and Organization as required and then click on Next to continue
  8. Configure the Display settings as required and then click on Next to continue
  9. Select the Time zone as required and then click on Next to continue
  10. Enter the Product Key required and then click on Next to continue
  11. Configure the Licensing Mode as required and then click on Next to continue
  12. Select Automatically generate computer name and then click on Next to continue
  13. Configure the Administrator Password as required and then click on Next to continue
  14. Configure the Domain settings as required and then click on Next to continue
  15. Configure the Advanced Settings pages as required click on Next to continue
  16. Click on Finish after the last Advanced Settings page and OK to save the filename as C:\Sysprep\sysprep.inf

Edit the Sysprep.inf file

  1. Open the C:\Sysprep\sysprep.inf file and Add the line LegacyNic=1 under the [Unattended] section
  2. Save and exit the file

Run Sysprep on the server

  1. Run the Sysprep.exe file from the C:\Sysprep folder
  2. Click on OK when warned you are running the tool
  3. Ensure that the Shtudown Mode is set to Shut Down and then click on the Reseal button
  4. When prompted that you will regenerate the SIDs for the server click on OK to run Sysprep
  5. Sysprep will now run on the server and shut it down once completed

Using gPXE To allow booting from iSCSI

There are several ways which gPXE can be used with a server including chaining it with an existing PXE installation and burning a ROM version in to the Network Card itself.

For this article the option used was to use a gPXE modified ROM for the network card as this is straight forward enough to perform on a virtual machine.

Obtaining the VMWare PCNet32 gPXE ROM

To obtain the ROM version for the PCNet32 NIC used in VMWare perform the following steps :-

  1. Go to the web-site www.rom-o-matic.org
  2. Click on the latest Production release link
  3. When prompted select the output format to be a ROM binary (flashable) image (.rom)
  4. Choose the pcnet32 NIC Type from the drop down box.
  5. Set the PCI VENDOR CODE to 1022  and the PCI DEVICE CODE to 2000
  6. Click on the Get Image button and save the file to the relevant place on the VMWare Server.

Modifying the VMWare Guest configuration file

Once the PCNet32 ROM has been obtained and saved on to the VMWare Server perform the following steps to modify the Virtual Machines Network Cards to use the gPXE ROM :-

  1. Open the VMWare Configuration File (.VMX File) for the Virtual Machine
  2. At the end of the file add in the line below :-nbios.filename = {Path to the PCNet32 ROM file}E.G. nbios.filename = “/downloads/pcnet32.rom”
  3. Save and exit the file