Version 5.0

Migrating individual VMs

The migration process for an individual source VM occurs in the following phases:

  • Onboarding: Select the VMs to migrate.

  • Replication: Replicate data from the source VM to Google Cloud. Data replication is a continuous process that takes place in the background until the final cut over or you delete the migration.

  • Set VM target details: Configure Compute Engine settings for the migrated VM, such as the project, instance type, memory, network, and more.

  • Test-clone (optional): Create a Compute Engine clone of the source VM from the replication data and test it on Google Cloud.

  • Cut over: Migrate the source VM to Compute Engine. This process includes stopping the source VM, performing a final replication, and creating the production Compute Engine instance from the source VM.

  • Finalize: Clean up all resources consumed by the migration following a successful cut-over operation.

For a complete description of each of these phases, see VM Migration lifecycle.

This document describes the process of performing all migration phases when migrating a source VM to Google Compute Engine.

Prerequisites

Before you can migrate a source VM to Google Cloud, you must configure the migration environment on your on-premises data center and on Google Cloud. See:

Licensing

Compute Engine supports premium pay as you go (PAYG) licenses and bring your own (BYOL) licenses, based on the operating system of the source VM. PAYG licenses are billed based on the resources that you use. See Supported operating systems for details on licensing for all supported operating system.

Onboarding a VM

The first phase of migration is to onboard the source VM. For example, a vSphere data center might contain tens, hundreds, or even thousands of VMs. Onboard only the VMs that you want to migrate.

You can have up to 100 migrations in progress, meaning migrations that you have onboarded, not counting migrations in the Finalize phase.

To onboard a source VM:

  1. Open the Migrate for Compute Engine page in the Google Cloud Console:

    Go to the Migrate for Compute Engine page

  2. Select the Sources tab.

  3. From the drop-down list, select the source corresponding to the on-prem data center where you installed the Migrate Connector. The data center is referred to as a migration source.

    Below the dropdown you see the Source status of the data center as:

    • Active: The source is active and connected to Migrate for Compute Engine.
    • Offline: The source is unavailable.
    • Pending: The source is in the process of being connected and verified.
  4. A table appears showing the source VMs in the data center available for migration. Select one or more source VMs.

  5. Click Add Migration.

  6. Confirm that you want to create the migration.

    After you create a migration, the Replication status column for a VM displays one of the following:

    • Pending: VM is in the process of being onboarded.
    • Ready: VM is onboarded but not yet replicating.
  7. You can now start replication of the VMs as described in the next section.

Starting replication of the source VM

After onboarding a source VM, start replicating the disk data from the source VM to Google Cloud. This process takes place in the background with no disruption to the on-prem workload.

Data replication is comprised of two steps:

  1. First replication step: Migrate for Compute Engine creates the initial VMware snapshot of the source VM data disks and replicates the snapshot data to Google Cloud. Depending on the amount of disk data on the source VM, the first replication can take minutes or hours to complete.

  2. Incremental replication step: Following a successful first replication step, incremental replication steps occur at set time intervals (every two hours by default). In each step, a new snapshot is created for each data disk. Only data updates that occurred after the previous step are replicated to Google Cloud using the Change Block Tracking (CBT) mechanism.

To initiate replication of a source VM:

  1. Open the Migrate for Compute Engine page in the Google Cloud Console:

    Go to the Migrate for Compute Engine page

  2. Select the Migrations tab.

    A table appears showing the source VMs in the data center that you have onboarded. You can start replication on any VM in the Ready state.

  3. Select one or more source VMs.

  4. Click Migration > Start Replication.

    After you start a migration, the Replication status column for a VM displays one of the following:

    • First sync: VM is performing the first replication step.
    • Active (Current cycle: XX%): VM has performed XX% percent of the current replication step.
    • Active (Idle): VM is idle between replication steps.
  5. You can now configure a migration target for the test-clone and cut-over phases.

To pause replication:

At any time, you can pause replication for a VM. When you pause a VM, its Replication status changes to Paused.

  1. Open the Migrate for Compute Engine page in the Google Cloud Console:

    Go to the Migrate for Compute Engine page

  2. Select the Migrations tab.

    A table of available source VMs appears.

  3. Select one or more VMs.

  4. Select Pause.

    To later resume replication, select one ore more VMs and then select Resume.

To set the replication interval:

By default, Migrate for Compute Engine performs a replication of the source VM every 2 hours. To change the replication frequency:

  1. Open the Migrate for Compute Engine page in the Google Cloud Console:

    Go to the Migrate for Compute Engine page

  2. Select the Migrations tab.

    A table of available source VMs appears.

  3. Select the Info panel icon, Info panel file icon, for the VM. A panel opens to let you configure the target.

  4. Select the Migration Details tab.

  5. In the Replication policy area, set the replication frequency, in seconds.

  6. Select Save.

Configuring the target for a migrated VM

To configure a target, you perform two main steps:

  1. Add a target project. The target project is the project that contains the Compute Engine instance used to host the migrated VM.

  2. Configure the Compute Engine instance used to host the migrated VM. For both a test and a production environment, configure the target Compute Engine instance to specify:

    • Google project
    • Number of CPUs
    • Amount of memory
    • Disk size
    • many other options

This section describes how to set the initial configuration of the Compute Engine instance used to host the migrated VM. However, there are many additional settings that you can apply to a Compute Engine instance. See the Compute Engine documentation for detailed descriptions of all settings.

You can modify the target details at any time. When instantiating a Compute Engine instance for either the test-clone or cut-over phase, Migrate for Compute Engine uses the target details settings at the time of the operation.

To configure the Compute Engine target:

  1. If you have not done so already, add the target project as shown in Adding a target.

  2. Open the Migrate for Compute Engine page in the Google Cloud Console:

    Go to the Migrate for Compute Engine page

  3. Select the Migrations tab.

    A table of available source VMs appears.

  4. Select the Info panel icon, Info panel file icon, for the VM. A panel opens.

  5. Select the Migration Details tab.

  6. Set the Migration Details that define the characteristics of the Compute Engine instance used to host the migrated VM. The table below lists those settings and provides links to the Compute Engine documentation for detailed descriptions.

    Area Setting More information
    General (required) Compute Engine instance Name. This is the name of the Compute Engine instance. See Resource naming convention for the naming rules.
    Project hosting the Compute Engine instance. This must be a project you already added above.
    Zone for the Compute Engine instance. See Regions and Zones. Note: The region of the deployed instance is the one you specified when you registered the Migration Connector. See Installing the Migration Connector for more.
    Machine configuration (required) Series and Machine type. Compute Engine offers predefined series and machine types that you can use when you create an instance. Each option has a different cost. See Pricing for more.

    Note: Migrate for Compute Engine determines the OS type of the Compute Engine instance automatically based on the source VM and applies PAYG licensing to the instance. See Licensing.

    Networking (required) Network name. Specifies the VPC network that the instances will be part of.
    Subnetwork name. Specifies the subnet associated with a region. This must be a subnetwork of the specified Network.
    Networking (optional) Network tags. Tags enable you to make firewall rules and routes applicable to specific instances. See Configuring network tags.
    External IP Set to None (default) to disable external access, and to Ephemeral to allow Google Cloud to assign an IP. See Reserving a static external IP address.
    Internal IP Set to Ephemeral (Automatic) (default) to allow Google Cloud to assign an IP, Ephemeral (Custom) to set your own IP, or reserved-internal-ip (IP) to use a predefined IP. See Reserving a static internal IP address.
    Additional configuration (optional) Disk type. Specify the storage type for the instance. See Storage options.
    Service account

    Specify the service account on the target project used to run the Compute Engine instance. By default, no service account is assigned to the Compute Engine instance.

    If you plan to run an application on the Compute Engine instance that needs access to other Google Cloud services and APIs, create a service account in the target project with the necessary permissions to access those services and APIs before creating the Compute Engine instance. Then, specify that service account here. For more information, see set up a VM to run as a service account

    To attach the service account to the Compute Engine instance, your user account on the Migrate for Compute Engine host project requires the necessary permissions. See Configuring permissions on host project default service account for more.

    Labels To organize your project, add labels as key/value pairs to your resources. See Labeling resources.
  7. Select Save.

You can later edit the target details. When instantiating a Compute Engine instance for either the test-clone or cut-over phase, Migrate for Compute Engine uses the target details settings at the time of the operation.

Testing a clone of a migrating VM

In the test-clone phase, you deploy a clone of the migrated VM to a Compute Engine instance in your testing environment. While the testing phase is optional, it is a best practice to perform testing before deploying a migrated VM to production. The test-clone Compute Engine instance is created from the most recently completed replication step.

To test a VM:

  1. Ensure that you have configured a testing VM target environment as shown in Configuring VM target.

  2. Open the Migrate for Compute Engine page in the Google Cloud Console:

    Go to the Migrate for Compute Engine page

  3. Select the Migrations tab.

    A table of available source VMs appears. You can test any VM that is in the Active (Current cycle: XX%) or Active (idle) state. The Active state means the first replication sync of the VM succeeded and VM data is being incrementally replicated.

  4. Select a VM.

  5. Select Cut-Over and Test-Clone > Test-Clone. The Test-Clone/Cut-Over status column shows the status of the operation.

  6. Wait for the Test-Clone/Cut-Over status column to show Succeeded, meaning the clone was created successfully.

  7. To view the test-clone history for a VM, select the Info panel icon, Info panel file icon, for that VM.

  8. In the panel that opens from the right, select the Monitoring tab to view the history:

    View the test-clone status.
  9. To manage the running Compute Engine instance, go to the VM instances page in the Google Cloud Console:

    Go to VM instances page

    From the Google Cloud Console manage the Compute Engine instance to:

    1. Start, stop, and delete the instance.
    2. Determine the internal and external IP address of the instance.
    3. View and modify characteristics of the instance.
    4. Perform all other management tasks.
  10. Perform any validation testing or other testing on the migrated VM.

When you have completed testing you can delete the Compute Engine instance to free up resources and so that you will no longer be charged for the instance.

Cutting over

In the cut-over phase, you cut over control to your migrated VM running in a Compute Engine instance in your production environment on Google Cloud. The cut over process:

  1. If data replication is currently active, meaning the Replication status of the VM is Active (Current cycle: XX%), waits for it to complete.

  2. Shuts down the source VM.

  3. Performs the final data replication. Because replication occurs throughout all migration phases, the amount of data to replicate should not be very large.

  4. Stops replication.

  5. Creates the Compute Engine instance from the final replicated data.

The cut-over phase includes a short VM downtime and should take place during a scheduled maintenance window. You must determine the maintenance window during which you can stop the source VM and redirect traffic to the migrated VM running on Compute Engine.

To cut over:

  1. Ensure that you have configured the VM target details as shown in Configuring VM target. If the target details were previously configured for test-clone operation, you might want to edit the target details to point to a new target.

  2. Open the Migrate for Compute Engine page in the Google Cloud Console:

    Go to the Migrate for Compute Engine page

  3. Select the Migrations tab.

    A table of available source VMs appears. You can cut over any VM that is in the Active (Current cycle: XX%) or Active (idle state. The Active state means the first replication sync of the VM succeeded and VM data is being incrementally replicated.

  4. Select a source VM.

  5. Select Cut-Over and Test-Clone > Cut Over. Initiating a cut-over on a migrating VM starts the following sequence of actions performed by Migrate for Compute Engine:

    1. Shuts down the source VM.

    2. Performs the final data replication. Because continuous replication occurs throughout all migration phases, the amount of data to replicate should not be very large.

    3. Creates the Compute Engine instance hosting the migrated VM from the final replicated data.

    4. Stops data replication.

  6. Wait for the Test-Clone/Cut-Over status column to show Cut over job completed, meaning the cut over succeeded.

  7. To view the cut over history for a VM, select the Info panel icon, Info panel file icon, for that VM.

  8. In the panel that opens from the right, select the Monitoring tab:

    View the test-clone status.
  9. To manage the running Compute Engine instance, go to the VM instances page in the Google Cloud Console:

    Go to VM instances page

    From the Google Cloud Console manage the Compute Engine instance to:

    1. Start, stop, and delete the instance.
    2. Determine the internal and external IP address of the instance.
    3. View and modify characteristics of the instance.
    4. Perform all other management tasks.
  10. Perform validation test on the migrated workload.

If for any reason you want to retry cut over or roll back from cut over:

To retry cut over:

  1. Select a VM in the Cut-Over state.

  2. Select Migration > Resume Replication.

  3. Retry cut over.

To rollback from cut over:

  1. Cut over stops the original source VM in your on-premises data center, so you must start it and redirect traffic back to the source VM.

  2. If necessary, copy new data created on the Compute Engine instance so that you can write it to the source VM.

  3. Optionally delete or shutdown the Compute Engine instance running the migrated VM.

  4. Resume replication on the source VM as shown above. Replication resumes from the last snapshot taken.

  5. Retry cut over.

Finalizing a migration

The replication data used to create a Compute Engine VM is retained after cut over to allow you to resume replication from the last replication snapshot.

However, you are charged for the storage used by the replication data until you delete it in the finalize phase. Finalizing deletes all replication data and all other storage resources associated with a migrated VM.

To finalize:

  1. Open the Migrate for Compute Engine page in the Google Cloud Console:

    Go to the Migrate for Compute Engine page

  2. Select the Migrations tab.

    A table of available source VMs appears. Finalize can be performed only on VMs in the Cut-Over state.

  3. Select a source VM.

  4. Select Finalize and then confirm the finalize.

    After finalize completes, the state of the VM is set to Finalized. The only allowed operations on a migration in the Finalized state are:

    • Delete the migration
    • Add to or remove from a group

Deleting a migration

Deleting a migration removes:

  • The replication data for the VM stored on Google Cloud
  • The Compute Engine configuration information
  • The monitoring history
  • All other data associated with migrating a VM
  • The VM from the list of onboarded VMs on the Migrations tab
  • The VM from its group, if the VM is currently a member of a group

However, deleting a migration does not remove the source VM from the list of available VMs for the data center displayed on the Sources tab. That is, only the migration data for the VM is deleted. The original source VM itself is not affected when you delete a migration.That means you can later onboard the source VM again to migrate it.

To delete a migration:

  1. Open the Migrate for Compute Engine page in the Google Cloud Console:

    Go to the Migrate for Compute Engine page

  2. Select the Migrations tab.

  3. Select a source VM.

  4. Select Delete and then confirm the deletion.

    The VM is removed from the Migration table.

  5. Select the Sources tab.

  6. From the drop-down list, select the on-prem data center where you installed the Migrate Connector.

  7. A table appears showing the source VMs in the data center available for migration. Notice that the source VM corresponding to the deleted migration is still listed.

If necessary, you can restart a migration on the VM.