huawei-cloud-mgc-migration-ecs-gcp-to-hw
MGC Cross-Region Migration
Overview
This skill runs the migration flow implemented in this repository, from precheck to task startup and result validation, keeping execution deterministic by following the exact command sequence and error-handling rules already implemented in the migration scripts.
Architecture: Terraform (main.tf) reads terraform.tfvars, maps the values to runtime environment variables, and invokes scripts/run_migration.sh, which currently calls python3 scripts/mgc_sms_existing_target_batch.py (batch existing-target SMS migration). That script signs and issues HTTPS requests directly against the Huawei Cloud IAM, SMS, ECS, VPC, and EVS REST APIs (no KooCLI/hcloud involved) to create migration projects, register migration tasks against pre-existing target servers, and poll them to completion. scripts/mgc_migrate.py remains available for the single-source SMS/rsync workflow, and scripts/repair_boot_via_helper.py performs post-migration boot-disk/SSH repair via a temporary helper ECS. Default policy is SMS first; when precheck/runtime indicates an incompatible source (for example SMS.6504), single-source runs switch to rsync phases (full_sync -> incremental_sync -> cutover_sync).
Applicable scenarios:
- Batch-migrating multiple sources to pre-existing target ECS instances matched by fixed IP.
- Migrating a single on-prem VMware VM, or an external GCP/AWS instance, into Huawei Cloud.
- Resuming a paused/interrupted batch run from checkpoint files.
- Repairing a target ECS that fails to boot or accept SSH after migration.
- Postmortem/experience-capture requests after a migration run.