|By Kevin Remde||
|October 5, 2012 08:00 AM EDT||
Hyper-V in Windows Server 2012 (and in the free Microsoft Hyper-V Server include an easy start to a good disaster recovery solution: Hyper-V Replica. With Hyper-V Replica you can easily create and maintain an off-line copy – a replica – of a virtual machine on a separate virtualization host. This means, for example, that if your main location or host for an important virtual machine goes down becomes unavailable, you can easily fail-over to the replica. The copy will start up and be available in short-order.
“That sounds really great, Kevin! But what does it cost to set this up?”
“How do I set it up?”
I’m glad you asked. There are really two simple requirements to make it happen:
- You need to be running Windows Server 2012 with the Hyper-V Role installed (or Microsoft Hyper-V Server 2012) on both the source and destination virtualization hosts, and
- You need network connectivity between them. (and don’t forget the firewall)
Here are my 6 steps to working with Hyper-V Replica:
1. Configuring the Hosts to Allow Replication
In Hyper-V Manager, right-click on, or select the host, and choose Hyper-V Settings…
On the left, select Replication Configuration, and then enable and configure your replication options.
2. Setting up a Replica
To configure the replica using Hyper-V Manager, right click on the VM you want to replicate and choose Enable Replication…
On the Before You Begin page, click Next
On the Specify Replica Server page, Enter the name of the server that is to be the replication host.
The Specify Connection Parameters page is, um, where you specify your connection parameters.
Choose the hard disks you want to replicate on the Choose Replication VHDs page.
On the Configure Recovery History page, choose whether you want to keep just the most recent recovery point, or perhaps maintain a number of points in the past that you could recover to. You also have the option to occasionally perform a VSS copy.
On the Choose Initial Replication Method page, notice that you have options on how you want that big initial replication to take place. Maybe you don’t want to use the network for that initial large transfer, but instead would prefer to use UPS or FedEx.
Then click Finish on the summary page, and you’re all set.
If all was configured properly, you’ll see a new VM appear on the replication host that will be turned off.
3. Verifying the Replica’s Status
You can easily verify the status of your replica by selecting either your original VM or your replica VM in Hyper-V Manager, right-click the VM, click Replication, and then View Replication Health.
4. Testing the Replica
You can test your replicated machine by right-clicking on the replica VM and under Replication select Test Failover…
Pick the point in time that you want to test, and click Test Failover.
This will create a linked copy VM with the text “ – Test” appended to the name. Simply start up that VM (go ahead. It isn’t connected to the network, so it won’t interfere with anything) and verify that it is a useable machine.
5. Disaster Strikes! Time to Fail Over
The unthinkable has happened. Time to act. Your original and important production VM is no longer available.
On the replica VM, right click. Under Replication, select Failover.
Select the recovery point, and click Fail Over.
And your replica will start up configured, networked, and ready to take on Dr. Proton.
6. Removing the Replica
Easy. On both the source and replica VMs, right click. Under Replication, select Remove Replication.
Now you can safely delete your replica from the replication host.
Simple, yes? Do you have any questions?
“Can I have the failover happen automatically?”
Not natively. In its most simple form, Hyper-V Replica is a manual failover. However, because you can use PowerShell to drive this entire process, there’s no reason why you (or some third party) couldn’t develop a solution that monitors the state of the source VM and launches a script (or some automation in System Center 2012 Orchestrator) to launch the failover.
“But do I need to have Active Directory? Or do both of my virtualization hosts need to be in the same domain?”
Actually, no. You have the option of using certificate authentication to make the trusted configuration. (CLICK HERE for details on how to use certificates for Hyper-V Replica.)
“Do my virtual machines need to be running particular operating systems for this to work?”
Nope. There is nothing required of the guest operating system. You could be running the original Duke Nukum on DOS 6.22 in your VM, and this will still work.
Currently the answer to that is no. But I’ve heard this question enough times, and really it does make sense.. so I have to imagine (and that’s all I personally have to go on) that Microsoft is considering doing that. Consider the ramifications, though… setting up a replica means configuring something beyond just standing up a virtual machine in Hyper-V.. so the process has to have the ability to manipulate the hypervisor. I could see it happening sometime, but I don’t know when.
“Can I replicate machines that are in clusters? And can I replicate into or out of another cluster?”
Yes and yes. You will think of the cluster as and treat it as a single machine. And to do that there is a special role that you need to add to the cluster called the Hyper-V Replica Broker. This defines a new named entity that becomes either the source or the destination for replicas coming into or out of a cluster. For more details on this, check out this Wiki article.
“What about PowerShell? Can I use PowerShell to set up a replica? Can I use it to do the failover or even get status on current replicas?”
Yes, yes, and yes.
For example, to configure the replica destination host, you could use these commands to configure the firewall to allow inbound replication on the destination, and set a server up as a new replication host (each numbered line is a separate complete PowerShell command or script line):
- Enable-Netfirewallrule -displayname "Hyper-V Replica HTTP Listener (TCP-In)”
- Import-Module Hyper-V
- $RecoveryPort = 8080
- $ReplicaStorageLocation = “D:\Example”
- Set-VMReplicationServer -ReplicationEnabled $true -AllowedAuthenticationType Kerberos -IntegratedAuthenticationPort $RecoveryPort -DefaultStorageLocation $ReplicaStorageLocation -ReplicationAllowedFromAnyServer $true
And then to create a replication (each numbered line is a separate complete PowerShell command or script line):
- Import-Module Hyper-V
- $ReplicaServer = “Recovery1.contoso.com”
- $RecoveryPort = 8080
- $PrimaryVM1 = “CRMVM”
- $PrimaryServer = “Primary1.contoso.com”
- Enable-VMReplication -VMName $PrimaryVM1 -ReplicaServerName $ReplicaServer -ReplicaServerPort $RecoveryPort -AuthenticationType Kerberos -CompressionEnabled $true -RecoveryHistory 0
- Start-VMInitialReplication –VMName $PrimaryVM1
For the full story, here is the Microsoft online documentation of Hyper-V Replica: Hyper-V Replica Overview - http://technet.microsoft.com/en-us/library/jj134172.aspx
(NOTE: as of today, the online documents are still based on the RC code. I’m sure it will be updated soon to work with RTM.)
And to give Windows Server 2012 a try,
- CLICK HERE for the evaluation,
- CLICK HERE for the Hyper-V Server 2012 download, or
- CLICK HERE to learn more at the Microsoft Virtual Academy.
So what do you think? Good stuff? Let’s discuss in the comments.
Internet of Things (IoT) will be a hybrid ecosystem of diverse devices and sensors collaborating with operational and enterprise systems to create the next big application. In their session at @ThingsExpo, Bramh Gupta, founder and CEO of robomq.io, and Fred Yatzeck, principal architect leading product development at robomq.io, discussed how choosing the right middleware and integration strategy from the get-go will enable IoT solution developers to adapt and grow with the industry, while at the same time reduce Time to Market (TTM) by using plug and play capabilities offered by a robust IoT ...
Jun. 29, 2015 06:00 PM EDT Reads: 1,630
The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional? In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists addressed this very serious issue of profound change in the industry.
Jun. 29, 2015 12:19 PM EDT Reads: 543
SYS-CON Events announced today that BMC will exhibit at SYS-CON's 16th International Cloud Expo®, which will take place on June 9-11, 2015, at the Javits Center in New York City, NY. BMC delivers software solutions that help IT transform digital enterprises for the ultimate competitive business advantage. BMC has worked with thousands of leading companies to create and deliver powerful IT management services. From mainframe to cloud to mobile, BMC pairs high-speed digital innovation with robust IT industrialization – allowing customers to provide amazing user experiences with optimized IT per...
Jun. 29, 2015 12:15 PM EDT Reads: 2,499
There will be 150 billion connected devices by 2020. New digital businesses have already disrupted value chains across every industry. APIs are at the center of the digital business. You need to understand what assets you have that can be exposed digitally, what their digital value chain is, and how to create an effective business model around that value chain to compete in this economy. No enterprise can be complacent and not engage in the digital economy. Learn how to be the disruptor and not the disruptee.
Jun. 29, 2015 11:00 AM EDT Reads: 2,077
Internet of Things is moving from being a hype to a reality. Experts estimate that internet connected cars will grow to 152 million, while over 100 million internet connected wireless light bulbs and lamps will be operational by 2020. These and many other intriguing statistics highlight the importance of Internet powered devices and how market penetration is going to multiply many times over in the next few years.
Jun. 29, 2015 11:00 AM EDT Reads: 1,822
It is one thing to build single industrial IoT applications, but what will it take to build the Smart Cities and truly society-changing applications of the future? The technology won’t be the problem, it will be the number of parties that need to work together and be aligned in their motivation to succeed. In his session at @ThingsExpo, Jason Mondanaro, Director, Product Management at Metanga, discussed how you can plan to cooperate, partner, and form lasting all-star teams to change the world and it starts with business models and monetization strategies.
Jun. 29, 2015 10:00 AM EDT Reads: 1,975
The Internet of Things is not only adding billions of sensors and billions of terabytes to the Internet. It is also forcing a fundamental change in the way we envision Information Technology. For the first time, more data is being created by devices at the edge of the Internet rather than from centralized systems. What does this mean for today's IT professional? In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists will addresses this very serious issue of profound change in the industry.
Jun. 29, 2015 09:45 AM EDT Reads: 2,348
Business as usual for IT is evolving into a "Make or Buy" decision on a service-by-service conversation with input from the LOBs. How does your organization move forward with cloud? In his general session at 16th Cloud Expo, Paul Maravei, Regional Sales Manager, Hybrid Cloud and Managed Services at Cisco, discusses how Cisco and its partners offer a market-leading portfolio and ecosystem of cloud infrastructure and application services that allow you to uniquely and securely combine cloud business applications and services across multiple cloud delivery models.
Jun. 28, 2015 11:00 AM EDT Reads: 2,138
In his General Session at 16th Cloud Expo, David Shacochis, host of The Hybrid IT Files podcast and Vice President at CenturyLink, investigated three key trends of the “gigabit economy" though the story of a Fortune 500 communications company in transformation. Narrating how multi-modal hybrid IT, service automation, and agile delivery all intersect, he will cover the role of storytelling and empathy in achieving strategic alignment between the enterprise and its information technology.
Jun. 27, 2015 10:00 AM EDT Reads: 2,160
Buzzword alert: Microservices and IoT at a DevOps conference? What could possibly go wrong? In this Power Panel at DevOps Summit, moderated by Jason Bloomberg, the leading expert on architecting agility for the enterprise and president of Intellyx, panelists peeled away the buzz and discuss the important architectural principles behind implementing IoT solutions for the enterprise. As remote IoT devices and sensors become increasingly intelligent, they become part of our distributed cloud environment, and we must architect and code accordingly. At the very least, you'll have no problem fillin...
Jun. 26, 2015 12:00 PM EDT Reads: 2,149
Growth hacking is common for startups to make unheard-of progress in building their business. Career Hacks can help Geek Girls and those who support them (yes, that's you too, Dad!) to excel in this typically male-dominated world. Get ready to learn the facts: Is there a bias against women in the tech / developer communities? Why are women 50% of the workforce, but hold only 24% of the STEM or IT positions? Some beginnings of what to do about it! In her Opening Keynote at 16th Cloud Expo, Sandy Carter, IBM General Manager Cloud Ecosystem and Developers, and a Social Business Evangelist, d...
Jun. 26, 2015 10:00 AM EDT Reads: 2,010
Converging digital disruptions is creating a major sea change - Cisco calls this the Internet of Everything (IoE). IoE is the network connection of People, Process, Data and Things, fueled by Cloud, Mobile, Social, Analytics and Security, and it represents a $19Trillion value-at-stake over the next 10 years. In her keynote at @ThingsExpo, Manjula Talreja, VP of Cisco Consulting Services, discussed IoE and the enormous opportunities it provides to public and private firms alike. She will share what businesses must do to thrive in the IoE economy, citing examples from several industry sectors.
Jun. 25, 2015 02:00 PM EDT Reads: 1,951
In his keynote at 16th Cloud Expo, Rodney Rogers, CEO of Virtustream, discussed the evolution of the company from inception to its recent acquisition by EMC – including personal insights, lessons learned (and some WTF moments) along the way. Learn how Virtustream’s unique approach of combining the economics and elasticity of the consumer cloud model with proper performance, application automation and security into a platform became a breakout success with enterprise customers and a natural fit for the EMC Federation.
Jun. 25, 2015 01:30 PM EDT Reads: 2,104
SYS-CON Events announced today that the "Second Containers & Microservices Conference" will take place November 3-5, 2015, at the Santa Clara Convention Center, Santa Clara, CA, and the “Third Containers & Microservices Conference” will take place June 7-9, 2016, at Javits Center in New York City. Containers and microservices have become topics of intense interest throughout the cloud developer and enterprise IT communities.
Jun. 22, 2015 02:15 PM EDT Reads: 2,627
SYS-CON Events announced today that the "First Containers & Microservices Conference" will take place June 9-11, 2015, at the Javits Center in New York City. The “Second Containers & Microservices Conference” will take place November 3-5, 2015, at Santa Clara Convention Center, Santa Clara, CA. Containers and microservices have become topics of intense interest throughout the cloud developer and enterprise IT communities.
Jun. 20, 2015 12:00 PM EDT Reads: 3,808
With major technology companies and startups seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo in Silicon Valley. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be! Internet of @ThingsExpo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with 17th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The Internet of Things (IoT) is the most profound change in personal an...
Jun. 15, 2015 08:45 PM EDT Reads: 4,037
17th Cloud Expo, taking place Nov 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud strategy. Meanwhile, 94% of enterprises are using some form of XaaS – software, platform, and infrastructure as a service.
Jun. 15, 2015 07:15 PM EDT Reads: 3,821
The 17th International Cloud Expo has announced that its Call for Papers is open. 17th International Cloud Expo, to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, APM, APIs, Microservices, Security, Big Data, Internet of Things, DevOps and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding business opportunity. Submit your speaking proposal today!
Jun. 15, 2015 10:15 AM EDT Reads: 5,881
In his keynote at 16th Cloud Expo, Rodney Rogers, CEO of Virtustream, discusses the evolution of the company from inception to its recent acquisition by EMC – including personal insights, lessons learned (and some WTF moments) along the way. Learn how Virtustream’s unique approach of combining the economics and elasticity of the consumer cloud model with proper performance, application automation and security into a platform became a breakout success with enterprise customers and a natural fit for the EMC Federation.
Jun. 11, 2015 08:00 AM EDT Reads: 2,272
The 4th International Internet of @ThingsExpo, co-located with the 17th International Cloud Expo - to be held November 3-5, 2015, at the Santa Clara Convention Center in Santa Clara, CA - announces that its Call for Papers is open. The Internet of Things (IoT) is the biggest idea since the creation of the Worldwide Web more than 20 years ago.
Jun. 10, 2015 06:00 PM EDT Reads: 3,271