All Products
Search
Document Center

Server Migration Center:Migrate servers over a VPC

Last Updated:Dec 25, 2025

If your server can connect to a virtual private cloud (VPC) in an Alibaba Cloud region from an on-premises data center, a virtual machine (VM) environment, or another cloud host, you can use Server Migration Center (SMC) to migrate the server over the VPC. This method is faster and more stable than migrating over the public network, which improves migration efficiency.

Scenarios

  • Scenario 1: You need to migrate a source server to Alibaba Cloud, but the server cannot access the public network. However, the data center where the source server resides has a public network egress.

    In this scenario, you can connect the source server to a VPC on Alibaba Cloud using VPN Gateway, an Express Connect circuit, or Smart Access Gateway. Then, you can set up a proxy server for the source server and access SMC through the proxy to migrate the server over a private network.

  • Scenario 2: A source server has public network access and can be migrated over the public network using SMC, but you want to improve the migration speed because the transfer rate is limited.

    In this scenario, you can connect the source server to a VPC using VPN Gateway, an Express Connect circuit, or Smart Access Gateway. Then, when you migrate the server using SMC, you can select the private network transfer method, which is more efficient than the public network transfer method.

Migration process

The following figure illustrates the server migration process over a private network.adasd566Process overview:

  1. Download the SMC client and install it on the source server.

  2. Run the SMC client on the source server and use a proxy server to import the source server into the SMC console. For more information about proxy servers, see Forward proxies.

  3. In the SMC console, create a migration job, set the network mode to private network transfer, and then start the job.

  4. SMC creates resources based on the migration job configuration and migrates data from the source server to Alibaba Cloud over the connected VPC.

  5. While the job is running, the proxy server receives instructions from the SMC server on behalf of the source server. For example, if the migration job fails, the SMC server stops the migration and sends an error log to the SMC client.

Forward proxies

A forward proxy is a server that acts as an intermediary between a client and a server. If a client cannot access a server directly over the public network, it can send requests through the proxy. The proxy forwards the requests to the server, receives the responses, and returns them to the client.正向代理

A forward proxy has the following benefits:

  • Allows clients to access data resources on the public network.

  • Acts as a cache for frequently accessed public data. When a client requests the data again, it can be retrieved directly from the cache. This speeds up resource access.

  • Controls client access through authorization, which improves security.

  • Hides client information when clients access public resources. The proxy server also saves a record of client access.

Prerequisites

  • You have connected your on-premises data center to an Alibaba Cloud VPC using VPN Gateway, an Express Connect circuit, or Smart Access Gateway. For more information, see Connect a VPC to an on-premises data center or another cloud.

  • Ports 8703 and 8080 are open in the firewall of your on-premises data center to ensure smooth data transfer between the migration source and the intermediate instance.

  • The source server and the proxy server can communicate with each other over the network, and the proxy server can access the public network.

Procedure

  1. Create a proxy server and open port 3128.

    • (Recommended) Create an Alibaba Cloud Elastic Compute Service (ECS) instance. We recommend that you use an ECS instance that runs CentOS 7 or a later version. For more information, see Create an instance using the wizard.

      By default, an ECS instance can connect to the private endpoints of SMC. Make sure that the following domain names are accessible.

      • https://<region-id>.axt.aliyun.com. For example, the domain name for the China (Hangzhou) region is https://cn-hangzhou.axt.aliyun.com.

      • https://smc.vpc-proxy.aliyuncs.com.

    • Create a server outside Alibaba Cloud.

      Ensure that the proxy server can access the public endpoints of SMC:

      • https://smc-service.aliyuncs.com

      • https://smc.aliyuncs.com

  2. Install the Squid proxy software in the connected VPC.

    1. You can use a third-party remote connection tool, such as WinSCP, to connect to the Linux server.

      This topic uses the CentOS 7.9 operating system as an example.

    2. Run the following command to stop the firewall.

      systemctl stop firewalld
      setenforce 0
    3. Run the following command to install the Squid proxy software.

      yum -y install squid
    4. Run the following command to check whether the rules in the /etc/squid/squid.conf configuration file include the CIDR block of the source server (which is the allowed CIDR block).

      cat /etc/squid/squid.conf

      image

      • If it is included, go to the next step.

      • If it is not included, perform the following steps:

        1. Run the following command to edit the Squid configuration file.

          vim /etc/squid/squid.conf
        2. Press the i key to add the CIDR block that you want to allow in the position shown in the following figure. For example, to allow all IP addresses, add acl localnet src 0.0.0.0/0.

          image

          Important

          By default, Squid uses port 3128 as the listener port for the HTTP proxy server. To change the port number, modify the http_port 3128 configuration item.

        3. After the configuration is complete, press the Esc key, enter :wq, and then press Enter to save the file and exit.

    5. Run the following command to start the Squid service.

      systemctl start squid
      systemctl enable squid
  3. Import the migration source using the SMC client. For more information, see Import a migration source using the SMC client.

    After you download and decompress the SMC client, you must first set the proxy server information in the client configuration file. Then, you can run the client to import the migration source. The following steps describe how to set the proxy server information on a Linux system:

    1. In the go2aliyun_client directory (or the /root/smc directory if you are using the VMware agentless connector), run the following command to open the client_data file.

      This topic uses the General-purpose Edition of the SMC client for 64-bit Linux as an example.

      cd go2aliyun_client_linux_x86_64 # If you use the VMware agentless connector, switch to /root/smc.
      vim client_data
    2. Find the proxy configuration item as shown in the following figure.proxy

    3. After the ip_port configuration item, set the IP address and port of the proxy server.

      The following example shows the configuration:

      "proxy": {
          "ip_port": "172.168.XX.XX:3128",
          "user_pwd": ""
      }

      After the configuration is complete, press the Esc key, enter :wq, and then press Enter to save the file and exit.

    4. (Optional) If the proxy server ECS instance cannot access the public endpoint of SMC (for example, because it does not have a public IP address), run the following command to specify the private endpoint of SMC.

      ./go2aliyun_client --rerun --useaxt=cn-hangzhou

      Replace cn-hangzhou with the region ID of the proxy server.

  4. In the SMC console, migrate the server. For more information, see Step 2: Configure migration settings.

    When you configure the migration, set Network Mode to Private Network Transfer and specify the VPC and vSwitch to use.

    image