Files
docs/Servers & Workflows/Windows/Windows Server/Virtualization/Hyper-V/Failover Cluster/Deploy Failover Cluster Node.md

7.8 KiB

Purpose: Deploying a Windows Server Node into the Hyper-V Failover Cluster is an essential part of rebuilding and expanding the backbone of my homelab. The documentation below goes over the process of setting up a bare-metal host from scratch and integrating it into the Hyper-V Failover Cluster.

!!! note "Prerequisites" This document assumes you are have installed and are running a bare-metal Hewlett-Packard Enterprise server running iLO (Integrated Lights Out) with the latest build of Windows Server 2022 Datacenter (Desktop Experience).

Download the newest build ISO of Windows Server 2022 at the [Microsoft Evaluation Center](https://go.microsoft.com/fwlink/p/?linkid=2195686&clcid=0x409&culture=en-us&country=us)

!!! info "Assumption that Cluster Already Exists" This document also assumes that you are adding an additional server node to an existing Hyper-V Failover Cluster. This document does not outline the exact process of setting up a Hyper-V Failover Cluster from-scratch, setting up a domain, DNS server, etc. Those are assumed to already exist in the environment. Your domain controller(s) need to be online and accessible from the Failover Cluster node you are building for things to work correctly.

Provision Server Roles, Activate, and Domain Join

# Enable Remote Desktop (NLA-Disabled)
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0
Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" -Name "UserAuthentication" -Value 0 Enable-NetFirewallRule -DisplayGroup "Remote Desktop"

# Rename the server
Rename-Computer BUNNY-NODE-02

# Install Hyper-V, Failover, and MPIO Server Roles
Install-WindowsFeature -Name Hyper-V, Failover-Clustering, Multipath-IO -IncludeManagementTools

# Change edition of Windows (Then Reboot)
irm https://get.activated.win | iex

# Domain-join the server
Add-Computer BUNNY-LAB.io

# Force activate server
irm https://get.activated.win | iex

!!! warning "Disable NLA (Network Level Authentication)" Ensure that "Allow Connections only from computers running Remote Desktop with Network Level Authentication" is un-checked. This is important because if you are running a Hyper-V Failover Cluster, if the domain controller(s) are not running, you may be effectively locked out from using Remote Desktop to access the failover cluster's nodes, forcing you to use iLO or a physical console into the server to log in and bootstrap the cluster's Guest VMs online.

This step can be disregarded if the domain controller(s) exist outside of the Hyper-V Failover Cluster.

Failover Cluster Configuration

Configure Cluster SET Networking

You will need to start off by configuring a Switch Embedded Teaming (SET) team. This is the backbone that the server will use for all Guest VM traffic as well as remote-desktop access to the server node itself. You will need to rename the network adapters to make management easier.

  • Navigate to "Network Connections" then "Change Adapter Options"
    • Rename the network adapters with simpler names. e.g. (Embedded LOM 1 Port 1 becomes Port_1)
    • For the sake of demonstration, assume there are 2 10GbE NICs (Port_1 and Port_2)
# Create Switch Embedded Teaming (SET) team
New-VMSwitch -Name Cluster_SET -NetAdapterName Port_1, Port_2 -EnableEmbeddedTeaming $true

Configure Static IP Address

You may be booted out of the Remote Desktop session at this time due to how the network team changed the configuration. Leverage iLO to remotely access the server again to configure a static IP address on the new vEthernet (Cluster_SET) NIC using the following configuration.
While in the NIC Properties, disable IPv6.

!!! note "Disable Embedded Ports" We want to only use the 10GbE Cluster_SET network for both virtual machines and the virtualization host itself. This ensures that all traffic goes through the 10GbE team. Disable all other non-10GbE network adapters.

IP ADDRESS SUBNET MASK GATEWAY PRIMARY DNS SECONDARY DNS
192.168.3.4 255.255.255.0 192.168.3.1 192.168.3.25 192.168.3.26

Configure iSCSI Initiator to Connect to TrueNAS Core Server

At this point, now that we have verified that the 10GbE NICs can ping their respective iSCSI target server IP addresses, we can add them to the iSCSI Initiator in Server Manager which will allow us to mount the cluster storage for the Hyper-V Failover Cluster.

  • Open TrueNAS Core Server

    • Navigate to the TrueNAS Core server and add the "Initiator Name" seen on the "Configuration" tab of the iSCSI Initiator on the Virtualization Host to the Sharing > iSCSI > Initiator Groups > "Hyper-V Failover Cluster Hosts"
  • Open Server Manager

    • Click on the "Tools" dropdown menu
    • Click on "iSCSI Initiator"
      • You will be prompted to start the Microsoft iSCSI service. Click on "Yes" to proceed.
    • Click on the "Discovery" tab
    • Click the "Discover Portal" button
      • Enter the IP addresses of "192.168.3.3". Leave the port as "3260".
      • Example Initiator Name: iqn.1991-05.com.microsoft:bunny-node-02.bunny-lab.io
    • Click the "Targets" tab to go back to the main page
      • Click the "Refresh" button to display available iSCSI Targets
      • Click on the first iSCSI Target failover-cluster-storage then click the "Connect" button
        • Check the "Enable Multi-Path" checkbox
        • Click the "Advanced" button
        • Click the "OK" button
      • Repeat the connection process seen above for all remaining iSCSI Targets
      • Close out of the iSCSI Initiator window
    • Navigate to "Disk Management" to bring the iSCSI drives "Online"

Initialize and Join to Existing Failover-Cluster

Validate Server is Ready to Join Cluster

Now it is time to set up the Failover Cluster itself so we can join the server to the existing cluster.

  • Open Server Manager
    • Click on the "Tools" dropdown menu
    • Click on "Failover Cluster Manager"
    • Click the "Validate Configuration" button in the middle of the window that appears
      • Click "Next"
      • Enter Server Name: MOON-NODE-01.moongate.local
      • Click the "Add" button, then "Next"
      • Ensure "Run All Tests (Recommended)" is selected, then click "Next", then click "Next" to start.

Join Server to Failover Cluster

  • On the left-hand side, right-click on the "Failover Cluster Manager" in the tree
    • Click on "Connect to Cluster"
    • Enter MOON-CLUSTER.moongate.local
    • Click "OK"
  • Expand "MOON-CLUSTER.moongate.local" on the left-hand tree
    • Right-click on "Nodes"
    • Click "Add Node..."
      • Click "Next"
      • Enter Server Name: MOON-NODE-01.moongate.local
      • Click the "Add" button, then "Next"
      • Ensure that "Run Configuration Validation Tests" radio box is checked, then click "Next"
      • Validate that the node was successfully added to the Hyper-V Failover Cluster

Cleanup & Final Touches

Activate Windows Server

You will need to change the edition from "Windows Server 2022 Datacenter Evaluation" to "Windows Server 2022 Datacenter". This will ensure that the server does not randomly reboot itself. If you have a license, you can install it now. Otherwise, you can force-activate using the Changing Windows Edition documentation.

Run Windows Updates

Ensure that you run all available Windows Updates before delegating guest VM roles to the new server in the failover cluster. This ensures you are up-to-date before you become reliant on the server for production operations.