Hyper-V Virtualization setup, Replication, NIC Teaming & VM creation on multiple xFusion Server
Summary Insights:
- In today virtualization post I will explain Hyper-V setup on three physical xfusion servers, but the same concept can apply on any vendor server. How to configure Hyper V replication failover and Hyper-V replica with Domain, if one server down than VM will run on another physical server. How to configure NIC teaming means to aggregate multiple physical ports on server.
Below points will cover ,read till the end to clear all query.
- How to install hyper-v ?
- Why NIC team status is faulty ?
- What & why virtual switch ?
- How to create VM in hyper-v?
- How to setup replication in Hyper v ?
- How to install & configure Domain controller?
- How to assign VLAN to VM in Hyper-V?
VMware Vs Hyper-V:
Before starting Hyper V Let me explain you quickly the difference b/w Hyper-V and VMware ESXI setup, in VMware scenario first we installed hyper visor ESXI on physical hardware then vCenter & cluster setup to add multiple physical server host. But in hyper V first will install OS then inside OS will install the hyper V feature & replication etc.
If you want to learn about OS installation, VMware, vCenter & cluster link is available in last of this article.
Hyper-V Installation:
Now let start from already installed window server 2019 OS part.
Open Server Manager–> click on add roles & features, you can select from top right side manage as below screenshot

Click next

Select role based or feature based installation as we are going to install hyper v —> then next

Select the server as in my case I am doing on my first server-1

Click on Hyper-V –> Next

Click on Add Features

Hyper-V has been selected click Next

Now create virtual switch select both Network adapters ports as below –> Next
For each Network adapter one virtual switch will be created.

Select the authentication protocol as CredSSP –>Next

Select drive location for installation

Click on install

Installing hyper-v features, after completed restart server if automatically not restarted.

Virtual Switch in Hyper-V:
Virtual switch is software-based network switch in Hyper-V it is connecting VMs to external & internal Network through physical NIC/Port of physical server.
Why Virtual switch:
As VM have Virtual Network adapter (vNIC) ,it needs to connect to switch for communication, switch is already bind with Server physical NIC ports, without Virtual switch cannot do communication.
NIC Teaming:
As in above Hyper-V installation I have select two ports & create virtual switches, Now first let me delete that ports than will create NIC team as without delete there will be error during teaming creation.
Right click on server & select virtual switch manager

There are two virtual switch we created during Hyper-V , now Select virtual switch than click on remove –> apply–>Ok

Let’s create NIC Teaming
Local server–>click on NIC Team (Disable)

Tasks–> New Team

Assign name to team & choose ports you want to add, in my case I have selected two 10G ports

Team status is fault means Down, let me select same LACP mode on switch & server side,

Right click on team interface & properties

Choose teaming mode to LACP & load balancing mode to dynamic
Bydefault teaming mode in hyper-V is switch Independent

Change switch port channel/eth-trunk mode as well, in our project using Huawei switches

Team interface has been up & status is OK

Team interface name Hyper-V has created as below

Virtual switch & NIC Team binding:
Now let’s create virtual switch & bind this Teaming ports
Right click on server–> than virtual switch manager

Choose type external as VM will communicate outside –>Click on create virtual switch

Give name to virtual switch in my case Hyper-V Switch –> select that teaming port (Multiplexor Driver) and if VLAN requirement than select VLAN ID & assign VLAN for server management & its not affect VMs networking.
Apply –>OK

Virtual switch has been created

VM Creation:
Right click on server –> New–>Virtual Machine

Next

Assign name to Virtual Machine–>Next

Specify generation–> Next
Generation 2 support new feature & 64 bit operating system.

Assign startup memory, it’s not actual RAM, just the initial memory for boot OS, normally 1 or 2 GB is enough

Select virtual switch created above Hyper-V Switch means this VM will communicate outside through this virtual switch

Choose virtual hard drive location like D drive –> Next

Browse operating system ISO file or install later

Finish

We have created multiple VMs as below

Now how to load OS ISO file in VM
Right click on VM –> settings

Select hard drive & browse the iso file –> apply –> Ok –> start the VM

Assign VLAN & processor on VM:
Right click on VM as I showed you above than go to Network adapter –> select virtual switch –>put VLAN ID –>OK
Teaming NIC is already attached with virtual switch & virtual switch will pass all vlan.

Select processor & put as per customer requirements

Note:
I showed you for one server but The same above steps performed on all server in my project three server,
Hyper-V Cluster & High availability:
There are multiple method of high availability in Hyper-V like if one VM or host server down then VM services will be available from another host server.
Some method with auto failover & zero down time and other required manual interaction & down time.it depends on customer infrastructure & availability of hardware resources in Data centre.
1-Hyper-V replication:
This method doesn’t require external storage but manual interaction required like if one host server down than manually need to activate/live the VM on replica server.
Two methods to achieve Hyper-V replica one with Domain & another is with certificate but without domain. Domain based will use active directory Kerberos authentication and Certificate method required manual setup of certificate & authentication.
2-Failover clustering:
Hyper-V failover clustering method is auto failover like if one host server down the VM & service will automatically run from another server without down time. But it required external shared storage & domain. Its same like VMWare vCenter centralized management ,I will share link of vCenter article in the end of this post.
Three is one other advance & cloud integration method called SCVMM (System Center Virtual Machine Manager) it will discuss in some other post.
Now its depend on customer requirements & resource availability to choose which method will use. in my project I am going to use the first Hyper-V Replica method with Domain.
Hyper-V Replica with Domain:
As in my case no domain server in network, first let me create one VM & set as a domain controller on Server-1.

Assign ip address & DNS to Domain server, (DNS ip is same as domain server)

Setup domain name & setting
Right click on PC –> properties–>change settings–> Change

Write domain name with dot local (.local) as its internal/intranet Network–> Ok
After this restart is required just restart.

Now let’s install active directory domain services on domain controller
Go to Manage –> Add Roles and Features

Next

Select Role-based –> Next

Next

Add DNS & Active directory domain services ( AD DS)
Next—>Next

Install and close

Setup domain & DNS configuration
Click on yellow notification symbol & promote this server to a domain controller.

Select Add a new forest & put domain name –> next

Set password that will used to add other server in domain –>next

Next

Set netbios name –>Next

Next –> Next –> install

It will restart automatically

Now lets login to first server-1 & add it in domain.
Right click on PC–> Properties–>Change settings–>change –> put domain name with or without .local
Important:
Before adding in domain verify the reachability, it should ping to domain server & also put the DNS address

It will show you prompt for password put that domain password, it will take few seconds to add in domain

Server has been added in domain–> Restart

Perform the same steps on all servers.
After restarting now login with domain credentials

Before replication first enable delegation on all server from domain controller
Go to tools–> active directory users & computers

There are three servers in our project, right click –> properties
Do the same below process for all servers in domain.

Under delegation select trust this computer for delegation bydefault is not trust for delegation–> apply –> OK

Replication:
Finally let’s start replication, I have created three VM & one Domain controller VM on server-1, now I will replicate these on server-3.
Right click on one VM –>Enable replication–> Next

Specify replica server to click on browser

Click on advance –> find –> select the replica server–> Ok –> Next

Authentication type is Kerberos –> Next

Next –> choose frequency of changes will send to replica server
30 seconds, 5 minutes & 15 minutes available only in Hyper-V replica

Select additional hourly recovery points as it will required more storage & processing but will recover an earlier point after failover.

Choose initial replication method –>Next

Review & finish

Replication has started & showing percentage under status.

Now lets check on server-3 ,is it replicated from server-1
I have replicated multiple VM from server-1 & 2, now its showing in server-3 and the states is off (Down).

If VM down on primary just right on VM –>replication–>failover on replica server to recover the services

It required manual interaction & down time as there is no external storage.
Link for OS installation:
Link for VMware ESXI setup:
Still If you have any questions or concerns let me know in the comments section to learn from each other.
