Sharing of thoughts and information is what blogging is all about. This way we can learn from each other. Post A Comment!These postings are provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.
Resident Bloggers
Chris Di LulloSr. IT Pro Marketing Manager Twitter | LinkedIn Pierre Roman Twitter | LinkedIn Mitch Garvis Twitter | LinkedIn Anthony Bartolo Twitter | LinkedIn
In my last piece (Creating a Storage Area Network Using Microsoft iSCSI Software Target 3.3) I showed you how to create software Logical Unit Numbers (LUN). In this article we are going to take what we have learned to leverage the benefits of a SAN device to create redundancy for our Hyper-V environment. We will:
The equipment I am using for these demos are matching HP EliteBook laptops with Intel Core2 Duo T7700 CPUs and 8 GB of RAM. They are both running Windows Server 2008 R2 Enterprise Edition Service Pack 1. For most clustering there is no requirement for identical machines. For Hyper-V Live Migration, the ultimate goal of the article, the CPUs of all nodes have to be of the same family (a limitation of live migration from any vendor). Enterprise Edition (or Datacenter Edition) is required as Failover Clustering is not a feature of Windows Server Standard Edition. Because we are also using Cluster Shared Volumes this must be performed on Server 2008 R2.
Proper networking is of course a requirement… although I strongly recommend having a dedicated network for storage, in this case I am using a simple D-Link gigabit switch to connect my two portable nodes, and have ensured that proper networking has been configured between my hosts:
In the previous article we configured our LUN to present to host1. Before we create our cluster we have to repeat these steps for host2, or there will be no shared storage.
In the server where the iSCSI Software Target is configured:
A dialogue box should appear warning you that you are assigning multiple initiators to a single iSCSI target. Accept the warning by clicking Yes. Click OK in LUN1 Properties.
In the second server (host2)
The first step requires installing the Failover Clustering feature in Windows Server. As with any other feature this is fairly simple:
The cluster will take a few minutes to create; be patient! You should get a Summary screen like the one below. Click Finish.
Cluster Shared Volumes (CSVs) is a feature of Failover Clustering in Server 2008 R2 for Hyper-V; it is a standard clustered NTFS volume that is available to all nodes that gives the HAVM (Highly Available Virtual Machines) complete mobility as any node can be an owner.
To enable CSVs:
“The Cluster Shared Volumes feature is only supported for use with Windows Server 2008 R2 Hyper-V role. Creation, reproduction and storage of files on Cluster Shared Volumes that were not created by the Hyper-V role, including any user or application data stored under the ClusterStorage directory of the system drive on every node, are not supported and may result in unpredictable behavior, including data corruption or data loss on these shared volumes. For information regarding support services, please see http://go.microsoft.com/fwlink/?LinkId=137158.”
“The Cluster Shared Volumes feature is only supported for use with Windows Server 2008 R2 Hyper-V role. Creation, reproduction and storage of files on Cluster Shared Volumes that were not created by the Hyper-V role, including any user or application data stored under the ClusterStorage directory of the system drive on every node, are not supported and may result in unpredictable behavior, including data corruption or data loss on these shared volumes.
For information regarding support services, please see http://go.microsoft.com/fwlink/?LinkId=137158.”
Click the check-box and click OK. Cluster Shared Volumes should now appear in the navigation pane under your cluster.
Under Cluster Shared Storage you should now have your CSV configured. It is essentially a hard-link to your VHD that sits on the C drive on the host node under C:\ClusterStorage\Volume1.
Hyper-V is an easy role to install. To ensure that it is installed, open Server Manager on each node, click on Roles, and ensure that Hyper-V is listed under Roles Summary. If it is not, add it now.
Under Virtual Networking you must ensure that each host has a virtual network that is identically configured. The name and connection type must match, else failing over will truly fail.
There are two ways to create a highly available virtual machine.
For the purpose of this article we are going to create an HAVM.
The New Virtual Machine Wizard will launch. Create the VM as you would any VM, ensuring that:
Note: You can install the OS on the VM on host2 from host1 in a number of ways; one way is to open Hyper-V Manager in host1, right-click on Hyper-V Manager in the navigation pane, and click Connect to Server… then type the host name (or IP Address) of host2. However you can also launch the Virtual Machine Connection from within the Services and Applications window in Failover Cluster Manager.
Once you have an HAVM created, we can configure it and then test it out.
The HAVM should migrate relatively quickly to Host1. Verify in the Services and applications section that your HAVM is now owned by Host1. In Hyper-V Manager manage Host1 and verify that it is there.
Following the same steps as above, Live Migrate your HAVM back to Host2.
Now that we have performed an Active Live Migration, we have three tests left to go:
Notice in Failover Cluster Manager that the HAVM is restored on Host1 but in reality it is a Quick Migration, and the VM is not rebooted.
Once Host2 is rebooted, after a few minutes your HAVM should fail back to its preferred owner. This may take a few minutes! Do not continue until the current owner for your HAVM is Host2.
Our last test is so simple that you can ask the least technical person in the room to do it. Turn off Host2. Do not perform a shutdown – this is supposed to simulate hardware failure. If it is a laptop unplug the power source and then remove the battery. If it is a server then just yank the power cord!
Within a second or two the HAVM should restart on Host1… it will be the equivalent of a dirty boot, but it will come up, alive and well. When you restart Host2 the HAVM will fail back to it just as it did before.
Does it look and feel like black magic? Probably… but you’ll get used to it; you will get used to high availability without the high costs; you will get used to redundancy without excess hardware. Most of all you will be able to rest easy, knowing that your Hyper-V environment is truly highly available, and that you were able to do it all using a bunch of free tools from Microsoft.
What’s next? Build it! Test it! Implement it! Love it! At long last we have true redundancy available for all.
Mitch Garvis, MCT | Senior IT Consultant & Trainer | SWMI Consulting Group My blog | Twitter | Facebook | LinkedIn | MVP Profile
I'm a PC
Hi Mitch
Great post! Can't believe this is available for free. Going even further will the MS iSCSI Target 3.3 allow some kind of replication to another virtual SAN (MS iSCSI Target) for full redundancy? Is something like that even possible?
Thanks,
Pepe
Yes indeed, then the single point of failure is gone. So tell us Mitch, is it possible? Thanks