Configure Failover Clustering on Windows Server 2008 R2 Server Core - TechNet Articles - United States (English) - TechNet Wiki

In this post I will explain how to build a Windows Server 2008 cluster with Server Core and Hyper-V.

Configure Failover Clustering on Windows Server 2008 R2 Server Core


Prepare the Nodes

I had created 2 VMs with Windows Server 2008 Enterprise(Server core)  as the operating system.

Follow the below steps to prepare the Nodes to form failover cluster. Required command to achieve the goal is given for each step.

1.   
Get the computer Name.

HOSTNAME

2.   
Change computer Name. (This would require a reboot.)

NETDOM RENAMECOMPUTER  <machinename>  /NEWNAME:newmachinename

To reboot the server: SHUTDOWN –r  –t  0

3.   
Set the IP configuration

NETSH INTERFACE IPV4 SET ADDRESS NAME= ”Local Area Connection”  STATIC 192.168.1.10 255.255.255.0

NETSH INTERFACE IPV4 ADD DNSSERVERS  ”Local Area Connection”  192.168.1.1

4.
   
Join the Node to the domain

NETDOM JOIN  <NodeName>  /DOMAIN: <domain name> /UserD:domain\Administrator /Passwordd:*

Reboot the server after joining it to domain.

Repeat the steps for Other Nodes as well.


Configure ISCSI Initiator and disks

 
Its Assumed that you have already created the Virtual Disks/iSCSI targets as required. These steps only cover how we are connecting to the Target from the Server Core nodes.

On the Server Core Node, type "Iscsicpl.exe". If the Service is not already started, it will prompt you to start the service and then will open the iSCSI initiator Properties.
In the Target box, Type the Target IP Address and click “Quick Connect

Once you refresh, the discovered targets will be displayed in the bottom box.

Select the targets and click Connect to connect to the target one by one. Once you are connected to the Targets successfully, the disks will be loaded in Disk Management.

To configure disks we could use DISKPART command. While testing I had created 3 disks 2GB each.

DISKPART

LISTDISK  (this will return the disks available in your system. (Disk 0 being the OS disk normally.)

Further steps will select the target disk, clear the readonly attribute, bring it online and create an NTFS partition

SELECT DISK 1
ATTRIBUTE DISK CLEAR READONLY
ONLINE DISK
CREATE PART PRIMARY
SELECT PART 1
ASSIGN LETTER=Q

Repeat the steps for other disks. Put the Disk Number and Drive letter accordingly.

Quit DISKPART. Format each disk by typing FORMAT  D: /q  where D is your Drive letter. No need to provide any label.

The servers are now completely configured to form a Windows Server 2008 R2 Failover Cluster.


Install PowerShell

In Windows Server 2008 R2 we are introducing PowerShell as the new scripting language for clustering technologies.  PowerShell with Failover Clustering will replace Cluster.exe and the Windows Server 2008 R2 release will be the deprecation release for Cluster.exe.  This means it will still be available for use so it doesn’t break legacy scripts, but no improvements have been made and Cluster.exe will be completely removed in the next release of Windows Server.

By default, Windows PowerShell is not installed on a computer that is running Windows Server 2008 R2 Core. You can use the below method to install Windows PowerShell on a computer that is running Windows Server 2008 R2 Core.

Install PowerShell

In Windows Server 2008 R2 we are introducing PowerShell as the new scripting language for clustering technologies.  PowerShell with Failover Clustering will replace Cluster.exe and the Windows Server 2008 R2 release will be the deprecation release for Cluster.exe.  This means it will still be available for use so it doesn’t break legacy scripts, but no improvements have been made and Cluster.exe will be completely removed in the next release of Windows Server.

By default, Windows PowerShell is not in>1.    Run SCONFIG.

2.    Select option 4 (Configure Remote Management).
3.    Select option 2 (Enable Windows PowerShell).
4.    Click OK.

Ref:  http://support.microsoft.com/kb/976736


Enable Failover Cluster Feature

You could use OCLIST command to find which all features/Roles are already installed.

Use OCSETUP to install the required Features

            Start /w OCSETUP FailoverCluster-Core

            Start /w OCSETUP FailoverCluster-Core-WOW64

Also add additional Features/Roles that you was Cluster Services.

In this scenario I have added File Server and DFSR roles

          Start /w OCSETUP CoreFileServer

            Start /w OCSETUP DFSNServer

            Start /w OCSETUP DFSR-Infrastructure-ServerEdition

You may also use DISM /Online /Get-Features command to list the features.

And to install features you can use DISM /Online /Enable-Feature /FeatureName:<featureName>

Example: DISM /Online /Enable-Feature /FeatureName: MicrosoftWindowsPowerShell

Repeat the tests on other Nodes as well.


Run Cluster Validation Tests

In Windows Server® 2008 and Windows Server 2008 R2, the way that clusters are qualified is changing significantly with the introduction of the cluster validation wizard. The cluster validation wizard is a feature that is integrated into failover clustering in Windows Server 2008 and Windows Server 2008 R2. With the cluster validation wizard, you can run a set of focused tests on a collection of servers that you intend to use as nodes in a cluster. This cluster validation process tests the underlying hardware and software directly, and individually, to obtain an accurate assessment of how well failover clustering can be supported on a given configuration.

A cluster validation report is required by Microsoft® Customer Support Services (CSS) as a condition of Microsoft supporting a given configuration.

To run the cluster validation tests using Power shell in Windows Server 2008 R2 Core:

1.    Start Power shell and import the Failover Cluster module

POWERSHELL

IMPORT-MODULE FAILOVERCLUSTERS

2.    Run the cluster Validation against the proposed cluster nodes

TEST-CLUSTER –NODE Node1,Node2


Create a Cluster


Once the cluster validations
are passed, you can proceed with creating a cluster. You would provide a Name and IP for the cluster.

To create a Failover Cluster using Power shell in Windows Server 2008 R2 Core:

1.    Start Power shell and import the Failover Cluster module

POWERSHELL

IMPORT-MODULE FAILOVERCLUSTERS

2.    Create the cluster with the proposed cluster nodes

NEW-CLUSTER –NAME “CoreCluster” –NODE Node1,Node2,Node3 –STATICADDRESS 192.168.1.15

Wait for the Failover Cluster configuration to be complete.

Note: You may also perform these steps from a Windows Server 2008 R2 Full version using Failover Cluster Management RSAT tools.


Managing your Failover Cluster

Let’s discuss few commands to manage your Server Core failover cluster


Add a Service to Failover Cluster


Let’s try adding a File server Service to the Failover Cluster.

ADD-CLUSTERFILESERVERROLE -STORAGE “Cluster Disk 1” –NAME “CoreFileServer” –STATICADDRESS 192.162.1.20


Move the Services from one Node to another Node

Move-ClusterGroup CorePrintServer -Node node2

This command moves the clustered service called MyPrintServer from the current owner node to node2.

Get-ClusterNode node3 | Get-ClusterGroup | Move-ClusterGroup

This command moves all clustered services and applications (resource groups) that are currently owned by node3 to other nodes. You can use this command before performing maintenance on the specified node.

Move-ClusterGroup CorePrintServer -Node node2 -Wait 0

This command moves the clustered service (resource group) called MyPrintServer from the current owner node to node2. Information about MyPrintServer is displayed immediately, while it is in the process of being moved.


Move the Services from one Node to another Node

Move-ClusterGroup CorePrintServer -Node node2

This command moves the clustered service called MyPrintServer from the current owner node to node2.

Get-ClusterNode node3 | Get-ClusterGroup | Move-ClusterGroup

This command moves all clustered services and applications (resource groups) that are currently owned by node3 to other nodes. You can use this command before performing maintenance on the specified node.

Move-ClusterGroup CorePrintServer -Node node2 -Wait 0

This command moves the clustered service (resource group) called MyPrintServer from the current owner node to node2. Information about MyPrintServer is displayed immediately, while it is in the process of being moved.

Add Nodes to an existing failover cluster

Get-Cluster CoreCluster | Add-ClusterNode node3

This command adds node3 to cluster1.


Remove Nodes from your failover cluster

Remove-ClusterNode node4

This command removes node4 from the local cluster.
Remove-ClusterNode node4 -force
This command removes node4 from the local cluster without prompting for confirmation.


Destroy an existing failover cluster

Remove-Cluster

After prompting for confirmation, this command destroys the local failover cluster and removes cluster configuration information from the cluster nodes.

Remove-Cluster –Force

This command destroys the local failover cluster and removes cluster configuration information from the cluster nodes. The command does not prompt for confirmation.

Get-Cluster CoreCluster | Remove-Cluster -Force –CleanupAD

This command destroys Cluster1, removes cluster configuration information from the cluster nodes, and deletes the cluster objects in Active Directory.  The command does not prompt for confirmation.

NOTE
I am working on few more commands and screenshots to be added to this. Good Luck with your Windows Server 2008 R2 Server Core Failover Cluster. Let me know your feedback.