Enable Migrate to Virtual Machines services

Before you can begin a migration, you must enable the Migrate to Virtual Machinesservice on Google Cloud and also enable all other Google Cloudservices required by Migrate to Virtual Machines.

Identifying your host project

Google Cloud projectsform the basis for creating, enabling, and using Google Cloud servicesincluding managing APIs, enabling billing, adding and removing collaborators,and managing permissions for Google Cloud resources.

Migrate to Virtual Machines uses the following types of projects:

  • Host project (Required)

    Use thehost project to control the migration process and optionally tohost the Compute Engine instances running your migrated workloads. Youmust create and configure a host project as described in the followingsections.

  • Target project (Optional)

    Atarget project defines the destination project for a Compute Engineinstance running your migrated VM. Yourhost project can be used as atarget project. If you want to migrate VMs to additional projects, you mustadd them as target projects to Migrate to Virtual Machines. SeeAdding a target project for more.

To enable Migrate to Virtual Machines services, you must identify theGoogle Cloud project that you want to use as thehost project:

  1. In the Google Cloud console, on the project selector page, select or create aGoogle Cloud project to use as thehost project:

    Go to the project selector page

  2. Note the name and ID of the selected project.

Installing the gcloud CLI

Install the gcloud CLI on your workstation, which also installs theGoogle Cloud CLI.gcloud is the primary CLI tool that you use to create andmanage Google Cloud resources. You can usegcloud to perform many commonplatform tasks either from the command line or in scripts and other automations.

To install the gcloud CLI:

  1. Install and initialize thegcloud CLI.

  2. Update gcloud CLI:

    gcloud components update
  3. Make sure that gcloud CLI is authorized to access your data andservices:

    gcloud auth login
  4. 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 byMigrate to Virtual Machines service. For more information about these services,seegcloud services.

Thehost project for Migrate to Virtual Machines requires that you enable thefollowing Google Cloud services:

NameTitle
vmmigration.googleapis.comMigrate to Virtual Machines API
servicemanagement.googleapis.comService Management API
servicecontrol.googleapis.comService Control API
iam.googleapis.comIdentity and Access Management (IAM) API
cloudresourcemanager.googleapis.comCloud Resource Manager API
compute.googleapis.comCompute Engine API

To enable the required services:

  1. Ensure that you have set the default project to thehost project.ReplacePROJECT_ID with the project ID of yourhost project:

    gcloud config set projectPROJECT_ID
  2. View the list of services already enabled on the project:

    gcloud services list
  3. If you don't 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
  4. You should now be able to open the Migrate to Virtual Machines page in theGoogle Cloud console:

    Go to the Migrate to Virtual Machines page

Using predefined roles

Identity and Access Management includes two predefined roles that you can use to control accessfor users in your organization:

RoleTitleDescription
roles/vmmigration.adminVM Migration AdministratorAllows users to create new Migrate to Virtual Machines sources and perform all other migration operations.
roles/vmmigration.viewerVM Migration ViewerAllows users to retrieve information about Migrate to Virtual Machines 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 viewinformation about a migration, but not be able to perform a migration, assignthem the roleroles/vmmigration.viewer.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.