migctl reference

migctl is a command-line tool for setting up and managing a Migrate for Anthos migration environment on Google Cloud:

For a step-by-step introduction to key migctl commands and to make a simple migration, see Quickstart.

migctl

Command Description
completion Generates bash completion scripts
doctor Check Migrate for Anthos deployment status and related configuration
help Help about any command
migration Migration operations.
setup Install or uninstall Migrate for Anthos
source Manage references to the migration source.
version Print version for Migrate for Anthos, and for migctl

Synopsis

migctl [-h]

Flags

-h, --help
Help for this command.

Notes

migctl included in Cloud Shell

migctl completion

Generate bash completion scripts.

To load completion run . <(migctl completion bash)

To configure your bash shell to load completions for each session add the following to your ~/.bashrc or ~/.profile: . <(migctl completion bash)

Synopsis

migctl completion {bash | zsh}

Positional arguments

{bash | zsh}
The shell to use.

Flags

-h, --help
Help for this command.

migctl doctor

Check Migrate for Anthos deployment status and related configuration.

Synopsis

migctl doctor

Flags

-h, --help
Help for this command.

See also

Installing Migrate for Anthos

Examples

Response for a functioning Migrate for Anthos deployment.

migctl doctor
[✓] Deployment

migctl help

Provide help on the migctl tool.

Use "migctl [command] --help" for more information about a command.

Synopsis

migctl help

Flags

-h, --help
Help for this command.

migctl migration

Command Description
migration create Create a migration plan.
migration delete Delete a migration plan.
migration generate-artifacts Create artifacts for a given migration.
migration get Get a migration plan specification.
migration get-artifacts Get artifacts for the migration, such as Deployment/StatefulSet spec YAML and Dockerfile.
migration list List migrations.
migration status Get migration plan status.
migration update Update a migration plan.

migctl migration create

Create a migration plan.

A migration plan defines the specifics of the migration, including the source platform, VM ID, project name, and so on.

The generated migration plan file is copied to the machine where the command is run -- it is not applied to the processing cluster. If you like, you can edit the file before using it in migration.

Synopsis

migctl migration create migration-name --source source-name --vm-id source-vm-id [--intent {ImageAndData | Image | Data}]  [--os-type type] [--no-comments] [--project project-name] [--zone source-vm-zone]

Positional arguments

migration-name
Name to give this migration.

Flags

-i, --intent {ImageAndData | Image | Data}
The aspect of the VM to migrate.
--no-comments
Generate YAML file without comments.
--os-type type
Specify the OS as Linux (default) or Windows.
-p, --project project-name
Override default Compute Engine source VM project.
-s, --source source-name
Name of the source created with migctl source create.
-v, --vm-id source-vm-id
Source VM ID. The form of this value will vary depending on the source platform specified in source-name. See the command examples for more.
-z, --zone source-vm-zone
Override default Compute Engine source VM zone.
-h, --help
Help for this command.

Examples

Create a migration plan for Compute Engine VM, for both creating an image and exporting a data volume.

migctl migration create --source my-ce-src --vm-id my-id --intent ImageAndData

Create a migration plan for VMware VM for creating an image.

migctl migration create --source my-vmware-src --vm-id My_VMware_VM --intent Image

Create a migration plan for an AWS VM for exporting a data volume.

migctl migration create --source my-aws-src --vm-id i-1234567890abcdef0 --intent Data

See also

Creating a migration

migctl migration delete

Delete a migration plan.

This command deletes a migration you created with migctl migration create.

Synopsis

migctl migration delete migration-name 

Positional arguments

migration-name
Name of the migration to delete.

Flags

-h, --help
Help for this command.

migctl migration generate-artifacts

Create artifacts for a given migration.

For example, this command creates an image, data-volume, Dockerfile, deployment YAML, and so on.

Synopsis

migctl migration generate-artifacts migration-name

Positional arguments

migration-name
Name of the migration for which to create artifacts.

Flags

-h, --help
Help for this command.

See also

Executing a migration

migctl migration get

Get a migration plan specification.

Synopsis

migctl migration get migration-name  [--output-file migration-yaml-file]

Positional arguments

migration-name
Name of the migration whose plan to get.

Flags

--output-file migration-yaml-file
Output YAML file of migration plan specification.
-h, --help
Help for this command.

migctl migration get-artifacts

Get artifacts for the migration, such as Deployment/StatefulSet spec YAML and Dockerfile.

Synopsis

migctl migration get-artifacts migration-name [--output-directory directory-path] [--overwrite]

Positional arguments

migration-name
The migration for which to get artifacts.

Flags

--output-directory directory-path
Output directory path. Default is "."
--overwrite
Overwrite existing local files.
-h, --help
Help for this command.

See also

Reviewing generated deployment files

migctl migration list

List migrations.

Synopsis

migctl migration list [--all-namespaces] [--watch]

Flags

-A, --all-namespaces
List migrations across all namespaces.
-w, --watch
Watch for changes.
-h, --help
Help for this command.

See also

Monitoring a migration

migctl migration status

Get migration plan status.

Synopsis

migctl migration status migration-name  [--verbose] [--watch]

Positional arguments

migration-name
Name of the migration to get status for.

Flags

-v, --verbose
Verbose status.
-w, --watch
Watch for changes.
-h, --help
Help for this command.

See also

Monitoring a migration

migctl migration update

Update a migration plan.

Synopsis

migctl migration update migration-name --file yaml-filename

Positional arguments

migration-name
Name of the migration to update.

Flags

--file yaml-filename
YAML file containing the updated migration plan.
-h, --help
Help for this command.

See also

Monitoring a migration

migctl setup

Command Description
setup install Install Migrate for Anthos on the current cluster.
setup uinstall Uninstall Migrate for Anthos from a cluster.

migctl setup install

Install Migrate for Anthos on the current cluster.

Synopsis

migctl setup install [--cos-runtime] [--gkeop --json-key service-account-json] [--node-selectors string] [--tolerations string] [--version version-number]

Flags

--cos-runtime
Install runtime support on workload clusters with Container-Optimized OS nodes.
--gkeop
Install Migrate for Anthos for GKE on-prem.
--json-key service-account-json
JSON key file for the service account with the necessary permissions to install Migrate for Anthos for GKE on-prem. See Creating a service account for an on-prem migration for more.
--node-selectors string
Node selector for the components deployed by Migrate for Anthos in the form: LABEL1=VALUE1,LABEL2=VALUE2,..... See Installation options for more.
--tolerations string
Tolerations for the components deployed by Migrate for Anthos in the form: KEY1=VALUE1:EFFECT1,KEY2=VALUE2:EFFECT2,..... See Installation options for more.
--version version-number
Migrate for Anthos version to install.
-h, --help
Help for this command.

Examples

Install Migrate for Anthos on a processing cluster.

migctl setup install

Install runtime support on workload clusters with COS nodes.

migctl setup install --cos-runtime

See also

Installing Migrate for Anthos

migctl setup uninstall

Uninstall Migrate for Anthos from a cluster.

Synopsis

migctl setup uninstall [-f]

Flags

-f
Force uninstalling while migrations are in progress.
-h, --help
Help for this command.

Examples

Uninstall Migrate for Anthos.

migctl setup uninstall

Force uninstalling Migrate for Anthos while migrations are in progress.

migctl setup uninstall --force

See also

Uninstalling Migrate for Anthos

migctl source

Perform operations related to a migration source.

Command Description
source create Add a migration source to the processing cluster.
source delete Delete a migration source from the processing cluster.
source list List migration source configurations in the processing cluster.

migctl source create

Add a migration source to the processing cluster.

Command Description
source create aws Add AWS as a migration source to the processing cluster.
source create azure Add Azure as a migration source to the processing cluster.
source create ce Add Compute Engine as a migration source.
source create local-vmware Add VMware as a migration source to an on-prem processing cluster.
source create vmware Add VMware as a migration source to the processing cluster.

See also

Adding a migration source

migctl source create aws

Add AWS as a migration source to the processing cluster.

Synopsis

migctl source create aws name --cloud-details cloud-details --manager-address manager-address --cloud-extension cloud-extension

Flags

-d, --cloud-details
Cloud Details name of the source, as configured in Migrate for Compute Engine
--cloud-extension
ID or name of the Migrate for Compute Engine Cloud Extension
--manager-address
Address of the Migrate for Compute Engine (formerly Velostrata) Manager server
-h, --help
Help for this command.

Examples

Add AWS as a migration source.

migctl source create aws my-aws-src--manager-address 1.2.3.4 --cloud-extension my-cloud-extension --cloud-details my-aws-cloud-details

See also

Adding a migration source

migctl source create azure

Add Azure as a migration source to the processing cluster.

Synopsis

migctl source create azure name --cloud-details cloud-details --manager-address manager-address --cloud-extension cloud-extension

Positional arguments

name
A name to give the source.

Flags

-d, --cloud-details cloud-details
Cloud Details name of the source, as configured in Migrate for Compute Engine
--cloud-extension cloud-extension
ID or name of the Migrate for Compute Engine Cloud Extension
--manager-address manager-address
Address of the Migrate for Compute Engine (formerly Velostrata) Manager server
-h, --help
Help for this command.

Examples

Add Azure as a migration source.

migctl source create azure my-azure-src--manager-address 1.2.3.4 --cloud-extension my-cloud-extension --cloud-details my-azure-cloud-details

See also

Adding a migration source

migctl source create ce

Add Compute Engine as a migration to the processing cluster.

Synopsis

migctl source create ce name --project project [--json-key service-account-json ]

Positional arguments

name
A name to give the source.

Flags

--project project
Default project for the Compute Engine source type.
--json-key service-account-json
JSON key file for the service account used to create the Compute Engine source. See Creating a service account for using Compute Engine as a migration source for more.
-h, --help
Help for this command.

Examples

Add Compute Engine as a migration source.

migctl source create ce my-ce-src --project myproject --zone us-west1-a

See also

Adding a migration source

migctl source create local-vmware

Add VMware as a migration source to an on-prem processing cluster.

Synopsis

migctl source create local-vmware name --vc vcenter --user user --password pass
[flags]

Positional arguments

name
A name to give the source.

Flags

--vc host
Specifies the vCenter DNS name or vCenter IP address.
--username user
The username for a user that has permission to access the vCenter.
--password pass
The password for a user that has permission to access the vCenter.
-h, --help
Help for this command.

Examples

Add VMware as a migration source.

migctl source create local-vmware local-vmware-src --vc '1.2.3.4' --username 'admin' --password 'pass1'

See also

Adding a migration source

migctl source create vmware

Add VMware as a migration source to the processing cluster.

Synopsis

migctl source create vmware name --manager-address manager-ip --cloud-extension extension-name 

Positional arguments

name
A name to give the source.

Flags

--cloud-extension extension-name
ID or name of the Migrate for Compute Engine Cloud Extension.
--manager-address manager-ip
Address of the Migrate for Compute Engine management server
-h, --help
Help for this command.

Examples

Add VMware as a migration source.

migctl source create vmware my-vmware-src --manager-address 1.2.3.4 --cloud-extension my-cloud-extension

See also

Adding a migration source

migctl source delete

Delete a migration source from the processing cluster.

Synopsis

migctl source delete source-name [-f] 

Positional arguments

source-name
The name of the source to delete. This is the name you specified when you created the source with migctl source create.

Flags

-f
Ignore errors and force the deletion.
-h, --help
Help for this command.

Examples

Delete the migration source.

migctl source delete my-source

Attempt to force deletion of a source.

migctl source delete my-source -f

migctl source list

List migration source configurations in the processing cluster.

Synopsis

migctl source list

Flags

-h, --help
Help for this command.

migctl version

Print the version for Migrate for Anthos and for migctl.

Synopsis

migctl version

Flags

-h, --help
Help for this command.