📜 ⬆️ ⬇️

Hyper-V 2012 Failover Cluster

Immediately, I’ll note that many who have come across Microsoft’s virtualization will not find anything new for themselves - this is a small guide to creating a cluster based on Hyper-V 2012 with some subtleties regarding a specific configuration.
So, what we have:

According to MS , it is desirable to have the same SAS controllers, with the same drivers and firmware, on all nodes of the cluster.

We also need:

It is important to note that for the control PC, windows 7 will not work, because Some RSAT functionality for win 7 does not work with servers of the 2012 family.

Downloading Hyper-V Server 2012, you will need free registration, and in any way convenient for you, we put it on our two servers. Let me remind you that we use the Core version, because We don't need a GUI on the server.

Configuring the network
In the server console, go to the command line and then in Powershell, with the same command, combine all 4 interfaces into one logical one and set the LACP merge mode:
New-NetLbfoTeam –Name Team –TeamMembers “ethernet 2”,“ethernet 3”,“ethernet 4”,“ethernet 5”
Set-NetLbfoTeam -Name Team –TeamingMode LACP
On the switches, we also combine the necessary ports in the Port-Channel with LACP support and enable the trunk on it:
Switch(config-if)#switchport mode trunk
Switch(config-if)#channel-group 1 mode active
After that, in the list of network adapters on the server, our new Team interface will be visible in the Up status:
 PS C:\Users\administrator> Get-NetAdapter Name InterfaceDescription ifIndex Status ---- -------------------- ------- ------ Team Microsoft Network Adapter Multiplexo... 24 Up Ethernet 5 HP Ethernet 1Gb 4-port 366i Adapter #4 16 Up Ethernet 3 HP Ethernet 1Gb 4-port 366i Adapter #2 14 Up Ethernet 4 HP Ethernet 1Gb 4-port 366i Adapter #3 15 Up Ethernet 2 HP Ethernet 1Gb 4-port 366i Adapter 13 Up 

And the status of timing:
 PS C:\Users\administrator> Get-NetLbfoTeam Name : Team Members : {Ethernet 4, Ethernet 2, Ethernet 5, Ethernet 3} TeamNics : Team TeamingMode : Lacp LoadBalancingAlgorithm : TransportPorts Status : Up 

')
Further, through the pseudo-graphical menu, you can assign IP settings, enable remote control, enter the domain. After rebooting, you can use a convenient workstation and do everything remotely using our PC / laptop with Win 8 / 8.1 on board.
We install RSAT by the link above, we include the Hyper-V component in the control panel — the programs and we can already manage the hypervisor, but we need a cluster.

Create a cluster
From the Server Manager snap-in, we will add our servers, and we can look at all the information on them, from there we connect powershell to the server and add the failover cluster component:
Install-WindowsFeature Failover-Clustering
Install-WindowsFeature RSAT-Clustering-PowerShell
After that, we create a cluster through the GUI or via PS from the Failover Manager snap-in.
New-Cluster –Name HV-Cluster –Node Srv01,Srv02 –StaticAddress 192.168.10.5

Configuring shared storage
We allocate two LUNa to the storage, one for virtual machines, the second for quorum (1GB)
We initialize these two disks on the servers through the disk manager, convert them to GPT and format them, you can not assign letters.
In order for the cluster test to accept these disks, it is necessary to change the bus type from RAID to SAS, ( Source HP ) you need to change the BusType parameter from 8 to A on the path HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ hpcisss2 \ Parameters \
It is also necessary to install MPIO from Microsoft:
Install-WindowsFeature Multipath-IO
We add SAS support in the mpiocpl snap-in and after rebooting in the Disk Manager, the LUNs will not be divided if the server is connected with two SAS cables.
After these manipulations, you can add disks in the Failover Manager snap-in; in the same place, we make a quorum from the added disk.

Create a virtual switch
Using the Hyper-V snap-in, we create an external virtual switch and set the checkbox “Allow the management OS to provide access to the adapter”, we do not install Vlan. Same thing in PS:
New-VMSwitch “Lan” –NetAdapterName “Team” –AllowManagementOS:$True
In the virtual machines themselves, we can add several network adapters with the same virtual switch but with different Vlans.

That's all, you can then create virtual machines and put them on shared storage, reminding you that the shared disk is mounted in the C: \ ClusterStorage \ Volume1 \ folder

Source: https://habr.com/ru/post/201792/


All Articles