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?

callisto
  • 171
  • 3

3 Answers3

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.

batistuta09
  • 8,723
  • 9
  • 21
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.

NISMO1968
  • 768
  • 1
  • 5
  • 14
-1

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

joeqwerty
  • 108,377
  • 6
  • 80
  • 171