Today i will continue with the Second and Last Part in HYPER-V Failover Clustering. Use these 2 technologies together to make High Available your Virtual Machines and keep downtime out of the game. In Firs Part i have describe how can enable Failover Clustering , use Validation Wizard and add the nodes that will be act as Clusters.
Today i will describe the following
- Add Storage in Failover Clustering.
- Create VM in Failover Clustering.
- Enable High Availability for the Virtual Machine
- Test Failover Clustering.
We have lot to write so let's start.
Before start to read the article must already read and understand the
Deploy HYPER-V Failover Cluster in Windows Server 2012 - Part 1
Add Storage in Failover Clustering.
Now the first step is to add the Storage that will be use with Clusters to create the Virtual Machines. Remember that the Storage:
- You must use Share Storage that is attached in Windows Server 2012 and not Local Storage of your Server.
- Attach Storage should contain multiple, separate disks (logical unit numbers, or LUNs) that are configured at the hardware level.
So after have setup your Share Storage like SAN or any NAS base on your requirements we can start
- Open Server Manager and go Tools - - -> iSCSI Initiator.
- Click in Discovery Tab.
- Click in Discovery Portal.
- Type the Ip Address of your Share Storage and click OK.
- Go in Tab Targets and you will see the available targets base on what you have create in your Share Storage.
- Clik in target that you have create and select Connect. As you can see in image what i have create for this scenario.
- Click Enable Multipath and any other settings base on your Vendor documentation from Share Storage.
- Go in Disk Management and you will see the new Disk tha you have add.
- Right click in Disk and select Online.
- Right click in the Partition and select Initialize.
- Select GPT or MBT base on your requirement and click Next.
- You don't need to change anything click Next and Next to start Formatting the Disk.
- Do the same steps from the beginning in second HYPERV.
- When you finish open Failover Clustering
- Expand Storage and click Disks.
- Click Add Disk from the right side.
- Select the Disk that you want to Add and click OK.
- Now you can see the Disk . If you see in Assign To the status is Available Storage.
- Until now i have add the disk in Cluster but only the specific node can see the Disk. I must proceed to Share the Storage to have read-write access multiple nodes in the same LUN like here.
- Right click in the Cluster Disk and select Add to Cluster Shared Volumes.
- If you check now in the Assign to will see that the status is Cluster Shared Volume.
Until now we have add the Storage in Failover Clustering and all the nodes of the Clustering can see the Share Storage. One thing that has change is the location of the Storage. If you open My Computer you will not find any new Partition. The Partition you will find it in C:\ClusterStorage.
Create VM in Failover Clustering.
After Add the Storage in Failover Clustering it's time to create new VM in Share Storage. I wrote an article to explain how can create Virtual Machine in Create Virtual Machine in Windows 8.1 with HYPER-V but in any case i will repeat the steps.
- From the Failover Clustering Console click Roles and from the right side click Virtual Machines - - > New Virtual Machine.
- For the First Step of Wizard Before you Begin just click Next.
- Write the name for the VM that you want and check Store the Virtual Machine in different location. Click Browse and find the C:\ClusterStorage\Volume1. Because i like to have clean structure i create a Folder with the name of the VM. Click Next.
- Select Generation 1 or 2 base on your requirements.Click Next
- Add the RAM that you want to has the Virtual Machine.
- Select the Network Adapter if you have createed in HYPER-V. Unless leave it Not Connected and you will create after the Network Adapter. Click Next
- Type the size for the virtual hard disk. Click Next.
- Select install an Operating System later. Click Finish.
- Find the new Virtual Machine in Failover Cluster Manager.
Now we create the Virtual Machine .It's time to configure it for High Availability. If choose to leave it as it in case that the node bring offline then the Virtual Machine also will be offline. So it's necessary the following step to take advantage of the Clustering.
Enable High Availability for the Virtual Machine
Let's start to Configure Role for High Availability in VM.
- From Failover Cluster Manager select Roles
- Click Configure Roles from the right side.
- In the Before you Begin of the High Availability Wizard click Next.
- Find and Select Virtual Machines of the Roles that included. Click Next.
- Select the Virtual Machine that you want to configure it for High Availability. Click Next.
- Just a Confirmtion Page for the Configuration until now. Click Next.
- Click Finish.
So now we have configure the Virtual Machine for High Availability. The last Step is to test if all he Configuration that we have done works without problems.
Test Failover Clustering.
This is the last and the most important step. Before start to use Failove Clustering in production enviroment first must test if works.
- From Failover Cluster Manager select Nodes and you will see all the available Nodes that you have which is UP or DOWN.
- Select Roles and identify the Owner of the Virtual Machine.
- Restart the owner node of the Virtual Machine and go in Roles to check what will happen in Virtual Machine that you have create.
- If everything is working properly then it will start the Live Migration and you will see the status in Information field. With the Live Migration the Virtual Machine will be transfered in available node and continue to be Online without any downtime. As you can see the Owner is the HYPERV2 now.
- If the VM bring offline then must be check all the configuration because probably has misconfiguration.
- With the same way test and the other node.
If everything working properly then you are ready to go Live with the Failover Clustering and create High Availability Solution in your enviroment. Failover Clustering can save you from a lot and critical problems and keep your enviroment without downtimes.
Do you want to share your experience. Write in our commented system and share it with other IT Pro.
Have a nice weekend!!