Before you can begin a migration, you must enable the Migrate for Compute Engine service on the Google Cloud and also enable all other Google Cloud services required by Migrate for Compute Engine.
Identifying your host project
Google Cloud projects form the basis for creating, enabling, and using Google Cloud services including managing APIs, enabling billing, adding and removing collaborators, and managing permissions for Google Cloud resources.
Migrate for Compute Engine uses the following types of projects:
Host project (Required)
Use the host project to control the migration process and optionally to host the Compute Engine instances running your migrated workloads. You must create and configure a host project as described below.
Target project (Optional)
A target project defines the destination project for a Compute Engine instance running your migrated VM. Your host project can be used as a target project. If you want to migrate VMs to additional projects, you must add them as target projects to Migrate for Compute Engine. See Adding a target project for more.
To enable Migrate for Compute Engine services, you must identify the Google Cloud project that you want to use as the host project:
In the Google Cloud Console, on the project selector page, select or create a Google Cloud project to use as the host project:
Note the name and ID of the selected project.
Installing the Cloud SDK
Install the Cloud SDK on your workstation, which also installs the
gcloud command-line interface.
gcloud is the primary CLI tool that you use to create and manage Google Cloud resources.
You can use
gcloud to perform many common platform tasks either from the command line
or in scripts and other automations.
To install the Cloud SDK:
Install and initialize the Cloud SDK.
Update Cloud SDK:
gcloud components update
Make sure that Cloud SDK is authorized to access your data and services:
gcloud auth login
A new browser tab opens and you are prompted to choose an account.
Enabling required services on the host project
Within your host project, enable the Google Cloud services required by Migrate for Compute Engine service. For more information about these services, see gcloud services.
The host project for Migrate for Compute Engine requires that you enable the following Google Cloud services:
||Migrate for Compute Engine API|
||Service Management API|
||Service Control API|
||Identity and Access Management (IAM) API|
||Cloud Resource Manager API|
||Compute Engine API|
To enable the required services:
Ensure that you have set the default project to the host project. Replace PROJECT_ID with the project ID of your host project:
gcloud config set project PROJECT_ID
View the list of services already enabled on the project:
gcloud services list
If you do not see all of the required services listed, enable them:
gcloud services enable vmmigration.googleapis.com servicemanagement.googleapis.com servicecontrol.googleapis.com iam.googleapis.com cloudresourcemanager.googleapis.com compute.googleapis.com
You should now be able to open the Migrate for Compute Engine page in the Google Cloud Console:
Install the Migrate Connector.
Using predefined roles
Identity and Access Management includes two predefined roles that you can use to control access for users in your organization:
|roles/vmmigration.admin||VM Migration Administrator||Allows users to create new Migrate for Compute Engine sources and perform all other migration operations.|
|roles/vmmigration.viewer||VM Migration Viewer||Allows users to retrieve information about Migrate for Compute Engine in the Google Cloud Console. Intended for users who are performing migrations, but not setting up the system or adding new migration sources.|
For example, if you want to allow a user in your organization to be able to view
information about a migration, but not be able to perform a migration, assign them