AWS, Azure, Cloud Computing

4 Mins Read

Migrating an Ubuntu Server from Azure to AWS using AWS MGN

Voiced by Amazon Polly

Overview

In today’s cloud-driven world, businesses often need to shift workloads across cloud platforms to take advantage of better pricing, features, or performance. Migrating an Ubuntu server from Microsoft Azure to Amazon Web Services (AWS) can seem complex, but using AWS MGN (Application Migration Service) simplifies this process.

Introduction

AWS MGN automates much of the migration process by seamlessly converting and transferring your workloads to AWS while minimizing downtime.

However, there are specific considerations to be aware of—especially concerning the Azure-customized Ubuntu kernel. This blog will guide you through migrating an Ubuntu server from Azure to AWS using AWS MGN, including addressing the challenge of the Azure kernel.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Step-by-Step Guide to Migrating from Azure to AWS with AWS MGN

  1. Prepare Azure Environment

Before migrating, ensure that your Azure environment is properly set up.

  • Access the Azure Portal and identify the Ubuntu server(s) that need to be migrated.
  • Ensure you have the credentials and access rights to the Azure and AWS environments.
  1. Understanding the Azure Kernel Limitation

One of the key challenges when migrating Ubuntu servers from Azure to AWS is that Azure uses an Azure-tuned Ubuntu kernel, which is optimized for the Azure platform. However, this kernel is not supported on AWS, meaning you must replace it with a standard Ubuntu kernel before the migration.

Steps to Replace the Azure Kernel:

  • Check the Current Kernel: Log in to your Azure Ubuntu server and check the current kernel version.

If the output contains “azure,” you use the Azure-tuned kernel.

  • Install the Generic Ubuntu Kernel: You must install the generic Ubuntu kernel compatible with AWS.
  • Update GRUB: Once the new kernel is installed, you must update the GRUB bootloader to make the generic kernel the default.
  • Reboot the Server: Reboot the server to apply the changes.
  • Verify the Kernel: After rebooting, verify that the server is now using the generic kernel by running:

The output should no longer include “azure.” You are now using a standard Ubuntu kernel compatible with AWS.

  • Set Up AWS MGN
  • Log in to AWS Console: Navigate to the AWS Management Console and search for Application Migration Service (MGN).
  • Create Source Servers:
    • In AWS MGN, go to Source Servers and click on Add Source Server.
    • You will be prompted to install the AWS MGN agent on your source server.
  • Install AWS MGN Agent on Ubuntu in Azure

You must install the AWS MGN agent on your Ubuntu server hosted in Azure to enable migration.

  • Connect to your Ubuntu server via SSH using Azure Portal or an SSH client.
  • Download and install the AWS MGN agent by running the following commands:

Replace <aws-region> with your specific AWS region (e.g., us-west-2).

  • Once installed, the agent will automatically register the server in your AWS MGN console.
  • Configure AWS MGN Settings
  • Replication Settings: In AWS MGN, go to Source Servers, and you should see your Ubuntu server listed.
    • Click on the server and configure the Replication Settings, where you can specify:
      • Data Transfer Speed
      • Disk and Network settings
      • Tags and encryption options
  • AWS MGN will now start the continuous replication process in the background. Depending on the size of your server, the initial replication may take some time.
  • Launch Test Instance in AWS

Once replication is complete, it’s recommended to launch a test instance to ensure everything is functioning as expected before performing the actual cutover.

  • In the AWS MGN console, select the source server and choose Launch Test Instance.
  • Review the instance details, such as instance type and network settings, to match your requirements.

AWS will then create a new Amazon EC2 instance based on the replicated data from the Azure server.

  • Connect to the Amazon EC2 instance to verify that it runs correctly.
  • Check for any discrepancies in the system and resolve any issues.
  • Perform Cutover to AWS

Once you’ve confirmed the test instance works correctly, you can perform the cutover, permanently moving the workload to AWS.

  • In the AWS MGN console, select the source server and choose Launch Cutover Instance.
  • Confirm the instance configurations and launch the cutover instance. This instance will be your production server in AWS.

The original server in Azure will remain unaffected until you decide to decommission it. You can now point your users and applications to the new AWS environment.

Post-Migration Steps

  • Validate Application: Test your application thoroughly on the AWS instance to ensure everything functions as expected.
  • Data Consistency: Verify that all the data on AWS is intact and up-to-date.
  • Decommission Azure Resources: Once the migration is complete, you can safely decommission the Azure resources to avoid incurring unnecessary costs.

Key Considerations

  • Azure Kernel Replacement: Remember to switch from the Azure-tuned Ubuntu kernel to the generic Ubuntu kernel, as the Azure-specific kernel is not supported on AWS.
  • Network Configuration: Ensure your Amazon VPC and security groups are properly configured to allow the necessary traffic.
  • Downtime: Minimize downtime by conducting thorough testing before cutover. MGN allows continuous data replication, ensuring the final cutover is quick and smooth.
  • Costs: Monitor Azure and AWS billing to manage the costs during the migration. AWS MGN is free for 90 days per server, but be aware of charges for running instances.

Conclusion

Migrating an Ubuntu server from Azure to AWS using AWS MGN offers a seamless and automated way to transition workloads. By following the steps outlined in this blog, you can reduce downtime, ensure data consistency, and easily shift your cloud infrastructure from Azure to AWS.

With AWS MGN, you can not only migrate but also continually optimize and scale your applications on AWS, setting the stage for a more agile and cost-effective cloud environment.

Drop a query if you have any questions regarding AWS MGN and we will get back to you quickly.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery Partner and many more.

To get started, go through our Consultancy page and Managed Services PackageCloudThat’s offerings.

FAQs

1. Is AWS MGN free to use for migrations?

ANS: – AWS MGN is free for the first 90 days per server. After that, you will incur running instances and other AWS service charges. Monitoring both Azure and AWS billing during the migration process is recommended.

2. What happens to my original Azure server after migration?

ANS: – The original Azure server remains unaffected by the migration. Once the cutover to AWS is successful, you can decommission the Azure server to avoid extra costs.

WRITTEN BY Aniket Kumar Ambasta

Aniket Kumar Ambasta works as a Research associate- TC - Infra, Security, and Migration at CloudThat. He is AWS Solutions Architect- Associate certified and has completed his Bachelor's in Computer Applications. He has good experience in Cloud technologies. Apart from professional interests, he loves exploring and learning new technologies.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!