The new Microsoft iSCSI Software Target 3.3 includes support for a new feature called differencing virtual hard disks (VHDs). This feature helps deploy diskless boot for servers running Windows, especially in a Windows HPC Server 2008 R2 compute cluster environment.
We worked closely with the HPC team to deliver a simple management experience. The deployment process is tightly integrated within the Microsoft HPC management pack, which manages the iSCSI target using an HPC provider. Support for differencing VHDs and iSCSI boot in iSCSI Software Target 3.3 is useful in other deployments beyond HPC and this post will focus on how to deploy iSCSI boot outside of the HPC environment. You can get more details about how this works in this blog post.
Advantages of using diskless boot include:
This post will explain how diskless boot works and how you can try it out yourself!
Before going any further, let’s clarify a few terms:
Client: The server that will boot from the image stored on the iSCSI target server. It can also be referred as an iSCSI initiator or a “diskless node”. Note: Since iSCSI boot is only supported on Windows Server SKU’s, the term “Client” refers to the iSCSI client machine which runs Windows Server OS.
Golden image: A generalized (sysprep’d) image containing an operating system and any other required applications. It is prepared on an iSCSI LUN and set to be a read-only master image. A section below describes one way to create the golden image.
HPC: High-performance computing (see here).
iSCSI target: The end point where the iSCSI initiator will establish the connection. Once the initiator connects to the iSCSI target, all the VHDs associated with that target will be accessible to that initiator.
iSCSI Software Target: Software application which provides iSCSI storage to clients (iSCSI initiators).
Differencing VHD: One of the supported VHD formats used by Microsoft iSCSI Software Target. (For a definition, please see here.) When using diskless boot, the clients will read from the golden image and write to a differencing VHD. This allows multiple clients to boot off of the same golden image.
Boot loader: Refers to the software that can bootstrap the operating system. In the iSCSI boot scenario, it contains a basic iSCSI initiator that can connect to the iSCSI target and mount a disk. It is an alternative solution to an iSCSI boot-capable NIC/HBA.
There are two phases when managing diskless clients:
See this TechNet article on iSCSI Boot which covers the more information on this topic. It includes a step-by-step guide for deployment using options 1 & 2 mentioned below.
You will need one of the following options to enable iSCSI boot on a physical client:
The NIC needs to be configured in the server BIOS to provide the iSCSI target IQN, iSCSI target IP address, and credentials if set (examples of this type include Intel or Broadcom).
Figure 1 - iSCSI Boot capable NIC configuration An iSCSI boot-capable HBA
An iSCSI boot capable HBA requires similar information to the iSCSI NIC. The follow example shows a QLogic HBA.
Figure 2 - iSCSI boot capable HBA configuration
A software boot loader needs more configuration and details are in the workflow section of this post. Examples of a boot loader are gPXE (open source) and Doubletake Netboot/I (commercial). This post will use the gPXE as an example. You can also use iPXE instead of gPXE.
The pre-boot phase can be executed by any of the three options described above (NIC, HBA, or software boot loader).
The following diagram describes the components involved on the client computer during the boot process:
Figure 3 - Boot process components
When the pre-boot loader starts, it loads a real-mode network stack driver. The loader contains an iSCSI initiator which logs on to the iSCSI target and mount the boot disk to the system. Another function of the loader is to populate the iSCSI Boot Firmware Table (iBFT), which is required for iSCSI boot. The Boot Parameter driver in Windows will load the parameters from the iBFT, and the Microsoft iSCSI Software Initiator will be able to connect to the iSCSI target using the parameters set in the iBFT. The importance of the iBFT is to be able to share the parameters between the iSCSI boot initiator (which establishes the session in the preboot phase) and the Microsoft iSCSI initiator (which establish the session after Windows boots).
If you are using hardware NICs or HBAs, please visit this TechNet page for a different approach for deployment.
Once you have a hardware or software solution selected, you need to think about whether you want to leverage DHCP and TFTP server for the deployment:
Boot loader
Using DHCP for deployment
Hardware (NIC or HBA)
If yes, see your vendor’s documentation
If not, see Using an iSCSI boot capable NIC or HBA
Software loader (gPXE)
If yes, see Use a Software boot loader with DHCP and TFTP server
If not, see Using software boot loaders without DHCP and TFTP server
Using a hardware solution is easy to deploy, you just configure the firmware with the iSCSI target IQN and IP address (see Figure 1 above), then power up the client. The basic iSCSI initiator built into the firmware will be able to connect to the target and mount the VHDs.
Since it doesn’t use a software boot loader, it doesn’t need additional infrastructure such as TFTP server in the deployment. The downside is that you need to acquire the hardware, and configure each one manually. To find out how to automate the configuration, you will need to contact the hardware vendor.
Required hardware:
Once the client NIC has been configured, the machine will boot as illustrated below:
Figure 4 - Boot process using iSCSI Boot capable hardware
A TFTP server hosts the boot loader in a central location. You can configure a DHCP server to provide each client machine a unique target. When a client boots up, it acquires the IP, TFTP server location, as well as information about the target to connect to from the DHCP server. Using DHCP in combination with the TFTP server will reduce the management operations. This is the approach used in Windows HPC diskless cluster deployments. The HPC management pack guides users to configure the DHCP and TFTP servers in a simplified manner. This configuration can scale higher with automation support. The hardest part is to configure the DHCP server. The configuration needs to adhere to the software loader specification. To get more information on how to configure the DHCP server, please visit here.
Once the configuration of the DHCP server is done, and the boot loader has been copied to the TFTP server, the machine boot sequence follows this process:
Figure 5 - Boot process when using DHCP, TFTP server with software boot loader
In a test environment, it may not be feasible to configure a DHCP and TFTP server. Without a TFTP server, you need to find another way to get the boot loader image presented to the client machines. You can put the boot loader on a USB drive or a CD in the client machine. This is the simplest way to try out and does not require any extra hardware investment. The step-by-step guide below focuses on this configuration.
Once the software boot loader has been configured, the machine boot will follow this process:
Figure 6 – Boot process for local software boot loader
Step-by-step deployment guide
Here is the recipe for using a software boot loader on a CD/USB.
There are two stages:
After stage 2, the client machine will be ready to run a workload. You can use the machine just like one that has an OS image stored locally.
A word of caution: While the iSCSI target is servicing diskless clients, rebooting the iSCSI target server will cause unexpected behavior for the diskless clients. This is similar to removing the local hard drive while the machine is running. If you require high availability in your environment, you should consider deploying a failover cluster with the iSCSI targets LUNs.
To create a golden image, you need to do a normal OS and application install on the iSCSI VHD, to ensure the setup process can load the driver stacks in the correct order. This is important, because the Windows setup process goes through different path for installing the OS on local hard drive vs on a iSCSI disk. The image installed on a local hard drive can not be used for iSCSI boot, as the drives loading sequences will be different.
Once the installation is complete, run sysprep on the OS image.
Steps to create a golden image:
(Note, I used this page as reference when I did my setup. You may find it useful as well.)
dhcp net0 set initiator-iqn iqn.1991-05.com.microsoft:iscsiboot-${net0/mac} set root-path iscsi:10.121.28.150::::iqn.1991-05.com.microsoft:testsvr -iscsiboot-${net0/mac}-target set keep-san 1 sanboot ${root-path}
The above script needs to be customized to your configuration:
Once the golden image is prepared, you can use it to deploy more clients by following the steps below:
Jian Yan Program Manager iSCSI Software Target