In this guide, we will go over the process of adding Hyper-V servers into a Failover Cluster and configuring an iSCSI LUN as a shared volume.
Failover Clustering ensures high availability of virtual machines by allowing them to move between Hyper-V hosts without downtime, and shared storage is essential for seamless failover.
Prerequisites
Before you begin, make sure you have the following:
- Two or more Hyper-V hosts running a supported version of Windows Server.
- Both servers are joined to the same Active Directory domain.
- Shared Storage (LUN) accessible by all Hyper-V hosts, such as iSCSI or Fibre Channel.
- Failover Clustering feature enabled on both servers.
- Properly configured network for Hyper-V traffic, Cluster communication, and Storage access.
Step 1: Install Failover Clustering on Hyper-V Hosts
- Open Server Manager on both servers.
- Go to Manage > Add Roles and Features.
- Select Role-based or feature-based installation.
- In the Features section, check Failover Clustering, then click Install.
- Repeat this on both Hyper-V hosts.
Step 2: Connect the LUN to Hyper-V Servers
To ensure the iSCSI storage LUN is available for both Hyper-V hosts:
- On both Hyper-V servers, open iSCSI Initiator from start menu.
- Connect to the iSCSI target (the LUN).
- In Disk Management, take the disk online, initialize it, and format it from one server, then take it offline.
- On the second server, bring the disk online briefly to verify visibility, then take it offline.
Step 3: Validate Cluster Configuration
- Open Failover Cluster Manager on one of the servers.
- Select Validate Configuration from the right-hand pane.
- Add the names of the Hyper-V hosts to be part of the cluster.
- Run the validation tests to verify the setup (network, storage, and system checks).
- Review the report for any issues that need fixing before proceeding.
Step 4: Create the Failover Cluster
- In Failover Cluster Manager, select Create Cluster.
- Add the Hyper-V servers you wish to include in the cluster.
- Assign a Cluster Name and Cluster IP.
- Complete the wizard to form the cluster.
Step 5: Add the LUN as a Clustered Shared Volume (CSV)
Once the cluster is created, add the LUN to be used as shared storage:
- In Failover Cluster Manager, right-click Disks and select Add Disk.
- Choose the LUN that both servers have access to.
- Right-click the added disk and select Add to Cluster Shared Volumes (CSV).
- This LUN is now available for use by both Hyper-V servers for highly available virtual machines.
Step 6: Configure Hyper-V for High Availability
- On each server, make sure the Hyper-V role is enabled.
- In Failover Cluster Manager, right-click Roles and select Configure Role.
- Choose Virtual Machine, and pick the VMs you want to make highly available.
- This ensures that virtual machines are able to fail over between the Hyper-V hosts without disruption.
Conclusion
By following these steps, you can successfully add Hyper-V servers into a failover cluster and configure a iSCSI LUN as shared storage. This setup is critical for ensuring high availability and minimizing downtime in a Hyper-V environment.