This topic describes how to migrate a VMware virtual machine (VM) from an on-premises host or storage device to Alibaba Cloud by using the Hybrid Backup Recovery (HBR) console.

Prerequisites

You have read the limits on the operating system and VMware platform of the ECS instance. For more information, see Limits.

Background information

HBR provides non-intrusive, agentless, and full-copy migration for VMware VMs. HBR migrates data by using VMware VM snapshots and reading data from disks. These features allow you to migrate all the data that is stored on the disks of a VMware VM to the disks of an ECS instance.

Step 1: Create a migration gateway

  1. Log on to the HBR console.
  2. In the left-side navigation pane, choose Migration > VMware VM Migration.
  3. In the top navigation bar, select a region.
  4. In the upper-right corner of the VMware VM Migration page, click Create Migration Gateway.
    Note You can create only one migration gateway in one region.
  5. In the Create Migration Gateway panel, set the following parameters and click Create.
    Parameter Description
    Gateway Name The name of the migration gateway. The name must be 1 to 64 characters in length.
    VMware Platform The software platform of the VMware VM from which you want to migrate data. Select On-premise vSphere from the drop-down list.
    Network Type
    • Select VPC if the gateway transmits data over an Express Connect circuit.
    • Select Internet if no VPCs are available.
    Use HTTPS Specifies whether to use HTTPS to transmit encrypted data that is stored in a backup vault. To ensure data security during transmission, we recommend that you transmit data over HTTPS. If you modify the setting of this parameter, the modification takes effect on the next migration job.
  6. In the Create Migration Gateway panel, click Download Gateway and Download Certificate.
    Note The backup client is used to connect your VM to HBR. The certificate is used to activate the client. You can also download the client and the certificate from the client list.

Step 2: Install the backup client

After you download the client and the certificate, install the client on the VM. After the client is installed, you can use the client to run migration jobs. To install the client, perform the following steps:

  1. Log on to the vSphere Web Client.
  2. In the left-side navigation pane, right-click the VM and select Deploy OVF Template from the shortcut menu. OVF
    Note For more information, see Deploying OVF and OVA Templates.
  3. Deploy an OVF template.
    1. In the Deploy OVF Template dialog box, select Local file. Click Browse, select the client template that you downloaded, and then click Next.
      Select template
    2. Enter the name of the Open Virtual Format (OVF) template, select the location where you want to deploy the template, and then click Next.
      Select name and location
    3. Select the location where you want to run the deployed template and click Next.
      Select a resource
    4. Verify the template details and click Next.
      View details
    5. Select the format of the virtual disk, select a storage resource to which you want to store the files of the deployed template, and then click Next.
      Select storage
    6. Select a destination network for each source network and click Next.
      Select networks
    7. Configure the required deployment properties for the software solution and click Next.
      Customize template
    8. Review the configuration data, and click Finish.
      Review configuration data
    View the progress of each deployment task in the Recent Tasks section. Recent tasks
  4. After the deployment tasks are completed, start the VM on which the OVF template is deployed. Open a browser, and enter http://hostname:8011 in the address bar.
    Note The value of hostname is the IP address of the VM on which the OVF template is deployed.
  5. On the Register page, configure the parameters and click Register to log on to the HBR gateway. The following table describes the parameters.
    Parameter Description
    AccessKey ID The AccessKey ID and AccessKey secret of the Alibaba Cloud account or RAM user. We recommend that you use the AccessKey ID and AccessKey secret of a RAM user. For more information, see How can I create an AccessKey pair for a RAM user?.
    AccessKey Secret
    Certificate The certificate that you downloaded from the HBR console. If a VM remains in the shutdown state for more than five days after you use the certificate to activate the client on the VM, the certificate becomes invalid. In this case, you must download a new certificate to reactivate the client.
    After you activate the client, click OK to go to the HBR console.

Step 3: Add a vCenter Server

  1. Log on to the HBR console.
  2. In the left-side navigation pane, choose Migration > VMware VM Migration.
  3. In the top navigation bar, select a region.
  4. On the Migration Gateway tab, find the migration gateway and click View in the Actions column.
  5. In the upper-right corner of the Managed vCenter page, click Add vCenter Server.
  6. In the Add vCenter Server panel, set the Server IP Address, Username, and Password parameters. Then, click Create.

    A vCenter Server may fail to be added if the password contains the following special characters:

    ` ^ ~ = ; ! / ( [ ] { } @ $ \ & # % +

    Note We recommend that you create a vCenter Server account that is dedicated for backup. We recommend that you use periods (.) instead of other special characters in the password of the account.

Step 4: Migrate the VMware VM

  1. On the Migration Gateway tab, find the migration gateway and click View in the Actions column.
  2. On the Managed vCenter Servers page, click Migrate in the Actions column.
    vCenter
  3. In the Create Migration Plan panel, set parameters in the Migration Plan step and click Next. The following table describes the parameters.
    plan
    Parameter Description
    Migration Plan Name The name of the migration plan. If you do not configure this parameter, a random name is specified for the migration plan.
    Migration Plan The migration plan. Valid values: Right Now and On Schedule.

    If you select On Schedule, you must set the Start Time parameter. The value is accurate to seconds.

    Force silent snapshots
    • If you select this check box, HBR uses quiesced snapshots to migrate data. If quiesced snapshots are unavailable, the backup fails.
    • If you clear this check box, HBR attempts to use quiesced snapshots to migrate data. If quiesced snapshots are unavailable, HBR uses common snapshots to migrate data. By default, this check box is cleared.
    Enable Incremental Sync Specifies whether to enable incremental migration.

    If you enable incremental migration, you must set the Incremental Sync Frequency parameter. Valid units: hours, days, and weeks.

    Note
    • If Change Block Tracking (CBT) is disabled for the VM, HBR migrates full data instead of migrating incremental data.
    • If you enable incremental migration, HBR automatically creates an image to test whether workloads can be switched to the destination. The cost of the image is included in ECS bills instead of HBR bills. For more information, see Overview.
  4. In the Select VMs to Migrate step, select the source VM and click Next.
    Select the VM that you want to migrate
  5. On the ECS Configuration tab, configure an ECS instance for each source VM.
    Create a migration plan
    1. In the left pane, select the source VM that you want to configure.
    2. In the right pane, configure an ECS instance for the source VM.
      Notice Make sure that the security group allows outbound data transfer over TCP port 80, TCP port 443, and UDP port 53.
      Parameter Description
      VPC Select the VPC where the ECS instance resides from the VPC drop-down list.
      VSwitch Select the vSwitch of the VPC from the VSwitch drop-down list.
      Instance Type The type of the ECS instance.
      Instance Family The specifications of the ECS instance.
      Storage Type The storage type of the ECS instance. Valid values:
      • Ultra Disk
      • Standard SSD
      Security Group From the Security Group drop-down list, select the security group that you want to use to create the ECS instance.
      IP Address Type The IP address of the ECS instance.
      • DHCP: The system assigns a dynamic IP address to the ECS instance.
      • Static: You must specify a static IP address for the ECS instance.
      IP Address This parameter is required only if the IP Address Type parameter is set to Static. You can specify a static IP address for this parameter.
      Assign Public IP Specifies whether to assign a public IP address to the ECS instance.
      Reboot After Restoration Specifies whether to start the ECS instance after data is migrated.
      Create System Image Specifies whether to create a system image.
    3. If you want to apply the configurations of ECS instances to all source VMs, click Apply to All VMs. Then, click Create.
    4. If you want to configure an ECS instance for each source VM, click Save Configuration to Current VM. Repeat the preceding two steps to configure an on-premises ECS instance for each source VM. Then, click Create.
    On the Migration Plans tab, you can view the progress of the migration job.
    If incremental migration is enabled, you can perform the following operations after the VM is migrated:
    • Click Sync Tasks in the Actions column of the migration job to view the size of the incremental data that is migrated and the migration status. syn
    • Click Create ECS Instance in the Actions column. In the dialog box that appears, select Verify Migration or Finish Migration. verification
      • If you select Verify Migration, HBR creates an ECS instance and migrates data that is generated after the last migration to the ECS instance, for example, data generated after 20:21:31, February 21, 2020. This way, you can check whether the VM runs as expected. You can verify the migration result on a VM up to three times. The verification does not interrupt incremental synchronization. After you click OK, HBR creates an ECS instance. If you click Resume Migration in the Actions column, HBR deletes the ECS instance and resumes the migration. continue
      • If you select Finish Migration, HBR creates an ECS instance and migrates data that is generated after the last migration to the ECS instance, for example, data generated after 20:21:31, February 21, 2020. HBR also stops the migration job. If you select Run an incremental synchronization task before finishing the migration job, HBR migrates data that is generated after the last incremental migration to the created ECS instance.
      Note
      • If you select Run an incremental synchronization task before finishing the migration job, more time is required to finish the migration job.
      • You are charged for the migration of the VM only the first time you verify the migration or finish the migration job. If you verify migration or finish a migration job on the same VM again, you are not charged. For more information, see Pricing.
    • To cancel the migration job, click Cancel Migration in the Actions column.

Collect logs

You can collect logs of a backup client, regardless of whether you have logged on to the HBR gateway.

  • Collect logs when you have not logged on to the HBR gateway

    To collect logs of a backup client when you have not logged on to the HBR gateway, perform the following steps:

    1. Open a browser, enter the logon address of the backup client http://hostname:8011 in the address bar, and then press Enter.
    2. In the upper-left corner of the logon page, click Diagnose.
    3. In the dialog box that appears, choose Collect Logs > Download Logs.
  • Collect logs when you have logged on to the HBR gateway

    To collect the logs of a backup client when you have logged on to the HBR gateway, perform the following steps:

    1. In the upper-right corner of the logon page, click the icon next to admin, and select Diagnose from the shortcut menu.
    2. In the dialog box that appears, choose Collect Logs > Download Logs.