Setting Up Failover Clustering for Hyper-V (Part 5)

by [Published on 20 July 2011 / Last Updated on 20 July 2011]

This article builds on the last article by showing you another method of allocating iSCSI storage to your virtual machines. The goal behind this method is to help keep your storage infrastructure more organized.

If you would like to read the other parts of this article series please go to:


In the previous article, I showed you how to establish iSCSI connectivity from your cluster nodes. As you will recall, the technique that I showed required you to create an iSCSI target and then you had to allocate storage to that target. When you assigned storage to the iSCSI target, you did not connect the target directly to the physical storage resources, but rather to a virtual hard disk file residing on the physical storage. The cluster nodes ended up using the storage as a repository for the virtual hard disk files that are to be used by Hyper-V.

What all of this means is that if you follow the steps in the previous article, you will end up with a virtual hard drive file that technically exists inside of another virtual hard drive file. While there is nothing wrong with using this technique, I primarily showed it to you so that you could see how iSCSI connectivity will work within our cluster, but without making things too complicated.

While you can use the technique that I showed you in the previous article for allocating storage to your virtual machines, you may find it easier allocate storage directly to a virtual machine. The technique for doing so builds on what I have already shown you, and requires a little bit more work, but simplifies administration in the long run.

Installing Hyper-V

Before I can show you how this technique works, we need to install Hyper-V onto our cluster nodes. We aren’t actually ready to build our Hyper-V clusters just yet, but I want to go ahead and set up Hyper-V on the cluster nodes so that I can show you how the iSCSI connectivity is going to work.

The installation process is really simple, but you must ensure that hardware virtualization is enabled in the system BIOS.  To install Hyper-V, open the Server Manager on your first cluster node and click on the Roles container and then click on the Add Roles link. When you do, Windows will launch the Add Roles Wizard. Click Next to bypass the wizard’s Welcome screen and you will be taken to a screen that asks you which roles you want to install. Select the Hyper-V Role and click Next.

You should now see a screen that introduces you to Hyper-V. Click Next and you will be taken to a screen that shows all of the network adapters that are installed in the server. You must select the network adapter that will be used by your virtual machines. Remember that one network adapter is dedicated to storage traffic and another adapter is usually dedicated to management traffic on the parent partition. Ideally there would also be a network adapter that will be dedicated to handling communications between the cluster nodes. My point is that you must choose your network adapter carefully so that you don’t accidentally select a network adapter that you have set aside for another purpose. If you have trouble determining which adapter is which, you can always open the Control Panel and look at the properties for each network adapter.

Once you have made your selection, click Next and you will be taken to an informational screen confirming your network adapter choice. Take a moment to review this screen to make sure that the information is correct and then click the install button. Windows will now install the necessary files. When the process completes, you will see a message telling you that you must reboot your server. Click the Close button and then click Yes when Windows asks you if you want to restart the server now. While the cluster node is rebooting, go ahead and repeat this process for your other cluster nodes.

Creating an iSCSI Target

Now that Hyper-V has been installed on the cluster nodes, it is time to make some decisions about how you want to organize your storage. Here are some of your options:

  • Place all of your virtual hard drives beneath a single iSCSI target
  • Create a separate iSCSI target for each virtual hard drive
  • Create a separate iSCSI target for each virtual machine

I tend to think that the best approach is to create a separate iSCSI target for each virtual machine. Now I realize that some of you may be concerned about using this approach because some virtual machines require multiple virtual hard drives. This isn't a problem because a single target can contain multiple storage allocations. In other words, if you have a virtual machine that requires two separate virtual hard drives, you can create a single iSCSI target and create both required virtual hard drives beneath that target.

Creating a Demo Virtual Machine

To show you how this works, I want to create a demo virtual machine. I'm not going to worry about clustering this virtual machine for right now. I only want to show you how the underlying connectivity works. Eventually I will turn my attention to building the Hyper-V cluster, but since the cluster is only as good as the underlying storage architecture I want to make sure that I give you a solid foundation.

With that said, go back to your storage server and open up the iSCSI target software. Now, right click on the iSCSI Targets container and choose the Create iSCSI Target command from the resulting shortcut menu. Now, go ahead and set up an iSCSI target in exactly the same way as I showed you in the previous article. The only difference is that this time the iSCSI target will be dedicated to a specific virtual machine, so you will want to name the target accordingly. Don't forget to provide the iSCSI target with the IQN names of your cluster nodes servers.

Now that the iSCSI target has been created, we need to assign some storage to it. For demonstration purposes, let's assume that the virtual machine that we are creating is going to require two different virtual hard drives.

Now, select the iSCSI target the you've just created, right-click on it, and choose the Create Virtual Disk for iSCSI Target command from the shortcut menu. Follow the prompts to create a virtual hard disk. Remember that the virtual hard disk that you are creating is only going to act as a single drive for the virtual server. As such, you need to size the drive accordingly. If you look at Figure A for example, see that I have created two 20 GB virtual hard drives. One of these virtual hard drives will act as the C: drive for the virtual machine, while the other will act as the D: drive. You will also notice that the iSCSI Target software allowed me to provide a description of each virtual hard drive’s purpose. I highly recommend creating such a description, as it will make it easier to keep your storage organized.

Figure A: I have created two separate virtual hard drive files within a single iSCSI target.


Now that I have set up the storage for the demo machine, it is time to create a virtual server and configure it to use these virtual hard drive files. I will show you how to do that in Part 6.

If you would like to read the other parts of this article series please go to:

See Also

The Author — Brien M. Posey

Brien M. Posey avatar

Brien Posey is an MCSE and has won the Microsoft MVP award for the last few years. Brien has written well over 4,000 technical articles and written or contributed material to 27 books.


Featured Links