How to Use the Alibaba Cloud Migration Tool

Alibaba Cloud
7 min readMar 22, 2018

--

By Kingson Jebaraj, Alibaba Cloud Tech Share Author and Alibaba Cloud MVP.

Cloud, despite its ubiquity, is still an emerging technology with vast innovations across multiple industries. Owing to its flexibility and advanced security model, organizations have already started to move most of their IT workloads to the cloud. Some of the high-level reasons to move to cloud are listed below:

• Fast and efficient deployment
• Less or no capital investment
• Reliability, scalability, sustainability & resource pooling
• Pay as you go, with no monthly commitment
• Highly automated with utility based system
• On-demand service

Seamless integration is what we all expect when it comes to information technology, especially with migration. However, this is easier said than done. Cloud migration is fairly complicated because it involves so many elements, from picking a suitable operating system (OS) to selecting the best geographical region for our deployments. Migration also involves some standard processes and considerations as there is no small feat.

Migration strategy differs from case to case basis, however as a whole, cloud migration should be based on best practices from previous examples. An effective migration strategy should maintain a reliable, real-time migration, with less or zero down time. Migration can be broadly categorized into physical to virtual (cloud migration), virtual to virtual (multi-cloud), and virtual to physical (hybrid cloud). Migration can have any combination of these categories.

In this article, we are focused on physical to virtual and virtual to virtual migration. Here the target is going to be Alibaba Cloud platform. This whole process involves Alibaba tools for image conversion, OSS for storage, & some third-party tools to synchronize the data in real time.

For a successful migration, the standard process and procedures below are applicable for most of organizations.

• Cloud ready assessment (involves infra assessment to decide which workloads can be moved to the cloud)
• Migration kick-off meeting (listing down servers, application, down time preparation, cutover and other requirements)
• Creating a backup plan — A migration plan is incomplete without a backup plan. There is always a non-zero probability for errors to happen in a migration process, and damages are often irreversible.
• Schedule migration, notify users if there is any down time expected during cutover.
• Make a checklist of functions.
• Post migration testing before moving to production, to ensure all are met in terms of functions, operations.

Cloud migration can be perform in two ways: application level migration and virtual machine (VM) migration. The choice is based on the applications running on virtual/physical servers; we may need to plan which one will be best suitable for migration.

Application Migration

During migration assessment, we need to check how many applications can support real time migration. For example, Microsoft Exchange can use native DAG; SQL replication tools can be used for database mirroring.

Irrespective of any application and platform, it is always better to get an insight from application experts. Typically, a migration expert will create similar infrastructure as the source on the target platform (such as Alibaba Cloud), and then establish a connection using VPN/MPLS to create site-site connection. Some applications can simply be migrated using public IP without VPN.
Do real time replication/migration using native methods and switchover. Switchover/cutover requires several steps to be performed by administrators like changing DNS, Routing configuration, Firewall customization and so on.

VM Migration (Image Migration)

If there is no available method for application migration, or if the application level migrated is complicated, VM migration is an alternative. Also known as image migration, VM migration is the best option for any organization to simplify the migration process.

This method is sometimes simply referred to as migrating from a platform to another platform. Alibaba Cloud runs on the KVM/XEN platform, so we need to ensure that it has all required drives to support automation, licensing, and all other cloud dependencies.

There are few migration scenarios listed below:

• On premise (IDC) to Alibaba Cloud
• Traditional virtualization platform to Alibaba Cloud
• Other public cloud to Alibaba Cloud
• One region of Alibaba Cloud to another region of Alibaba Cloud

Alibaba Cloud Migration Tool

Irrespective of any source platform Alibaba Cloud has a tool called Alibaba Cloud Migration Tool (Cloud Migration Tool) to perform migration to create ECS instances. Alibaba Cloud invests resources into various categories of image migration to carry out the process with ease and effectiveness.

Before you use the Alibaba Cloud Migration Tool, you need to consider the following:

• The on-premises server can access the Internet for uninterruptedly transferring data to Alibaba Cloud ECS console.
• The system time of the on-premises server is synchronized with the real time. Otherwise, an error indicating abnormal TimeStamp is recorded in the migration log file.
• To enable all the server configuration successfully after the migration, we recommend that you install cloud-init for your on-premises servers.

For on-premises servers running Windows OS

• The go2aliyun_client.exe and Rsyncbinrsync.exe programs are not restricted by firewall on the server.
• The system start loader is normal.
• Run Alibaba Cloud Migration Tool as an administrator.

For on-premises servers running Linux OS

• The go2aliyun_client program is not restricted by firewall on the server.
• The Rsync library has been installed.

oCentOS: Run yum install rsync –y.
oUbuntu: Run apt-get install rsync –y.
oDebian: Run apt-get install rsync –y.
oOther distributions: See the installation documents of the distributions on their official website.

• The Xen or Kernel-based Virtual Machine (KVM) driver is installed. For more information about how to install a KVM driver, see install virtio driver.
• SELinux must has been deactivated. You can temporarily deactivate SELinux by running setenforce 0.
• Run Alibaba Cloud Migration Tool as a root user.
• If the kernel of your on-premises Linux servers is too old and the version of GRUB (GRand Unified Bootloader) is earlier than 1.9. You may update the boot loader GRUB to a version later than 1.9.

The migration Process as follows:

• Request for migration tool from this link
• After approval, decompress the folder at source and modify the JSON Script as needed
• JSON Script needs to have the value of AccessID, Secret Key, Region ID, Image name, System disk size & Data disk
• For more details refer to this link and refer to below screenshots to validate the process.

Sample Migration Process

Below are the steps performed to migrate simple web server from Azure to Alibaba cloud.

(Operating System : Windows Server 2016)

1.Extract the folder and locate JSON->Open with->Notepad

2.Modify as below: (Refer to the link for more parameters). To create and obtain new access key refer here

{
"access_id": "ENTER_YOUR_ACCESS_ID",
"secret_key": "ENTER_YOUR_SECRET_KEY",
"region_id": "me-east-1",
"image_name": "KingsonWS",
"system_disk_size": 60,
"platform": "",
"architecture": "",
"data_disks": [],
"bandwidth_limit": 0
}

3.Save the file and run go2aliyun_client tool as an administrator

4.You may notice that it creates VPC, Vswitch, Security group all by itself.

5.During migration you can see that it creates new instance named “INSTANCE_FOR_GOTOALIYUN
6.Post sync the same will be exported with image name that you specified in JSON and the same instance will be released.
7.Below is the screenshot for new webserver image that was migrated from Azure to Alibaba

Source before migration

Image created after migration

Target site after migration

After completing the migration, you still need to check whether the migration is 100% successful. To do this, you need to run some tests as listed below.

Post migration tasks:

• Ensure all services are functioning as expected.
• Make comparison using functions check list.
• Ensure that the Windows license is activated by running slmgr.vbs /dlv command in command prompt.
• Ensure to do all DNS redirection to Alibaba Cloud instance public IP (If required).
• Make sure to restart servers from cloud portal and monitor the events to confirm if any issues needs an attention.

Considerations:

• This migration tool supports data disks as well.
• It doesn’t support incremental sync. If your application requires real-time replication, you may have to consider using native or third-party tools.
• The same image can also be used to enable Hybrid DR environment. It requires SID correction in active directory environment before joining to the domain.

Please note that region level migration within same Alibaba Cloud account can be achieved by taking a snapshot and sharing the copy to target region

Conclusion:

You are always recommended to get advice from the experts, to ensure the most suitable approach to make migration as seamless as possible.

Reference:

https://www.alibabacloud.com/blog/How-to-Use-the-Alibaba-Cloud-Migration-Tool_p541801?spm=a2c41.11318738.0.0

--

--

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com