Recently I received a request to migrate test SAP instance to Microsoft Azure, again for testing purposes and validating selected Azure architecture.
Selected method of migration at this point was Azure Site Recovery service, since there where multiple steps to be taken and Azure Migrate as of time of writing this post still does not support migrating from Hyper-V (it is in private preview).
SAP virtual machines are currently residing on production Hyper-V host and are placed in separated test and dev VLAN. Since we can not install anything on production Hyper-V hosts, we have devised following solution:
- Turn of all VMs and commit all changes
- Copy VHDX files over network to test Hyper-V server
- Recreate VMs on test Hyper-V server and use copied VHDX files
- Setup ASR in Azure and install required agent on test Hyper-V
- Migrate SAP VMs to my test and dev subscription
I have setup new Azure Site Recovery vault and added test Hyper-V server to it.
During Azure Site Recovery replication setup I will create storage account for SAP virtual machines and virtual network that will be used to fail over machines to once replicated.
Replication policy will be created and associated with site in Azure. After that, I configured replication of a SAP VM and started initial replication.
Replication status can be monitored from Azure dashboard or from Hyper-V replication settings for selected virtual machine.
I recommend you to do a test failover after migration. When VM boots, add public IP address and try to connect to it via RDP. If your environment requires more secure RDP connection, you can deploy VPN gateway in test VNET and connect to VM through VPN rather than through public IP.
When you are satisfied with results, go to your Recovery Services Vault, select your replicated VM and click on “Cleanup test failover” so you can do “Planned Failover” when ready.
It is recommended to select SAP verified virtual machine sizes when doing production failover to Azure so you can retain SAP support.
When migrating SAP machines to Azure and it is your production, all SAP licences are invalidated due to hardware changes. You will need to reactivate your licences. Thanks Robert for heads up!