Gadgets
How to Migrate VMware to Hyper-V (3): Deploy Hyper-V Cluster
[ad_1]
In part 3 of my VMware to Hyper-V migration, I will guide you through creating a 2-node Hyper-V cluster. After deploying the cluster, we’ll configure it.
Once the cluster is ready, we will deploy our first Highly Available (HA) cluster resource – the SCVMM VM!
Let’s roll!
Task 1: Create the Hyper-V Cluster
Our first task is to create a 2-node Hyper-V cluster using the table below:
Cluster Name | Cluster IP address | Cluster Nodes |
---|---|---|
lab-cluster-2 | 192.168.0.107 | IPMpHPV4, IPMpHPV5 |
Task 1.1: Run Cluster Validation Test on all Hosts
Before deploying a cluster, it is recommended that a validation test be run. Here are the steps:
- From the Server Manager Tools menu, open the Fail Over Cluster Manager. When the Cluster Manager opens, check the “Don’t show this message again” at the pop-up, then close the pop-up.



- Then, on the top right of the Cluster Manager, click Validate Cluster.


- On the first page of the Cluster Validation wizard, check the Do not show this again checkbox. Then, click Next to continue.


- Then, on the Select Servers or cluster page, enter the name of a Hyper-V host, and click Add to add the server to the list. Repeat the process to all the nodes you want to validate.
After adding all servers, click Next.
You can also use the Browse button to search for servers using Active Directory search.


- Accept the “Run all tests (recommended)” option on the Test Options page and proceed. Then, on the next page, review all the tests that will be run if you like and click Next to start running the tests.


Wait for the tests to complete. It will take a little while.


When the Cluster validation test completes, it will return pass in some categories and fail in others. Review the report and if you’re deploying in a production environment, I strongly recommend reviewing the report and fixing essential issues.
To close the Cluster validation wizard, click Finish.


Since I’m deploying in a lab, I can ignore the errors. Some of the errors are about my Hyper-V hosts having different network adapters.
When I deploy Hyper-V clusters in production, as much as possible, I strongly recommend using hosts with specs as close as possible.
Task 1.2: Deploy the 2-Node Hyper-V Cluster
I prefer creating clusters with PowerShell as it is faster and gives me more control. I’ll run this command to create a cluster “lab-cluster-2” with two Hyper-V hosts, IPMpHPV4 and IPMpHPV5, and a static IP address of 192.168.0.107.
If you have a separate network for Live Migration, specify the IP address of that network next to the first IP. The New-Cluster command will assign the IPs automatically.
New-Cluster -Name "lab-cluster-2" -Node IPMpHPV4, IPMpHPV5 -StaticAddress 192.168.0.107
The command creates the cluster quickly. When the cluster is deployed, PowerShell displays its name.


Task 2: Configure the Cluster
After deploying a Hyper-V cluster, you must optimize some of its settings. Follow these steps to complete some essential post-deployment tasks:
- From the Fail Over Cluster Manager, choose Connect to Cluster.


- Then, enter the cluster name and choose OK.


- Once the Cluster Manager has successfully connected, the cluster will be displayed on the left pane. To see its resources, expand it by clicking the arrow highlighted in my screenshot below.


- Let’s start the configuration with its storage. Expand the cluster’s Storage node, then choose Disks.
All cluster-eligible disks will be displayed. The Disk node also shows the current Owner node. If you recall, I connected the Hyper-V hosts to three disks: QuorumvDisk, VMMLibvDisk, and CSVvDisk.


Disk 2 has already been automatically elected as the Quorum witness disk. Before we accept this, let’s confirm that we intend to use that disk as the quorum.
- Left-click the disk, and its details will be displayed at the bottom. As shown in my screenshot below, this is our 1 GB disk, which we designated for the quorum witness.


Let’s rename it accordingly to make it easy to ID this disk.
- Left-click the disk to select it. Then, at the bottom of the right pane, choose Properties.


- Then, rename the disk and click OK.


The next step is to configure the cluster’s Cluster Shared Volume.
- To assign a disk as a Cluster Shared Volume, left-click the disk, then confirm that it is the one you want to use as CSV.
Finally, click Add to Cluster Shared Volume.
I’m making Cluster Disk 1 the Cluster Shared Volume as it is the disk I plan to use for this purpose. If you look at the details of the disk, its volume label is CSVDisk. This highlights the reason I labeled the disk property for easy identification!


When you select a disk as a Cluter Share Volume, it goes offline briefly. In my case, when it came online, the disk Node owner changed from IPMpHPV5 to IPMpHPV4.
Also, the disk is now displayed as Assigned to Cluster Share Volume. For clarification, the Cluster Share Volume disk stores Hyper-V cluster resources like VM configuration files and virtual disks.


Before we rename the disk, I would like to highlight one important change that occurred when we configured it as a Cluster Share Volume.
If you look at the disk’s details pane, it has additional information – C:ClusterStorageVolume1.


The Cluster Shared Volume is mounted C:ClusterStorageVolume1, Volume2, Volume 3, etc. This is the physical storage where the Hyper-V resources like VMs will be stored.


I would like to share yet another important piece of information regarding Cluster Shared Volumes. When you designate a disk as a Cluster Shared Volume, Windows configures it with the CSVFS file system.
The CSVFS file system is a special file system that Windows assigns to volumes, which is assigned the Cluster Shared Volume role.
To confirm this, open Disk Management on the Cluster Node that currently owns the Cluster Shared Volume resource, which in my example is IPMpHPV4.
Disk Management confirms that this disk’s file system has changed from NTFS to CSVFS.


Now that I have given you a crash course about Cluster Shared Volumes let’s rename the Cluster Disk.
- Select the disk and open its Properties sheet. Then, change the name to CSV Disk and click OK.


Later in this part, we will use the remaining cluster disk to configure our VMM Library share. For now, do not do anything with that disk! Instead, rename the Cluster Disk “VMMLibrary Disk.”
To manually set a cluster disk as a quorum witness, select the cluster, select More Actions, and then select Configure Cluster Quorum Setting. On the first page, click Next, then choose option 2; select the quorum witness > Configure a disk witness.
Task 3: Configure Cluster Network
If you create a Hyper-V cluster in production, you must have created 3 Hyper-V SET switches for management/VM, live migration, and cluster traffic connected to different VLANs.
If you click the Cluster Manager Network node, it will display the three networks. If you click on a network, the Cluster Manager displays its network so you can identify the workload to assign to the network.
Rename the networks to reflect the workload traffic that should pass through them. This will make it easy to identify the network and its assigned workload, making the configurations easy to manage.


In my screenshot below, I have three Hyper-V virtual switches – two are connected to the network I named “Cluster & VM Network,” while the second is connected to the “Live Migration” network.
Windows Cluster does not display networks by IP addresses but by network. This is why I have two networks in my screenshot below.


If you open the cluster network’s properties, you can set the traffic workload that the network allows.


The default is “Allow cluster network communication on this network” and “Allow clients to connect through this network.”
If you want to set a network to allow only cluster traffic, select “Allow cluster network communication on this network” but uncheck “Allow clients to connect through this network.”
Then, on the network you want to use for Live Migration, uncheck the “Allow clients to connect through this network” checkbox.


After configuring the Live Migration network, its Cluster Use column should display “Cluster only.”


Finally, to set up a network for Live Migration, click the Live Migration Settings.


Then, uncheck all other networks and check the network for Live Migration traffic.


Task 4: Update the Cluster Name Resource Permissions
When I tried creating the cluster file server role during one of my deployments, it kept failing. When I ran the cluster validation test, it returened an error that the cluster resource name does not have “Create Computer Objects” permissions on the OU it supposed to create the file server resource.
Based on this, I decided to include this task. For the environment I was deploying to, clutser resource is created in a specific OU.
By default, cluster resources should be created in the computer container, and modifying the permission should not be necessary. If, however, cluster resources are configured to be created in an OU, follow the steps below to grant the cluster resource name “Create Computer Objects” permissions on the OU:
- Open Active Directlory Users and Computers and enable Advanced View options.


- Then, open the Properties of the OU and then the Security tab > Advanced.


- Click the Add button.


- After that, click Select a principal. Then, click Object Types and check Computers > OK.




- Enter the name of the cluster resource name, click Check names, then click OK.


- Finally, check “Create Computer Objects,” then OK.


- Finally, click OK to apply the changes and close the Advanced Security page.


Task 5: Reconfigure Hyper-V VM Storage
Earlier, I mentioned that we would store the Hyper-V VMs created in the cluster on the CSV disk. So, it is essential to reconfigure the default location Hyper-V hosts store VMs to the CSV – C:ClusterStorageVolume1.
Here are the steps. Before you proceed, connect all Hyper-V hosts to one host’s Hyper-V Manager.
- On the Hyper-V Manager, select a Hyper-V host. Then, in the top right pane, choose Hyper-V Settings.


- On the Hyper-V Setting configuration, Storage > Virtual Hard Disks node, replace the path with “C:ClusterStoragevolume1Virtual Hard Disks.”
Attempting to use the path – “Attempting to use the path” – for the VM hard disks on a server core installation fails. To avoid this error, use the above path instead.


- Next, click the Virtual Machines node and replace the path with “C:ClusterStorageVolume1”
When you finish, click OK to save the changes.


Repeat the above steps in all Hyper-V hosts. When you finish, the “Virtual Hard Disks” and “Virtual Machines” folders will be created on the CSV volume.


Task 6: Create a VM for SCVMM on the Cluster
It is time to create our first HA VM on the cluster. The table below shows the VM specs. Before creating the VM, configure the Hyper-V hosts’ access to the network share hosting of the ISO image.
If you’re deploying SCVMM in production, the minimum RAM is 16 GB (16384 MB).
VM Name | Number of CPUs | RAM (MB) | Virtual Hard Disk |
---|---|---|---|
IPMvVMM | 1 | 8192 | 90 GB |
Follow these steps to create the VM to use as the Service Center Virtual Manager (SCVMM).
On a Windows Server Core installation, after installing the Hyper-V and Fail Over Clustering management tools on the WAC server, you must restart the server. If you try creating a VM from Fail Over Cluster Manager via the WAC server, it returns the error message, “failover cluster manager the hyper-v role management tools are not installed.”
- Right-click the Roles node on the Fail Over Cluster Manager, point to Virtual Machines, and select New Virtual Machine.


- Then, choose the Hyper-V host to create the VM and click OK.


- On the first page of the new VM wizard, check Do not show this again and click Next.


- Then, specify a name for the VM. The VM’s location should be the default location we set in Hyper-V Settings earlier. To create a folder for the VM, check the Store the virtual machine in a different location checkbox.


- Select generation 2, then on the next page, enter the memory size for the VM.




- Select the Management switch as the VM’s network.


- Accept the default location to store the VM’s virtual hard disk and name, but change the size.


- On the Installation Options page, choose the “Install an operating system from a bootable image file” option. Then, use the Browse button to navigate to the shared folder where you saved the Windows Server 2022 ISO image and select it.


- Finally, review the VM’s settings and create it by clicking Finish.


After creating the VM, complete the following tasks:
- Install Windows Server 2022 Standard
To start the VM and install the OS, select the VM on the Fail Over Cluster Manager and click Connect. Then, on the VM’s console, click Start.
The VM’s console opens in a separate window from the Cluster Manager. I left the VM’s console on the cluster console to screenshot both.


- Rename VM in Windows
- Configure VM’s network – I’m using the following network configuration for my SCVMM VM:
I have a second DNS server in my home lab. Its IP address is 192.168.0.81, and I use it as my Alternate DNS server.
VM Name | VM IP address | Subnet Mask | Default Gateway* | Preferred DNS |
---|---|---|---|---|
IPMvVMM | 192.168.0.106 | 255.255.255.0 | 192.168.0.1 | 192.168.0.80 |
- Join the VM to the domain
- Change the VM’s time zone
- Install Windows Update
- Enable Remote Desktop
Congratulations! You have completed part 3 of this hands-on guide. Proceed to part 4 – How to Migrate VMware to Hyper-V (4): Install and Setup SCVMM.
[ad_2]
Victor Ashiedu
Source link
