9.2. 使用 must-gather 工具
您可以使用 must-gather 工具来收集 MTV 自定义资源 (CR) 的日志和信息。您必须将 must-gather 数据文件附加到所有客户问题单。
您可以使用过滤选项为特定命名空间、迁移计划或虚拟机 (VM) 收集数据。
注意
如果您在过滤的 must-gather 命令中指定不存在的资源,则不会创建存档文件。
先决条件
-
您必须以具有
cluster-admin角色的用户身份登录到 OpenShift Virtualization 集群。 -
已安装 Red Hat OpenShift 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.5.7
$ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.5.7Copy to Clipboard Copied! Toggle word wrap Toggle overflow 数据被保存为
/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.5.7 \ -- NS=<namespace> /usr/bin/targeted
$ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.5.7 \ -- NS=<namespace> /usr/bin/targetedCopy to Clipboard Copied! Toggle word wrap Toggle overflow 迁移计划:
oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.5.7 \ -- PLAN=<migration_plan> /usr/bin/targeted
$ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.5.7 \ -- PLAN=<migration_plan> /usr/bin/targetedCopy to Clipboard Copied! Toggle word wrap Toggle overflow 虚拟机:
oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.5.7 \ -- VM=<vm_id> NS=<namespace> /usr/bin/targeted
$ oc adm must-gather --image=registry.redhat.io/migration-toolkit-virtualization/mtv-must-gather-rhel8:2.5.7 \ -- VM=<vm_id> NS=<namespace> /usr/bin/targeted1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- 指定在
PlanCR 中显示的 VM ID。