Hyper V Replication and Failover
ฝัง
- เผยแพร่เมื่อ 11 ก.ย. 2024
- Videos, Blog Posts and More at: www.EliTheCompu...
Today's Topic:
We discuss Hyper V Replication and failover and the benefits and dangers of using it. Hyper V Replication and Failover is demonstrated on Windows Server 2012 R2 with 2 servers.
The biggest issue with Hyper V Replication and Failover is the possibility of "split brain" where you accidentally initiate the replicated copy of a virtual machine while the original is still running. This may cause clients to use both machines simultaneously and the data stores will no longer remain identical. It this happens to specific types of servers it may end up being catastrophic to your infrastructure.
To use Hyper V Replication and Failover:
-It is easiest if you setup an Active Directory Domain and the both servers are members of it.
-Add Hyper V to both machines
-Enable Hyper V replication services on both machines
-Enable replication for EACH virtual machine to be replicated.
-Before doing a Failover verify the replication health
Technet Post on Setting up Replication: blogs.technet.c...
Today's Review:
Reactiv Instinct Bluetooth Speaker: www.reactivsoun...
Today's Questions:
"What books should I read to learn web design?"
"How do I upload files onto a Virtual Server?"
Today's Final Thoughts:
Make sure that you have laid a good foundation for accepting help before you ask for it.
******************** Tech Questions??? *******************
Spiceworks Community of IT professionals is the place to get your tech questions answered: goo.gl/75thj7
************** Please Visit our Sponsors!!! **************
Schooley Mitchell - Cheaper ISP and Telephone Service - goo.gl/Wu78H8
Plixer - FREE Net Flow - Network Analysis Tool - goo.gl/tSBPjC
TotalSem - A+, Net+, Security+ Books and Test Prep - goo.gl/GqeP3W
Altaro - Free HyperV Backup Software - goo.gl/K8SzFN
Nerds We Can Fix That - Start Your Own Computer Services Franchise - goo.gl/WVaER1
Veeam - FREE Training on Backup in Virtualized Environments - goo.gl/GFYaTg
Spiceworks - FREE Network/ Mobile Device Management - goo.gl/BJt9c1
********** For More Eli The Computer Guy... ************
Website: www.EliTheCompu...
Twitter: / elicomputerguy
Google+: plus.google.co...
You are easily one of the most knowledgeable guys on TH-cam. Learn so much from your videos. Whats are you currently doing job wise?
Eli is great. I have read the books and been in I.T. for 25 years, and still refer to his videos when I am unsure about something. he is like having a coach at your finger tips.
Great video and thanks for sharing.
One minor thing is "must" enable incoming rule for hyper-v http or https depending on which you choose. Failing to do this will mean replication of the VM will not work.
▶ Hyper V Replication and Failover - TH-cam buff.ly/1xqpcCU
New episode!!!
can u make a video on why you hate HP?
Actually, if both machines running the Hyper-V role are part of a domain themselves automated failover will can be configured and will work. I have deployed this in a production environment. In those environments we had a separate DC, not either of the Hyper-V clustered servers. Having a separate DC allows the either of the Hyper-V servers can fail, the running Hyper-V guests will failover to the other server in the cluster.
for remotin into linux machine or unix use vnc
Just discovered this channel, pretty good stuff. Easy way to get started.
You kept emphasizing not to get split brain, but did not specify how to prevent it. While I was listening to you, I thought of the following. Let me know if you think that would work.
You can use an extra NCI to connect host servers to each other with a cross-over cables and manually set TCP/IP. This way they will always talk to each other, even if routing rules or network switches break. That will be like a "heartbeat" connection between hosts that hopefully instances will be able to read.
Arm Lucifer I meant NIC cards.
Eli, "Split Brain" isn't such a big deal! Should it happen where you work the solution is very simple, you take YOUR BRAIN and SPLIT!! Should you be chained to your desk, you are screwed. My brain begins having spasms just trying to imagine that scenario. I'm a newb as far as Virtualization, but have enough experience to recognize the horror. BTW, new to your channel and am learning a great deal and reenforcing much of what I already know. Thanks for sharing your expertise.
Eli your way of explaining has improved a lot better through the past years.... btw what's the story behind the execution orange shirt? LOL
Eli,
I have learned more from watching your videos, the Windows 2012 series and a few others here and there, than from any other location, including the book I purchased about Windows 2012 R2, keep up with the excellent videos!
In this video you say that the host machine running Hyper-V should be added to a Windows Domain, I want the DC to be in one of the VM's, which are replicated to an off-site location for backup purposes. Can the host be added to a DC that is running in a Guest VM and is that a good idea?
Also, you mentioned you would set up Certificate Based Auth for replication in a later video, did you manage to get around to that or not?
I always keep my Windows Server 2012 R2 book on my desk; I can't afford a RAZER headphone stand but it's nice to have a $300 monitor stand. :(
In school, they taught us to never virtualize a Domain Controller, and I understand why, if it replicates to another DC in the forest, and then the VM rolls back on a failover, it could get confused. But apparently there's a way to do it:
docs.microsoft.com/en-us/windows-server/identity/ad-ds/get-started/virtual-dc/virtualized-domain-controller-deployment-and-configuration
To directly answer your question, there's nothing stopping you from doing it, but I'd advise against it. If your DC goes down and you don't have cached credentials on your host, you've effectively locked yourself out of your entire domain, unless you can get the Hypervisor host to contact another DC to grant you your login rights. And if you maintain a local login on the Hypervisor host, the advantages of domain-joining it start to dwindle into inevitable "which account did I save that file on" conflicts.
In regards to the "Compress the Data that is Transmitted over the network." (13:25) check-box.
If enabled you will save some network bandwidth at the cost additional CPU resources on the server. If disabled there will be no additional stress on the CPU but more bandwidth is required.
Last year I was puzzled by split brain, this year I learned, witnessed it in the flesh thankfully in a classroom project environment though.
Hi Eli,
When you say the best way to setup the replication is to use Kerberos... you say setup active directory on server 1. Do you mean setup a separate AD instance on the HOST and literally just have the 2 hosts in this AD environment just so they can use Kerberos ? Or do you mean join the two Hyper-V host servers to the AD on one of the virtual members ?
Thank you so much Eli!!!
I heard that licenses of Hyper-v on Server 2012 R2 doesn't mean that you can install another full license of server as VM. It means that you have to buy the license of Windows Server. You have two instances of those two licensed VMs. once you used the two instances, you have to buy extra licenses on top of MS Server licenses for each VM.
+Elmo L I think that is correct, but check with Microsoft... If you buy the datacenter edition I believe you get unlimited licenses for VM's on the one box.
You can also spin up 100 linux VM's on a HyperV server for no extra fee...
Each Server Standard license allows you to install up to two virtual machines on one host computer with up to two processors. If you install a full server OS on "bare metal" you can install two VM instances on top of it, but the bare metal OS can only run the virtualization hyper isle and nothing else.
If you have more than two processors you need additional licenses.
For examples: you have a host (physical computer) with 2vm only and no services on the base OS, you need one license.
If you have 2vm on a 3 processor host you need two licenses. (More than two processors triggers an additional license)
If you have 6 VM on a 2 processor host you need 3 licenses.
With heavy virtualization environments where running dozens of VM on a host, you just buy the $5k Datacenter license, which allows you unlimited VM per two processors.
Microsoft Licencing - Straight from Byzantium...............
Orthodox Liturgy is sometimes more easy to understand.....
Interesting! This looks like a pretty quick and slick solution to get data offsite for an included price... Onsite however I wonder how this compares to Microsoft's built in Failover Cluster. I guess this would require more storage since you are storing two copies of the VM, but it would get around the requirement of shared storage.
Eli, thank you for this lesson. Just to be clear, failover is a manual process only, not automatic?
Question - since cloud upload speeds can be very slow (looking at you, onedrive!), is it really worth for average users, or even businesses, replacing servers and hard drives for cloud storage and cloud backups?
Awesome just what i need to know thanks Eli
replication works 100%
i have 2 hosts and 1 backup server with a total of 10 virtual server. works like a charm
how did you originally get the same VM "clones"/instances on server 2 so you can setup replication in the very beginning of your video session demo?
Nice to know that hyper-v can replicate so to be used as a virtual cluster. But good to know about lag time and not starting 2 instances out of sync issues. Curious how different is other virtualization systems level 1 i only really worked with level 2
I don't get it, why wouldn't you make your failover server after a certain incedent, become a main server, while the failed one is fixed, and once it is fixed, it becomes a new failover, or you just sync with the data the failover server got. This process will liturally avoid the splitbrain situation.
+exZerry - Because what if there aren't any actual servers that go down? Imagine if you had two servers replicating with one another, but the network link between those two servers went down. In that case, both servers are still up ... but since they can't communicate with each other, then you wind up with the backup server firing up and possibly serving clients across the segments of the network that it is still connected to.
That's when you wind up with the split-brain situation even though none of the actual servers themselves go down.
About the only way I can think of that this could be mitigated is if each server had at least two paths to be able to connect to each other. This could be easier said than done though if the servers are in different physical locations.
The biggest problem that I see with any network is that no matter how hard you try, it seems like there is always at least one single point of failure somewhere in the mix. The only way you could get around that would be if you have more money than you know what to do with.
Think about it: two ISPs, two separate power companies, two separate PBX boxes, two separate everything, basically. There aren't many organizations that can really afford to be 100% redundant.
The rant about Split Brain was hilarious!
It happened with my Hyper - V server once. My switch died and the backup server started however the backup switch was still running and then 2 exact copies of a domain controller started up and ended up corrupting the entire domain. It took about 7 hours of restoring backups to get everything back the way it was.
Ouch. I'm glad I watched this. I'll definitely be going with a manual switchover process
never replicate your DC in this manner LOL
Thanks for the great vid. Hope you keep doing this for a long time :)
Gr8! Thanks a lot Eli, another very good video.
Tell me.. Do the 2 HOST Servers need to be on a domain or can they be on a normal workgroup (stand alone servers) ?
I'm looking to setup replication within our environment. Due the size of the company we're only going to have 2 physical boxes. I was planing on having a VM on each Hyper-V host with AD setup on(AD01 on Host-01 and AD02 on Host-02 etc). I know it would be possible to join a HyperV host to a domain where the AD is a VM on itself, but would you recommend this setup?
Use this only to Replicate Stand alone Servers like File Servers or web servers.. You dont want to be replicating AD servers.. That what they do by nature.
What would you recommend for a replicating SAN setup? For example, if you have a Hyper-V cluster (which needs to share a single iSCSI target) how can you have something similar with storage? Is there some kind of self-replicating virtual SAN that you can set up that might use two physical storage servers where any data written to one is automatically written to the other one as well, in real-time?
I'm wanting to set up Hyper-V fail-over clustering, but all the tutorials I have come across show a single SAN running. If this single SAN were to fail, then both Hyper-V servers in the cluster would go down. What suggestions do you (or anyone else) have? Any good tutorials, either videos or text-based, that you can recommend? Thanks!
Solved it for me, thanks.
Thanks for the helpful video! 👍
Hi Sir,
I have 2 hosts evaluation version (1 win svr 2012 R2 Std & the other win svr 2012 R2 datacenter) which joined Domain, login as domain admin and disable the firewall for both hosts. When I try to replicate host A instance to host B...it failed...saying something cannot establish connection.
Any idea? TQ
Edited: Seem like both host must be in same version then only it's worked.
Can this be done using a workgroup instead of domain?
Question: Can you over allocate resources on Hyper-V?
Hi eli.
Am doing a Windows 2008r2 cluster.
Getting mstdc offline. And DTC service error.
Could u guide me for fix..
im a big fan of yours sir..ty so much for the information.. it really helps me to understand all about Virtualization ^_^..this is a big help for my Thesis to interpret more about VMs ^_^ (Y)
do they have to be same hardware on both servers?
Have you been occupied with creating new Hyper V videos a lot? I'm kind of looking forward to some exciting new videos. :)
I am still waiting for years to understand How to shut down Hyper-V Fail over cluster. I need to know the sequence , best practise for shutting down VMs, physical servers. Which is first? Please HELP.
can you help me understand : how to config automatic failover in hyper v replicate, not use failover cluster future.
Please put videos on exchange server and its features like litigation hold mrm policies ediscovery etc
Kindly can i do replication betwen 2 cluster 1 cluster running windows Server 2016 and the other cluster run windows server 2019 ?
23:35 Lets say you have two physical Server 2012 boxes each running two virtual HyperV 2012 servers. Why can't you set up one of the Virtual servers to be AD/DNS/DHCP and the other to be File Sharing/Email Server etc? Does the physical box *need* to be the DC? I suppose you can replicate one physical box to the other but I was thinking of two physical boxes simply running HyperV.
The DC does not have to be a physical box - however Microsoft recommends or at least used to recommend it for a long time. If you decide to run the DC as VM you will have to ensure that the DC gets the tme sync from an external Network source (pool.ntp.org or time.windows.com) and not the Hyper-V infrastructure Service. This is also recommended anyways for physical DCs: External Time Source -> Primary DC and other DCs -> other Network Servers.
Now what is REALLY required for disaster evasion reasons is that you operate at least 2 DCs within your Domain! In case the Primary DC Fails the spare DC will be able to assume its Position and roles and also the active Directory data will not be lost in case the Server completely died. thereofe These DC Need to be on physically different boxes. Given hardware/budget limitations I would suggest that both physical boxes are set up as Hyper-V hosts and on each box one DC is hosted. The other Services (fileserver and mailserver) can run on virtualized Domain member Servers on lets say the Primary Hyper-V host and have replication to the secondary hyper-v host. BTW: a DC also needs to be running DNS and AD Services and can also host DHCP (including failover)
+junglejamesie - I guess it really depends on your organization and how things are set up there. (Or if it's a new network being set up for the first time.)
I suppose it might be possible to have say, 2 10-gigabit network cards in each server, with both NICs connecting to the other server (dual links for redundancy). All the actual failover / redundancy traffic would traverse these links only. They might even be cross-over cables negating the need for a switch in the mix. Then you might have say one or two multi-port Gigabit adapters in both servers that actually connect to your client network and serve the VM contents.
But then ... you'd also need both servers to have access to a storage pool / server, and there would be (ideally) at least two of those - *per storage provider*. So maybe you could use eight more 10-Gigabit links for that ... two from each physical server going to the data storage servers (two links from each server going to both the primary and backup (failover) storage servers.)
So that's what ... 10 links alone just to connect the two servers to each other redundantly AND to provide each server two paths to each storage server. o.O
But this scenario would really only be applicable if all 4 servers (2 Hyper-V servers + 2 SANs) are all phyiscally located together in the same data center. But then ... that would create another point of failure ... if that one data center is compromised, both your primary AND your failover will go down.
You know what ... does anyone actually DO this sort of thing?? I mean, seriously, aren't you going to have some kind of single point of failure somewhere at some point?
Sorry @junglejamesie, I guess I ended up creating more questions than I answered. :-(
You are the man!
Do most virtualization type one come with clustering,replication,raid support . As well as a manager service on the server and the client service on the client type of form this virutal type 1 is normally setup like design wises
Many devices I tested are from east europe !!
24:42
Hi, can replicate Oracle database as well
can you do replication from physical to hyper-v server?
Hi there
Please can you do a M2M review for alarm transferring
good information though I appreciate it!!!!!!!!
Wish he also did clustering and real time replication
Thats one bad recorder cam :(
Why don't u use shared storage for the clones? Like in VMware FT?
You can definitely do that. I'm just trying to "dumb this down enough" so people don't get lost. If I start adding in too many concepts at once people brains fry...
+mbiesheuvel What if storage fails? :)
+gophop Host server external backup restore to working storage, maybe.
you can use shared storage for clustering not replication, and yet its 3rd part, Windows 2012 r2 doesn't support volume replication, but the new Windows Server 2016 will support volume replication, which basically will allow that.
That speaker is hexy!
is it possible to enable replication without domain??
+Digi Vorous - Yes it's painful by comparison, so would love to see Eli do a vid on that (he did hint he may). have a look on the web about it
+Mat Heron have you tried doing it? i tried, all went well and after resolving few errors i am getting this error. "hyper- v failed to enable replication for this machine"rdp01:%%2147954586(0x80072F9A)"".
You have any idea about this? searched on web about this...didnt get any resolution.
Digi Vorous Yes, and got it working. Hard to find perfect instructions on the web, so had to play with the certificate installation process and making your own certificates using makecert.exe. This needs to be done on both Primary and Replica servers
Mat Heron
i tried it with the follwing method techm9.blogspot.ae/2016/05/hyper-v-replication-between-two.html
Do the host machines need to be on a domain in terms of normal setups.. ? Without going through all the hassle as above in the comments. If so
do you create a DC VM and join both HOST Servers to that Domain ? Thanks.
Please introduce your corgis like you used to. Thanks!
LOL, I doubt Texas and Tonto care, but i agree :)
👍👍
BRO, WHY YOU MOVING YOUR HANDS SO MUCH!!!!!!!!!!!!!!
Ker-be-ros
He called me a newb... LOL
12:00 its pronounced ker-ber-us
Really? I thought it was ker-ber-os (like, 'wind*ows*'), not ker-ber-us (like 'f*uss*')
Hi there
Please can you do a M2M review for alarm transferring
Many devices I tested are from east europe !!