Server Migration Center (SMC) containerized migration feature supports migration without downtime. It can containerize servers and business applications from physical machines, mainstream virtualization environments (VMware/Xen/KVM/Hyper-V), and multi-cloud platforms (AWS/Azure/GCP/Tencent Cloud, etc.), generate images and push them to Alibaba Cloud Container Registry (ACR), and finally complete application deployment in Container Service for Kubernetes (ACK), thereby achieving containerized migration of servers and applications.
Introduction
The server-to-container image migration feature has been upgraded to support migration of specific applications from servers to container images, known as application migration mode. It now supports both machine-level migration mode and application migration mode.
SMC containerizes servers and business applications through machine-level migration and application migration, pushes them to Alibaba Cloud Container Registry (ACR), and finally completes application deployment in Container Service for Kubernetes (ACK), thereby achieving containerized migration of servers and applications. The following diagram shows the relationship between related product services and the migration process.
Install the SMC client on the source server platform.
Configure migration settings and start migration. After migration is complete, container images are automatically generated and stored in ACR personal edition. Both machine-level migration mode and application migration mode are supported.
Deploy applications in Container Service for Kubernetes to complete the migration.
Alibaba Cloud Container Registry (ACR) personal edition is designed for individual developers and provides common base image hosting and building services.
Container Service for Kubernetes supports enterprise-level Kubernetes containerized application lifecycle management, allowing you to easily and efficiently run Kubernetes containerized applications in the cloud.
Migration scenarios
Machine-level migration
Supports containerizing the system and all application data from physical servers/VMs/cloud platform servers, generating images, and pushing them to Alibaba Cloud Container Registry (ACR). Suitable for system-level disaster recovery scenarios.
Application migration
Supports containerizing specific applications from physical servers/VMs/cloud platform servers, generating images, and pushing them to Alibaba Cloud Container Registry (ACR). Suitable for microservice containerization transformation scenarios.
ImportantThe application migration feature is in invitational preview. Contact us to submit a request to be added to the whitelist. Supported application versions include:
Java Tomcat
Java Tomee
Java JBoss (standalone mode)
ASP.NET Core 3.1 and ASP.NET 5/6/7/8
Limits
Only x86 architecture Linux operating system servers support migration to container images. Supported operating system versions include:
CentOS
Ubuntu
RedHat
Alibaba Cloud Linux
The application migration feature requires whitelist approval to use. If needed, please contact us. Supported application versions include:
Java Tomcat
Java TomEE
Java JBoss (standalone mode)
ASP.NET Core 3.1 and .NET 5/6/7/8
Only supports migration to image repositories in ACR personal edition instances.
Containerized migration currently does not support data disk migration. The system automatically excludes the
/mnt
directory and all data disk mount points. The target disk generated by migration contains only one default partition, and there is no need to adjust the existing partition structure.If data disk data needs to be migrated to Alibaba Cloud, you can migrate data through FTP, SCP, manual backup to OSS/NAS, and other methods. For more information, see Select a file transfer method and ossutil 1.0.
In application migration mode, do not restart the application process during migration. Changes in the process ID will cause the migration task to fail.
Migration costs
SMC is a free service, but using Alibaba Cloud ECS resources (creating intermediate instances) during migration will incur a small fee. You can learn about billing details in billing.
Containerized migration saves the generated container images to Alibaba Cloud Container Registry personal edition. Personal Edition is designed for individual developers, currently supports supports some regions, and you can use it for free during the public preview period.
The specific costs of deploying applications in Container Service for Kubernetes (ACK) vary depending on the cluster type and cloud product usage.
Migration principles
The SMC service consists of a client and a console. Containerized migration supports machine-level migration mode and application migration mode, with the following principles.
Machine-level migration
Supports containerizing the system and all application data from physical servers/VMs/cloud platform servers, generating images, and pushing them to Alibaba Cloud Container Registry (ACR).
Does not generate analysis reports. After minimal trimming of system and application data, it packages the entire operating system application environment, generating larger container images, but fully preserving the source system runtime environment and supporting multiple applications simultaneously.
Application migration
The application migration feature requires whitelist approval to use. Please contact us to submit a request for whitelist approval. Supported application versions include the following:
Java Tomcat
Java Tomee
Java JBoss (standalone mode)
ASP.NET Core 3.1 and ASP.NET 5/6/7/8 versions
Supports containerizing specific applications from physical machines/VMs/cloud platform servers, generating images, and pushing them to Alibaba Cloud Container Registry (ACR).
Generates analysis reports for specified applications and packages specified application data accordingly, producing smaller container images.
The migration principles are explained as follows:
Download and install the SMC client on the source server (if you import the information about a migration source by using CLI or the SMC console, the system will automatically download and install the SMC client without user intervention).
Run the SMC client on the source server. The SMC client will register and report the source server information to the SMC service through the SMC service domain.
The SMC service creates a temporary intermediate instance and opens ports 8080 and 8703 in the security group.
The intermediate instance uses two data disks to complete data migration and generate container images. Intermediate data disk 1 is used to store source server data, and intermediate data disk 2 is used to store data for generating container images.
The SMC client establishes communication by connecting to port 8080 of the intermediate instance and transfers disk applications and data from the source server to the data disk of the intermediate instance through port 8703 of the intermediate instance.
For application migration, the application and related data are transferred to the data disk of the intermediate instance.
The SMC service creates container images from the disk data of the intermediate instance and uploads them to Alibaba Cloud Container Registry (ACR).
For application migration, the application and application-related data are made into container images based on environment variables and startup commands, and uploaded to Alibaba Cloud Container Registry (ACR).
Go to the Container Service for Kubernetes (ACK) console to deploy applications and complete the migration.
Migration impacts
Before migration, understand the following items, as shown in the table below.
Impact item | Description |
Intermediate instance | Do not perform operations on the intermediate instance during the migration. To prevent migration failures, do not stop, start, restart, or release the intermediate instance or change the billing method of the intermediate instance during the migration process. After the migration is complete, SMC automatically releases the intermediate instance. Note
Formore information, see How it works. |
IP address | The IP address will change after migration. If your business involves IP address configuration, please modify domain name resolution, ICP filing, etc. after migration. |
Underlying hardware | After the migration, the underlying hardware may change, and the application licenses that are associated with the underlying hardware may become invalid. Perform checks based on your business requirements. |
Prerequisites
Server Migration Center (SMC) is activated. If you are using SMC for the first time, you need to activate related permissions, prepare migration networks, back up data, and perform other operations. For more information, see Before you begin.
You can first connect your data center and Alibaba Cloud VPC Connect a data center to a VPC through VPN Gateway, Express Connect circuit, or Smart Access Gateway for private network migration. If you need to migrate servers across international regions, the migration speed may be slow due to unstable public network environments. You can refer to the guide Evaluate migration time and test transmission speed.
Migration operations
Step 1: Make preparations
Step 2: Import migration source
Step 3: Configure the migration
Verify migration results
When the Migration Status is Completed, it indicates that the migration was successful.
After successful migration, an Alibaba Cloud container image is generated, and you can deploy container applications using this container image. Specific operations are as follows:
In the Actions column of the migration source, click Deploy Application. The system will redirect you to the ACK cluster list page.
Select an existing ACK cluster or create an ACK cluster. For specific operations, see Create a cluster.
Enter the cluster, select Workloads > Deployments from the left navigation pane, and click Create From Image to create an application. Select the container image generated from the migration. For more information, see Create a stateless application by using a Deployment.
Startup command example for machine-level migration mode
When deploying applications in an ACK cluster, you need to add scripts related to starting the source service on the source server and open ports in the application lifecycle or application YAML file to start the service. Supplement the script according to your actual situation. An example of a YAML with CMD added is as follows:
spec: containers: - args: - | cd /www/server/panel && chmod +x /www/server/panel/init.sh && echo 3 | sh init.sh && tail -f /dev/null command: - /bin/sh - '-c' image: 'registry-vpc.cn-hangzhou.aliyuncs.com/zi***h/sa***:v1'
Instructions for application migration mode
You can use
netstat -lptn
to view the application service ports on the source server and enable port mapping when deploying applications in ACK.
After migrating the server, you need to verify and validate the data to ensure data integrity and correctness. For specific operations, see How do I check my system after I migrate a Linux server? .
NoteIf a domain name has been bound to the source server, the public IP address of the server is changed after the migration. In this case, you must resolve the domain name to the new public IP address of the server. For more information, see Add an A record for a website domain name.
When the Migration Status is Error, it indicates that the migration task has encountered an error. In this case, you need to troubleshoot the issue and retry:
In the Actions column, click Troubleshoot and fix the issue according to the error code and error message prompts. For more information, see SMC FAQ and Troubleshooting.
After fixing the issue, click Retry Migration in the Actions column. The migration task will continue from where it left off.
ImportantIf the intermediate instance is released, you need to migrate again. For more information, see FAQ about Server Migration Center (SMC).