Como monitorar uma migração
Use a ferramenta migctl
ou o Console do Google Cloud
para ver o progresso de uma migração após executar a migração.
migctl
Como listar migrações
Quando você tem mais de uma migração em andamento, execute migctl migration list
para ver um status rápido de todas elas de uma só vez.
migctl migration list NAME STATUS CURRENT-OPERATION my-migration Completed GenerateArtifacts another-migration Running GenerateMigrationPlan
Como ver o status
Veja o status da migração com migctl migration status
.
Quando o status mostrar que a migração foi concluída, passe para
a próxima etapa do processo.
migctl migration status my-migration NAME CURRENT-OPERATION PROGRESS STEP STATUS AGE my-migration GenerateArtifacts [1/1] ExtractImage Running 12m2s
Como ver o status detalhado
Para ver um status mais detalhado e eventos de migração, além de avisos e erros, use a sinalização -v
:
migctl migration status my-migration -v
apiVersion: anthos-migrate.cloud.google.com/v1beta2 kind: Migration metadata: annotations: anthos-migrate.cloud.google.com/initial-intent: Image creationTimestamp: "2020-07-13T17:48:28Z" generation: 1 labels: migration: 30ae4f80 migration-name: my-migration migration-namespace: v2k-system migration-uid: 30ae4f80-fdb5-4049-95fc33926 name: my-migration namespace: v2k-system resourceVersion: "18992" selfLink: /apis/anthos-migrate.cloud.google.com/v1beta2/namespaces/v2k-system/migrations/my-migration uid: 30ae4f80-fdb5-4049-fc33926 spec: osType: Windows sourceSnapshot: sourceId: v2k-windows-test-2019 sourceProvider: my-ce-src-win status: artifacts: deploymentFiles: bucket: velos-auto-1-migration-artifacts type: gcs windowsArtifactsFile: v2k-system-my-migration/artifacts.zip currentOperation: GenerateArtifacts currentOperationSubSteps: - description: ExtractImage status: Completed flowId: 30ae4f80 intent: Image resources: sourceSnapshot: name: source-snapshot-3f80-fdb5-40499fc33926 status: computeEngine: sourceDisks: - name: v2k-windows-test-2019 zone: europe-west1-c volumes: v2k-windows-happy-flow-test-2019: copiedDisk: endTime: "2020-07-13T10:49:59.058-07:00" name: v2k-windows-test-2019-disk-9fdced96-e4f5-1f7a810e0 operationName: operation-12535938-50d-72da2cc2-55a00121 operationType: insert progress: 100 startTime: "2020-07-13T10:48:56.458-07:00" status: DONE zone: europe-west1-b pvc: claimPhase: Bound created: false csiPvc: false name: v2k-windows-test-2019-disk-9fdced96-e4f5-81adf3435 snapshot: endTime: "2020-07-13T10:48:53.835-07:00" name: v2k-windows-test-2019-europe-west1-c-snapedd80ddca operationName: operation-159466251458b7edd7-63d270b9-59daefff operationType: createSnapshot progress: 100 startTime: "2020-07-13T10:48:35.264-07:00" status: DONE ready: true windowsDiscovery: name: windowsdiscovery-e4f80-fdb5-40d81a9fc33926 status: discover: job: name: discover-51df463f-a4b7-4813d84a88b379 status: Completed status: Completed windowsDiscoveryResult: name: windowsdiscovery-30f80-fdb50-d81a9fc33926 windowsGenerateArtifacts: name: migrationplan-51df463f-a4b7-483d84a88b379 windowsGenerateArtifacts: name: migrationplan-51df463f-a4b7-4851-a88b379 task: name: my-migration-mpchq status: artifacts: artifactsZip: artifacts.zip repositoryBucket: velos-auto-1-migration-artifacts repositoryFolder: v2k-system-my-migration/ extract: job: name: extract-9f-e6fc-c-9d251331770b status: Completed status: Completed status: Completed Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 10m Job discover-92def542-e10b-4817-947b3a Created pod: discover-92def542-e10b-4817-947b3a Normal Scheduled 10m Pod discover-92def542-e10b-4817-949d-2fe0mlv Successfully assigned v2k-system/discover-92def542-e10b-4817-949d to gke-smg-c luster-nodepool-6ff-bkbx Normal Pulling 9m53s Pod discover-92def542-e10b-4817-947b3a Pulling image "eu.gcr.io/velos-auto-1/v2k-windows-discover:test3" Normal Pulled 6m20s Pod discover-92def542-e10b-4817-947b3a Successfully pulled image "eu.gcr.io/velos-auto-1/v2k-windows-discover:test3" Normal Created 6m20s Pod discover-92def542-e10b-4817-947b3a Created container discover-92def542-e10b-4817-949d-2fe0mlv Normal Started 6m9s Pod discover-92def542-e10b-4817-947b3a Started container discover-92def542-e10b-4817-949d-2fe0mlv
CRD
Use kubectl
para aguardar a migração "my-migration" contendo a condição de status do tipo "Pronto".
kubectl wait -n v2k-system --for=condition=Ready migrations.anthos-migrate.cloud.google.com/my-migration
Console
Para monitorar uma migração usando o Console do Google Cloud:
Abra a página "Migrate to Containers" no Console do Google Cloud.
Clique na guia Migrações para exibir uma tabela com as migrações disponíveis.
Visualize a coluna Status na linha da migração pretendida para ver o status.
Clique no Nome da migração na linha para a migração pretendida. A guia Detalhes da migração é aberta. Clique na guia Monitoramento para ver os detalhes do status ou na guia Eventos para ver os eventos de migração.