4

I have a very limited budget, and little knowledge of this, so please bear with me.

We have a primary, and backup Hyper-V server. Replication is running from the primary to the secondary. I need to failover one of the VMs on Primary to secondary without interrupting the services provided by that VM.

This VM is a webserver, with a public website.

No data changes are written in this VM's storage - There is another VM where the databases are hosted. The webserver VM needs to restart after windows updates, while the Secondary Hyper-V runs the most recent replication image.
After the VM has restarted on Primary, the VM on Primary should again be the active one, and then the WindowsUpdates Replicated down to the (dormant again) Secondary Hyper-V.

So in short - Having 2 Hyper-V servers (not clustered - no Active Directory), How to I get a VM to run on the secondary (without downtime of the service provided), and reboot the VM on primary, and switch all users' sessions back to the VM on primary?

8

LIveMigration is required to avoid service interruption in you case. To enable LiveMigration and/or automatic failover you need domain joined WSFC (domain independent cluster doesn't support LiveMigration) and shared storage.

I can suggest the following cost-effective design:

1) Upgrade license to Windows Server Standard (you need it to license AD VM on each server)

2) Use VSAN to create a shared storage (Starwind vsan free for example)

3) Create domain joined Failover cluster

4) Deploy VMs

P.S. Technically you can do it with Hyper-V Server, but I am not sure, if the license allows it.

2

You can use Hyper-V Replica and PowerShell script automated failover. See:

PoSh Hyper-V Replica Failover Automation

... just make sure you use some mechanism to avoid split brain scenario, say run your automation scripts from Azure or AWS hosted monitoring VM.

-1

Hyper-V Replica doesn't provide automatic failover and failback capabilities. For that you need to deploy a Failover Cluster.

  • 1
    This isn't true at all! Please see my answer with a link to HOWTO guide on topic. – NISMO1968 Feb 5 at 19:49
  • That isn't automatic failover. Hyper-V Replica does NOT perform automatic failover or failback. Failover Clustering performs automatic failover and failback. – joeqwerty Feb 5 at 20:30
  • Answer gets job done. Period. – RiGiD5 Feb 6 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.