Logs to collect when opening a case with OpenShift Virtualization Support
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4
- Red Hat OpenShift Virtualization
- 4
- Migration Toolkit for Virtualization (MTV)
- 2
Issue
- What are the basic logs to collect when troubleshooting
OpenShift VirtualizationandMigration Toolkit for Virtualizationcases with Red Hat Support? - A "standard"
must-gatherdoes not capture virtualization-specificCustom Resources (CRs)likeVirtual Machines (VMs)andVirtual Machine Instances (VMIs). As such, which additional logs are needed for investigation?
Resolution
All the steps in this document must be done inside a bastion host (a server that has access to OCP via oc CLI), and the account to be used must have cluster-admin privileges.
For OpenShift Virtualization cases
-
For OpenShift Virtualization must-gather, refer to how to gather logs and data for OpenShift Virtualization?
-
Inspect of the
openshift-cnvnamespace and the namespace where the impacted VM is located are also useful:$ oc adm inspect ns/openshift-cnv ns/[vm_namespace] $ tar cvaf inspect.local.tar.gz inspect.local.XXXX -
To troubleshoot hypervisor issues, generate a sos report of the node.
For Migration Toolkit for Virtualization cases
For MTV issues, collect a "standard" must-gather and MTV specific data:
-
Standard must-gather:
$ oc adm must-gather $ tar cvaf must-gather.tar.gz must-gather.local.XXXX -
MTV CRs:
-
Can be obtained using the MTV specific must-gather image.
-
Or with the following commands:
$ DIR=$(date +%s) $ oc adm inspect plans,providers,migrations,storagemaps,networkmaps -A --dest-dir=mtv-inspect.$DIR $ oc adm inspect ns/openshift-mtv ns/openshift-cnv ns/[target_ns] --dest-dir=mtv-inspect.$DIR $ tar cvaf mtv-logs.tar mtv-inspect.$DIRProvide the
mtv-logs.tarandmust-gather.tar.gzfiles to the case. -
NOTE: If using a Windows client to run the above, use the following:
$ oc adm must-gather $ oc adm inspect plans,providers,migrations,storagemaps,networkmaps -A $ oc adm inspect ns/openshift-mtv ns/openshift-cnv ns/[target_ns]
With a Windows client, it will be needed to tar each inspect and upload it to the case.
Root Cause
To help troubleshoot and debug OpenShift Virtualization and Migration Toolkit for Virtualization issues, gathering the relevant logs is particularly important.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.