Skip to main content
Pure Technical Services

Pure Cloud Block Store VMware Replication to Azure using Azure Site Recovery (ASR)

Currently viewing public documentation. Please login to access the full scope of documentation.

KP_Ext_Announcement.png

This document demonstrates how to leverage Azure Site Recovery service (ASR) for migrating a VMware virtual machine (VM) to Azure cloud. The solution presented in this document is designed to provide a simple understanding of conducting a data migration to Azure from an on-premises VMware environment with Pure Storage.

Note that the failback process documentation is in progress.

Abstract

The solution leverages two workflows. First, ASR for the replication and converting of the whole VM to Azure including the VM’s boot volume. Second, Pure Storage array-based replication for replicating the data volumes. Data volume replication requires the VMs volume to be in a vVol or RDM datastore and it can be performed from an on-premises FlashArray to Pure Cloud Block Store (CBS) on Azure, the replicated data volume can be presented to the newly created Azure VM via in-guest iSCSi. 

This document can fit into many use case scenarios, including disaster recovery (DR), lift-and-shift migration, and Dev/Test.

Introduction

Pure Cloud Block Store on Azure along with Azure Site Recovery provides a simple and cost-effective replication approach for Pure Customers with an on-premises FlashArray and VMware environment. This approach offers a unique hybrid-cloud environment for the data to be mobile and live anywhere. 

The simplicity and the cost-effectiveness of this solution comes from combining both CBS array-based replication which reduces the total bandwidth preserving dedupe and compression on the wire, and ASR advanced near-constant block data replication and failover and failback functionality 

For this solution, both Azure ASR and Pure CBS will be configured to continuously replicate the on-premises VMs to Azure. This offers the ability to failover to a newly provisioned Azure VM instance on-demand and failback accordingly. Azure ASR first replicates the boot disk/volume to reside on Azure storage account. Once the initial sync is complete, ASR handles the instantiation of the instance (Azure VM) and attaches the boot volume to it. Within the same process, ASR works on excluding the data volumes prior to the replication being initiated. Those data volumes are replicated using the built-in Pure replication between FlashArray and CBS, and can be mounted using in-guest iSCSi to the created instance.

ASR-with-CBS.png 

Prerequisites

  1. Deployment of Cloud Block Store on Azure.

  1. Async replication connection established from on-premises FlashArray to Cloud Block Store.

  2. VM volumes contained on a vVol datastore or on raw device mapping (RDM) disks and backed by on-premises FlashArray. If VMFS datastores are in use, please convert them to vVols, Check the example in Appendix A

 Prepare Azure

Step 1:

Verify Azure account permissions

Verify Azure account has the below permissions:

  • Create a VM in the selected resource group.
  • Create a VM in the selected virtual network.
  • Write to an Azure storage account.
  • Write to an Azure managed disk.

To assign those permissions, contact the Azure administrator of your Azure subscription and add two role assignments: (1)Virtual machine Contributor built-in role, and (2) Site Recovery Contributor built-in role. For more details on how to assign roles in Azure, refer to Assign Azure roles using the Azure portal.


Step 2:

Create an Azure Storage account

  1. Search for Storage Account and select +Create. 

clipboard_e1f48e425b92135e8c6db8f40e8c386cb.png

  1. Under Basics tab, select the resource group and the region. No additional settings are required, leave the rest to default and click Review + create

Step 3:

Create an Azure Recovery Service vault

  1. Search for Recovery Service Vault and select +Create

clipboard_e263b2a464cd9c2842356a8c826a4e66d.png

Step 4:

Create an Azure VNet and Subnet

(If a VNet and subnet are already existed and have enough IP addresses for the replicated VM, move to the next Section )

  1. Search for Virtual Network and click +Create. In Basics tab select the Subscription, Resource group, and insert Name for the VNet. For Region, select the same region in which the Recovery Service vault was created.

clipboard_e0be7841086b9cdbe54519b10d45c2935.png 

  1. In IP Address, enter the address range in CIDR block notation, then click + Add subnet and enter name and subnet address range. 
  2. In Security tab, leave the settings as default. In Tags, enter tags (optional) and Review + create

clipboard_eeb83778d8a9f3434684e7cb360ed73d5.png 

Note: NAT Gateway and Service Endpoint are not used in this setup. If a customer wants to leverage NAT Gateway to provide internet connectivity, see Create and validate NAT Gateway.


Configuring VMware 

Step 1:

Deploy and configure ASR configuration server

  1. In Azure portal, navigate to the created recovery service vault and configure Site Recovery by selecting +Enable Site Recovery from Overview tab.

clipboard_e1e1b2b879d946e539153f0b43136373e.png

  1. Under VMware machine to Azure, select Prepare Infrastructure. 

clipboard_e569132243279ab60c455a5a7623c46ae.png

  1. In Deployment Planning select Yes, if planning has been done. Microsoft provides a PowerShell tool to assess and estimate the replication requirements. See Azure Site Recovery Deployment Planner for VMware to Azure for further information.

clipboard_e9efca1d60411cc871e7f8ee0d00cceef.png

  1. In Source settings, click on Add configuration Server, then click on Download from the left side panel. This downloads the latest release of Configuration Server in an OVA template format.

clipboard_eeda708a91e3b0aab551c9101e12588b0.png

Note:

  • The latest version of the configuration server template can be directly downloaded from the Microsoft Download Center
  • The license provided with the template is an evaluation standard license and it is valid for 180 days. 
  1. Log in to vCenter and select the cluster or host where the downloaded OVA template is planned to be deployed. Please refer to Deploy Configuration Server and check the hardware requirements needed. 

There are limitations in uploading large OVA files (The Configuration server template OVA size is 21 GB). Based on VMware KB, VMware recommends extracting the OVA file. Then you can provide the deployment wizard with the OVF and VMDKs as separate files. 

  1. Access the VM interface by using the web console or VMware remote console
  2. Navigate through the installation wizard and configuring the server name and network. The wizard then runs a connectivity check and asks for Azure Account. Once authenticated it requires a reboot and takes 15 - 20 minutes to Boot up again.  

clipboard_e90de630aa6262a38fdfcfd848da30b92.png

  1. After a successful reboot, the configuration server is ready to be configured, access the server with one of the following: 
    • Directly, by using the VM console, sign in and launch the Azure Site Recovery Configuration manager from the desktop shortcut.
    • Remotely, by HTTPS using any browser and sign in with the same administrator credentials  https://<ConfigurationServerName|IP>/:44315
  2. A number of steps to complete configuring the Configuration server. First, set up network connectivity, an Internet connection is required as the configuration server will be responsible for sending the VM data to Azure. 

 clipboard_ecdc65d89d07a52830bcadd898c46d7d5.png

  1. Next, the wizard requires signing in to Azure, in order to select the recovery service vault. 

Note: Network settings and Recovery Service vault selection can not be changed once this wizard is completed and the configuration server is registered.

clipboard_e0638242b0101b71836a0a99c30ccee2e.png

  1. Accept the license agreement and install MySQL server.

clipboard_ef40d8b07bfb35af4a8ce88f2a15ab121.png

  1. Validate the configuration server setup has met all the prerequisites. 

clipboard_eb600bb565854d56c08d14735a334e897.png

  1. Add vCenter or ESXi server, this helps in discovering VM, or choose the option where VM can be manually selected using their IP address. 

clipboard_ec3c668f1a4e8abb5093a6cac2f71af7d.png

  1. For this step manage virtual machine credentials, select the checkbox. The installation of the mobility service agent will be done manually for each VM to be replicated. The manual installation of the mobility service before starting replication of virtual machine is a must in order to exclude the data disks/volumes, and select only the boot volume to be replicated via Azure site recovery. 

clipboard_e5dfc1eb430f874d5f73c4e72e4cbc9f6.png

  1.  The configuration server is configured and ready for replicating VM instances. 

clipboard_e71e3e05596bb21425d48d082c5d4e3a2.png

Step 2:

Prepare the Source VM

For each VM planned to be replicated, perform the below: 

  1. Open Remote Access ports and enable services, ex, RDP, SSH. 
  2. Install VMware Tools.
  3. For Windows VM, configure the SAN policy as Online All. Use the diskpart.exe utility and execute this command san policy=onlineall. This will prevent the auto-assignment and preserve the source disk letters after the replication/ failover to Azure VM.
  4. For Linux Machine, make sure the kernel version is supported, refer to the Azure Site Recovery support matrix
  5. Disable VM UEFI Secure Boot from the Virtual machine settings. 
  6. Install Mobility service agent
    • Locate installer files on the Configuration server, refer to Microsoft Docs here.
    • Move installer to the VM selected to be replicated, extract and execute the installer. 
    • After installed, the agent has to be connected to the Configuration Server (CS), three Fields needed here: CS IP address (This is the one configured in the previous section ), Passphrase (Refer to Generate configuration server passphrase), and Port (443). 
  7. If Antivirus Software is Active, exclude the ASR agent Folder, check here for detailed steps.  

Configuring Azure

Step 1:

Finish Prepare Infrastructure

1. Click on the created Azure Recovery Vault and click Prepare Infrastructure. If the previous steps are done successfully, the Source settings should be filled in automatically. 

clipboard_e9a1db9483c53d806ae95b6e1f62bae95.png
2. In Target Settings, select the Azure subscription and the deployment model for the post-failover environment. 

clipboard_ed0a9588dc3ef36218dee0812f185dced.png

3. Create and associate a replication policy. The policy can be modified as required after creation. 

clipboard_e5160ab29a0355c8fd37b7072ad712316.png

Step 2:

Enable replication

1. Go back to the create vault and select Enable replication from Site Recovery tab.

clipboard_e5c16c7416b3dc67f7b54dc0681834cda.png

2.  Select the source configuration. 

clipboard_e82feae5db7f43be6a5cb6fe7e60b46b0.png

3. In Target environment, select the subscription and resource group and network (VNet and subnet) in which the replicated data will failover to. 

clipboard_e12e29e5c93b5ee53e72971548b027cf7.png

4. Select the Virtual machine(s) from the discovered list. If VM(s) can not be selected (grayed out), the reason would appear when you hover on the exclamation mark. The most common reasons are: 1. VMware tools are not installed, 2. Vm is not powered up, 3. No IP address associated to the VM.

If VM(s) are not available in the list, see the troubleshooting steps in Troubleshoot source machines that aren't available for replication.

clipboard_e60927ed9bfb198ebd5e6e7b9284aa485.png

5. In Replication settings, there are four sections to be filled: 

a. User account credentials. This can be added from the configuration server and it is sued to push the installation of the mobility service agent. However, in our scenario, the mobility service has been manually installed in order to particularly include the Boot volume and exclude the rest. 

b. Managed disk type. Three options to choose from Standard HDD, Standard SSD, and Premium SSD. 

c. Cache storage account. Select the storage account created in Preparing Azure section. 

d. Target name. This is the VM name after failover. 

clipboard_efee6c80dc40529c84015a8d68bf0fb26.png

6. Assign the replication policy created before and review and Enable replication. To check the replication job navigate to Replication Items

Step 3:

Perform failover

1.  Once the initial replica is completed. The replication Item is cleared to be tested or failed over. it is recommended to test the replication before cutting it over and complete the migration. 

clipboard_e40ae36ec159cde3e35b2cb0d43ea9edc.png

2. The Azure VM size can be changed from Compute and Network tab, and then click Edit.  

clipboard_ee56997c76be91390232853e5fb9f1ae8.png

3. In case of failover action to be performed. a list of recent recovery points (crush consistent and application-consistent) to choose from. Also, there is an option to shutdown the source machine.

Note: the frequency of the recovery points can be always configured/changed by associating a new replication policy or modifying an existed one. 

clipboard_e8b8490fc9f0cb346887f5158a7cb2616.png

4. To verify the failover, navigate to Virtual Machine and select the VM name, scroll down and select Boot diagnostics tab, click refresh to get a live screenshot from the OS. 

clipboard_e3115401262b4fea533caf6d1b2bb1b69.png

5. If the failover is successful and VM is healthy. Commit can be initiated to persist the failover and stop the protection/replication. Alternatively, a Complete Migration can be done. However, the VM can not be failed back to the VMware environment at that point. 


Configuring Cloud Block Store

Step 1:

Connect and configure replication from on-premises FlashArray 

  1. Access Cloud Block Store and get the connection key as shown in the below. 
     

clipboard_e1f6b9b163f84f90e2df51b6b1557f8a3.png

  1. Access on-premises FlashArray and establish the connection with Cloud Block Store by clicking on the plus icon, and fill the following

    1. Management Address: this is the Cloud Block Store floating IP address used to access the GUI. 

    2. Type: Async Replication 

    3. Connection Key: The key obtained in the previous step. 

    4. Replication Address: This is auto discovered unless NAT is used. (In order to get the replication address use the CBS GUI and go to Settings > Network).

clipboard_e3dc58eeb0c88f92fb89c162b7a74a773.png

  1. Create a protection group for replication to Cloud Block Store.

clipboard_efae875aec971a53b92bd853f280e51f1.png

  1. Click on the created protection group and enable and edit replication schedule.

clipboard_e7e6b045d09a6654941080763bafc1a84.png

For more detail information on protection group replication interval and retention schedule. See FlashArray Asynchronous Replication Configuration and Best Practices Guide.

  1. Click on the shown ellipsis to add target to the protection group. The target for this should be Cloud Block Store connected in the previous steps. 

clipboard_ea117a59ae8f0f291a1c6c7c15a4d6482.png

  1. Import the protection group created using the Pure Storage plugin in vCenter. 

clipboard_e6809ffc5e10bf14153b2a2c7a763d8e2.png

  1. From VM and Templates, Right click on the VM(s) to be replicated to CBS and click on Edit VM Storage Polices.

clipboard_e2d2cdfaf2da564334f1d9a7c044a78a3.png

  1. In this step, enable Configure per disk and assign the replication policy to the data disks/volumes (No need to select the OS disk since it has been already replicated using Azure Site Recovery in the previous sections).

clipboard_e8ebd3ce8cc7809e37bcc56f9879c8dc2.png

  1. Once protection group snapshots are replicated to CBS, copy the replicated snapshot out to a volume.

clipboard_e0defd891acc82674bd1800347df4bb5e.png

  1. Create a host on CBS and configure it with the IQN collected from new Azure VM instance once the cutover is complete.

  2. Attach the VM volumes to the newly created host.

See Creating Hosts in the deployment and configuration guide for detailed examples on how to create and attach a volume to a host. 

Step 2:

     1. Access the replicated Virtual machine via RDP/SSH or configure Azure Bastion.

     2. Install iSCSI and Multipath required packages on the host and perform iSCSi login and MPIO configuration.

     3. Perform iSCSI rescan to find newly presented volumes.

     4. Mount volumes and bring up the application.

For detailed steps on how to configure and connect Azure VM to CBS volumes, please refer to this section (Mounting a volume) in the deployment and configuration guide. 


 

Appendix A 

Convert Data from a VMFS Datastore to a VVol Datastore

Before data can be migrated from a VMFS Datastore to a vVol Datastore, it is recommended that the FlashArray plugin be installed in vCenter, in order to simplify vVol administration.

The following document goes through the steps to install the FlashArray plugin in vCenter, and to register the FlashArray VASA provider with vCenter:

https://support.purestorage.com/Solutions/VMware_Platform_Guide/003Virtual_Volumes_-_VVols/Web_Guide%3A_Virtual_Volumes_Quick_Start_Guide

When the steps in the document at the above link are followed to install the FlashArray plugin in vCenter, and to register the VASA provider with vCenter, a Protocol Endpoint called pure-protocol-endpoint is automatically created on the FlashArray. 

To verify the existence of the protocol endpoint, select the ESXi host in vCenter, and go to Protocol Endpoints under Configure. The Protocol Endpoint should be visible, as shown below:

vcenter-pe.png

If the Protocol Endpoint doesn't exist, contact Pure Storage Support for troubleshooting help.

After the steps above have been completed, a vVol Datastore should be created.

Creating a VVol Datastore

The next step is to create a vVol Datastore. This can be done using the following steps. Right-click on the host or the host cluster, and select New Datastore under Storage:

vvol_1.png

Select the VVol option for the datastore type:

vvol_2.png

Specify a name for the new vVol Datastore; select the vVol container for the FlashArray; and click Next: In this example, we are creating a vVol Datastore called Vvol-TMEFA07-DS:

vvol_4.png

Select the host or host cluster that will have access to the vVol Datastore:

vvol_5.png

Review the summary, and click Finish to create the datastore:

vvol_6.png

View the list of datastores for the ESXi host to verify that the newly created vVol Datastore called Vvol-TMEFA07-DS has been created:

vvol_7.png

 

Migrating the VM to the VVol Datastore

After the vVol Datastore has been created, the next step is to migrate the storage for the SQLSrv-2019 VM to the vVol Datastore called Vvol-TMEFA07-DS. Right click on the VM SQLSrv-2019 and select the Migrate option:

VMFS_Vvol_1PP.png

Select the Change Storage option. The option to change both compute and storage can also be used, if desired:

VMFS_VVols_PP2.png

Select the vVol Datastore called Vvol-TMEFA07-DS as the storage destination, and click Next:

VMFS_VVols_PP3.png

Review the summary and click Finish to migrate the storage for the SQLSrv-2019 VM to the Vvol-TMEFA07-DS Datastore:

VMFS_VVols_PP4.png

When the migration is complete, verify that the datastore for the VM SQLSrv-2019 is now the vVol Datastore Vvol-TMEFA07-DS as shown below:

vm_vvol.png

After the datastore for the VM SQLSrv-2019 has been migrated from VMFS to the vVol Datastore, the VM can be replicated to a CBS instance in AWS.