A migration plan is the generated configuration for transforming a source VM into a containerized workload with Migrate for Anthos (M4A). It gives you a point to review and adjust the transformation before generating deployment artifacts. Most plans need no changes, but you can remove unneeded VM components or add configuration. section 15.4.3 section 15.0
A practical migration sequence is:
- Prepare a processing cluster and register a migration source. For a Compute Engine source, the example uses a service account with compute.viewer and compute.storageAdmin bindings and a JSON key. section 15.4.2
- Create a migration by specifying its name, source, VM ID, and intent. The console workflow also asks for the VM OS type. M4A then generates the plan. section 15.4.2 section 15.4.3
- Inspect the plan before generating artifacts. Use `migctl migration get my-migration` in the CLI or the console’s Options menu to review and edit it; `migctl migration status my-migration -v` provides detailed progress information. section 15.4.2 section 15.4.3
- Generate and retrieve the artifacts. These can include a Dockerfile, container image, Deployment specification YAML, migration plan YAML, and artifact links YAML. Check the deployment specification separately for how the workload will be exposed. section 15.4.3 section 15.4.2
Compute Engine VM to container
For an Apache VM, `migctl migration create my-migration --source http-source --vm-id http-server-demo --intent Image` creates the migration and its plan. After inspection, `migctl migration generate-artifacts my-migration` produces artifacts for deployment. In the example, a LoadBalancer Service is added to the generated `deployment_spec.yaml` to make the migrated web server reachable on port 80. section 15.4.2
Windows workloads follow a similar plan-review sequence, but artifact handling differs: retrieve the plan, edit its YAML if needed, and upload the change with `migctl migration update my-migration`. The generated Windows artifacts are downloaded from Cloud Storage and used to build and push a container image before deployment to GKE. section 15.4.4
