Basic steps to setup Windows Server 2012 Cluster with Hyper-V
Setup Windows Server 2012 Cluster in Hyper-V
- iSCSI Target Configuration
- iSCSI Initiator Configuration
- Setup Windows Server 2012 Cluster
There are different types of Quorum models. Nodes and Disk Majority type will be used fir this example.
Pre-Requisites
- 1 Windows Server 2012 server (It will be called as DC01 in this example)
- 2 Windows Server 2012 servers (They will be called as Node01 and Node02 in this example)
- 1 Windows Server 2012 server (It will be called Storage01 in this example – I also used DC01 as a Storage01 server)
Storage Configuration
Step 1: Storage01 iSCSI Target Server Installation
- Open “Server Manager” and click “Dashboard”
- Click “Add roles and features”
- Before You Begin: Click Next
- Installation Type: Select “Role-based or feature-based installation” and click Next
- Server Selection: Select the server on which to install roles and features. If there are more than one servers within the “Server Pool”, select the appropriate one to enable iSCSI Target. Select Storage01 server and click Next
- Server Roles: Select “File and Storage Services” and then “File and iSCSI Services” and then “File Server” and then select “iSCSI Target Server” to enable iSCSI target server role and click Next
- Features: Click Next
- Confirmation: Click Installation
- Restart in necessary
Step2: Node01 Start “Microsoft iSCSI Initiator Service”
- Open Services console
- Right click on “Microsoft iSCSI Initiator Service” and then select properties
- Change “Startup type” to Automatic and then press Start button to start the service and then press OK button
Step3: Node02 Start “Microsoft iSCSI Initiator Service”
- Open Services console
- Right click on “Microsoft iSCSI Initiator Service” and then select properties
- Change “Startup type” to Automatic and then press Start button to start the service and then press OK button
Step 4: Storage01 iSCSI Target Server Configuration
- Open “Server Manager” and click “File and Storage Services” and then click “iSCSI”
- Select “New iSCSI Virtual Disk…” within TASKS menu
- iSCSI Virtual Disk Location: Select the Volume Drive to create the virtual disk. Click Next
Virtual Hard Disks are created within the “C:\iSCSIVirtualDisks” folder by default. If necessary, the patch can be changed by selecting “Type a custom path” option.
If there is not enough space in the selected volumes (Check the Free Space column), create a new “Hard Disk…” using the “Hyper-V” console (Actions – New – Hard Disk). - iSCSI Virtual Disk Name: Type the name of the virtual disk (LUN1.vhd) and click Next
- iSCSI Virtual Disk Size: Type the size of the virtual disk (512MB for Quorum Disk) and click Next
- iSCSI Target: Select “New iSCSI target” and click Next
iSCSI target can have more than one virtual disks and any server can connect the “iSCSI Target” and access the Hard Disks within the iSCSI Target. If you plan to create windows cluster, you can create one iSCSI Target with a few Hard Disks and then you can set the same iSCSI Target for both nodes using the iSCSI Initiator on the nodes. It is called as shared storage. If you plan another set of Hard Disks for another server, you can create a new iSCSI Target with a few Hard Disks and that server can access the Hard Disk by connecting the new Target Server. - Target Name and Access: Type the name of the new Target Server (iscsitarget1) and click Next
- Access Servers: Click Add to add an initiator(s) (Initiator is the server name which will have access to the Target Server which has the Virtual Hard Disks) and click Next
If it is planned for the windows cluster, every single node name within the cluster should be added
Our example is also a windows cluster so Add “Node01” and “Node02” as Initiators.
When you add the initiator, you can select “Enter a value for the selected type” and then select “IQN” and then type Value. To write the correct “Value”, connect to Node01 and start the “iSCSI Initiator” and then select the “Configuration” tab and copy the “Initiator Name” and paste it within the Value field. - Enable authentication: Click Next
- Confirmation: Click Create
- Results: Click Close
Step 5: Node01 iSCSI Initiator Configuration
- Open iSCSI Initiator and Click “Discovery” tab
- Click “Discovery Portal…” and type the IP address of the iSCSI Target server (IP Address of Storage01) and then click OK
- Click “Targets” tab and Select the target within the “Discovered targets” field (iscsitarget1) and then click Connect
- Keep the all default values and Click OK
- Status should be “Connected”
- Click OK to close the “iSCSI Initiator Properties”
- Open “Server Manager” and click “File and Storage Services” and then click “Disks”
- The new disk (512MB for Quorum) should be presented as Offline
- Right click on the disk and select “”Bring Online” and then Click Yes to accept the message
- Right click on the new disk and select “New Volume”
- Before You Begin: Click Next
- Server and Disk: Select the appropriate Server and Disk and then click Next and click OK to accept the message
- Size: Select the appropriate size for the new disk and then click Next
- Drive Letter or Folder: Select the appropriate drive letter and ten Click Next
- File System Settings: Type the label of the volume (Quorum Disk)
- Confirmation: Click Create
- Results: Click Close
Step 6: Node02 iSCSI Initiator Configuration
- Open iSCSI Initiator and Click “Discovery” tab
- Click “Discovery Portal…” and type the IP address of the iSCSI Target server (IP Address of Storage01) and then click OK
- Click “Targets” tab and Select the target within the “Discovered targets” field (iscsitarget1) and then click Connect
- Keep the all default values and Click OK
- Status should be “Connected”
- Click OK to close the “iSCSI Initiator Properties”
- Open “Server Manager” and click “File and Storage Services” and then click “Disks”
- The new disk should be presented as Offline
- Right click on the disk and select “”Bring Online” and then Click Yes to accept the message
512MB Disk (Quorum) can be seen on both nodes.
Setup Windows Server 2012 Failover Cluster
Step 7: Node01 Install Failover Clustering
- Open “Server Manager” and click “Dashboard”
- Click “Add roles and features”
- Before You Begin: Click Next
- Installation Type: Select “Role-based or feature-based installation” and click Next
- Server Selection: Select the server on which to install roles and features. If there are more than one servers within the “Server Pool”, select the appropriate one to enable iSCSI Target. Select Storage01 server and click Next
- Server Roles: Click Next
- Features: Select “Failover Clustering” Click Next
- Confirmation: Click Installation
- Restart in necessary
Step 8: Node02 Install Failover Clustering
- Open “Server Manager” and click “Dashboard”
- Click “Add roles and features”
- Before You Begin: Click Next
- Installation Type: Select “Role-based or feature-based installation” and click Next
- Server Selection: Select the server on which to install roles and features. If there are more than one servers within the “Server Pool”, select the appropriate one to enable iSCSI Target. Select Storage01 server and click Next
- Server Roles: Click Next
- Features: Select “Failover Clustering” Click Next
- Confirmation: Click Installation
- Restart in necessary
Step 9: Node01 Validate and Create Windows Cluster
- Open “Failover Cluster Manager”
- Click “Validate Configuration”
- Before You Begin: Click Next
- Select Servers or a Cluster: Add the node names (Node01 and Node02) and click Next
- Testing Options: Select “Run all tests (recommended)” and click Next
- Confirmation: Click Next
- Validating: “Create the cluster now using the validated nodes..” is checked and click Finish
- Before You Begin: Click Next
- Access Point for Administering the Cluster: Type the cluster name (SQLNodeClu). Cluster Name object will be created in Active Directory. The user who creates the cluster should have permission in active directory such as create computer object. Type the IP address from the public network.
- Confirmation: “Add all eligible storage to the cluster” is checked. Click Next
- Creating New Cluster: Finish
- Check the Quorum Setting: On the left-hand side select “Failover Cluster Manager” and windows cluster name (SQLNodeClu) and right click on the windows cluster name (SQLNodeClu) and select “More Actions” and then “Configure Cluster Quorum Settings”
- Before You Begin: Click Next
- Select Quorum Configuration Option: Select “Add or change the quorum witness” and then click Next
- Select Quorum Witness: Select “Configure a disk witness” and then click Next
- Configure Storage Witness: Check the Quorum disk. If it is not correct, select the correct disk and then click Next
- Confirmation: Click Next
- Summary: Finish
- Check the “Current Host Server” and test the failover by selecting “Move Core Cluster Resources” option.
The Result
It is ready to have one of the options below
- New SQL Server failover cluster installation
Failover cluster installation requires shared storage for system databases, user databases, tempdb, backup. Check the steps between “Step 1” and “Step 6” - SQL Server 2012 AlwaysOn
Comments
- Anonymous
July 18, 2013
Thanks for the great setup Batuhan!I have an issue though where the validation test fails under storage for Disk Arbitration and Disk Failover. Looking over the report if fails to list the quorum disk as a potential disk cluster disk (it just shows the boot disk). Unfortunately there are no details as to why the quorum disk isn't eligible. Neither nodes have the quorum disk online as specified in the report. It is formatted with NFTS (no drive letter).Any thing I can do to further troubleshoot? - Anonymous
July 20, 2013
Nevermind. I had a probably with the OS on one of my nodes. I reinstalled 2012 and it resolved the issue as was able to build my cluster. Thanks again! - Anonymous
March 06, 2014
Excellent, going to use it in my setup. Thank you.