Migration & Modernization

Export AWS Migration Hub data for Import into AWS Application Migration Service

AWS Application Discovery Service (ADS) discovers servers in preparation for a migration to AWS. ADS performs discovery via importing data from existing sources or by deploying Discovery Agents or the Agentless Collector which collect server performance and network communication data. This data is sent to AWS Migration Hub where the servers can be organized into application groups. An important part of the mobilize phase of a migration is to group servers into migration waves and to get Amazon Elastic Compute Cloud (Amazon EC2) sizing recommendations based on the performance metrics observed by ADS. Migration waves can be configured within Migration Hub.

In this post I demonstrate how to build a migration plan including migration waves, generate Amazon EC2 instance recommendations, and export the data from Migration Hub. Following that, I will demonstrate how to import the data into AWS Application Migration Service (AWS MGN)

The data collected by ADS and organized within Migration Hub can be exported for use by AWS MGN. AWS MGN is the migration execution service. It replicates the data from your source servers into AWS and automates the conversion of your source servers to run natively on AWS as Amazon EC2 instances with Amazon Elastic Block Store volumes. By importing Migration Hub data into AWS MGN, the migration can be run according to the specified applications and waves and the Amazon EC2 instances launched by AWS MGN match the Amazon EC2 instance recommendations generated using ADS performance metrics.

This post assumes servers are already present in Migration Hub.

Group servers into migration waves

A migration wave is a collection of applications and infrastructure that have technical and nontechnical dependencies that require the group is migrated at the same time. Migration Hub allows you to group servers into applications and define migration waves which are a collection of applications.

Use the following steps to create migration waves.

  1. From the Applications menu within Migration Hub select the application you wish to assign to a Wave.
Figure 1 - Screenshot of Application menu within Migration Hub highlighting application selection

Figure 1 – Screenshot of Application menu within Migration Hub highlighting application selection

  1. For the selected application select the pencil icon to input a Wave ID. All applications with the same Wave ID will then be grouped into a Wave within AWS MGN.
Figure 2 - Screenshot of editing the Wave ID

Figure 2 – Screenshot of editing the Wave ID

Export data and Amazon EC2 instance recommendations from Migration Hub

Amazon EC2 instance recommendations are used to select the least expensive Amazon EC2 instance type that can handle the existing performance requirements. The data used to generate these recommendations is actual utilization metrics collected by ADS or manually imported performance details added into Migration Hub.

Use the following steps to export these recommendations.

  1. From the Applications menu within Migration Hub select the applications you wish to produce recommendations for.
Figure 3 - Screenshot of selecting Applications for Amazon EC2 Instance Recommendations

Figure 3 – Screenshot of selecting Applications for Amazon EC2 Instance Recommendations

  1. Use the Actions menu and choose Get EC2 recommendations.
  2. Choose a Sizing preference. If you have used the Discovery Agent or Agentless Connector you can use Percentile of utilization which is based on time-series utilization data. Select a Region, Tenancy and Pricing model.
Figure 4 - Screenshot of instance recommendations options

Figure 4 – Screenshot of instance recommendations options

  1. You can add or remove servers or applications from the export.
  2. Choose Export recommendations to create the export.

A zip file is downloaded. Within the zip file there are two CSV files

  • EC2InstanceRecommendations-#### Contains your EC2 instance recommendations and server details.
  • MgnInventory-#### – Contains the data which can be used import into AWS MGN.

Import servers in AWS MGN

The MgnInventory-#### CSV file can be imported into AWS MGN.

The application information is translated into an Application resource in AWS MGN and it groups all the servers that belong to it. The wave information is translated into a Wave resource in AWS MGN and it groups all the applications that belong to it. Both the wave and the applications allow AWS MGN users to perform bulk operations on multiple servers and get an aggregated monitoring view of the migration status.

The rest of the information is used to populate EC2 launch templates and are applied to the Amazon EC2 instances that are launched for test and cutover purposes. This includes the instance type and the subnet.

You can enable Transfer server tags so that VMware specific attributes like vmname and vmmoref are added as tags to the migrated Amazon EC2 instances.

Take note of the following fields within the CSV.

  • mgn:server:user-provided-id – To avoid duplicates during the import the initial value in this field is a concatenation of the hostname and the server ID within Migration Hub. You may modify this field to a value you choose. This ID must match the ID used when the AWS Replication Agent is installed.

    During agent installation the default ID is the hostname of the source server. The installation parameter –user-provided-id can be used to override the default ID. See Linux and Windows installation instructions how to use the installation parameters.

  • mgn:wave:name – The value in this field contains the wave you configured within Migration Hub.
  • mgn:app:name – The value in this field contains the application you grouped this server in within Migration Hub.
  • mgn:launch:instance-type – The value in this field contains instance type which has been recommended.
  • mgn:launch:nic:0:private-ip:0 – The value in this field is used to set the IP address of the migrated server. The export from Migration Hub sets this value to the current IP address of the source server to use the same IP address in AWS. If the migrated server is going into an Amazon Virtual Private Cloud (Amazon VPC) with a different IP range this field should be cleared.

Use the following steps to import the data into AWS MGN.

  1. From the Import menu within AWS MGN select Choose file to import the CSV which you downloaded from Migration Hub.
Figure 5 - Screenshot of how to choose file within import menu of AWS MGN

Figure 5 – Screenshot of how to Choose file within import menu of AWS MGN

  1. Select the CSV file downloaded from Migration Hub.
  2. Choose Import
  3. Use Import history to track the status of the import operation.

The servers from Migration Hub along with the Wave configuration and Amazon EC2 instance type recommendations have now been added to AWS MGN.

Figure 6: Screenshot of Waves imported from Migration Hub within AWS MGN

Figure 6: Screenshot of Waves imported from Migration Hub within AWS MGN

Conclusion

AWS Migration Hub with AWS Application Discovery Service (ADS) can be used to discover, plan and execute migrations to AWS. ADS is used to gather performance metrics important for Amazon EC2 instance type recommendations. Migration Hub is used to group servers into applications and waves which define the applications that must be migrated together. The data gathered during the discovery and planning can be fed into the execution phase of a migration using the export generated within Amazon EC2 Instance Recommendations. The export is in a format which can be directly imported into AWS Application Migration Service (AWS MGN), the migration execution service. AWS MGN sets up the applications, migration waves, and instance type configurations according to the export from Migration Hub.

Learn more about the features of Migration Hub and AWS Application Migration Service