Migrating VMs with Migrate for Compute Engine: Building your foundation

This document helps you build a foundation for the VMs in your source environment that you migrate to Google Cloud by using Migrate for Compute Engine. Migrate for Compute Engine lets you migrate virtual machines (VM) from a source environment to Google Cloud. Your source environment might be running in an on-premises environment, in a private hosting environment, or in another cloud provider.

This document is part of a multi-part series about migrating to Google Cloud. If you're interested in an overview of the series, see Migration to Google Cloud: Choosing your migration path.

This article is part of a series:

This document is useful if you're planning to build a foundation to migrate VMs from a supported source environment to Compute Engine with Migrate for Compute Engine. These source environments can include the following:

In the planning phase of the migration framework, you provision and configure the infrastructure and services that support your workloads on Google Cloud.

The tasks to build a foundation for Migrate for Compute Engine in the source environment and in Google Cloud include the following:

  1. Build the foundation on Google Cloud.
    1. Provision the resource hierarchy.
    2. Set up network access.
    3. Configure Cloud APIs, Identity and Access Management (IAM) roles, and service accounts.
    4. Configure Migrate for Compute Engine Manager.
  2. Prepare the source environment.
    • Prepare your VMware environment.
    • Prepare your Amazon Web Services (AWS) environment.
    • Prepare your Azure environment.
  3. Set up Cloud Extensions.
  4. Set up logging, monitoring, and alerting.

Terminology

The following terms are important for understanding a VM migration that uses Migrate for Compute Engine.

  • Migrate for Compute Engine Manager is a Compute Engine VM that manages all other Migrate for Compute Engine components and orchestrates VM migrations. You use the Migrate for Compute Engine Manager to control your migrations.
  • Infrastructure project is a Google Cloud project where you deploy the Migrate for Compute Engine Manager.
  • Cloud Extensions are deployed on Google Cloud to handle storage migrations and to serve data to migrated workloads during migrations.
  • Cloud Edge nodes are deployed on Google Cloud and are part of Cloud Extensions. Each Cloud Extension has two Cloud Edge nodes.
  • Migrate for Compute Engine Exporter creates Persistent Disks when you detach the VM from your source environment.
  • Waves organize the VMs to migrate in batches to avoid a single, high-risk migration.

The following terms are important if you migrate from an on-premises environment:

  • Migrate for Compute Engine On-Premises Backend is a virtual appliance that connects to VM disks in your on-premises environment and streams or migrates the data in disks by using Cloud Extensions.
  • Migrate for Compute Engine VMware vCenter Web Client Plugin is a VMware vCenter plugin that connects vCenter to the Migrate for Compute Engine Manager. This plugin lets you manage and monitor Migrate for Compute Engine operations in vCenter.
  • Backend token is a string that you generate from Migrate for Compute Engine. The Migrate for Compute Engine Backend asks for this token during configuration.

The following terms are important if you migrate from an Azure VMs or AWS EC2 environment:

  • Migrate for Compute Engine Importer is a VM that serves data from Azure disks or Amazon Elastic Block Store (Amazon EBS) volumes to Cloud Extensions.
  • Cloud Details objects represent cloud environments as sources for the migration.

Building the foundation on Google Cloud

To build a foundation for Migrate for Compute Engine in your Google Cloud environment, you do the following:

  1. Provision the resource hierarchy.
  2. Set up the network access.
  3. Provision IAM roles and service accounts with Migrate for Compute Engine Manager.
  4. Prepare the source environment.

Provision the resource hierarchy

To provision Migrate for Compute Engine resources, you first create a resource hierarchy in your Google Cloud environment.

If you don't yet have an Organization, you can create an Organization, and then you can create a project in your Organization. If you need to group related projects, you can create folders. For example, you can create a migrate-for-compute-engine folder to host the projects that contain Migrate for Compute Engine resources.

After provisioning a resource hierarchy, you create the infrastructure project where you deploy the Migrate for Compute Engine Manager.

Set up network access

The second task in the plan phase for Migrate for Compute Engine is to set up network connectivity and access between the source and destination environments:

  1. Set up a Virtual Private Cloud (VPC) on Google Cloud.
  2. Create the network tags for each Migrate for Compute Engine VM, including the Migrate for Compute Engine Manager VMs, the Migrate for Compute Engine Cloud Extension VMs, and the VMs that host your workloads. For example, you might add the fw-migration-manager tag to the Migrate for Compute Engine Manager VMs. For a complete list of network tags, see Steps to set up network access.
  3. Create firewall rules to allow traffic between the VMs in your source and target environments by using the network tags you created. Firewall rules list all the rules that you need to configure in the source environment and the destination environment. For more information about firewalls, see the Virtual Private Cloud firewall documentation, AWS VPC firewall documentation, Azure VPC firewall documentation, and your firewall vendor documentation. Also, you can configure firewall rules that are not required for migrations, but that let you connect to the Migrate for Compute Engine Manager to receive logs.
  4. Apply the network tags as metadata attached to the VMs that you deploy as part of your Migrate for Compute Engine environment. You tag the VMs where you deployed Migrate for Compute Engine Manager, Cloud Extensions. You also tag the VMs that you're migrating with Migrate for Compute Engine.
  5. Configure any additional network routes to carry traffic between networks.

Configure Cloud APIs, IAM roles, and service accounts

To provision and configure the resources that Migrate for Compute Engine needs, such as Cloud APIs, IAM roles, and service accounts, you configure the Migrate for Compute Engine Manager.

To configure Migrate for Compute Engine Manager, you need the following IAM roles:

  • Organization role administrator to administer Migrate for Compute Engine roles in the organization and the projects in that organization.
  • Organization administrator to administer all resources that belong to the organization.
  • Compute admin to grant full control over Compute Engine resources.
  • Owner to grant full control over projects.

You deploy Migrate for Compute Engine Manager from the Google Cloud Marketplace in the infrastructure project.

After deploying the Migrate for Compute Engine Manager, you enable and configure logging and the gathering of usage and performance metrics.

Preparing the source environment

Migrate for Compute Engine can migrate from the following source environments:

To prepare a source environment for Migrate for Compute Engine, you do the following:

  1. Verify that the source environment meets the Migrate for Compute Engine requirements.
  2. Configure the source environment as a migration source for Migrate for Compute Engine.

Prepare your VMware environment

Migrate for Compute Engine can migrate from VMware vCenter Server and VMware ESXi source environments. To prepare your VMware environment, do the following:

  1. Verify that your VMware vCenter Server or VMware ESXi versions are compatible with Migrate for Compute Engine.
  2. Verify that you have the necessary permissions in the VMware environment.

  3. Create a backend token in the Migrate for Compute Engine Manager to configure the Migrate for Compute Engine On-Premises Backend on vSphere.

  4. Deploy and configure the Migrate for Compute Engine On-Premises Backend in your VMware environment to enable connections to your VM disks and to stream data to Google Cloud.

  5. Configure the Migrate for Compute Engine service role and permissions in VMware vCenter Server to allow Migrate for Compute Engine to access your VMs for the migration.

  6. Register the VMware vCenter environment and Migrate for Compute Engine vCenter plugin to manage and monitor Migrate for Compute Engine Manager from VMware vCenter.

If you don't need to prepare other source environments, you can skip to the section about setting up Cloud Extensions . Otherwise, you can learn how to prepare your AWS or Azure environments.

Prepare your AWS environment

Migrate for Compute Engine supports Amazon EC2 as a source environment. To prepare your AWS environment, do the following:

  1. Create an AWS Identity and Access Management (IAM) group for Migrate for Compute Engine.
  2. Create an AWS IAM user account for Migrate for Compute Engine and add it to the Migrate for Compute Engine AWS IAM group.

  3. Define cloud credentials for AWS APIs in the Migrate for Compute Engine Manager so that Migrate for Compute Engine can use AWS APIs during the migration.

  4. Create a Cloud Details object for AWS migrations to represent your AWS environment as a migration source.

If you don't need to prepare other source environments, you can skip to the section about setting up Cloud Extensions. Otherwise, you can learn how to prepare your Azure environment.

Prepare your Azure environment

Migrate for Compute Engine can migrate from Azure VMs as a source environment. To prepare your Azure environment, do the following:

  1. Prepare a runtime environment for the Azure configuration script.
  2. Run the Azure configuration script to configure the Azure roles and permissions that Migrate for Compute Engine needs for the migration from Azure.
  3. Define cloud credentials for Azure APIs in the Migrate for Compute Engine Manager so that Migrate for Compute Engine can use Azure APIs during the migration.
  4. Create a Cloud Details object for Azure migrations to represent your Azure environment as a migration source.

Setting up Cloud Extensions

To transfer VM storage data from the source environment to Google Cloud, you provision and configure Cloud Extensions. For example, if you're migrating from a VMware environment or from another public cloud environment, a Cloud Extension is a connection between that environment and your Google Cloud environment to move VM storage data.

Before setting up a Cloud Extension, do the following:

  1. Determine how many Cloud Extensions that you need. Each Cloud Extension supports up to 50 concurrent VMs, depending on the Cloud Extension size.
  2. Ensure that your project meets the Persistent Disk quota size requirements.

Migrate for Compute Engine reuses Cloud Extensions across waves, so you don't need to set up Cloud Extensions to migrate all your VMs at once. For example, if you need to migrate 1,000 VMs from your source environment to Google Cloud across 4 waves, you set up 5 Cloud Extensions, each supporting 50 VMs per wave.

After deciding how many Cloud Extensions you need, set them up from the Migrate for Compute Engine Manager.

Setting up logging, monitoring, and alerting

Having a clear picture of your migration performance is key for successfully completing the migration and to reduce the risks of your migration failing.

Migrate for Compute Engine is integrated with the Google Cloud operations suite so you get the following logging and monitoring information about Migrate for Compute Engine components during the migration:

  1. Inspect metrics about Migrate for Compute Engine components with Cloud Monitoring. For example, you can get information about network performance and the disk usage of Migrate for Compute Engine components.
  2. Configure alerts for timely awareness of migration problems with Cloud Monitoring.
  3. Diagnose issues with Migrate for Compute Engine to access logs with Cloud Logging. For example, you can read Migrate for Compute Engine Manager logs and Cloud Extension nodes logs.

Also, you can check the health of Migrate for Compute Engine components by using the Migrate for Compute Engine Manager health check feature. For example, you can check if the Migrate for Compute Engine Manager is able to connect to the Migrate for Compute Engine Backend.

What's next