Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 2.05 KB

accessing-logs-cli.adoc

File metadata and controls

60 lines (48 loc) · 2.05 KB

Accessing logs and custom resource information from the command line interface

You can access logs and information about custom resources (CRs) from the command line interface by using the must-gather tool. You must attach a must-gather data file to all customer cases.

You can gather data for a specific namespace, a completed, failed, or canceled migration plan, or a migrated virtual machine (VM) by using the filtering options.

Note

If you specify a non-existent resource in the filtered must-gather command, no archive file is created.

Prerequisites
  • You must be logged in to the {virt} cluster as a user with the cluster-admin role.

  • You must have the {ocp} CLI (oc) installed.

Procedure
  1. Navigate to the directory where you want to store the must-gather data.

  2. Run the oc adm must-gather command:

    $ {oc} adm must-gather --image={must-gather}

    The data is saved as /must-gather/must-gather.tar.gz. You can upload this file to a support case on the Red Hat Customer Portal.

  3. Optional: Run the oc adm must-gather command with the following options to gather filtered data:

    • Namespace:

      $ {oc} adm must-gather --image={must-gather} \
        -- NS=<namespace> /usr/bin/targeted
    • Migration plan:

      $ {oc} adm must-gather --image={must-gather} \
        -- PLAN=<migration_plan> /usr/bin/targeted
    • Virtual machine:

      $ {oc} adm must-gather --image={must-gather} \
        -- VM=<vm_name> NS=<namespace> /usr/bin/targeted (1)
      1. You must specify the VM name, not the VM ID, as it appears in the Plan CR.