Stay organized with collectionsSave and categorize content based on your preferences.
Amazon Linux 2 is a Linux distribution developed and
maintained by Amazon. While it can be run on other cloud platforms,
it is not supported by Amazon.
Migrate to Virtual Machines can automatically convert Amazon Linux 2 running on a VM to an operating system supported by Google Cloud. The VM is then migrated to Google Cloud.
If your VM cannot be converted, you can rebuild the VM using a Google Cloud OS image, and then transfer data from the source VM to the rebuilt VM.
To migrate your Amazon Linux 2 workloads to Google Cloud, choose one of
the available migration flows:
OS conversion: In this approach, Migrate to Virtual Machines first attempts
to convert the Amazon Linux 2 running on your VM instance to Rocky Linux 8.
If the conversion is successful, Migrate to Virtual Machines completes the
migration. This process includes the following steps:
Start thereplication of the source VM. The replication process converts and upgrades the Amazon Linux 2 OS to Rocky Linux 8 (including all installed packages), and adapts the VM to Compute Engine.
The VM boots with Rocky Linux 8. You can now set the target details, create
a test-clone and test the VM. If the VM works as expected, you can cut-over
to the VM on Google Cloud.
VM Disk migration: If you don't want to perform an automated OS conversion, or if your VM is not suitable for this process,
you can choose tomigrate your VM's disks to Persistent Disk volumeson Google Cloud. This feature helps you migrate the
workload state (VM disks) from a source VM and attach it as a Persistent Disk
volume to an existing or new VM on Google Cloud, using an officially
supported or any other base image, with minimal interruptions to the
workload.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Migrate an Amazon Linux 2 VM to Google Cloud\n\n| **Experimental**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n| **Note:** To inquire about this feature, send an email to the email address: [m2vm-amazon-linux-migration@google.com](mailto:m2vm-amazon-linux-migration@google.com).\n\nAmazon Linux 2 is a Linux distribution developed and\nmaintained by Amazon. While it can be run on other cloud platforms,\nit is not supported by Amazon.\n\nMigrate to Virtual Machines can automatically convert Amazon Linux 2 running on a VM to an operating system supported by Google Cloud. The VM is then migrated to Google Cloud.\nIf your VM cannot be converted, you can rebuild the VM using a Google Cloud OS image, and then transfer data from the source VM to the rebuilt VM.\n\nTo migrate your Amazon Linux 2 workloads to Google Cloud, choose one of\nthe available migration flows:\n| **Note:** Some VMs running Amazon Linux 2 cannot be automatically converted to Rocky Linux 8. For these VMs, we recommend that you use the VM disk migration flow to migrate your VM to Google Cloud.\n\n- **OS conversion**: In this approach, Migrate to Virtual Machines first attempts\n to convert the Amazon Linux 2 running on your VM instance to Rocky Linux 8.\n If the conversion is successful, Migrate to Virtual Machines completes the\n migration. This process includes the following steps:\n\n 1. Run the following command on your source VM. \n\n ```\n mkdir -p /etc/google/migrate/elevate_amazonlinux2_to_rocky\n ```\n 2. Start the [replication of the source VM](/migrate/virtual-machines/docs/5.0/migrate/migrating-vms#replication). The replication process converts and upgrades the Amazon Linux 2 OS to Rocky Linux 8 (including all installed packages), and adapts the VM to Compute Engine.\n\n The VM boots with Rocky Linux 8. You can now set the target details, create\n a test-clone and test the VM. If the VM works as expected, you can cut-over\n to the VM on Google Cloud.\n- **VM Disk migration** : If you don't want to perform an automated OS conversion, or if your VM is not suitable for this process,\n you can choose to [migrate your VM's disks to Persistent Disk volumes](/migrate/virtual-machines/docs/5.0/migrate/migrating-disks) on Google Cloud. This feature helps you migrate the\n workload state (VM disks) from a source VM and attach it as a Persistent Disk\n volume to an existing or new VM on Google Cloud, using an officially\n supported or any other base image, with minimal interruptions to the\n workload."]]