Migrate an Amazon Linux 2 VM to Google Cloud

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:

    1. Run the following command on your source VM.
      mkdir -p /etc/google/migrate/elevate_amazonlinux2_to_rocky
    2. Start the replication 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 to migrate your VM's disks to Persistent Disk volumes on 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.