Using the Migration Tool

The migration tool can run only on a Linux server that has Python installed, and the server must be able to access your cloud and ping the configured service endpoints.

Precautions

  1. If you enable access logging for classic load balancers, these load balancers cannot be migrated. If you want to migrate these load balancers, access logs may be lost.
  2. After the migration, virtual IP addresses of the newly created shared load balancers will be different from those of original classic load balancers. Load balancing will be interrupted for a short time if you choose to delete the classic load balancers. If a domain name is configured for a load balancer, you need to change the virtual IP address mapped to the domain name.
  3. If you have configured security group rules, you need to configure a whitelist of IP addresses that are allowed to access each listener after private network classic load balancers are migrated to shared load balancers.

Preparations

  1. Install Python.
  2. Install the pip.
  3. Check whether Requests has been installed.
    • If it has been installed, go to 4.
    • If it has not been installed, run the following command to install Requests:
      pip install requests
  4. Download the tool code.
  5. Configure user.cfg.

Script Execution

Run the following command to execute the script:

python migrate.py
  • By default, all classic load balancers will be migrated.
  • --lb: (Optional) This parameter is followed by the ID of the classic load balancer to be migrated, for example, python migrate.py --lb XXXX. If there are multiple IDs, separate them using spaces, for example, python migrate.py –lb 'XXXX1 XXXX2'.
  • --dry-run: (Optional) This parameter only checks whether a classic load balancer can be migrated, and no load balancers will be created or deleted. You can use either python migrate.py --dry-run or python migrate.py --lb XXXX --dry-run.
  • After the script is successfully executed, two files will be generated, output and logger.log. output is a migration report, and logger.log is the log generated during script execution.