huawei-cloud-migration-ecs-across-region
MGC Cross-Region Migration
Overview
This skill runs the single-source Huawei Cloud server migration flow implemented in this repository, from precheck to task startup and result validation. It keeps execution deterministic by following the exact command sequence and error-handling rules already implemented in scripts/mgc_migrate.py.
Architecture: Terraform (main.tf) reads terraform.tfvars, maps the values to runtime environment variables, and invokes scripts/run_migration.sh, which calls python3 scripts/mgc_migrate.py. That script signs and issues HTTPS requests directly against the Huawei Cloud IAM, SMS, ECS, and VPC REST APIs (no KooCLI/hcloud involved) to create a migration project, register a migration task, and poll it to completion. Default policy is SMS first; when precheck/runtime indicates an incompatible source (for example SMS.6504), the script switches to rsync phases (full_sync -> incremental_sync -> cutover_sync).
Applicable scenarios:
- Migrating a single on-prem VMware VM or another-cloud ECS instance into Huawei Cloud via Terraform + SMS/rsync (
scripts/mgc_migrate.py). - Migrating an AWS EC2 instance directly into Huawei Cloud via the standalone rsync path (
scripts/run_aws_migration.sh+aws_to_huawei_direct.py/aws_to_huawei_rsync.py), when the source is AWS-specific (EC2 PEM-key auth, AWS CLI/API source discovery) rather than going through SMS. - Source hosts that SMS cannot handle natively, requiring rsync-based staged migration instead.
- Post-migration troubleshooting: SSH/TCP-22 unreachable, cloud-init failures, stale SMS tasks/quota errors.
- Postmortem/experience-capture requests after a migration run.