This document helps you build a foundation for the VMs in your source environment that you migrate to Google Cloud by using Migrate to VMs. Migrate to VMs 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:
- Migrating VMs with Migrate to VMs: Getting started
- Migrating VMs with Migrate to VMs: Building your foundation (this document)
- Migrating VMs with Migrate to VMs: Migrating your VMs
- Migrating VMs with Migrate to VMs: Best practices
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 to VMs. These source environments can include the following:
- A VMware vSphere environment
- A Microsoft Azure VM environment
- An Amazon Elastic Compute Cloud (Amazon EC2) environment
- Physical servers and VMs running an operating system that Google Cloud supports
The tasks to build a foundation for Migrate to VMs in the source environment and in Google Cloud include the following:
- Build the foundation on Google Cloud.
- Provision the resource hierarchy.
- Set up network access.
- Configure Cloud APIs, Identity and Access Management (IAM) roles, and service accounts.
- Configure Migrate to VMs Manager.
- Prepare the source environment.
- Prepare your VMware environment.
- Prepare your Amazon Web Services (AWS) environment.
- Prepare your Azure environment.
- Set up Cloud Extensions.
- Set up logging, monitoring, and alerting.
The following terms are important for understanding a VM migration that uses Migrate to VMs.
- Migrate to VMs Manager is a Compute Engine VM that manages all other Migrate to VMs components and orchestrates VM migrations. You use the Migrate to VMs Manager to control your migrations.
- Infrastructure project is a Google Cloud project where you deploy the Migrate to VMs 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 to VMs VMware vCenter Web Client Plugin is a VMware vCenter plugin that connects vCenter to the Migrate to VMs Manager. This plugin lets you manage and monitor Migrate to VMs operations in vCenter.
- Backend token is a string that you generate from Migrate to VMs. The Migrate to VMs 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 to VMs in your Google Cloud environment, you do the following:
- Provision the resource hierarchy.
- Set up the network access.
- Provision IAM roles and service accounts with Migrate to VMs Manager.
- Prepare the source environment.
Provision the resource hierarchy
To provision Migrate to VMs resources, you first create a resource hierarchy in your Google Cloud environment.
If you don't yet have an
create an Organization,
and then you can create a
in your Organization. If you need to group related projects, you can create
For example, you can create a
migrate-for-compute-engine folder to host the
projects that contain Migrate to VMs resources.
After provisioning a resource hierarchy, you create the infrastructure project where you deploy the Migrate to VMs Manager.
Set up network access
The second task in the plan phase for Migrate to VMs is to set up network connectivity and access between the source and destination environments:
- Set up a Virtual Private Cloud (VPC) on Google Cloud.
- Create the
for each Migrate to VMs VM, including the
Migrate to VMs Manager VMs, the
Migrate to VMs Cloud Extension VMs, and the VMs that
host your workloads. For example, you might add the
fw-migration-managertag to the Migrate to VMs Manager VMs. For a complete list of network tags, see Steps to set up network access.
- 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 to VMs Manager to receive logs.
- Apply the network tags as metadata attached to the VMs that you deploy as part of your Migrate to VMs environment. You tag the VMs where you deployed Migrate to VMs Manager, Cloud Extensions. You also tag the VMs that you're migrating with Migrate to VMs.
- Configure any additional network routes to carry traffic between networks.
Configure Cloud APIs, IAM roles, and service accounts
To configure Migrate to VMs Manager, you need the following IAM roles:
- Organization role administrator to administer Migrate to VMs 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 to VMs Manager from the Google Cloud Marketplace in the infrastructure project.
After deploying the Migrate to VMs Manager, you enable and configure logging and the gathering of usage and performance metrics.
Preparing the source environment
Migrate to VMs can migrate from the following source environments:
To prepare a source environment for Migrate to VMs, you do the following:
- Verify that the source environment meets the Migrate to VMs requirements.
- Configure the source environment as a migration source for Migrate to VMs.
Prepare your VMware environment
Migrate to VMs can migrate from VMware vCenter Server and VMware ESXi source environments. To prepare your VMware environment, do the following:
- Verify that your VMware vCenter Server or VMware ESXi versions are compatible with Migrate to VMs.
Verify that you have the necessary permissions in the VMware environment.
Create a backend token in the Migrate to VMs Manager to configure the Migrate to VMs On-Premises Backend on vSphere.
Deploy and configure the Migrate to VMs On-Premises Backend in your VMware environment to enable connections to your VM disks and to stream data to Google Cloud.
Configure the Migrate to VMs service role and permissions in VMware vCenter Server to allow Migrate to VMs to access your VMs for the migration.
Register the VMware vCenter environment and Migrate to VMs vCenter plugin to manage and monitor Migrate to VMs Manager from VMware vCenter.
Prepare your AWS environment
Migrate to VMs supports Amazon EC2 as a source environment. To prepare your AWS environment, do the following:
- Create an AWS Identity and Access Management (IAM) group for Migrate to VMs.
Create an AWS IAM user account for Migrate to VMs and add it to the Migrate to VMs AWS IAM group.
Define cloud credentials for AWS APIs in the Migrate to VMs Manager so that Migrate to VMs can use AWS APIs during the migration.
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 to VMs can migrate from Azure VMs as a source environment. To prepare your Azure environment, do the following:
- Prepare a runtime environment for the Azure configuration script.
- Run the Azure configuration script to configure the Azure roles and permissions that Migrate to VMs needs for the migration from Azure.
- Define cloud credentials for Azure APIs in the Migrate to VMs Manager so that Migrate to VMs can use Azure APIs during the migration.
- 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:
- Determine how many Cloud Extensions that you need. Each Cloud Extension supports up to 50 concurrent VMs, depending on the Cloud Extension size.
- Ensure that your project meets the Persistent Disk quota size requirements.
Migrate to VMs 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 to VMs 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 to VMs is integrated with the Google Cloud operations suite so you get the following logging and monitoring information about Migrate to VMs components during the migration:
- Inspect metrics about Migrate to VMs components with Cloud Monitoring. For example, you can get information about network performance and the disk usage of Migrate to VMs components.
- Configure alerts for timely awareness of migration problems with Cloud Monitoring.
- Diagnose issues with Migrate to VMs to access logs with Cloud Logging. For example, you can read Migrate to VMs Manager logs and Cloud Extension nodes logs.
Also, you can check the health of Migrate to VMs components by using the Migrate to VMs Manager health check feature. For example, you can check if the Migrate to VMs Manager is able to connect to the Migrate to VMs Backend.
- Migrating VMs with Migrate to VMs: Migrating your VMs.
- Explore reference architectures, diagrams, tutorials, and best practices about Google Cloud. Take a look at our Cloud Architecture Center.