In this blog post, we’ll discuss how to migrate your on-premises virtual machines to Azure – focusing mostly on Azure Site Recovery – along with key prerequisites but also limitations.
Migrating virtual machines to the cloud can be painful and complicated unless you use the right tools for the job.
Microsoft offers a service called “Site Recovery” which offers your organization a service for your business continuity and disaster recovery (BCDR) strategy.
Site Recovery contributes to your BCDR strategy by orchestrating replication of on-premises virtual machines and physical servers. You replicate servers and VMs from your primary on-premises datacenter to the cloud (Azure), or to a secondary datacenter.
When outages occur in the primary site, you are able to failover to the secondary site and keep workloads accessible and available, whether this is in the public cloud or another datacenter.
Although Site Recovery makes a great BCDR service, it can also be used for migration purposes, let’s say you want to migrate to Microsoft Azure.Migration scenario’s include from physical server to Azure, Hyper-V to Azure and VMware to Azure which different sets of tooling. Site Recovery uses the same principles as Hyper-V Replica where a maximum of RPO can be specified; 30 seconds, 5 minutes or 15 minutes but when doing a planned failover to Microsoft Azure, Site Recovery ensures there is not data loss.When the failover is triggered, Site Recovery will sync the latest data to Azure and then shutdown the source VM. After the shutdown Site Recovery will check the source VM again to see if there are any changes made to the disks in between the shutdown and latest sync and transfer the changes again. A Virtual Machine will be created in Microsoft Azure with the specified size and will have the disk attached of the VM on-premises.
Ofcourse it’s easy to say “Give your VM an IP address and you’re done”. The are some serious considerations concerning the networking part. Typically applications or services have a fixed IP address which your users reach when connecting, does the address say the same? Likley this is not the case when there is a active connection with Azure through a VPN or ExpressRoute otherwise there will be duplicate networks and you will walk into routing issues. Either you route the whole subnet where the virtual machine is in over VPN so that your users can access your server on the same IP or you need to change the IP of the server. There are ways to migrate your servers to Azure without to much hassle, you could use a load balancer to manage traffic flows as shown in the animation below.
The loadbancer will route all traffic to the VM on-premises because the VM in Azure is not online (actually it’s not even a VM, but your reserve the IP).
As soon as you failover to Azure, the loadbalancer will see the VM in Azure come online re-route all traffic to it as the VM on-premises has gone offline.
Automation and orchestration
“Wait a second, this is all fine if you failover a single virtual machine… but I want to failover a whole bunch of VMs and preferably without me clicking.”
Azure Site Recovery can handle big migrations and DR scenario’s due to the automation which is built in using “Recovery Plans”.
You can set up recovery plans that include scripts and Azure automation runbooks. Recovery plans allow you to model and customize failover and recovery of applications that are spread over multiple VMs. This way you can choose to failover your domain controller first and when the domain is fully operational you failover the dependent workloads like fileservers, SQL etc.
You can even build in ‘Manual approval’ in the recovery plan if you’re a control-freak and don’t trust the script you built.
31 days free
Yes, 31 days free. No, this is not an temporary offer.
Microsoft has decided to make Azure Site Recovery free for the first 30 days to enable testing and migration scenario’s.
This is beneficial for both parties, the Microsoft customer does not pay any migrations costs and Microsoft has landed a new customer on Azure.
Want to learn more on Azure Site Recovery? check the documentation on https://docs.microsoft.com/en-us/azure/site-recovery/site-recovery-overview
Thank you for reading my blog.
If you have any questions or feedback, leave a comment or drop me an email.
Darryl van der Peijl