AWS Server Migration Service – Server Migration to the Cloud Made Easy
By Ahmed Omran, Solutions Architect at AWS focused on Migration
Migrating on-premises servers to the cloud in a large-scale environment can be an involved process unless you have an orchestrator that can automate, schedule, minimize the bandwidth consumption for the replicated data, and reduce the cutover time of your migration.
In this post, I will show you how to efficiently migrate on-premises workloads to AWS using the AWS Server Migration Service (AWS SMS), via a step-by-step guide.
What is the AWS Server Migration Service?
In October 2016, we introduced AWS SMS with a goal to simplify the end-to-end server migration process. AWS SMS currently supports the migration of on-premises virtual machines (VMs) as an agentless service using a virtual appliance. AWS SMS provides the following key benefits:
- Automates an incremental replication of live server volumes to AWS reducing server downtime at cutover.
- Orchestrates large-scale server migrations in a cost effective manner.
- Supports most widely used operating systems.
- Manages and tracks the progress of your server migration through an easy to use UI.
AWS SMS is an ideal solution to use when you are planning a scaled migration from VMware environments to AWS where the downtime, agentless tools, incremental replication, and testing the application before the cutover are critical considerations.
Currently, the service is available in the GovCloud (US), US East (N. Virginia), US West (Oregon), US East (Ohio), EU (Ireland), EU (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Tokyo), Asia Pacific (Seoul), and Asia Pacific (Mumbai) Regions.
How Does it Work?
Before going through the steps of how to use AWS SMS to migrate your workload, we’ll give you some details about the migration process itself and how AWS SMS handles it.
The migration process goes through four stages, as illustrated in the following diagrams.
Overview of AWS SMS Migration Process
The final output of AWS SMS is an Amazon Machine Image (AMI); the migration process will produce an AMI for each replication run until the job is terminated (deleted by you or terminated automatically after 90 days).
The migration stages are iterative with an adjusted replication frequency. The minimum time between each replication run is 12 hours, and the maximum time is 24 hours. The lifetime of this iterative cycle is 90 days, and after that, the replication job is terminated.
You can select a group of VMs for migration. SMS supports up to 50 concurrent VM migrations per account.
How Do You Use AWS SMS?
AWS SMS requires a connector that orchestrates the workflow of the migration process. This connector is deployed in the vCenter.
Before you deploy the SMS connector, make sure that your environment meets the AWS SMS requirements and has the correct firewall configuration. Failing to reconfigure the firewall to permit stateful outbound connections for DHCP, DNS, HTTPS, ICMP, and NTP services will lead to an unsuccessful deployment.
You’ll also need to create a vCenter service account and an IAM user with the appropriate policy and permissions for AWS SMS, as detailed in the AWS SMS documentation.
Deploying the Server Migration Connector Virtual Appliance
The Server Migration Connector is a preconfigured FreeBSD virtual machine available in OVA format for deployment in the VMware environment. You can download the latest version of the Connector from AWS.
After downloading the Server Migration Connector, log in to the vCenter with sufficient credentials for the deployment.
Open the context (right-click) menu for your vCenter from the inventory, and choose Deploy OVF Template.
On the Select source page, specify the location where the source OVF template resides, and then choose Next.
On the Review details page, review the information about the OVF template, and then choose Next.
The appliance can be deployed with a size of 5.9 GB for thin provisioning, and 299.0 GB for thick provisioning. For a production environment, I recommend the thick provisioning option.
On the Select name and folder page, specify the appliance name and the location for the deployment.
On the Select a resource page, select the cluster, host, vAPP or the resource pool in which you want to deploy the OVF template.
On the Select storage page, choose Thick Provisioned Lazy Zeroed from the virtual disk format and select the datastore on which you need to deploy the OVF template.
On the Setup networks page, select a network from the Destination drop-down menu to set up the network mapping, and then choose Next.
On the Ready to complete page, review all the configuration settings, select Power on after deployment, and then choose Finish.
Before you configure the connector, make sure that the Server Migration Connector is able to resolve vCenter, and ESXi hosts FQDN.
For any required reconfiguration for network settings, log into the connector appliance console and follow the Advanced Network Configuration guide.
Configuring the Connector
In a web browser, access the Connector VM at its IP address to open the setup wizard.
Choose Get started now.
Review the license agreement, select the check box if you agree to the terms, and then choose Next.
Create a password for the Connector.
On the Network Info page, review the network information and then choose next.
Review and determine if you want to Upload logs automatically and participate in AWS Server Migration Service auto-upgrade.
For AWS Region, choose the desired region from the list.
For AWS Credentials, enter the IAM Access Key and Secret key of the IAM user created in the prerequisite steps.
For vCenter Service Account, enter the vCenter hostname, username, and password.
After accepting the vCenter certificate, complete the registration and view the Connector configuration dashboard.
Verify that the connector you registered shows up on the Connectors page.
The Connectors page is divided into four sections:
- The AWS Server Migration Service section provides settings you can edit, such as AWS access key, secret access key, and vCenter logins.
- The General Health section displays the health check and connectivity status.
- The Actions section lets you change the SMS administrator password and unregister the connector. If you want to ensure you always have the latest update, enable the auto-upgrade action.
- The Support section lets you download the logs, report an issue, or review the documentation.
Now you are ready to import your server inventory and orchestrate and automate your migration events.
Importing the Server Catalog
Once a connector is installed and properly registered, go to the AWS SMS console and choose Connectors, Import server catalog to gather your complete list of servers. It may take some time for your server catalog to be fully populated and displayed in the table.
Note: You can re-import or clear the server catalog at any time.
Creating a Migration Job
Before you initiate a migration job, make sure that you have enough space in the datastore for the temporary snapshots, and confirm that the selected VM doesn’t have any ISO attached to it.
In the AWS SMS console, choose Replication jobs, Create replication job, and follow the wizard.
Select the servers you want to replicate from the table, and then choose Next.
Select the license type for the AMIs that will be created from the replication job. Linux servers can only use Bring Your Own License (BYOL), and Windows servers can use either AWS-provided licenses or BYOL. When you’re done, choose Next.
Configure the replication job settings, and then choose Next. You can have replication runs start immediately or schedule them to start at a later date and time, up to 30 days from the current time.
You can choose the replication frequency by selecting the desired option from Replicate server every ‘drop down’ list. The minimum replication frequency is 12 hours, and the maximum is 24 hours. This means that you can have a point-in-time replica for your selected servers every 12 hours, at a minimum.
Review your settings. If the settings are correct, choose Create. If they are not, choose Previous to go back to the appropriate pages and change the settings.
In the AWS SMS console, Replication Jobs page, you can view all your replication jobs. When you select a single replication job, the Job details panel displays the details of the replication job.
As you can see from the previous screenshot, the migration started and is in the second stage, where the VMDK is uploaded to Amazon S3.
If you check the migration task status from the vCenter window, you can see that the snapshot initiated and the OVF template was exported for the transfer.
After the transfer, the migration process moves to the third stage to convert the VMDK to an Amazon Elastic Block Store (Amazon EBS) snapshot.
Once the conversion is complete, the migration process moves to the last stage to create an AMI for the point-in-time copy of this replication run.
You can view all the available AMIs for each replication run from the Replication jobs, Run history tab of the AWS SMS console.
Testing Before the Actual Cutover
You have the opportunity to test your application before decommissioning the on-premises application. Depending on the replication frequency, you can test many point-in-time replicas and then schedule the last replication job for the deltas.
To launch an instance, Open the Run history as indicated in the previous step, select the replication job and choose Launch instance for the instance you wish to test. Follow the wizard to choose the instance type, configure the instance, add storage, tag the instance, and configure the security group.
When you are done with testing and decide to do the actual cutover, quiesce all the IOPs, initiate the last incremental replication job immediately, and then launch the AMI. Since AWS SMS uses incremental replication, the cutover time will be at a minimum, depending on the changes from the previous replication run.
Deleting a Replication Job
Once the migration completes successfully and the migrated VMs are configured and running properly, you can delete the replication job to stop replication from your on-premises data center to AWS. On the Replication jobs page of the AWS SMS console, choose your job, and then choose Actions, Delete replication job.
In this post, I covered the benefits and features of the AWS Server Migration Service. I also demonstrated how to install and configure the SMS Connector and explained the four stages of the migration process to move your production workload from an on-premises data center to AWS with minimal downtime. I also discussed the ability to test several point-in-time replicas before actual cutover.
If you have comments about this blog post, please submit them in the comments section. I look forward to hearing from you.
For more information on getting started with the AWS Service Migration Service, visit our website.