9.2. must-gather 툴 사용

must-gather 툴을 사용하여 MTV CR(사용자 정의 리소스)에 대한 로그 및 정보를 수집할 수 있습니다. 모든 고객 사례에 must-gather 데이터 파일을 첨부해야 합니다.

필터링 옵션을 사용하여 특정 네임스페이스, 마이그레이션 계획 또는 VM(가상 머신)에 대한 데이터를 수집할 수 있습니다.

참고

필터링된 must-gather 명령에서 존재하지 않는 리소스를 지정하는 경우 아카이브 파일이 생성되지 않습니다.

사전 요구 사항

  • cluster-admin 역할의 사용자로 OpenShift Virtualization 클러스터에 로그인해야 합니다.
  • OpenShift Container Platform CLI(oc) 가 설치되어 있어야 합니다.

로그 및 CR 정보 수집

  1. must-gather 데이터를 저장하려는 디렉터리로 이동합니다.
  2. oc adm must-gather 명령을 실행합니다.

    $ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.3.0

    데이터는 /must-gather/must-gather.tar.gz로 저장됩니다. Red Hat 고객 포털에서 해당 지원 사례에 이 파일을 업로드할 수 있습니다.

  3. 선택 사항: 다음 옵션을 사용하여 oc adm must-gather 명령을 실행하여 필터링된 데이터를 수집합니다.

    • 네임스페이스:

      $ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.3.0 \
        -- NS=<namespace> /usr/bin/targeted
    • 마이그레이션 계획:

      $ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.3.0 \
        -- PLAN=<migration_plan> /usr/bin/targeted
    • 가상 머신:

      $ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.3.0 \
        -- VM=<vm_id> NS=<namespace> /usr/bin/targeted 1
      1 1 1
      Plan CR에 표시되는 VM ID 를 지정합니다.