9.2. 使用 must-gather 工具
您可以使用 must-gather
工具来收集 MTV 自定义资源 (CR) 的日志和信息。您必须将 must-gather
数据文件附加到所有客户问题单。
您可以使用过滤选项为特定命名空间、迁移计划或虚拟机 (VM) 收集数据。
注意
如果您在过滤的 must-gather
命令中指定不存在的资源,则不会创建存档文件。
先决条件
-
您必须以具有
cluster-admin
角色的用户身份登录到 OpenShift Virtualization 集群。 -
已安装 OpenShift Container Platform CLI (
oc
)。
收集日志和 CR 信息
-
进入存储
must-gather
数据的目录。 运行
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
。您可以将此文件上传到红帽客户门户网站中的支持问题单中。可选:使用以下选项运行
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