Hyper-V Program Manager
As you hopefully know – I have been running Hyper-V Replica in my house for about a year now. In this time I have had a couple of instances when I had to take a step back and ask myself if I wanted to do a planned or an unplanned failover of a virtual machine.
To bring everyone up-to-speed here: planned failover of replicated virtual machine involves logging into the source computer, shutting down the virtual machine that you want to failover, and then selecting to perform a planned failover. Hyper-V will ensure that the two virtual machines are completely in sync and will orchestrate the process in a way that ensures no data loss. Unplanned failover is where you go to the recovery site and just power up the virtual machine, incurring some amount of data loss in the process.
At first glace, you would assume that you always wanted to do a planned failover if possible. But in my experience there are times when a planned failover is possible, but an unplanned failover is preferable.
Let me explain with a real-life situation I had to deal with.
One morning as I am about to leave for work – my wife calls out to me and says that the Internet isn’t working. I duck into my little server room and look around. Sure enough one of my Hyper-V servers is off, and will not turn on. 5 minutes later I have confirmed that it is a failed power-supply, I have replaced the power-supply, and I am booting the server.
Now, the replacement power-supply that I grabbed is not server grade (it is an old desktop power-supply that I had sitting on a shelf). So my initial thoughts were:
As I started working on this plan – my head was starting to do some math. All up this would not take long, probably 15 minutes – but I was already late for work. Furthermore; the virtual machines had all been turned off since the power-supply failure had happened – so there really wasn’t any significant data that would not have been replicated. Finally, all the virtual machines that had been on the failed physical server were largely stateless (firewall, VPN, etc…) my fileserver virtual machine had been on the other server.
Once I put all of these facts together I realized that I could just leave the failed server off and perform an unplanned failover on each of the virtual machines. This would take under 5 minutes and I would be on my way.
Which was exactly what I did.
You may be wondering if this would cause problems when I tried to startup the failed Hyper-V server later in the day (with duplicate virtual machines and the like) but this is something that Hyper-V handles for you automatically. When I did replace the power-supply and start up the physical computer, Hyper-V detected that the replica virtual machines were running and did not start the primary virtual machines.
I did have to go in and manually correct the replication relationship when I got all my hardware up and running – but using unplanned failover provided me exactly the functionality I needed, while minimizing the amount of time that I had to spend getting my virtual machines up and running.
It's a great feature no doubt, please get the Exchange team on board as well. I know there are DAGs..., but this is much easier esp. for smaller shops.
So, it's time for System Center deployment in your house to be able to monitor hardware failures and orchestrate a response :)
I really wish Hyper-V Replica & Live Migration worked together nicely in the failover scenario.
That is, the Live Migration & Replica worked together to take the already seeded data, and Live Migrate over and automatically reverse the Replica relationship.
Hi, I always struggle configuring Hyper-V's Virtual Switch on Windows 8. What are the configuration steps so the host and guest have intranet and both can access internet? Whatever configuration I try, I end up Internet working on both or none. Why don't Microsoft make it easy like VirtualBox... just start the box and you will get aforementioned configuration by default!
Please post a blog about it on blogs.windows.com, so more people know how to configure it for basic usage: like we have Win 8.1 RTM ISOs from BizSpark partner account, but we can't fully utilize it on Hyper-V due to complexity of Virtual Switch settings. Most people ended up using VirtualBox on Win8 to run 8.1 RTM and it worked like a charm..without altering network settings.
Please also cover this scenario: "Using Hyper-V with VirtualBox". Or support Hyper-V plugin development for Vagrant (an opensource Ruby implementation of abstraction of Virtual Machines for developers), so we don't need Hyper-V at all.. github.com/mitchellh/vagrant/issues/1244. Here is the proposed bounty www.bountysource.com/fundraisers/429-basic-vagrant-hyperv-support. If Microsoft chip-in some bucks, we can probably achieve the target.
Cool story Ben! But I don't believe its a little server room, I bet its way bigger than mine :)
Ben I'm interested in the equipment you're using at home
When you said:
Planned failover of replicated virtual machine involves logging into the "source computer."
Can I to run the planned failover from failover cluster console?
I cannot perform planned failover by Hyper-v Manager remotelly or Do I need to run the planned failover from owner hyper-v host from virtual machine primary?
I was just thinking about this as I was about to take my dedicated VM host offline to put in some hotswap bays.
Sums it up "nicely." "Quotes" because some of these comments are right - I don't need a cluster (though I'll lab one, one of these days), I use my workstations, all with Haswell Xeons and 32GB RAM (or better, on both counts) to pick up slack on critical and typically low use VMs. Lack of auto start, Live Migration complexities (dammit, the machine is *already there*), and other HA features which require HRM, FCM, etc... kind of limit the value of replica servers and make it entirely questionable if you're using shared/network available storage to host the VM drives.
I get the reasoning (blogs.technet.com/.../types-of-failover-operations-in-hyper-v-replica-part-ii-planned-failover.aspx) but if the number of simultaneous Live Migrations can be autodetected and capped under the user set limit, why not a replica process that chooses between LM vs. planned shutdown? I'm not on a WAN - in fact, the workstation I'm about to use has a 10GbE link to my VM host.
I fully concur with Xon, it's boggling that Live Migration cannot work in conjunction with Replica or that we can't do a planned failover without shutting down the VM.