On this half (2) of the Hyper-V to VMware migration, you’ll put together your Hyper-V hosts. The duties lined embody putting in and patching Home windows Server 2022.
You’ll additionally set up Hyper-V, Home windows Clustering, and MPIO (elective) roles on every host. Additionally, you will join the hosts to the storage and configure the disks required to configure the cluster.Â
Lastly, you’ll assign the host’s IP addresses, create Hyper-V digital switches, and assign them IP addresses.Â
Job 1: Meet the Home windows Area Requirement
All of the configurations on this information require a Home windows Area. So, when you’re setting this up in a house lab, you could configure a Home windows area. Additionally, all hosts – Hyper-V and SCVMM – have to be members of the Home windows area.
Job 2: Set up Home windows Server on the Hyper-V Hosts
On this part, full the next:
- Set up Home windows Server 2022 Customary or Datacenter. In case you’re putting in Server Core, observe the steps in my information, Set up and Configure Home windows Server 2022 Core.
- Rename the hosts on the OS.
- Allow RDP on all Hosts
Job 3: Rename pNICs on the Hyper-V Hosts
As a part of getting ready the servers, I renamed the community adapters for ease of identification.
Full the steps under on every Hyper-V host:
- Run the Get-NetAdapter command to listing all of the community adapters on the server. Then, replace the desk under with the default names of the NICs in column 2.
Right here is the results of the command in one of many Hyper-V hosts in my residence lab.
When you’ve got a number of community adapters, embody one other MAC deal with in column 3 to assist establish the pNICs while you rename them with the command in step 3.
- After that, rename the adapter with the command under:
Get-NetAdapter | The place-Object {$_.MacAddress -eq "A0-CE-C8-3A-DD-E3"} | Rename-NetAdapter -NewName Mgt-pNIC
After renaming the adapter, rerun the Get-NetAdapter command to verify.
Run the final command for all pNICs on each Hyper-V hosts utilizing the desk under as a information. The second desk is the simplified model of my lab setup.Â
Host Identify | Default pNIC Names* | MAC Deal with | New pNIC Names | Hyper-V SET Identify** |
---|---|---|---|---|
IPMpHPV4 | Community 1,Community 2 | 70-5A-0F-3E-8A-CD | Mgt-pNIC-1, Mgt-pNIC-2 | Mgt-vSwitch |
Community 1, Community 2 | Clu-pNIC-1, Clu-pNIC-2 |
Clu-vSwitch | ||
Community 3, Community 4 | Lmg-pNIC-1, Lmg-pNIC-2 | Lmg-vSwitch | ||
Community 7*** | Str-vSwitch | Str-vSwitch | ||
IPMpHPV5 | Community 3, Community 4 | Mgt-pNIC-1, Mgt-pNIC-2 | Mgt-vSwitch | |
Community 5, Community 6 | Clu-pNIC-1, Clu-pNIC-2 |
Clu-vSwitch | ||
Community 5,Community 6 | Lmg-pNIC-1, Lmg-pNIC-2 | Lmg-vSwitch | ||
Community 7 | Str-vSwitch | Str-vSwitch |
Host Identify | Default pNIC Names* | MAC Deal with | New pNIC Names | Hyper-V SET Identify** |
---|---|---|---|---|
IPMpHPV4 | Community | A0-CE-C8-3A-DD-E3 | Mgt-pNIC | Mgt-vSwitch |
IPMpHPV5 | Community | 70-5A-0F-3E-8A-CD | Mgt-pNIC | Mgt-vSwitch |
Job 4: Set up Required Home windows Roles
Set up the Hyper-V, Failover Clustering, and Multipath I/O roles on the Hyper-V hosts.
If you don’t use Fliber Channel for storage, don’t set up the Multipath I/O position.
As regular, you’ll be able to set up the roles with Server Supervisor or run the PowerShell command under:
Set up-WindowsFeature Hyper-V,Failover-Clustering -IncludeAllSubFeature -IncludeManagementTools
The above command installs Hyper-V and Failover-Clustering. In case you require Multipath I/O, run this command:
Set up-WindowsFeature Hyper-V,Failover-Clustering, Multipath-IO -IncludeAllSubFeature -IncludeManagementTools
After putting in the roles, restart the servers.
Job 5: Configure Storage
On this part, the storage is about up for use in configuring the Hyper-V cluster. When you’ve got a storage admin staff, request that they assign these LUMs to all Hyper-V hosts.
In case your setting makes use of a Fiber Channel, you should configure MPIO to say the LUMs.
Job 5.1: Assign Storage LUMs
In case you need assistance configuring the iSCSI digital disks, learn my information, Configuring Home windows Server 2019 as an iSCSI Goal Server.
This desk, utilized in my lab, is for steerage functions. It’s best to use greater storage capacities for the VMM Shared Library and the Clustered Shared Quantity in manufacturing.
Nonetheless, for the Cluster Quorum witness disk, 1 GB is sufficient.
iSCSI Digital disk identify | Dimension | Objective |
---|---|---|
ClusterQuorum | 1 GB | Cluster Quorum witness disk |
VMMLibrary | 200 GB | VMM Shared Library |
CSV | 821 GB | Clustered Shared Quantity |
Job 5.2: Join Hyper-V Hosts to the iSCSI Goal
In case you use Fiber Channel, skip this sub-section. Nonetheless, for iSCSI LUMs, join the Hyper-V hosts to the iSCSI goal with the steps under:
In case you’re utilizing Fibre Channel LUMs, the servers ought to be assigned LUMs by now. Make sure that that is performed now earlier than continuing to the following process.
- Log in to the Hyper-V host, search iSCSI, and open the iSCSI Initiator app. Home windows will show a immediate to begin the Home windows iSCSI Initiator service, click on Sure to begin the service.
- After that, enter the IP deal with or FQDN of the iSCSI goal within the Goal subject, then, click on the Fast join button.
If the iSCSI initiator (your Hyper-V host) connects efficiently to the goal, a second pop-up will show the IQN of the goal with the Standing Related. Click on Accomplished and shut the iSCSI Initiator app.
Join all Hyper-V hosts to the iSCSI Goal, then proceed to the following process under.
Job 5.3: Configure Disks in Home windows Disk Administration
For Home windows Server Core, use Server Supervisor to hook up with the distant server and configure the disks with Server Supervisor.
- Search Disk Administration and open the app. The three LUMs assigned to the host will probably be displayed.
- Proper-click one of many disks and choose On-line. Repeat the step for the three disks.
- After that, right-click one of many disks and choose Initiatlize Disk.
- A pop-up will show and choose the three disks for initialization. Choose GPT and click on OK.
- Lastly, following your storage plan desk (see minebelow), create a Easy Quantity, then format the amount as NTFS.
Quantity Label | Dimension | Drive Letter | Objective/Notes |
---|---|---|---|
QuorumDisk | 1 GB | Q | Cluster Quorum witness disk. |
VMMLibraryDisk | 200 GB | E (or any obtainable drive letter) | VMM Shared Library. Drive letter is required |
CSVDisk | 821 GB | None | Clustered Shared Quantity. Once you configure as a Cluster Share Quantity, Home windows mounts the amount in c:ClusterDisk |
Whereas creating the CSVDisk quantity, on the part o assign drive letter, select Don’t assign drive letter or drive path.
Once you end creating and formating the amount, they need to appear like the screenshot under.
In the meantime, on the opposite Hyper-V host, they’ll seem offline. Don’t convey the disks on-line or attempt to format them on the second host.
Job 6: Create Switches on the Hyper-V Hosts
On this process, you’ll create a Hyper-V Swap Embedded Crew (SET) digital swap. This swap groups two or extra bodily community playing cards to offer load balancing and redundancy.
After creating the SET, you’ll configure some settings like altering its Load Balancing Algorithm from HyperVPort (default) to Dynamic. Lastly, you’ll allow RDMA (Distant Dynamic Reminiscence Entry) on the swap.
Earlier than we start, you will need to be aware {that a} Hyper-V SET can solely be created with PowerShell or through Digital Machine Supervisor. At this stage of the information – since we’ve got not deployed SCVMM – we will probably be creating and configuring the swap with PowerShell.
- Create the SET with the command under. The command creates a brand new swap referred to as Mgt-vSwitch (see Desk 1.3 partially 1 of this information).
Whereas creating the swap we allow teaming and SR-IOV.
New-VMSwitch -Identify "Mgt-vSwitch" -NetAdapterName "Mgt-pNIC" -EnableEmbeddedTeaming $true -EnableIov $true
Once you execute the above command, after the swap is created, PowerShell returns the swap’s primary info. See my screenshot under for particulars.
- Change the load balancing algorithm of the swap to Dynamic with the Set-VMSwitchTeam command. Earlier than working the Set-VMSwitchTeam command, when you’re curious, you’ll be able to verify the present Load Balancing Algorithm with the Get-VMSwitchTeam.
Get-VMSwitchTeam -Identify Mgt-vSwitchSet-VMSwitchTeam -Identify "Mgt-vSwitch" -LoadBalancingAlgorithm Dynamic
After altering the Load Balancing Algorithm, I re-ran the Get-VMSwitchTeam command to verify that it has modified. See the outcomes of my instructions on this screenshot.
- Allow RDMA on the swap.
Allow-NetAdapterRDMA "vEthernet (Mgt-vSwitch)" -NoRestart
After enabling RDMA on the swap, you could map the digital swap to a bodily community adapter.
- To map the Hyper-V digital swap, Mgt-vSwitch to the community adapter, Mgt-pNIC, run this command.
You may solely map the digital swap to a bodily community adapter.
Set-VMNetworkAdapterTeamMapping -ManagementOS -SwitchName "Mgt-vSwitch" -PhysicalNetAdapterName "Mgt-pNIC"
After the mapping, you’ll be able to view the main points with this command.
Get-VMNetworkAdapterTeamMapping -ManagementOS
The above instructions created the administration swap. If you want to create a swap for the cluster and reside migration site visitors (required in a manufacturing setting), use the instructions under:
I added feedback (begins with #) to elucidate what every command does. Once we get to the VMM part of this information, we will probably be changing these digital switches to logical switches. For that to occur, the configuration of this digital swap have to be the identical because the VMM logical swap. You do not want to create these switches in a house lab because you wouldn’t have the bodily internet adapters.
Once you create a Hyper-V digital swap that requires setting Minimal Bandwidth by Weight (required and really useful for the cluster and reside migration switches), you could use the MinimumBandwidthMode parameter to set the mode to Weight. If this isn’t specified or SR-IOV is disabled, the default MinimumBandwidthMode is about to absolute.
#create a vSwitch for the cluster site visitors and set its MinimumBandwidthMode to WeightNew-VMSwitch -Identify "Clu-vSwitch" -NetAdapterName "Clu-pNIC-1" -EnableEmbeddedTeaming $true -EnableIov $false -MinimumBandwidthMode Weight
#change the load-balancing algorithm - default is Hyper-V
Set-VMSwitchTeam -Identify "Clu-vSwitch" -LoadBalancingAlgorithm Dynamic
#set vLAN ID #If VLAN ID is just not required, ignore this command
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Clu-vSwitch" -Entry -VlanId 28
#Flip the Digital Machine Queue weight to 100 - identical as the worth set within the default Cluster Port profile in VMM
#Set the MinimumBandwidth weight to 10 #use the identical vLAN for LM and Cluster site visitors.Set-VMNetworkAdapter -ManagementOS -Identify "Clu-vSwitch" -VmqWeight 100 -MinimumBandwidthWeight 10
#create a vSwitch for the Stay Migration site visitors and set its MinimumBandwidthMode to WeightNew-VMSwitch -Identify "Lmg-vSwitch" -NetAdapterName "Lmg-pNIC-1" -EnableEmbeddedTeaming $true -EnableIov $false -MinimumBandwidthMode Weight
#change the load-balancing algorithm - default is Hyper-V
Set-VMSwitchTeam -Identify "Lmg-vSwitch" -LoadBalancingAlgorithm Dynamic
#set vLAN ID #If VLAN ID is just not required, ignore this command
Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "Lmg-vSwitch" -Entry -VlanId 24
#Turns the Digital Machine Queue weight to 100 - identical as the worth set within the default Cluster Port profile in VMM
#Set the MinimumBandwidth weight to 40 - that is the setting for the Stay Migration Port Profile in VMMSet-VMNetworkAdapter -ManagementOS -Identify "Lmg-vSwitch" -VmqWeight 100 -MinimumBandwidthWeight 40
Job 7: Assign IPs to the Digital Switches on Hyper-V Hosts
On this process, you’ll assign static IP addresses to the Hyper-V digital switches yiu created in process 6. For my lab configuration, I used the desk under:
Host Identify | Objective | Hyper-V vSwitch | IP Deal with(es) |
---|---|---|---|
IPMpHPV4 | Hyper-V Host | Mgt-vSwitch | 192.168.0.101 |
 |  | Clu-vSwitch | 192.168.1.11 |
 |  | Lmg-vSwitch | 192.168.2.11 |
IPMpHPV5 | Hyper-V Host | Mgt-vSwitch | 192.168.0.102 |
 |  | Clu-vSwitch | 192.168.1.12 |
 |  | Lmg-vSwitch | 192.168.2.12 |
In case you’re configuring on a Home windows Server Core, from the SConfig console, choose possibility 8.
From my expertise, generally, assigning IP addresses utilizing SConfig fails. If that occurs, choose possibility 15 on the SConfig menu to load the PowerShell coommand console.
Then, run the command just like the one under to assign static IP addresses to the Hyper-V switches.
Get-NetAdapter | New-NetIPAddress -IPAddress 192.168.0.154 -PrefixLength 24 -DefaultGateway 192.168.0.1
In case you configured VLAN IDs on the Hyper-V switches, run the command – Get-VMNetworkAdapterVlan -ManagementOS – to verify that VLANs are configured appropriately.
Job 8: Be part of all Hosts to the Area
You may be a part of a number to the area through Pc Properties. Alternatively, run the Add-Pc PowerShell command to affix the pc to your area.
Here’s a pattern command:
Earlier than you run the command, change the area identify and the credentials. Once you execute the command, PowerShell will request for the password to the account. The pc will restart robotically.
Add-Pc -DomainName lab.infopressmedia.com -Credential (Get-Credential labadministrator) -Restart
Job 9: Configure Firewall on the Hyper-V Switches
On this process, we are going to configure the Home windows Firewalls required by the Hyper-V hosts. Â Run these instructions on every Hyper-V host (IPMpHPV4 and IPMpHPV5 in my lab).
#Set firewall guidelines.
[System.String[]]$Alias=@("vEthernet (Mgt-vSwitch)");
$Profile="Any"
$Identify="File and Printer Sharing"
$guidelines = Get-NetFirewallRule -DisplayGroup $IdentifyForEach ($rule in $guidelines) Set-NetFirewallAddressFilter -LocalAddress Any -RemoteAddress Any
Set-NetFirewallRule -DisplayGroup $Identify -Enabled True -Profile $Profile -InterfaceAlias $Alias
$Profile="Any"
$Identify="FPS-LLMNR-In-UDP"
Set-NetFirewallRule -Identify $Identify -Enabled True -Profile $Profile$Profile="Any"
$Identify="Home windows Distant Administration"
Set-NetFirewallRule -DisplayGroup $Identify -Enabled True -Profile $Profile -InterfaceAlias $Alias#Disable IPV6
Disable-NetAdapterBinding -Identify "Adapter Identify" -ComponentID ms_tcpip6
Job 10: Create a Home windows Admin Heart (WAC) VM
This part is required for a Home windows Server Core deployment.
Full – Arrange Hyper-V to Set up VMs from a Distant ISO Share – earlier than continuing. In any other case, you won’t be able to create the VM to put in OS utilizing the distant ISO file.
In case you’re configuring Hyper-V in Home windows Server Core, set up Hyper-V administration instruments in your Area Controller. To put in the Hyper-V Administration software, run the command under:
Set up-WindowsFeature -Identify RSAT-Hyper-V-Instruments #set up the GUI mgt and PowerShell modules
Earlier than creating the WAC VM on one of many Hyper-V Server Core hosts, run the command under (through the host’s console) to create the folder for storing the VM:
New-Merchandise -Identify IPMvWAC -path "c:Digital Machines" -ItemType Listing
Lastly, use the Hyper-V Supervisor console put in in your DC to hook up with the Home windows Server Core. Then, create a Gen 2 VM with the specs within the desk under.
VM Identify | Variety of CPUs | RAM (MB) | Digital Laborious Disk |
---|---|---|---|
IPMvWAC | 1 | 8192* | 90 GB |
*If putting in in a lab, you’ll be able to assign 2048 MB of RAM, the set dynamic reminiscence with a min of 512 GB and max of 4096 MB
After creating the VM, when you use VLAN ID, keep in mind to assign the VM’s digital NIC to the VLAN ID:
Earlier than continuing to Job 11, set up Home windows Server on the WAC VM, then full the next duties:
- Rename the server in Home windows
- Assign a static IP deal with
- Be part of VM to the area
- Allow RDP
- Set Time zone
- Patch the server
Job 11: Configure Home windows Server Core
In case you’re putting in Server Core, use the steps in my information, Set up and Configure Home windows Server 2022 Core.
Job 12: Set up Home windows Updates and Drivers
For a Home windows Server Core configuration, observe the steps in my information, Replace Drivers in WAC Managed Hosts.
Congratulations! You’ve accomplished half 2 of this hands-on information. Proceed to half 3 – Deploy Hyper-V Cluster.