Step-by-step: Using the Microsoft iSCSI Software Target with Hyper-V (Standalone, Full, VHD)

Overview

In this post, I will show all the steps required to run Windows Server 2008 Hyper-V with the Microsoft iSCSI Software Target. We will cover the specific scenario of a standalone Windows Server 2008 server (as opposed to a clustered one) on a full install (as opposed to a core install) and using a VHD file (as opposed a pass-through disk).

In order to follow these instructions you will need at least two computers. One computer will run a full install of Windows Server 2008 with the Hyper-V role enabled. The other computer needs to be a Windows Storage Server (WSS) with the iSCSI pack or Windows Unified Data Storage Server (WUDSS). Optionally, you could add a Client for your Virtual Machine and a computer for remote Hyper-V Management.

Configuring the Networks

For your server running Hyper-V, you should consider having at least three Network Interface Cards (NICs). One will be dedicated to iSCSI traffic. The second will be connected to the Virtual Switch and used for traffic going to your virtual machine. The third NIC you will dedicate to remote management. This configuration is showed in the diagram below:

01 

Checking the Windows Storage Server

WSS (with the Microsoft iSCSI Software Target) comes preinstalled from the hardware vendor. This special OS release is not available the Microsoft sales channels like software retailers or volume licensing. You can find more information about WSS and WUDSS at https://www.microsoft.com/storageserver. Windows Storage Server 2008 is also available from MSDN or TechNet subscriber downloads for non-production use (see details at https://blogs.technet.com/josebda/archive/2009/05/13/windows-storage-server-2008-with-the-microsoft-iscsi-software-target-3-2-available-to-msdn-and-technet-plus-subscribers.aspx).

You should make sure you have the proper credentials (username and password) with administrator privileges on the Storage Server. You should also make sure you have remote access to the Storage Server via Remote Desktop. Once you log on to the Storage Server via Remote Desktop, verify that you can locate the Microsoft iSCSI Software Target Management Console (MMC), which can be found in the Administration Tools menu. From a Storage Server perspective, we’ll perform all the configuration actions using the iSCSI Target MMC.

02 

Checking the Server running Hyper-V

On the server running Windows Server 2008 Hyper-V, you should make sure to run Windows Update to get the latest updates. This will ensure that you have the final release of Hyper-V, not the beta version that was released with Windows Server 2008.

You will also need to enable the Hyper-V role. This is done using Server Manager by right-clicking the “Roles” node on the tree on the left and selecting “Add Roles”.

03

This will bring up the “Add Roles Wizard”, where you will find “Hyper-V” on the list of roles:

 04

While configuring the Hyper-V role on the wizard, you should see the three (or more) NICs on your server on the “Create Virtual Networks” step.
Make sure you do not select the NICs used for iSCSI traffic and Hyper-V remote management in the “Create Virtual Networks”.

05 

You will need to restart the server after you add the Hyper-V role.

Loading the iSCSI Initiator

The next step now is to configure the iSCSI initiator on the Hyper-V server.
You can find the “iSCSI Initiator” under “Administrative Tools” in Windows Server 2008. You can also find it in the “Control Panel”.

The first time you load the iSCSI initiator, it will ask you two questions.
The first question is about loading the Microsoft iSCSI Initiator service every time:

06

The second question is about configuring the firewall to allow the iSCSI traffic:

07

You should click on “Yes” for both questions.
After that, the iSCSI Initiator Properties windows will load, showing the “General” tab.
This tab gives you an important piece of information: your initiator name or IQN. We’ll need this later when configuring the target:

07

Configuring the target portal

The next step is configure the initiator with the address of your iSCSI target portal.
In our case, this is the computer running Windows Storage Server and the Microsoft iSCSI Software Target.
In the iSCSI Initiator Properties window, select the “Discovery” tab and add the IP address of the Storage Server to the list of Target Portals.

09

Click on “Add Portal…” to add the information. You will need the IP address of your Storage Server at this point. Port 3260 is the default.

10

Here’s the screen after the Target Portal is added:

11

Now, if you switch over the “Targets” tab of the iSCSI Initiator Properties windows, you will see this:

12

This blank list of targets is expected at this point, since we haven’t configured any targets yet.
We’ll do that next.

Creating the iSCSI Target

Now we switch over the Microsoft iSCSI Software Target side, on the Windows Storage Server.
We will create the target using the Microsoft iSCSI Software Target MMC we mentioned before.

13

After starting the wizard, skip the introduction page by clicking “Next”.

14

Next, you will provide the name and description for the target. We’ll be using simply “T1” for the name.

15

On the following screen, you need to provide the identification for the target.
Here you can use an IQN (iSCSI Qualified Name) or you can use the advanced setting to go with an IP address, DNS name or MAC address.

16

Since our initiator in this case already contacted the Storage Server, you can simply click on “Browse” and pick the IQN from there.

17

Once you get the right IQN, click “Next” to proceed.

18

Finally, click “Finish” to create the target.

19

Adding LUNs to the iSCSI Target

Now that the target is created, you need to add virtual disks or LUNs to it. These will be the logical units that will be presented to the initiator.
You will do this by right-clicking the target T1 and selecting the option to “Create Virtual Disks for iSCSI Target”.

20

You will start the wizard. Click “Next” on the introduction page.

21

Next, you will provide a path to the file to use as your virtual disk or LUN. This file will have a VHD extension.

22

Next, you will specify the size for the virtual disk or LUN. We’ll create a 20GB LUN here, which is enough to install Windows Server 2008 later on. The iSCSI target uses fixed-sized VHD files, but you can extend them if needed.

23

Next, you will specify a description for the virtual disk or LUN.

24

Finally, click “Finish” to create the virtual disk. Depending on the size, it could take a while.

25

At this point, you can see the target and its virtual disk on the Microsoft iSCSI Software Target MMC:

26

You can check the properties of the target, including the target IQN, by right-clicking the target name and clicking on “Properties”.

27

Now we go back to the initiator side.

Configuring the iSCSI Initiator targets

When we last checked the “Targets” tab of the iSCSI Initiator Properties windows, we had an empty list.
With the target properly configured, you should see the it showing after you click on “Refresh”:

28

Now you need to click on “Log on…” to connect to the target.
On the “Log On to Target” window, be sure to check the box to “Automatically restore this connection when the computer starts”.

29

Once you log on, the target status will change to “Connected”.

30

The LUN should also appear in the list of “Volumes and Devices” in the iSCSI Initiator Properties:

31

Now we need to work on that LUN to turn it into an NTFS volume with a drive letter.
That is done in Disk Management.

Preparing the Volume

If you followed all the steps so far, you should already have the LUN as an offline, uninitialized, unallocated volume in Server Manager, under Disk Management:

32

The first thing you need to do here is to online the volume, by right-clicking on the disk:

33

The volume will be onlined automatically if you are running the Standard Edition of Windows Server 2008. 

After that, the volume will be online, but still uninitialized. You will then select the option to “Initialize Disk”:

34

At this point you need to select a partition style (MBR or GPT). The older MBR style is commonly used for small partitions. GPT is required for partitions larger than 2TB.

35

After this, you have a basic disk online which you could use to create an NTFS volume. If you right click it again, there will be an option to create a “New Simple Volume”.

36

Once you go through that wizard, format the volume and assign it a drive letter, you will have the final result in Disk Management as drive E:

37

We’ll use this drive E: as our storage for Hyper-V.

Creating the Virtual Machine

Last but not least, we must now create our Virtual Machine. We’ll do this in the Hyper-V Manager:

38

There are two places in the New Virtual Machine Wizard where you will refer to the E: disk.
The first one is when you select the location of your virtual machine configuration files:

39

The second one is when you specify the location of the virtual hard drive used by that virtual machine:

40

In this case, by using the wizard, we selected the default option of using a Dynamically Expanding VHD file that is exposed to the child partition as Virtual IDE.
You can verify that looking at the settings for the resulting Virtual Machine:

41

If you click on the “Inspect” button, you can see it’s a Dynamic VHD:

42

You could, of course, use any of the other types of VHD files or even a pass-through disk, but that’s a topic for another blog post…

Conclusion

I hope this blog post has helped you understand all the steps required to use the Microsoft iSCSI Software Target to provision storage for your Windows Server 2008 server running Hyper-V.
This post covered a scenario where Hyper-V runs on a full install of Windows Server 2008, using a VHD file on the parent and without Failover Clustering.

Comments

  • Anonymous
    January 01, 2003
    Introduction This post describes how to configure the Microsoft iSCSI Software Target offered with in
  • Anonymous
    January 01, 2003
    Para muchos es sabido que la única forma de compartir almacenamiento para formar un cluster DENTRO de
  • Anonymous
    January 01, 2003
    Introduction For the last few years, I’ve been blogging about the Microsoft iSCSI Software Target
  • Anonymous
    January 01, 2003
    Overview I am glad to share that Windows Storage Server 2008 (WSS 2008) with the Microsoft iSCSI Software
  • Anonymous
    January 01, 2003
    Microsoft got into the iSCSI Target business when we acquired WinTarget from String Bean software in
  • Anonymous
    January 01, 2003
    PingBack from http://amdtalk.com/1969/jose-barretos-blog-step-by-step-using-the-microsoft-iscsi/
  • Anonymous
    January 01, 2003
    For many of you it can be known that the only option to share storage to form failover clusters INSIDE
  • Anonymous
    January 01, 2003
    Last time I took a look at Hyper-V Server 2008 R2 Beta, I shared the surprise of having Failover Clustering
  • Anonymous
    June 12, 2014
    Pingback from Microsoft iSCSI Software Target 3.3 is now available freely! | Ilantz's Weblog