Hyper –V can be used to create virtualized computers to improve the hardware efficiency. In this blog post I will try to cover how to create windows failover cluster using Hyper-V with out using multiple physical computers. Cluster we are building can be used to install Clustered SQL Server and similar cluster aware applications.
1. We will create a Domain controller
2. We will create two member servers which will act as two nodes of the cluster.
We will start the installation by Turning on window feature Hyper-V.
To enable Hyper-V Open control panel—>Programs –>Get Programs->Turn windows features on or off –>Enable Hyper-V as shown in picture below
Once the Hyper-v feature is enabled open the hyper v manager and follow the below steps one by one.
Before creating virtual machine create virtual switch to configure network access between the computers which will create and name it.
Select the type of virtual switch for your virtual machines.
Give the name for your Virtual switch and click ok.
Now create New virtual machine by Right clicking SQLPC –>New->Virtual machine.
2.New virtual machine wizard will appear.Click Next to continue.
Specify the name for your virtual machine.Let us Create domain controller as DC.
Create a new folder or use the existing folder to store the virtual machine.Specify that location in location tab.Click Next
Specify the amount of memory you want to allocate for this machine.Then,click Next.
Inorder to do OS installation ,Connect to virtual hard disk and specify the size for it.Click Next
Then install an Operating system from CD or as image file which you have in your system.
Browse and select the file for installation.Click open.
Now,click finish and complete the virtual machine wizard.
Similarly,Follow the above steps and create two cluster nodes as clusternode1 and clusternode2 .
Now Hyper –V manager will have three virtual machines which we created one as DC and others as clusternodes.
Right click DC->Start->connect.(similarly do for all)
Cluster nodes will start running.
DC virtual machine connection window will appear,click next.
Installation window will appear,click install now to start installation.
Select the operating system you want to install.Select windows server 2008 R2 Enterprise(Full installation) for DC(domain controller).Click Next.
Accept the license term and click next
Select the type of installation as Custom(advanced)
Click Next and continue
After installation restart your virtual machine to update with new setting
Give the password for login.
Domain controller is installed with OS.
Perform the task which you want or else close the window.
Configure TCP/IP address and enable LAN connection.
To configure TCP/IP, open control panel->Network and internet->Network connections->click IPV4
Give IP address ,subnet mask and default gateway ,click ok.
Open dcpromo .
Active directory domain service wizard will appear.Click Next and continue
Select create new domain in a new forest
Give forest root domain which acts as domain.
Set forest functional level .Default Functional level is windows sever 2003.
Check DNS server and click Next.
Click Yes and continue.
Select the folder to store databases,log files and click Next.
Give the administrator password and click Next.
Summary of your selections will appear,review your selection and click next.
DNS installation will be completed.
Click Finish and complete domain services installation wizard.
Restart your computer after installation.
Now do the similar things for cluster nodes 1&2.
Select computer->properties->computer name.Change the computer name and give domain name which you gave in DC.
Configure IPV4 properties for cluster nodes.
Restart your computer to apply the changes.
Click Ok,to restart.
Now we have domain controller and member servers. We have to install failover cluster feature and make this members servers as node of cluster which we are going to create.
To install the failover cluster feature and create a cluster follow the steps in http://sqlserverscribbles.com/2013/06/17/how-to-install-cluster-in-windows-2008-and-windows-2012/
Once the cluster is created we have to create shared Disk for installing failover aware clustered application like SQL Server. Follow the steps in http://sqlserverscribbles.com/2013/06/16/how-to-create-shared-disk-using-iscsi-software-target/ to create a shared disk using iSCSI target software.