Skip to content

Latest commit

 

History

History
51 lines (44 loc) · 1.4 KB

canceling-migration-cli.adoc

File metadata and controls

51 lines (44 loc) · 1.4 KB

Canceling a migration from the command-line interface

You can use the command-line interface (CLI) to cancel either an entire migration or the migration of specific virtual machines (VMs) while a migration is in progress.

Canceling an entire migration
  • Delete the Migration CR:

    $ {oc} delete migration <migration> -n <namespace> (1)
    1. Specify the name of the Migration CR.

Canceling the migration of specific VMs
  1. Add the specific VMs to the spec.cancel block of the Migration manifest:

    Example YAML for canceling the migrations of two VMs
    $ cat << EOF | {oc} apply -f -
    apiVersion: forklift.konveyor.io/v1beta1
    kind: Migration
    metadata:
      name: <migration>
      namespace: <namespace>
    ...
    spec:
      cancel:
      - id: vm-102 (1)
      - id: vm-203
      - name: rhel8-vm
    EOF
    1. You can specify a VM by using the id key or the name key.

      The value of the id key is the managed object reference, for a VMware VM, or the VM UUID, for a {rhv-short} VM.

  2. Retrieve the Migration CR to monitor the progress of the remaining VMs:

    $ {oc} get migration/<migration> -n <namespace> -o yaml