Failover Cluster Hyper-V 2012

    I note right away that many who have come across Microsoft 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:
    • Two servers with an external SAS port and 4-port network card
    • HP P2000 G3 SAS Disk Storage
    • The switch, or rather two on the stack, with LACP support, in my case, is a stack of two Cisco 2960S

    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 will also need:
    • AD Domain
    • A computer or laptop in a domain with Windows 8 or 8.1 installed for management
    • Remote Server Administration Tools - RSAT for windows 8 or 8.1

    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.

    Download Hyper-V Server 2012, you need free registration, and in any way convenient for you, put it on our two servers. Let me remind you that we are using the Core version, as We do not need a GUI on the server.

    We configure 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 interface and set the LACP combining 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 Port-Channel with LACP support and enable 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 the 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-graphic menu, you can assign IP settings, enable remote control, enter into the domain. After rebooting, it will be possible to use a convenient workplace and do everything remotely using our PC / laptop with Win 8 / 8.1 on board.
    We install RSAT using the link above, turn on the Hyper-V component in the control panel - programs, and we can already control the hypervisor, but we need a cluster.

    Create a cluster
    Because Server Manager snap-in, add our server, and we can see all the information on them from there also are connecting powershell'om to the server and add the failover cluster:
    Install-WindowsFeature Failover-Clustering
    Install-WindowsFeature RSAT-Clustering-PowerShell
    After that, from the snap Failover Manager to create a cluster through the GUI or through PS:
    New-Cluster –Name HV-Cluster –Node Srv01,Srv02 –StaticAddress

    Configure shared storage
    We select two LUNa in 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, you can not assign letters.
    For the cluster test to accept these disks, you need to change the bus type from RAID to SAS, ( HP Source ) you need to change the BusType parameter from 8 to A in the registry along 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 LUNs will not double if the server is connected by two SAS cables.
    After these manipulations, you can add disks in the failover manager snap-in, there we also make a quorum from the added disk.

    Create a virtual switch
    Using the Hyper-V snap-in, create an external virtual switch and check the box “Allow the managing OS to provide access to the adapter”, we don’t set Vlan. The same thing via 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 Vlan.

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

    Also popular now: