You should review and update the GenerateArtifactsFlow .yaml before executing the migration. See Customizing a migration plan for more.
The GenerateArtifactsFlow .yaml has the following format:
apiVersion: anthos-migrate.cloud.google.com/v1beta2 kind: GenerateArtifactsFlow metadata: name: generate-artifacts-flow-id namespace: v2k-system annotations: # See below for an example. anthos-migrate.cloud.google.com/always-retake-snapshot: "false" ownerReferences: - apiVersion: anthos-migrate.cloud.google.com/v1beta2 blockOwnerDeletion: true controller: true kind: Migration name: migration-name uid: id spec: intent: "Image | ImageAndData | Data" global: filters: - '- *.swp' - '- /etc/fstab' - '- /boot/' - '- /tmp/*' - '- /var/log/*.log*' - '- /var/log/*/*.log*' - '- /var/cache/*' - '- /var/m4a/*' image: # imageRepository is optional. imageRepository: name: name of image repo spec base: "string" name: "name" systemServices: - name: service-name enabled: true|false - name: service-name enabled: true|false ... dataVolumes: - pvc: name: "name" --or-- spec: PVC inline Spec folders: - /folder-name deployment: appName: app-centos-mini # artifactsRepository is optional. artifactsRepository: spec: bucket: bucket_name credentials: type: gcs secret: secret folder: storage-folder-name/ # To auto-generate the endpoints array, you must first run the # Linux discovery tool on the source VM. endpoints: - port: PORT_NUMBER protocol: PORT_PROTOCOL name: PORT_NAME # Below NFS mounts were detected. Set 'enabled' field to 'true' to automatically # generate respective PV and PVC objects. # Make sure there is connectivity between the NFS server and the target workload deployed cluster. nfsMounts: - mountPoint: MOUNT_POINT exportedDirectory: DIR_NAME nfsServer: IP_OR_DNS mountOptions: - OPTION_1 - OPTION_2 enabled: false|true
Setting the always-retake-snapshot annotation
always-retake-snapshot is set to
true, any previous disk snapshots of the migrated VM are deleted, and new snapshots
are taken, when you apply a GenerateArtifactsTask .yaml
that references this GenerateArtifactsFlow.
This setting can be useful if you want to perform a data sync before the final cut-over
to the migrated workload. For example, you might have additional data to sync from
the source VM since you last generated the migration artifacts.
always-retake-snapshot annotation lets you take a fresh snapshot to contain that data.
Because Migrate for Anthos and GKE optimizes the files needed to be copied,
files which did not change since the last sync are not be copied again.
Only files which have changed are copied.