Server Migration Center (SMC) allows you to migrate VMware VMs without agents. This way, the migration does not modify the settings of the operating system of the migration source or occupy the computing resources of the operating system in the migration source. This can effectively eliminate your concerns about server security and performance. This topic describes how to use SMC to migrate VMware VMs without agents.
You can also migrate VMware VMs by using agents. For more information, see Migrate a server to an ECS instance.
Migration scenarios
(Recommended) Migrate a server to an ECS custom image
If you have not purchased an ECS instance, you can migrate a server to an ECS custom image and then manually use the custom image to create an ECS instance.
Migrate a server to an ECS instance
If you have purchased an ECS instance and the configurations of the ECS instance such as the storage and operating system match those of the source server to be migrated, you can migrate the server to the ECS instance.
WarningAfter the migration, the original data in the destination ECS instance is cleared. The data on the source server is not affected. We recommend that you do not use this method if the destination ECS instance contains important data.
Environment requirements
The following table describes the environment requirements that vary based on the Open Virtual Appliance (OVA) template.
OVA template | Configuration of a Server Migration Connector | Environment requirement for deploying a Server Migration Connector on vCenter Server | Environment requirement for deploying a Server Migration Connector on VMware ESXi |
SMC VMware Connector 6.7 OVA |
|
|
|
SMC VMware Connector 8.0 OVA |
|
|
|
Required account permissions for vCenter Server and VMware ESXi
If you deploy a Server Migration Connector on vCenter Server, the account used to log on to VMware ESXi and the account used to log on to the VMware VM to be migrated must be granted the following permissions:
Datastore > Browse datastore
Datastore > Low-level file operations
Host > Local operations > Create virtual machine
Virtual machine > Change Configuration > Acquire disk lease
Virtual machine > Change Configuration > Toggle disk change tracking
Virtual machine > Provisioning > Allow virtual machine download
Virtual machine > Provisioning > Allow disk access
Virtual machine > Provisioning > Allow read-only disk access
Virtual machine > Snapshot management > Create snapshot
Virtual machine > Snapshot management > Remove Snapshot
If you deploy a Server Migration Connector on VMware ESXi, you must use an administrator account to log on to VMware ESXi.
Prerequisites
The preparations for the migration are complete. For more information, see Before you begin.
Important data is backed up to an image, snapshot, or storage device other than the destination instance to prevent data loss.
The following operations are completed if you want to migrate a server to an ECS instance:
Back up the important data on the destination ECS instance to an image, snapshot, or storage device other than the instance.
The operating system of the destination ECS instance is the same as that of the source server.
The number of data disks attached to the destination ECS instance is greater than or equal to that of data disks attached to the source server. Otherwise, the disk data of the source server cannot be migrated to the destination ECS instance. In this case, you must attach more data disks to the ECS instance. For more information, see Attach a data disk.
The capacity of the system disk and data disks attached to the ECS instance is larger than or equal to that of the system disk and data disks attached to the source server. If you want to shrink the system disk and data disks attached to the source server, make sure that the capacity of the system disk and data disks attached to the destination ECS instance is larger than or equal to the size of the data on the system disk and data disks attached to the source server. Otherwise, data of the source server cannot be fully migrated to the destination ECS instance. In this case, you must scale up the data disks and system disk. For more information about how to resize a cloud disk, see Overview.
Procedure
Step 1: Create a Server Migration Connector
SMC provides OVA templates that are used to create a Server Migration Connector. In this step, download an OVA template, import the OVA template to your vCenter Server or VMware ESXi, and then deploy a Server Migration Connector by using the OVA template.
Open Virtualization Format (OVF) is an open standard that provides an open source, secure, effective, extensible, and portable format for packaging and distributing software for VMs. An OVF package generally consists of .ovf, .mf, .cert, .vmdk, and .iso files. OVA is a single file distribution of the OVF file package.
VMware vSphere is a virtualization platform that transforms data centers into aggregated computing infrastructures that include CPU, storage, and network resources. VMware vSphere manages these infrastructures as a unified operating environment and provides you with tools to manage the data centers that are added to the environment. The two core components of VMware vSphere are VMware ESXi and vCenter Server. VMware ESXi is a virtualization platform that is used to create and run VMs and virtual devices. vCenter Server is a service that manages multiple hosts connected on a network and pools host resources.
Download and extract an OVA template
Go to the Import Migration source page. In the Description section, download an OVA template based on the version of your VMware ESXi or vCenter Server and decompress the downloaded package.
Deploy a Server Migration Connector
Import the extracted OVA template to your VMware ESXi or vCenter Server and deploy a Server Migration Connector by using the OVA template. A Server Migration Connector can be deployed on vCenter Server or VMware ESXi. You can select the deployment environment based on your business requirements.
(Recommended) Deploy a Server Migration Connector on vCenter Server
Import the OVA template of a Server Migration Connector to vCenter Server and deploy the Server Migration Connector by using the OVA template. In this example, vCenter Server 6.7 is used. To deploy a Server Migration Connector on vCenter Server, perform the following steps:
Log on to vCenter Server. Find the vCenter Server host, right-click the name of the host, and then select Deploy OVF Template....
On the Deploy OVF Template page, follow the configuration wizard to create a VM.
Select the OVA template and click NEXT.
Select Local file and click Browse... to select the extracted OVA template file.
Specify the VM name and installation location, and click NEXT.
Enter the VM name in the Virtual machine name field and select the installation location.
Select a computing resource and click NEXT.
Confirm the template information and click NEXT.
Select the storage and click NEXT.
Select the destination network and click NEXT.
Confirm the configurations and click FINISH.
After the Server Migration Connector is deployed, right-click the Server Migration Connector and choose Power > Power On.
Configure the network environment to ensure that the Server Migration Connector can connect to port 443 of vCenter Server and port 902 of the ESXi host on which the VMware VM to be migrated resides. The preceding port numbers are the default port numbers.
On the Summary tab, obtain the IP addresses of the Server Migration Connector.
Deploy a Server Migration Connector on VMware ESXi
Import the OVA template of a Server Migration Connector to VMware ESXi and deploy the Server Migration Connector by using the OVA template. In this example, VMware ESXi 7.0 is used. To deploy a Server Migration Connector on VMware ESXi, perform the following steps:
Log on to VMware ESXi. In the left-side navigation pane, right-click Virtual Machines and select Create/Register VM.
In the Select creation type step, select Deploy a virtual machine from an OVF or OVA file and click Next.
In the Select OVF and VMDK files step, enter a VM name, click Click to select files or drag/drop, select the downloaded OVA template, and then click Next.
In the Select storage step, click Next.
In the Deployment options step, click Next.
In the Ready to complete step, click Finish.
Wait until the VM is deployed. The IP address of the Server Migration Connector is displayed in the General Information section. By default, Dynamic Host Configuration Protocol (DHCP) is configured in the network settings of the Server Migration Connector. You can modify the network settings based on your business requirements.
Configure the network environment to ensure that the Server Migration Connector can connect to port 443 and port 902 of VMware ESXi. The preceding port numbers are the default port numbers.
Step 2: Import the information about the VMware VM to be migrated
Log on to the Server Migration Connector, configure the VMware VM to be migrated, and then import the information about the VMware VM to be migrated by running commands.
Configure the VMware VM to be migrated
Log on to the Server Migration Connector.
In this example, an SSH remote connection is established. Perform the following steps:
On a terminal from which the Server Migration Connector is accessible over a network, run the following command to connect to the Server Migration Connector. The default username is
root
, and the default password is left empty.ssh root@<IP address of the Server Migration Connector>
ImportantFor account security, we recommend that you change your password at the earliest opportunity.
Run the following command to check whether the time on the Server Migration Connector is accurate:
date
If the time is inaccurate, you can run the ntpdate command to calibrate the time. In this topic, the time server at
0.asia.pool.ntp.org
is used.ntpdate 0.asia.pool.ntp.org hwclock --systohc
WarningIf the time is inaccurate, the information about the migration source fails to be imported.
Run the following commands to configure the VMware VM to be migrated on your vCenter Server or VMware ESXi:
NoteIn this step, you can obtain all the hosts and VMs in the environment. If you already know the names of the hosts or VMs that you want to configure, skip this step and directly specify the names of the hosts or VMs. For more information, see the "How do I migrate the specified VM or a VM on the specified host by performing VMware migration without agents?" section of the FAQ topic.
cd /root/smc bash configure.sh
Configure the IP address, username, password, and port number of vCenter Server or VMware ESXi in sequence. We recommend that you use the default port 443. Sample command output:
[root@localhost ~]# cd /root/smc [root@localhost smc]# ./configure.sh Please input vCenter/ESXi IP:192.168.XX.XX Please input username:administr****@vsphere.local Please input password: Please input port number(default 443):443
The "Connect success" message is displayed, and a list of hosts is generated. Enter the ID of the host on which the VMware VM to be migrated resides. You must select a host that is in the Connected state. If an asterisk (*) is displayed in the Connected column of a host, the host is connected.
Test to connect the vCenter/ESXi... Connect success! save to ./vmware_connect_config.json ========Aliyun SMC VMware Configure Tool 1.2======== Connect success! Getting host list progress: [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>100.00%]time: 1.0s Host List: ------------------------------------------------------------------------ ID Name Version Connected 1 192.168.XX.XX 6.7.0 * 2 192.168.XX.XX 7.0.3 * ------------------------------------------------------------------------ Please input the ID of Host(input 0 to exit):1
After you enter a host ID, a list of VMs is generated. Enter the ID of the VMware VM to be migrated. You must select a VM that is in the Connected state. If an asterisk (*) is displayed in the Connected column of a VM, the VM is connected.
Test to connect 192.168.XX.XX Connect success! Getting vm list progress: [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>100.00%]time: 2.3s VM List of 192.168.XX.XX: ------------------------------------------------------------------------ ID Name Connected CBT Add 1080 test1 * 1084 win16bios * 1011 centos7-bios-2 * 3008 centos7-uefi * 2001 centos-hw10 * ------------------------------------------------------------------------ Please input the ID of VM to be migrated (input 0 to exit):1084
Select the architecture of the VM to be migrated.
-------------------------------------------------------------- 0 x86_64 1 i386 2 arm64 -------------------------------------------------------------- Please choose the architecture:0
If the operating system recognized by the system is incorrect, enter the number that corresponds to the actual operating system in the list. For example, you can enter 10 to select the Windows Server 2016 operating system.
NoteThe preset operating system when a VM is created on vCenter Server may be incorrect. You must confirm the operating system of the VM.
------------------------------------------------------------------------ 0 CentOS 1 Ubuntu 2 SUSE 3 OpenSUSE 4 Debian 5 RedHat 6 Others Linux 7 Windows Server 2003 8 Windows Server 2008 9 Windows Server 2012 10 Windows Server 2016 11 Windows Server 2019 12 Windows Server 2022 ------------------------------------------------------------------------ Current OS [Apple macOS 10.14 (64-bit)] is invalid, please choose the OS of VM:10
If an asterisk (
*
) is displayed in theAdd
column of the VM, the VM is added to the migration list.VM List of 192.168.XX.XX: -------------------------------------------------------------- ID Name Connected CBT Add 481 TEST_CLONE_1 * 389 win16bios * * 338 hanjun_test_001 * 386 Aliyun_SMC_Agent_6.5 * 393 win16uefi -------------------------------------------------------------- Please input the ID of VM to be migrated (input 0 to exit):0
If you want to migrate multiple VMs, enter the IDs of the VMs to be migrated.
If you want to migrate only one VM, enter 0 and return to the host list. If you want to migrate VMs on other hosts, repeat the preceding steps. Otherwise, enter 0 to exit the configuration.
Optional. Run the following command to view the generated vmware_connect_config.json and vmware_migrate_config.json files:
ll
A command output similar to the following one is returned:
[root@localhost smc]# ll total 5588 drwxrwxrwx. 4 root root 239 Oct 17 17:27 Check -rwxrwxrwx. 1 root root 6884 Oct 14 15:54 client_data -rwxrwxrwx. 1 root root 151 Oct 14 17:47 configure.sh drwxrwxrwx. 2 root root 72 Nov 1 01:15 dist -rwxrwxrwx. 1 root root 38878 Oct 14 15:54 EULA drwxrwxrwx. 2 root root 4096 Oct 17 17:27 Excludes -rwxrwxrwx. 1 root root 5633792 Oct 31 19:43 go2aliyun_client -rwxrwxrwx. 1 root root 146 Oct 14 15:54 user_config.json -rw-r--r--. 1 root root 263 Nov 10 18:05 vmware_connect_config.json -rw-r--r--. 1 root root 18406 Nov 10 18:07 vmware_migrate_config.json
Import the information about a migration source by using the SMC client
After you log on to the Server Migration Connector, start the SMC client and import the information about the VMware VM to be migrated to the SMC console by running commands.
When the SMC client is running, do not perform operations on the VMware VM to be migrated, such as shutting down the VMware VM, restarting the VMware VM, and creating or deleting snapshots for the VMware VM. If you create or delete snapshots for the VMware VM to be migrated, the migration may fail. If the migration fails, run the ./dist/migrate_configure command in the /root/smc home directory of the SMC client to obtain the VM configurations again. Then, run the ./go2aliyun_client --jobtype=3
command to start a new SMC client.
Log on to the SMC console.
In the left-side navigation pane, choose
.On the Agentless Migration of VMware VMs page, click Import Migration source.
On the Import Migration source page, configure the parameters.
The following table describes the parameters.
Parameter
Description
Migration Source Type
The type of the migration source. Select VMware VM from the drop-down list.
Import Method
The method that is used to import the information about the migration source. By default, Use Server Migration Connector to Import VMware VM is selected and cannot be changed.
Description
The description of the procedure for importing the information about a migration source.
Obtain the SMC access token or AccessKey pair.
Obtain the SMC access token: recommended. An SMC access token consists of an access token ID and an access token code. If you do not have an SMC access token, go to the Import Migration source page in the SMC console. In the Description section, click Generate and copy the generated access token ID and access token code.
Obtain the AccessKey pair: An AccessKey pair of an Alibaba Cloud account consists of an AccessKey ID and an AccessKey secret. If you have not created an AccessKey pair, create one first. For more information, see Obtain an AccessKey pair.
Log on to the Server Migration Connector and run the following commands to import the information about the VMware VM:
chmod +x ./go2aliyun_client ./go2aliyun_client --jobtype=3
Enter the SMC access token or AccessKey pair as prompted. In this example, the SMC access token is used. The returned information is similar to the following content. If the
Import Source Server [s-bp14zd35128xgjdbh****] Successfully
message is displayed, the information about the VMware VM to be migrated is imported.On the Agentless Migration of VMware VMs page in the SMC console, view the status of the migration source in the Real-time Migration Status column.
If the status of the migration source is Online, the information about the migration source is imported.
If the migration source is in another state, the information fails to be imported. In this case, troubleshoot the failure based on the following solutions and import the information about the migration source again:
Troubleshoot the failure based on the message displayed in the SMC console or the log file in the directory in which the SMC client is installed. By default, the SMC client is installed in the C:\smc directory.
Refer to the FAQ about Server Migration Center (SMC) and Troubleshooting topics for troubleshooting.
Step 3: Create and start a migration job
In the SMC console, create and start a migration job as prompted. Valid values of the Destination Type parameter when you create the migration job:
(Recommended) ECS Image: You can migrate the VMware VM to an ECS image and then create an ECS instance by using the image.
ECS Instance: You can migrate the VMware VM to an ECS instance that you have purchased. The storage system and operating system of the VMware VM must be compatible with those of the destination ECS instance.
WarningAfter a migration job is created, all original data is deleted from the destination ECS instance. However, the system does not delete data from the VMware VM. If the destination ECS instance contains important data, we recommend that you do not directly migrate the VMware VM to the destination instance.
Log on to the SMC console.
In the left-side navigation pane, choose
.Find the migration source that you want to manage and click Start Migration in the Actions column.
Configure the parameters and click Create.
Configure the basic parameters described in the following table.
Parameter
Description
Example
Migration Job Name
The name of the migration job.
VMware migration without agents
Job Description
The description of the migration job.
test
Destination Type
Required. The type of the destination. Select a destination type based on the actual migration scenario.
ECS Image
Migrate the source server to an ECS image and then use the image to create an ECS instance.
If you set the Destination Type parameter to ECS Image, the following parameters are displayed:
Destination Region: the Alibaba Cloud region to which you want to migrate the source server. This parameter is required. For more information about regions, see Regions and zones.
Image Name: the name of the destination custom image generated by SMC for the source server.
ECS Instance
Migrate the source server to an existing ECS instance whose configurations such as storage and operating system match those of the source server.
If you set the Destination Type parameter to ECS Instance, the following parameters are displayed:
Destination Region: the Alibaba Cloud region to which you want to migrate the source server. This parameter is required. For more information about regions, see Regions and zones.
Destination Instance: the ECS instance that is used as the destination instance.
ECS Image
Execution Method
The mode in which the migration job is run. Valid values:
Migrate Now: The migration job starts immediately after it is created. This is the default value.
Migrate Later: The migration job automatically starts at the specified time after it is created.
NoteThe earliest time that you can specify to run a migration job is 10 minutes after the job is created.
Create Only: After the migration job is created, you must click Run in the Actions column to manually start the migration job.
Keep the default setting
Automatic Incremental Synchronization
Specifies whether SMC automatically synchronizes incremental data of the migration source to Alibaba Cloud. By default, this feature is disabled.
NoteIf you set the Destination Type parameter to ECS Instance and configure the Destination Instance parameter, this feature is not supported.
If you enable this feature, you must configure the following parameters:
Synchronization Interval: the interval at which SMC automatically synchronizes incremental data to Alibaba Cloud.
Maximum Reserved Images: the maximum number of images that can be retained during incremental data synchronization.
SMC automatically synchronizes incremental data to Alibaba Cloud at the specified interval. For more information about the best practices for incremental data synchronization, see Migrate incremental data from a VMware VM without an agent.
Keep the default setting
Configure the disk parameters described in the following table.
Parameter
Description
Example
Destination Disk Size (GiB)
The disk configurations of the destination instance. Configure the following parameters based on your business requirements:
System disk
The size of the system disk of the destination instance. Unit: GiB. Valid values: 20 to 2048. The size of the destination system disk must be larger than the amount of data on the source system disk. For example, if the total size of the source system disk is 400 GiB but the size of data stored on this disk is only 100 GiB, you must set this parameter to a value greater than 100.
NoteThe default value of this parameter is the size of the source system disk. We recommend that you retain the default value or specify a greater value.
Data disk
Data Disk <N>: the size of the data disk of the destination instance. Unit: GiB. Valid values: 20 to 32768.
If you select the Data Disk <N> check box, a destination data disk is generated.
<N>
indicates the serial number of the data disk.The size of the destination data disk must be larger than the amount of data on the source data disk. For example, if the total size of the source data disk is 500 GiB but the size of data stored on this disk is only 100 GiB, you must set this parameter to a value greater than 100.
NoteIf your migration source has no data disk or no data disk is attached to the migration source, the Data Disk parameters are not displayed. For more information, see the "Why are the data disk parameters of a migration source not displayed in the Create Migration Job dialog box? What do I do?" section of the FAQ topic.
Keep the default setting
Optional. Click Expert Mode to configure advanced parameters such as Network Type and Compression Ratio. The following table describes the advanced parameters.
Parameter
Description
Example
Network Type
The type of network that is used to migrate data from the source server to the intermediate instance. By default, data is migrated over the Internet. During the migration, SMC creates an intermediate instance that connects to a vSwitch in a VPC. If you select Public Network, a public IP address is assigned to the intermediate instance.
Public Network (default value)
SMC migrates data to the intermediate instance over the Internet. If you select Public Network, make sure that the source server can access the Internet. You can determine whether to specify a VPC and a vSwitch based on your business requirements.
If you specify a VPC and a vSwitch, SMC creates an intermediate instance that connects to the specified VPC and vSwitch.
If you do not specify a VPC or vSwitch, SMC creates an intermediate instance that connects to the VPC and vSwitch automatically created by the system.
VPC
SMC migrates data to the intermediate instance over a VPC. If you select VPC, you must specify a VPC and a vSwitch and make sure that the source server can connect to the VPC.
NoteIf your server in a data center, your VM, or your third-party cloud server can connect to a VPC, we recommend that you select this network type to migrate data. Compared with migration over the Internet, migration over a VPC is more efficient and stable. You can use VPN Gateway, Express Connect, or SAG to connect a migration source to a VPC. For more information, see Connect a data center to a VPC.
Keep the default setting
Transmission Speed Limit
The maximum bandwidth for data transmission during the migration. Unit: Mbit/s.
Keep the default setting
Compression Ratio
The compression ratio of the data to be migrated. Set the compression ratio based on your business requirements.
If the bandwidth is limited, a high compression ratio improves the transmission efficiency.
If a high bandwidth is available, we recommend that you do not compress data. Data compression consumes CPU resources of the migration source.
Valid values: 0 to 10. Default value: 7. A value of 0 indicates that data is not compressed.
Keep the default setting
Checksum Verification
Specifies whether to verify data integrity by using a checksum. By default, this feature is disabled. If you enable this feature, data integrity is ensured, but transmission speed may be reduced.
Keep the default setting
License Type
The license type. Valid values:
Alibaba Cloud: the Microsoft license provided by Alibaba Cloud. For more information, see the What Windows Server licenses does Alibaba Cloud support? section of the "FAQ" topic. This is the default value.
BYOL: SMC allows you to bring your own license (BYOL). You can bring your own Microsoft license or register with Red Hat Cloud Access. For more information, see the Is BYOL supported when I migrate servers by using SMC? section of the "FAQ" topic.
Keep the default setting
Image Check
Specifies whether to enable the image check feature. The image check feature checks whether an image is valid and whether the image can be used to create full-featured ECS instances. You can use the image check feature when you create a server migration job or an agentless migration job for a VMware VM.
This feature helps you identify potential issues in images or ECS instances after the migration job is complete, and provides solutions to the identified issues. This helps you improve the success rate of starting ECS instances.
For more information, see Configure image check.
Keep the default setting
Migration Job Tags
The tags that you specify for the migration job. Each tag contains a key and a value. You can use tags to query and manage migration jobs. For more information, see Use tags to manage migration sources and migration jobs and Use tags to implement fine-grained access control.
NoteYou can specify up to 20 tags for a migration job.
Keep the default setting
Intermediate Instance Type
The type of the intermediate instance. Select an intermediate instance type based on your business requirements. This parameter is available only if you set the Destination Type parameter to ECS Image.
If you specify an instance type, SMC creates an intermediate instance of the specified type. If the specified instance type is unavailable, you cannot create the migration job.
If you do not specify an instance type, SMC automatically creates an intermediate instance.
ImportantDo not stop, start, restart, or release the intermediate instance during the migration to prevent migration failures.
In the message that appears, read the migration notes and click Got It.
On the Agentless Migration of VMware VMs page, view the real-time status of the migration job.
The amount of time required for data transmission is subject to factors such as the data size of the migration source and network bandwidth. Wait until the migration job is complete.
To pause the migration job when the migration job is in the Synchronizing state, click Pause in the Actions column.
Optional. To view details about the migration, perform the following steps:
Step 4: (Optional) Migrate another VMware VM
If you specify multiple VM IDs when you configure the VMware VM to be migrated, you can close the SMC client process after the current VMware VM is migrated, and then migrate another VMware VM. To migrate another VMware VM, perform the following steps:
Log on to the Server Migration Connector. For more information, see the Configure the VMware VM to be migrated section in Step 2 of this topic.
Press
Ctrl+C
to exit the current SMC client process that is running. Then, run the following command to close the SMC client process:./dist/finish 1
Run the following command to start a new SMC client. Then, migrate another VMware VM.
./go2aliyun_client --jobtype=3