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

Notice The VM that you want to migrate is not a Linux VM whose system disk is created on a logical volume managed by Logical Volume Manager (LVM).

The system disk of the VM has at least 1 GB of available space before migration.

Background information

HBR provides non-intrusive, agentless, and full-copy migration for data that is stored on 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.

  • Regions

    HBR allows you to migrate VMware VMs to Alibaba Cloud in multiple regions. You can log on to the HBR console to view the supported regions.

  • Operating systems

    You can use HBR to migrate VMware VMs that run the following operating systems: CentOS, Ubuntu, CoreOS, Alibaba Cloud Linux, Debian, Gentoo Linux, SUSE Linux, openSUSE, FreeBSD, Red Hat Enterprise Linux (RHEL), Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows Server 2016, Windows 7, custom Linux distributions, Mars, and NeoKylin.

  • Supported versions of Grand Unified Bootloader (GRUB)
    Before you can migrate a VMware VM, the required version of GRUB must be installed on the VM based on the operating system of the VM.
    • If the VM runs the Linux operating system, you must use GRUB V1.99 or later.
    • If the VM runs an earlier version of operating systems such as CentOS 5, Red Hat 5, and Debian 7, you must use GRUB V1.99 or later.
    • If the VM runs an operating system such as Amazon Linux, you must use GRUB V2.02 or later.

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 upper-right corner of the Migration Gateway tab, click Create Migration Gateway.
    Note You can create only one migration gateway in one region.
  4. In the Create Migration Gateway panel, set the parameters and click Create.
    The following table describes the parameters.
    Parameter Description
    Gateway Name The name of the migration gateway. The name must be 1 to 64 characters in length.
    Software Platform The software platform of the VMware VM from which you want to migrate data. Set the value to vSphere.
    Network Type
    • VPC: Select this option if you want the migration gateway to transmit data over a virtual private cloud (VPC).
    • Internet: Select this option if no VPCs are available.
    Use HTTPS Specifies whether to use HTTPS to transmit encrypted data that is stored in a backup vault. If HTTPS is used, the performance of data transmission is compromised. If you modify the setting of this parameter, the modification takes effect on the next backup or restore job.
  5. Click Download Client 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.
    Note HBR supports only vCenter Server 5.5, vCenter Server 6.0, and vCenter Server 6.5.
  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. In the Deploy OVF Template dialog box, select Local file. Click Browse, select the client template that you downloaded, and then click Next. Select the client template
  4. Enter the name of the open virtual format (OVF) or open virtual appliance (OVA) template, select the location where you want to deploy the template, and then click Next.
    Specify the name and location
  5. Select the location where you want to run the deployed template and click Next. Select a resource
  6. Verify the details of the template and click Next. View details
  7. Select the format of the virtual disk as needed, select a storage resource to store files for the deployed template, and then click Next. Select a storage resource
  8. Select a destination network for each source network and click Next.
    Select a network
  9. Specify the required deployment properties for the software solution and click Next. Custom templates
  10. Review your configuration data and click Finish. Review configuration data
  11. View the progress of the deployment tasks in the Recent Tasks section.
    Recent tasks
  12. After the deployment tasks are completed, start the VM on which the OVF or OVA template is deployed.
  13. 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 or OVA template is deployed.
  14. On the Register page, set the parameters and click Register to log on to the HBR gateway. The following table describes the required parameters.
    Parameter Description
    AccessKey ID The AccessKey ID and AccessKey secret of the Resource Access Management (RAM) user that is used to access HBR. You can obtain the AccessKey ID and AccessKey secret of a RAM user from your Alibaba Cloud account for which HBR is activated. For more information, see Create an AccessKey for a RAM user.
    AccessKey Secret
    Certificate The certificate that you downloaded from the HBR console. If a VM is shut down for more than five days after you use the certificate to activate the client on the VM, the certificate expires. In this case, you must download a new certificate to reactivate the client.

    After the client is activated, click OK to go to the HBR console.

Step 3: Add a vCenter Server

  1. On the Migration Gateway tab, find the migration gateway and click View in the Actions column.
    View the migration gateway
  2. In the upper-right corner of the Backend vCenter Servers page, click Add vCenter Server.
  3. In the Add vCenter Server panel, set the Server IP Address, Username, and Password parameters. Then, click Create.

    You may fail to add a vCenter Server 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 (.) but not other special characters in the password of the account.

Step 4: Migrate data from the VMware VM

  1. On the vCenter Servers page, find the vCenter Server and click Migrate in the Actions column.
    vCenter
  2. 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 specify this parameter, a random name is specified by default.
    Migration Plan The migration policy. 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 switches to 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 the billing for ECS instead of HBR. For more information, see Billing overview.
  3. In the Select VMs to Migrate step, select the source VM and click Next.
    Select the VM to be migrated
  4. In the Configure ECS Instance step, set the following parameters: VPC, Switch, Instance Type, Instance Family, Storage Type, Security Group, IP Address Type, Assign Public IP, Reboot After Restoration, and Create System Image. Then, click Apply to All VMs or Apply to Current VM.
    Note Make sure that the security group allows outbound data transfer over TCP port 80, TCP port 443, and UDP port 53.
    Create a migration plan
  5. Click Create to start the migration job. On the Migration Plans tab, you can view the progress of the migration job.
    syn
    If incremental migration is enabled, you can perform the following operations after the migration is completed:
    • Click Sync Record in the Actions column of the migration job to view the size of the migrated incremental data 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 after the last migration (for example, 20:21:31, February 21, 2020) to the ECS instance. 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 after the last migration to the ECS instance, for example, 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

For information about how to collect logs, see Collect logs and diagnose network issues.